3 Replies Latest reply on Jun 18, 2008 8:47 AM by artd

    How to specify maximum instances allowed for a SFSB

      Hello,

      I am looking for an example or parameter on how to specify the min and max instances of SFSB allowed in a container. So far, I only found snippet of configuration like this:

      <MinimumSize>10</MinimumSize>
       <MaximumSize>100</MaximumSize>
       <KeepAliveMillis>3000000</KeepAliveMillis>
      


      Yet no mention of how and where to put this configuration (jboss.xml? ejb-jar.xml?)

      Does anyone have a working example that they can share? Much appreciated.

      Thanks
      -Tony

        • 1. Re: How to specify maximum instances allowed for a SFSB

          hello tony ,
          i have the same problem with SLSB.
          the pooling parameters for SLSB and SFSB is described info jboss configuration file :
          standardjboss.xml

          <container-configuration>
           <container-name>Standard Stateless SessionBean</container-name>
           <call-logging>false</call-logging>
           <invoker-proxy-binding-name>stateless-unified-invoker</invoker-proxy-binding-name>
           <container-interceptors>
           <interceptor>org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor</interceptor>
           <interceptor>org.jboss.ejb.plugins.LogInterceptor</interceptor>
           <interceptor>org.jboss.ejb.plugins.SecurityInterceptor</interceptor>
           <!-- CMT -->
           <interceptor transaction="Container">org.jboss.ejb.plugins.TxInterceptorCMT</interceptor>
           <interceptor transaction="Container">org.jboss.ejb.plugins.CallValidationInterceptor</interceptor>
           <interceptor transaction="Container">org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor</interceptor>
           <!-- BMT -->
           <interceptor transaction="Bean">org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor</interceptor>
           <interceptor transaction="Bean">org.jboss.ejb.plugins.TxInterceptorBMT</interceptor>
           <interceptor transaction="Bean">org.jboss.ejb.plugins.CallValidationInterceptor</interceptor>
           <interceptor>org.jboss.resource.connectionmanager.CachedConnectionInterceptor</interceptor>
           </container-interceptors>
           <instance-pool>org.jboss.ejb.plugins.StatelessSessionInstancePool</instance-pool>
           <instance-cache></instance-cache>
           <persistence-manager></persistence-manager>
           <container-pool-conf>
           <MaximumSize>100</MaximumSize>
           </container-pool-conf>
           </container-configuration>
          


          here is maximum size of pool - 100
          but it does not working correctly, I noticed that the CreateCount continues to increment over time, while RemoveCount is rarely incremented. For example, I may have a CreateCount in the tens-of-thousands while the RemoveCount stays in the hundreds.


          any idea will be greatly appreciated.




          • 2. Re: How to specify maximum instances allowed for a SFSB
            georke2

            Did you find a solution on this?

            I also notice that the maxSize in the MBean view is always 30 and not 100 as defined in the container-pool-conf.

            Also the strictMaximumSize element doesn't seam to be working.

            As we're running a webapplication with many users, the currentSize is constantly growing and after a while (couple of days) we get an out of memory exception, resulting in a needed server restart.

            All suggestions are welcome!

            • 3. Re: How to specify maximum instances allowed for a SFSB

              http://www.jboss.com/index.html?module=bb&op=viewtopic&t=137351

              See that post.

              The 30 limit is on the SLSB's, the default maximum for SFSB's is 100000 as defined in the ejb3-aop-interceptors.xml file under deploy.

              Even the max values only appear to be defined for the active Cache of beans, and not the total amount allowed to exist after passivation. The Removal timeout is what declares when those passivated beans may be cleaned up. By default, jboss sets this to 0, or infinite (ie, the passivated beans will never be cleaned up until the server is gracefully shutdown).