[Design of EJB 3.0] - Re: Passivating EJB 3 Stateful Session Beans stops the World
by andy.miller@jboss.com
"ALRubinger" wrote : "andy.miller(a)jboss.com" wrote : I tested changing the cache maxSize parameter with ejb3-interceptors-aop.xml, and discovered that I am actually using the SimpleStatefulCache. I'm not really sure why. Perhaps something I need to have on the @Clustered annotation?
|
| This shouldn't be. We add the proper default annotations if not specified in AOP (ejb3-interceptors-aop.xml):
|
| <!-- Clustered cache configuration -->
| | <annotation expr="!class((a)org.jboss.ejb3.annotation.Cache) AND class((a)org.jboss.ejb3.annotation.Clustered)">
| | @org.jboss.ejb3.annotation.Cache ("StatefulTreeCache")
| | </annotation>
| | <annotation expr="!class((a)org.jboss.ejb3.annotation.CacheConfig) AND class((a)org.jboss.ejb3.annotation.Clustered)">
| | @org.jboss.ejb3.annotation.CacheConfig (name="jboss.cache:service=EJB3SFSBClusteredCache", maxSize=100000, idleTimeoutSeconds=300, removalTimeoutSeconds=0)
| | </annotation>
|
| S,
| ALR
I do have what you list above in my configuration. Just before it is also the non-clustered configuration, and that is what I'm picking up, based on my experimentation.
I think Brian will discover a problem with the way this is being selected when there is no @CacheConfig annotation.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4183372#4183372
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4183372
16 years, 2 months
[Design of EJB 3.0] - Re: Passivating EJB 3 Stateful Session Beans stops the World
by ALRubinger
"andy.miller(a)jboss.com" wrote : I tested changing the cache maxSize parameter with ejb3-interceptors-aop.xml, and discovered that I am actually using the SimpleStatefulCache. I'm not really sure why. Perhaps something I need to have on the @Clustered annotation?
This shouldn't be. We add the proper default annotations if not specified in AOP (ejb3-interceptors-aop.xml):
<!-- Clustered cache configuration -->
| <annotation expr="!class((a)org.jboss.ejb3.annotation.Cache) AND class((a)org.jboss.ejb3.annotation.Clustered)">
| @org.jboss.ejb3.annotation.Cache ("StatefulTreeCache")
| </annotation>
| <annotation expr="!class((a)org.jboss.ejb3.annotation.CacheConfig) AND class((a)org.jboss.ejb3.annotation.Clustered)">
| @org.jboss.ejb3.annotation.CacheConfig (name="jboss.cache:service=EJB3SFSBClusteredCache", maxSize=100000, idleTimeoutSeconds=300, removalTimeoutSeconds=0)
| </annotation>
S,
ALR
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4183367#4183367
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4183367
16 years, 2 months
[Design of EJB 3.0] - Passivating EJB 3 Stateful Session Beans stops the World!
by andy.miller@jboss.com
Carlo and Andrew,
I have been running the same load test that I ran for my EAP 4.x performance tuning presentation (uses the EJB 3 Stress Test application we use in QE), and I have discovered what appears to be a pretty major problem. When I first kick-off a run, everything is running quite smoothly and I am actually getting slightly higher results than with EAP 4.2. Then everything just stops. The test just seems to be hung for anywhere between 30 seconds and a minute. Then everything starts again, and it runs like it was running before. In trying to correlate what was happening I found something quite interesting.
In looking at the JMX console for my stateful session bean, I can see that when everything stops, is when the container is passivating bean instances. In fact, when everything stops, that is the only time that the passivation counts increments in the JMX console. On EAP 4.2/4.3 I noticed similar behavior, but never correlated it to anything, because it would stop only for 5 to 10 seconds, never this extended period of time. Even with these hangs, we are only about 8% slower than before, and if these hangs were eliminated, we would be faster by about 3%. Of course, I am using OpenJDK 6, versus using the Sun JDK 5, and the improvement may be just because of the JVM, but even if that is the case, we are probably a wash in terms of performance.
In any case, this is a serious issue that needs investigation. Here is some more relevant information:
The default cache configuration is being used, which should be the StatefulTreeCache, since I have the @Clustered annotation on my stateful bean.
I can probably reduce the code down to just the servlet and stateful session bean, and strip out the database access, and just put a sleep in the method implementation.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4183361#4183361
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4183361
16 years, 2 months