1 Reply Latest reply on Dec 12, 2003 3:32 AM by milowe

    How to set maximum pool of Bean in JBoss?

    xf_fong

      I make the codes of the "Count" Stateful Session Bean sample in Master EJB II. Before I test the Count bean, the book says "We will force the container to have a maximum pool of two beans ". But after I modified my JBoss.xml as followed:
      ====================================

      <enterprise-beans>

      <ejb-name>Count</ejb-name>
      <jndi-name>
      EnterpriseBean/Count
      </jndi-name>
      <configuration-name>
      Standard Stateful SessionBean
      </configuration-name>

      </enterprise-beans>

      <container-configurations>
      <container-configuration>
      <container-name>
      Standard Stateful SessionBean
      </container-name>
      <container-pool-conf>
      2
      </container-pool-conf>
      </container-configuration>
      </container-configurations>

      ====================================

      But at the JBoss side, the output is still:
      ejbCreate()
      Count()
      ejbCreate()
      Count()
      ejbCreate()
      Count()
      ......
      NOT AS THE BOOK SAYS:
      ejbCreate()
      Count()
      ejbCreate()
      Count()
      ejbCreate()
      ejbPassivate()
      Count()
      ......

      So, I can see the passivation. Who can tell me whether my jboss.xml is right? And how to do adjust it?
      Thanks!

        • 1. Re: How to set maximum pool of Bean in JBoss?
          milowe

          Use this syntax to extend standard container.
          ...
          <container-configuration extends="Standard Stateful SessionBean">
          <container-name>YourName</container-name>
          ...

          <configuration-name>YourName</configuration-name>
          ...
          Otherwise you will use the standard configuration from standardjboss.xml
          and its value for .

          /micke