Q&A

Q1:Can a stateless session bean maintain state?
A1: Yes. A stateless session beans can contain non-client specific state across client-invoked methods. For example, states such as socket connection, database connections, reference to an EJBObject, and so on can be maintained. However, they cannot have state specific to any client across client-invoked methods.
Q2:In which tier should client state be maintained?
A2: In a typical transactional J2EE application, client state should be maintained in the EJB tier. A stateful session bean is used to manage workflow and maintain state during client interactions.
Q3:How does the container recognize the session bean type?
A3: The EJB container recognizes the session bean type from the bean's deployment ...

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.