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

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4176147#4176147

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4176147
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to