Q&A

Q1:What files do I need to write for a message-driven bean?
A1: Unlike other enterprise beans, message-driven beans consist of enterprise bean class and deployment descriptors. They do not provide home or component interfaces.
Q2:Can a message-driven bean contain a state that's specific to a client?
A2: A message-driven bean can't contain a state that is specific to a client. However, the instance variables of the message-driven bean instance can contain a state across the handling of client messages. Examples of such a state include socket connections, database connections, and references to EJBObject.

Get Sams Teach Yourself EJB in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.