-
1. Re: Passivation-can its time of occurance be controlled?(4.2
wolfc Oct 9, 2007 1:35 PM (in response to konkimalla)Take a look in ejb3-interceptors-aop.xml. In the "Stateful Bean" domain, the cache is configured for clustered and non-clustered beans.
You can either edit this file or add the annotations to your bean. -
2. Re: Passivation-can its time of occurance be controlled?(4.2
wolfc Oct 9, 2007 1:37 PM (in response to konkimalla)If you don't want clustering or passivation you can use:
@Cache(org.jboss.ejb3.cache.NoPassivationCache.class)
-
3. Re: Passivation-can its time of occurance be controlled?(4.2
konkimalla Oct 10, 2007 11:19 AM (in response to konkimalla)Thanks for the timely response as this was critical. I started with testing by adding the annotation and it works fine. Then, removed the code and edited the xml file and even then it works fine (no passivation). I edited the file both in clustered/nonclustered and passivation is being stopped.
However, I am not sure the editing of the xml file will cause other problems. Following are the changes I made.
1) First test: stopping passivation for all beans. Added the following lines to domain = "Stateful Bean".
'<'annotation expr="!class(@org.jboss.annotation.ejb.cache.Cache)">
@org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.NoPassivationCache.class)
'<'/annotation>
2) Second test: stopping passivation for a specific bean (only one stateful bean in def package) . Added the following lines to domain = "Stateful Bean".
'<'annotation expr="!class(@com.aaa.bbb.ccc.def.*)">
@org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.NoPassivationCache.class)
'<'/annotation>
Can you please confirm the correctness of the changes made to the xml file?