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/572625#572625
--------------------------------------------------------------
aravind kopparthi wrote:
can you tell me when timeout method gets called by the container in this case process
method in singletonBean calls a method on SLSBean's process method. at this time
slsbeans instance gets activated by the container and give's that instance to this
method call , during this process when a timout gets triggered doesn't it get a
reference to another slsb instance to process?
Like I have been saying previously,
the second instance of SLSB will only be created if the first instance is in use. So one
the 1st timeout on the Singleton bean, you invoke on a SLSB. This results in the creation
of the 1st instance of SLSB. *If* the next timeout invocation happens on the singleton
bean before the 1st invocation on that SLSB has completed, *only then* will a new instance
be created for the SLSB.
As you saw from your logs, the 2nd timeout invocation on the singleton is *not* happening
before the 1st invocation finishes. This is due to the fact that you have (by default)
configured your singleton bean to be Lock.WRITE type. Change the lock attribute to
Lock.READ on that method. That will allow the 2nd timeout on the Singleton to happen while
the first invocation on the SLSB is in progress (assuming the SLSB.process is a long
running job compared to the timeout interval).
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/572625#572625]
Start a new discussion in EJB3 at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]