Home > Articles

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

Q&A

  1. Can a stateless session bean maintain state?

  2. 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.

  3. In which tier should client state be maintained?

  4. 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.

  5. How does the container recognize the session bean type?

  6. The EJB container recognizes the session bean type from the bean's deployment descriptor(ejb-jar.xml).

  • + Share This
  • 🔖 Save To Your Account