Lots n Lots of stateless bean instances.
raj_kumar Apr 17, 2012 6:48 AMAll,
I am using Jboss 5.1, One of my stateless bean which is heavily used. After runinng for 7 days my Jboss occupies all of memory (6G heap on solaris) and goes into unresponsive state. I took a heap dump and analysed, i found that it shows 15,238,735 instances of a particular stateless bean in JVisualVM. My beans is accessed locally and remotely both.
I am not able to find out why these many instances has been created in Jboss.
Can you please tell me how to control the instances in my stateless?
below is the configuration of ejb3-interceptors-aop.xml file.. I assume this confguration stands true for all beans in jboss container
-<domain name="Stateless Bean" inheritBindings="true" extends="Intercepted Bean"> -<bind pointcut="execution(public * *->*(..))"> <interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/> <interceptor-ref name="org.jboss.ejb3.security.AuthenticationInterceptorFactory"/> </bind> -<bind pointcut="execution(public * @org.jboss.ejb3.annotation.SecurityDomain->*(..))"> <interceptor-ref name="Basic Authorization"/> </bind> -<bind pointcut="execution(public * *->*(..))"> <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/> </bind> -<bind pointcut="execution(public * @org.jboss.ejb3.annotation.Clustered->*(..))"> <interceptor-ref name="org.jboss.ejb3.remoting.ReplicantsManagerInterceptorFactory"/> </bind> -<bind pointcut="execution(public * *->*(..))"> <interceptor-ref name="org.jboss.aspects.tx.TxPropagationInterceptor"/> <interceptor-ref name="org.jboss.ejb3.tx.CMTTxInterceptorFactory"/> <interceptor-ref name="org.jboss.ejb3.stateless.StatelessInstanceInterceptor"/> <interceptor-ref name="org.jboss.ejb3.tx.BMTTxInterceptorFactory"/> <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/> <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/>
<!-- interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/ -->
<stack-ref name="EJBInterceptors"/> </bind> <annotation expr="class(*) AND !class(@org.jboss.ejb3.annotation.Pool)"> @org.jboss.ejb3.annotation.Pool (value="ThreadlocalPool", maxSize=30, timeout=10000) </annotation> </domain>
I looked into jmx-console then it says MaxSize =47 and AvailableCount=-8
Your input is really appreciated.
Thanks
Raj..