1 Reply Latest reply on Jul 4, 2002 8:11 AM by falk

    disabling Passivation of stateful Session Bean

    xlrg

      Hi,

      I've running an stateful Session Bean (Session Facade). It contains an private member variable. This variable cannot be serialized (from third party). After some time (ca.15min) the server throws an Exception that the bean cannot be passivated (because private member isn't serializable).
      I would prefer to disable the passivation. How can i achive that?
      Is it possible to set an idle time after that the bean would be destroyed?
      I think this would go into the jboss.xml but I don't know the correct syntax.

      with best regards,
      Oliver

        • 1. Re: disabling Passivation of stateful Session Bean
          falk

          It is possible to set a max-bean-age (time after that ejbPassivate() will be done) and a max-bean-life (time after that ejbRemove() will be done) Parameter.
          This can be done in jboss.xml, e.g.:

          <container-cache-conf>
          <cache-policy>org.jboss.ejb.plugins.LRUStatefulContextCachePolicy</cache-policy>
          <cache-policy-conf>
          <min-capacity>50</min-capacity>
          <max-capacity>1000</max-capacity>
          <remover-period>1800</remover-period>
          <max-bean-life>1800</max-bean-life>
          <overager-period>300</overager-period>
          <max-bean-age>600</max-bean-age>
          <resizer-period>400</resizer-period>
          <max-cache-miss-period>60</max-cache-miss-period>
          <min-cache-miss-period>1</min-cache-miss-period>
          <cache-load-factor>0.75</cache-load-factor>
          </cache-policy-conf>
          </container-cache-conf>

          File standardjboss.xml in directory conf shows Standardkonfigurations for this, which you can use with jboss.xml.

          Hope this may help you!
          Falk