[jboss-jira] [JBoss JIRA] Commented: (JBAS-6528) MDB - Failed to acquire the pool semaphore

David Tonhofer (JIRA) jira-events at lists.jboss.org
Fri Nov 19 10:28:08 EST 2010


    [ https://jira.jboss.org/browse/JBAS-6528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12564356#comment-12564356 ] 

David Tonhofer commented on JBAS-6528:
--------------------------------------

Got bitten by this bug in jboss-4.2.3.GA today.



> MDB - Failed to acquire the pool semaphore
> ------------------------------------------
>
>                 Key: JBAS-6528
>                 URL: https://jira.jboss.org/browse/JBAS-6528
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: JBossAS-4.2.2.GA
>         Environment: JBoss 4.2.2 + ActiveMQ 5.1.0 on RedHat Linux
>            Reporter: David Goodman
>
> See linked issue JBAS-1599.  The original bug was for SLSB, but it still affects MDBs.  We have three MDBs configured with the following activation spec:
> @MessageDriven(activationConfig =
> {
>       @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
>       @ActivationConfigProperty(propertyName="maximumRedeliveries", propertyValue="0"),
>       @ActivationConfigProperty(propertyName="acknowledgeMode", propertyValue="Auto-acknowledge")
> })
> @Depends({"client.project:service=ProjectAppManager"})
> @ResourceAdapter("activemq-rar.rar")
> @PoolClass (value=org.jboss.ejb3.StrictMaxPool.class, maxSize=1, timeout=30000)
> public class StatusMessageMDB implements MessageListener{ 
> ...
> }
> All three MDBs have different names, and listen on different queues, but they are configured the same.  In the PoolClass annotation, we are using a maxSize of 1 in an attempt to force processing of messages in the order they were loaded on the queue.
> We loaded two of the queues with 500 messages each.  One queue processes 2-3 messages per second, we will call this the "fast" queue.  The other queue, the "slow" queue, takes about 5 seconds per message.  The slow queue threw the following exception 5 times during the period of time both queues were loaded with messages.  Curiously, the slow queue did not seem to throw this exception once the fast queue had finished its 500 messages.
> 2009-02-19 11:19:47,470 ERROR [ActiveMQSession] error dispatching message:
> javax.ejb.EJBException: Failed to acquire the pool semaphore, strictTimeout=30000
>         at org.jboss.ejb3.StrictMaxPool.get(StrictMaxPool.java:122)
>         at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:54)
>         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
>         at org.jboss.ejb3.mdb.MessagingContainer.localInvoke(MessagingContainer.java:249)
>         at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.delivery(MessageInflowLocalProxy.java:268)
>         at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:138)
>         at $Proxy235.onMessage(Unknown Source)
>         at org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:116)
>         at org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:59)
>         at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:695)
>         at org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:165)
>         at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
>         at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
>         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:756)
>         at java.lang.Thread.run(Thread.java:595)
> I am posting this bug report here because in the comments field of JBAS-1599 there were a couple of other people who had a similar issue with MDBs and the StrictMaxPool.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list