5 Replies Latest reply on Apr 5, 2002 7:00 AM by annegret

    stateful Session Bean's  session activation BUG

    sandeepjam

      I have an application in which i am using Stateful session bean ,problem is.. while maintaining session in 20 -30 minutes span the activation call back method is called and session is continued but if after more than one hour i came back ..its unable to start activate method and giving error JBoss/db/sessions/558392081.ser ClassNotFound error.
      if there is a time setting where i have to set.
      if container calls the remove() method for removing the secondary storage serializable object..after certain time then my remove() method in bean must be called..and System.Out.Prinln() should print ..
      what I am printng while ending the session..with windowClosing();

      Nothing is happening..

      exception caught in readEntry at proxy serverRemoteException occurred in server thread; nested exception is:
      javax.transaction.TransactionRolledbackException: Could not activate; nested exception is:
      java.io.FileNotFoundException: E:\JBoss-2.4.0_Tomcat-3.2.3\jboss\db\sessions\LDAPOperation\985059950689.ser (The system cannot find the file specified); nested exception is:
      java.rmi.NoSuchObjectException: Could not activate; nested exception is:
      java.io.FileNotFoundException: E:\JBoss-2.4.0_Tomcat-3.2.3\jboss\db\sessions\LDAPOperation\985059950689.ser (The system cannot find the file specified)

        • 1. Re: stateful Session Bean's  session activation BUG
          annegret

          The default lifetime of a Stateful SessionBean (jboss 2.4.x) is 1800 seconds. After this time jboss removes the bean without calling ejbRemove. You should see an entry in server.log like
          [Bean Cache] Removing from cache bean MySessionSB with id = xxxxx - Cache size = 2
          [Container factory] Removing from storage bean MySessionSB with id = xxxxx

          You can change these settings in standardjboss.xml
          <container-configuration>
          <container-name>Standard Stateful SessionBean</container-name>
          ...
          <cache-policy-conf>
          ...
          <max-bean-life>1800</max-bean-life>


          • 2. Re: stateful Session Bean's  session activation BUG
            sandeepjam

            Hello !!
            I have tried by putting 7200 sec like as follows:

            <min-capacity>50</min-capacity>
            <max-capacity>1000</max-capacity>
            <remover-period>7200</remover-period>
            <max-bean-life>7200</max-bean-life>
            <overager-period>300</overager-period>
            <max-bean-age>600</max-bean-age>
            <resizer-period>400</resizer-period>

            but its still passivated and removed after half an hour.
            JBoss version is 2.4.3
            Please advice !!
            thanx.

            • 3. Re: stateful Session Bean's  session activation BUG
              annegret

              Are You shure You changed the container-configuration used for the beans ( for SFSB normally configuration-name "Standard Stateful SessionBean" ) ?
              We are using jboss 2.4.3 and it works for us.

              The passivation time is configured as
              <max-bean-age>

              You can find the description of the container-configuration tags in the online manual

              http://www.jboss.org/online-manual/HTML/ch07s16.html

              • 4. Re: stateful Session Bean's  session activation BUG
                sandeepjam

                Many thanks..
                In standardjboss.xml..there are two configuration one for Standard Stateful SessionBean and another one is jdk1.2.2 Stateful SessionBean..which has to be modified.

                Well now i am modifying both and its seems that after below stated configuration :-

                <min-capacity>50</min-capacity>
                <max-capacity>1000</max-capacity>
                <remover-period>7200</remover-period>
                <max-bean-life>7200</max-bean-life>
                <overager-period>300</overager-period>
                <max-bean-age>600</max-bean-age>
                <resizer-period>400</resizer-period

                its passivated after 15 minutes but *.ser file is not removed after 1.5 hrs..still I am testing its seems that it will work but to..increase the (time before passivation) passivate time I have to modify this
                '<max-bean-age>600</max-bean-age>'...please advice,,
                Thanks again

                • 5. Re: stateful Session Bean's  session activation BUG
                  annegret

                  yes, <max-bean-age> is the time after which the bean can be passivated. But the container looks for beans to passivate every <overager-period> seconds. So You should modify <overager-period> as well. In best case the bean is passivated after <max-bean-age> but in an adverse case the bean may be pssiavted not until <max-bean-age> + <overager-period>

                  The same is with <max-bean-life> - time after which the bean is ready for removal - and <remover-period> - time after which the container looks for beans to remove. In an adverse case the bean is removed not until <max-bean-life> + <remover-period>

                  For default the period-times are half the time of the max-bean-age or max-bean-life times.

                  Hope this helps
                  Annegret