1 Reply Latest reply on May 31, 2007 3:49 AM by Gavin King

    Problem with passivation/activation

    M Bol Newbie

      I have SFSB on SESSION scope. SFSB looks like this:

      @Stateful
      @Scope(ScopeType.SESSION)
      @Name("dnListBean")
      public class DnListBean extends ListManagerSimple<Dn> implements DnListLocal
      {
       private Long resultCount;
       private List<Dn> resoultList;
      
       @PrePassivate
       public void prePasivate()
       {
       System.out.println("DnListBean.prePasivate()");
       System.out.println("resultCount="+resultCount);
       }
      
       @PostActivate
       public void postActive()
       {
       System.out.println("DnListBean.postActive()");
       System.out.println("resultCount="+resultCount);
       }
      
       ...
      }
      


      Problem is that when SFSB gets passivate (after some time if user does nothing on page) and then back activate (after user for eg. refresh page which uses this sesssion bean) all data is lost.

      Here is log from console:
      09:14:02,021 INFO [STDOUT] DnListBean.prePasivate()
      09:14:02,022 INFO [STDOUT] resultCount=64
      09:14:33,674 INFO [STDOUT] DnListBean.postActive()
      09:14:33,674 INFO [STDOUT] resultCount=null
      


      Am I missing something?