4 Replies Latest reply on May 18, 2007 11:09 AM by bigdaddy

    JBoss EJB Lifecycle

    iudoka

      Hey guys, I have a long running application which connects to a stateful session bean via JNP using JBoss 4.0.3SP1. However, I lose my EJB connection after x minutes. I noticed the server was automatically passivating the EJB's and I'm pretty sure the amount of time before passivation is configurable but I've been searching for a few hours and couldn't find out which deployment file and property to change. If you guys could just quickly point me in the right direction I would really appreciate it.

      Thanks.

        • 1. Re: JBoss EJB Lifecycle
          iudoka

          Please can anybody help me with this?

          • 2. Re: JBoss EJB Lifecycle
            genman

            You need to post more information. Exceptions, code samples, test cases, etc.

            • 3. Re: JBoss EJB Lifecycle
              iudoka

               

              "genman" wrote:
              You need to post more information. Exceptions, code samples, test cases, etc.


              I'm not sure what more information is needed, I believe that there is some EJB life cycle property that can be set in order to determine how long the container should hold on to an EJB before passivating it. I just can't for the life of me find which properties file has this property. I'm not sure if I'm being too vague but I'm not sure how else to explain it because my issue (I don't think) should be specific to any code, its more of a general question about property file for deploying EJB's.

              I simply connect to an EJB via JNP and after about 30 minutes the EJB is passivated. I put in a print statement in the beans ejbPassivate() function and it prints on the server after about 30 minutes. I want to see how I can increase this passivation time to a high number if possible. And I'm under the impression that you can do it through a properties file.



              • 4. Re: JBoss EJB Lifecycle
                bigdaddy

                Configuration of the passivation period may be accomplished by tweaking the container configuration under standardjboss.xml or a deployed META-INF/jboss.xml. A couple of properties that should help with that would be the max-bean-age and the overager-period. Have a look at the container cache configuration section of the JBoss J2EE application server reference manual. Reviewing the EJB container section (4.3) of the manual should provide the information requested.

                Hope this helps.