-
1. Re: SFSB passivation disabling
asiandub May 31, 2011 9:21 AM (in response to axlbri)Same situation & same question here...
-
2. Re: SFSB passivation disabling
jaikiran May 31, 2011 9:25 AM (in response to asiandub)Can you please post the relevant code/configs?
-
3. Re: SFSB passivation disabling
asiandub May 31, 2011 10:33 AM (in response to jaikiran)Sure :-)
I'm need to disable EJB-Passivation on a JBoss AS 6 GA (default configuration) because of https://issues.jboss.org/browse/WELD-917.
After a lot of try and error, I still haven't found the right place to configure this, whatever I do doesn't seem to affect the passivation, it simply kicks in after 10 minutes
That's what I've tried so far:
(1) Changed standardjboss.xml to:
<container-configuration>
<container-name>Standard Stateful SessionBean</container-name>
...
<container-cache-conf>
<cache-policy>org.jboss.ejb.plugins.NoPassivationCachePolicy</cache-policy>
</container-cache-conf>
...
</container-configuration>
-> no effect on passivation, also tried to set passivation to some value >30min, again: no effect
(2) Played with jboss-web.xml:
<passivation-config>
<use-session-passivation>false</use-session-passivation>
<passivation-min-idle-time>0</passivation-min-idle-time>
<passivation-max-idle-time>0</passivation-max-idle-time>
</passivation-config>
-> no effect on ejb-passivation, but that's rather the place where I configure _session_ passivation!?
(3) Looked for @CacheConfig:
-> This annotation is not present in my classpath, I assume that's because I'm on the default profile!?
So, if anyone could either tell me here or point me to a relevant resource I'll be more than glad :-)
Cheers,
Jan
-
4. Re: SFSB passivation disabling
jaikiran May 31, 2011 2:08 PM (in response to asiandub)Jan Groth wrote:
That's what I've tried so far:
(1) Changed standardjboss.xml to:
That won't work because that file is meant for legacy EJB2.x beans.
Jan Groth wrote:
(2) Played with jboss-web.xml:
<passivation-config>
<use-session-passivation>false</use-session-passivation>
<passivation-min-idle-time>0</passivation-min-idle-time>
<passivation-max-idle-time>0</passivation-max-idle-time>
</passivation-config>
-> no effect on ejb-passivation, but that's rather the place where I configure _session_ passivation!?
It's not meant for EJB passivation, like you already noticed.
Jan Groth wrote:
(3) Looked for @CacheConfig:
-> This annotation is not present in my classpath, I assume that's because I'm on the default profile!?
So, if anyone could either tell me here or point me to a relevant resource I'll be more than glad :-)
Cheers,
Jan
@org.jboss.ejb3.annotation.CacheConfig is the one you are looking for. And it's present in JBOSS_HOME/common/lib/jboss-ejb3-ext-api.jar
-
5. Re: SFSB passivation disabling
asiandub Jun 8, 2011 5:15 AM (in response to jaikiran)Thanks for that helpful answer!
I had to modify my classpath to use @ConfigConfig, but after that everything run nice and smoothly.
One extra question: If I needed that configuration at deployment time - where would I be able to put that ?
-
6. Re: SFSB passivation disabling
jaikiran Jun 8, 2011 10:50 AM (in response to asiandub)Jan Groth wrote:
One extra question: If I needed that configuration at deployment time - where would I be able to put that ?
Check this doc http://docs.jboss.org/ejb3/docs/reference/1.0.7/html/SessionBean_and_MDB_configuration.html (the "Note" section specifically).