[jboss-user] [EJB3] - Re: SLSB pool size is always one in jboss 6.0 CR1 using ejb 3.1

jaikiran pai do-not-reply at jboss.com
Tue Nov 23 12:08:57 EST 2010

jaikiran pai [http://community.jboss.org/people/jaikiran] created the discussion

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

To view the discussion, visit: http://community.jboss.org/message/572533#572533

> aravind kopparthi wrote:
> thanks for the comments. but in my example Singleton is not trying to do any WRITES is  it? all the business logic is in SLSBean that this singleton delegates to and that to slsb call that singleton calls is  @Asynchronous slbs.process(). 
The EJB3 container has no way to know what you have in your impl of that method. Unless you explicitly specify as a READ lock, it's by default treated for WRITE lock.

> aravind kopparthi wrote:
> my question what is that i need to configure in the interseptors some where where SLSB injected in Singleton are not treaded like regular beans and handle with multiple pool instances when ever a method is invoked by the container ( timeout) or by the calller.

Just mark that timeout method on the singleton to be READ lock type:

import javax.ejb.Lock;
import javax.ejb.LockType;
public void process(javax.ejb.Timer timer) {

If you want READ lock to apply to all business methods in that singleton bean, then specify that annotation on the EJB bean class level.

Reply to this message by going to Community

Start a new discussion in EJB3 at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20101123/999be0b7/attachment.html 

More information about the jboss-user mailing list