1 Reply Latest reply on Feb 18, 2004 9:45 AM by alessandro_rizzi

    Timeout with statefull session bean

    alessandro_rizzi

      I need to set the timeout to infinite for a statefull session bean.
      For what I've understood I should write something in jboss.xml of my sesssion-bean or (better) I should write something in standardjboss.xml of my server.
      Can anyone help me
      Regards
      Alessandro Rizzi

        • 1. Re: Timeout with statefull session bean
          alessandro_rizzi

          I found it:
          In standardjboss.xml you have to change
          <container-configuration>
          <container-name>Standard Stateful SessionBean</container-name>
          ...
          <container-cache-conf>
          <cache-policy>org.jboss.ejb.plugins.LRUStatefulContextCachePolicy</cache-policy>
          <cache-policy-conf>
          ...
          <max-bean-life>1800</max-bean-life>

          (in a clustered environment you have to change also another <max-bean-life> just some lines later)

          This means that after 1800 seconds (30 minutes) the statefull session been, which was alredy passivated to file, is completely removed from disk.
          I simply improve the value from 1800 to 1073741824, so now I'm sure that my EJB will never been deleted from disk (which made my application crash, and the only solution was to restart JBoss)