[EJB 3.0] - Stateful Bean - Timeout put bean in pool
by Huber Maier
mikka2010 [http://community.jboss.org/people/mikka2010] created the discussion
"Stateful Bean - Timeout put bean in pool"
To view the discussion, visit: http://community.jboss.org/message/568236#568236
--------------------------------------------------------------
Hello,
I have observed a strange behaviour of my simple stateful bean.
For testing I annotated my bean class like this:
@CacheConfig (maxSize=100, idleTimeoutSeconds=30, removalTimeoutSeconds=30)
If the client creates and destroys my stateful bean, everything works fine. After creation the bean is held in the cache until it is passivated or the client executes the beans remove-Method, which executes the ejbRemove-Method.
But if I simulate a client crash, so that the bean is passivated after 30 seconds of inactivity and then destroyed after further 30 seconds. (only the ejbRemove-Method is called) The bean is still available in memory, because it is only transfered from the cache to the pool.
In the file ejb3-interceptors-aop.xml I configured the pool size like this for "Base Stateful Bean"
<annotation expr="!class((a)org.jboss.annotation.ejb.PoolClass)">
@org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.ThreadlocalPool.class, maxSize=3, timeout=100)
</annotation>
After starting and crashing 5 Clients, eclipse shows the following pool's attributes:
maxSize = 3
inUse = 5
The content of the pool is never reduced. The underlying LinkedList always contains 5 entries.
Why is the bean transfered from the cache to pool in case of a timeout and why is the bean not destroyed in the same way as it is done, when the client calls the remove-Method? Why is the pool ever used in case of timeout?
I thought that statful beans don't use a pool. My understanding is that stateful beans only use the cache until they are active.
Kind regards,
Huber
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/568236#568236]
Start a new discussion in EJB 3.0 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months
[Beginner's Corner] - I am getting java.lang.NoSuchMethodError
by swaroop kumar
swaroop kumar [http://community.jboss.org/people/swaroopp] created the discussion
"I am getting java.lang.NoSuchMethodError"
To view the discussion, visit: http://community.jboss.org/message/567808#567808
--------------------------------------------------------------
java.lang.NoSuchMethodError: com.frost.common.delegate.LoginDelegate.auth1(Lcom/frost/ecomm/domain/authentication/AuthenticationRequest;)Lcom/frost/ecomm/domain/authentication/AuthenticationResponse;
com.frost.ecomm.domain.signin.LoginProcess.performLogin(LoginProcess.java:275)
com.frost.ecomm.domain.signin.LoginProcess.execute(LoginProcess.java:91)
com.frost.ecomm.domain.signin.SignInManager.login(SignInManager.java:75)
com.frost.ecomm.action.signin.LoginUserSubmitAction.execute(LoginUserSubmitAction.java:108)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
com.frost.ecomm.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:71)
com.frost.ecomm.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:71)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/567808#567808]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months