Developing stateful session beans
You can create a bean implementation class for a stateful
session bean as introduced in the Enterprise JavaBeans™ (EJB) 1.0
specification and significantly simplified by the EJB 3.0 specification.
A stateful bean is a type of session bean that is intended for use
by a single client during its lifetime and maintains a conversational
state with the client that is calling it.
Developing singleton session beans
Create a bean implementation class for a singleton session
bean, introduced by the Enterprise JavaBeans (EJB)
3.1 specification. The EJB container initializes only one instance
of a singleton session bean, and that instance is shared by all clients.
Because a single instance is shared by all clients, singleton session
beans have special life cycle and concurrency semantics.