2 Replies Latest reply on Dec 13, 2002 1:14 PM by Andrzej Roszkowski

    Session Beans

    Andrzej Roszkowski Newbie

      Hi!

      In EJB spec is wrotten that client have to create new bean when old have been destroyed (removed unexpectly ie. by time out during passivation) by container. Is there any way to test this bechaviour under JBoss?

        • 1. Re: Session Beans
          Adrian Brock Master

          jboss.xml

          <?xml version="1.0" encoding="utf-8"?>



          <container-configurations>
          <container-configuration extends="Standard Stateful SessionBean">
          <!-- Override the cache policy to remove after 10 seconds -->
          <container-name>My Stateful Session</container-name>
          <container-cache-conf>
          <cache-policy>org.jboss.ejb.plugins.LRUStatefulContextCachePolicy</cache-policy>
          <cache-policy-conf>
          <min-capacity>1</min-capacity>
          <max-capacity>1000000</max-capacity>
          <!-- Times are in seconds -->
          <!-- How often to check for beans with an expired max-bean-life -->
          <remover-period>10</remover-period>
          <!-- How often to check for beans with an expired max-bean-age -->
          <overager-period>10</overager-period>
          <!-- How long before a bean is a candidate for passivation -->
          <max-bean-age>10</max-bean-age>
          <!-- How long before a passivated bean is a candidate for removal -->
          <max-bean-life>10</max-bean-life>
          </cache-policy-conf>
          </container-cache-conf>
          </container-configuration>

          </container-configurations>

          <enterprise-beans>

          <ejb-name>StatefulEJB</ejb-name>
          <jndi-name>StatefulEJB</jndi-name>
          <configuration-name>My Stateful Session</configuration-name>

          </enterprise-beans>



          Regards,
          Adrian

          • 2. Re: Session Beans
            Andrzej Roszkowski Newbie

            Thank You, really helps ;)