Skip to main content

Adam Bien: Do We Need Stateless Session Bean Pooling?

Adam Bien asks Do We Need Stateless Session Bean Pooling?:

Pooling is still mentioned in the EJB 3.1 / Java EE 6 specification. The question is: do you have to care? The answers are: 1. Pooling is not a requirement, it is just an assumption: "...Since stateless session bean instances are typically pooled, the time of the client’s invocation of the create method need not have any direct relationship to the container’s invocation of the PostConstruct/ejbCreate method on the stateless session bean instance..."[EJB 3.1 spec, page 78]. 2. EJB container can either pool the instances or create a new one for each request...

Community: