Session Beans

A session bean is a type of enterprise bean. It is created by a client and usually exists only for the duration of a single client-server session.

Session beans are useful for describing interactions between other beans (taskflow) and for implementing particular tasks. They do not represent data in the database, but they can access data, so we can use session beans to read, update, and insert data in a business process. Session beans access data that spans concepts, is not shared, and is usually read-only. Session beans contain business logic, and entities model persistent data. There are three types of session beans: stateless, stateful and singleton.