This content has been marked as final.
Show 2 replies
-
1. Re: Possibility to test passivation / activation of SFSB
francis17101970 Sep 12, 2008 10:22 AM (in response to sebgerpb)You can test activation/passivation by setting the timeout parameter in the @CacheConfig annotation.
@Stateful @CacheConfig(idleTimeoutSeconds=10) public class HelloBean implements HelloBeanItf, Serializable { @PrePassivate public void beforePassivate () { System.out.println("Going to be passivated"); } @PostActivate public void afterActivation () { System.out.println("Going to be reactivated"); }
In this example the EJB will be passivated after 10 seconds. If you try to access to the Bean instance again then it will be reactivated....
Hope it helps -
2. Re: Possibility to test passivation / activation of SFSB
sebgerpb Sep 12, 2008 11:01 AM (in response to sebgerpb)Many thanks, Francesco.