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;
@Lock(LockType.READ)
@Timeout
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
[
http://community.jboss.org/message/572533#572533]
Start a new discussion in EJB3 at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]