Session Beans

Session beans typically represent business logic functions and are not stored in the database. A session bean can still access the database, however.

A session bean might or might not hold onto data between method invocations. If a session bean keeps data, it is referred to as a stateful session bean. If the bean doesn't keep any data, it is referred to as a stateless session bean.

Each client has its own separate session bean, which is one reason the bean is called a session bean. You can think of the bean as representing a client's session with the EJB container. For example, many online shopping sites have the concept of a shopping cart. You click an item to add it to your shopping cart and when you're ready to check out, the ...

Get Special Edition Using Java™ 2 Enterprise Edition 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.