1 Reply Latest reply on Mar 28, 2007 5:15 PM by weston.price

    Setting pool size for beans

    carlos.grahl

      Hello,

      Is there a way to set the pool size individually, per EJB? For example:

      stateless SB example.A:
      MinimunSize = 10, maximunSize=30

      stateless SB example.B:
      MinimunSize=30, maximunSize=50

      MDB example.C:
      MinimunSize=1, maximunSize=10

      and so on..

      I found only global settings, for all MDBs, on standardjboss.xml file

      Thanks in advance,

      Carlos Augusto Grahl

        • 1. Re: Setting pool size for beans
          weston.price

          To do this you would simply create multiple container configurations for each setting you would like to support and then assign that container to each EJB instance. Example:

           <container-configuration>
           <container-name>First Config 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>
          
           <container-configuration>
           <container-name>Second Config 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>50</MaximumSize>
           </container-pool-conf>
           </container-configuration>
          


          And then you would simply apply these separate configuration in your jboss.xml to your individual EJBs.