JBoss Community

Re: SLSB pool size is always one in jboss 6.0 CR1 using ejb 3.1

created by jaikiran pai in EJB3 - View the full discussion

The EJB3.1 spec says (for singleton bean concurrency):

 

If the concurrency locking attribute is not specified, it is assumed to be Lock(WRITE). The absence of a concurrency attribute specification on the bean class is equivalent to the specification of Lock(WRITE)on the bean class.

 

 

Furthermore, the spec says:

 

If the container invokes a method associated with a Read lock, any number of other concurrent invocations on Read methods are allowed to access the bean instance simultaneously.

 

If the container invokes a method associated with a Write lock, no other concurrent invocations will be allowed to proceed until the initial Write method’s processing completes. A concurrent access attempt that is not allowed to proceed due to locking is blocked until it can make forward progress.

 

Your @Singleton bean doesn't specify any explicit @Lock. So it's treated by default as WRITE lock and that explains the behaviour you are seeing.

Reply to this message by going to Community

Start a new discussion in EJB3 at Community