<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Adjust / reduce MDB bean pool
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/ejb3workshop">Alexander Hartner</a> in <i>EJB 3.0</i> - <a href="http://community.jboss.org/message/568627#568627">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>I am trying to reduce the MDB bean pool to limit the concurrency of my application. I know I can do this via the ActivationSpecification as well as via the deployment descriptor. However I would like to do this outside the EAR file and be able to adjust it at the application server level. I have found the suggestion to edit <span style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; ">maxSize=5 in </span>ejb3-interceptors-aop.xml.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><blockquote class="jive-quote"><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">      <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))"></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">         <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">      </bind></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">      <bind pointcut="execution(public * *->*(..))"></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">         <interceptor-ref name="org.jboss.ejb3.stateless.StatelessInstanceInterceptor"/></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">         <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">         <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">         <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">         <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">      </bind></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">      <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)"></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">         @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.StrictMaxPool.class, maxSize=5, timeout=10000)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">      </annotation></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">   </domain></div><p>   <domain name="Message Driven Bean"></p><p>      <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))"></p><p>         <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/></p><p>      </bind></p><p>      <bind pointcut="execution(public * *->*(..))"></p><p>         <interceptor-ref name="org.jboss.ejb3.stateless.StatelessInstanceInterceptor"/></p><p>         <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/></p><p>         <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/></p><p>         <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/></p><p>         <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/></p><p>      </bind></p><p>      <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)"></p><p>         @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.StrictMaxPool.class, maxSize=5, timeout=10000)</p><p>      </annotation></p><p>   </domain></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p></blockquote><p>Yet this resulted the following exception:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><blockquote class="jive-quote"><p><p>javax.ejb.EJBException: Failed to acquire the pool semaphore, strictTimeout=10000</p><p>        at org.jboss.ejb3.StrictMaxPool.get(StrictMaxPool.java:122)</p><p>        at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:54)</p><p>        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)</p><p>        at org.jboss.ejb3.mdb.MessagingContainer.localInvoke(MessagingContainer.java:249)</p><p>        at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.delivery(MessageInflowLocalProxy.java:268)</p><p>        at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:138)</p><p>        at $Proxy158.onMessage(Unknown Source)</p><p>        at org.jboss.resource.adapter.jms.inflow.JmsServerSession.onMessage(JmsServerSession.java:178)</p><p>        at org.jboss.jms.client.container.ClientConsumer.callOnMessageStatic(ClientConsumer.java:160)</p><p>        at org.jboss.jms.client.container.SessionAspect.handleRun(SessionAspect.java:831)</p><p>        at org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect14.invoke(SessionAspect14.java)</p><p>        at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)</p><p>        at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)</p><p>        at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)</p><p>        at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)</p><p>        at org.jboss.jms.client.delegate.ClientSessionDelegate.run(ClientSessionDelegate.java)</p><p>        at org.jboss.jms.client.JBossSession.run(JBossSession.java:199)</p><p>        at org.jboss.resource.adapter.jms.inflow.JmsServerSession.run(JmsServerSession.java:237)</p><p>        at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)</p><p>        at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)</p><p>        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:756)</p><p>        at java.lang.Thread.run(Thread.java:619)</p></p></blockquote><p><span style="color: #333333;"><br/></span></p><p><span style="color: #333333;">Further reading brought me on to this link : </span><a class="" href="http://community.jboss.org/docs/DOC-9334"><span style="color: #333333;">http://community.jboss.org/wiki/ConfigJBossMDB</span></a><span style="color: #333333;"> as well as other forum posts which suggests adding </span><span style="border-collapse: collapse; color: #333333; font-size: 12px; white-space: pre; "><strong><strictTimeout>forever</strictTimeout></strong> to conf/standardjboss.xml as in:</span></p><p><span style="color: #5b5b5b; font-size: 12px; border-collapse: collapse; white-space: pre;"><span style="color: #333333;"><br/></span><blockquote class="jive-quote"><p><p>  <container-configuration></p><p>      <container-name>Standard Message Driven Bean</container-name></p><p>      <call-logging>false</call-logging></p><p>      <invoker-proxy-binding-name>message-driven-bean</invoker-proxy-binding-name></p><p>      <container-interceptors></p><p>        <interceptor>org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor</interceptor></p><p>        <interceptor>org.jboss.ejb.plugins.LogInterceptor</interceptor></p><p>        <interceptor>org.jboss.ejb.plugins.RunAsSecurityInterceptor</interceptor></p><p>        <!-- CMT --></p><p>        <interceptor transaction="Container">org.jboss.ejb.plugins.TxInterceptorCMT</interceptor></p><p>        <interceptor transaction="Container">org.jboss.ejb.plugins.CallValidationInterceptor</interceptor></p><p>        <interceptor transaction="Container">org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor</interceptor></p><p>        <!-- BMT --></p><p>        <interceptor transaction="Bean">org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor</interceptor></p><p>        <interceptor transaction="Bean">org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT</interceptor></p><p>        <interceptor transaction="Bean">org.jboss.ejb.plugins.CallValidationInterceptor</interceptor></p><p>        <interceptor>org.jboss.resource.connectionmanager.CachedConnectionInterceptor</interceptor></p><p>      </container-interceptors></p><p>      <instance-pool>org.jboss.ejb.plugins.MessageDrivenInstancePool</instance-pool></p><p>      <instance-cache></instance-cache></p><p>      <persistence-manager></persistence-manager></p><p>      <container-pool-conf></p><p><span style="white-space: pre;">     </span>      <MaximumSize>100</MaximumSize></p><p><span style="white-space: pre;">     </span>      <strictTimeout>forever</strictTimeout></p><p>      </container-pool-conf></p><p>    </container-configuration></p></p></blockquote></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: monospace; color: #5b5b5b; font-size: 12pt;"><p><span style="font-family: arial, helvetica, sans-serif;">Any suggestion on how I to change the pool size used for MDBs using JBoss 4.2.3 correctly.</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: arial, helvetica, sans-serif;">Kind regards</span></p><p><span style="font-family: arial, helvetica, sans-serif;">Alex</span></p></span></p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/568627#568627">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in EJB 3.0 at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>