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

Guillaume Jeudy (JIRA) jira-events at lists.jboss.org
Thu May 21 10:42:11 EDT 2009


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

Guillaume Jeudy commented on JBAS-6528:
---------------------------------------

I'm having the same issue with an MDB but not explicitely using StrictMaxPool I set maxSession=1. Again the goal is to preserve message ordering when consuming them in the MDB.

I saw the error during development on JBoss-4.2.2.GA on Windows XP using IBM MQ Series.

config: 

@MessageDriven(name = "AJSubscriber", activationConfig = {
		@ActivationConfigProperty(propertyName = "providerAdapterJNDI", propertyValue = "java:/msdmiWSMQJMSProvider"),
		@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"),
		@ActivationConfigProperty(propertyName = "destination", propertyValue = "BOSS/AuditServices/Events/Sharepoint"),
		@ActivationConfigProperty(propertyName = "clientId", propertyValue = "msdmiClient"),
		@ActivationConfigProperty(propertyName = "subscriptionName", propertyValue = "msdmiSubName" ),
		@ActivationConfigProperty(propertyName = "subscriptionDurability", propertyValue = "Durable"),
		@ActivationConfigProperty(propertyName = "DLQMaxResent", propertyValue = "2" ),
		@ActivationConfigProperty(propertyName = "maxSession", propertyValue = "1")})

stack: 10:34:25,936 ERROR [JmsServerSession] Unexpected error delivering message
JMS Message class: jms_text
  JMSType:         mcd://xml
  JMSDeliveryMode: 2
  JMSExpiration:   0
  JMSPriority:     4
  JMSMessageID:    ID:414d5120444c4d513032202020202020ecae7b49e7e60121
  JMSTimestamp:    1242779507865
  JMSCorrelationID:ID:414d5120444c4d513032202020202020ecae7b49e0b1fa20
  JMSDestination:  topic://BOSS/AuditServices/Events/Sharepoint
  JMSReplyTo:      null
  JMSRedelivered:  false
  JMS_IBM_PutDate:20090520
  JMSXAppID:DLMB01
  JMS_IBM_Format:MQSTR
  JMS_IBM_PutApplType:26
  JMS_IBM_MsgType:8
  JMSXUserID:mqsiuser
  JMS_IBM_PutTime:00341540
  JMSXDeliveryCount:1
<?xml version="1.0" encoding="UTF-8"?>
<Issue xmlns="http://www.a.b/backoffice/service
Another 15,154 character(s) omitted
javax.ejb.EJBException: Failed to acquire the pool semaphore, strictTimeout=10000
        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 $Proxy75.onMessage(Unknown Source)
        at org.jboss.resource.adapter.jms.inflow.JmsServerSession.onMessage(JmsServerSession.java:178)
        at com.ibm.mq.jms.MQSession.run(MQSession.java:1744)
        at org.jboss.resource.adapter.jms.inflow.JmsServerSession.run(JmsServerSession.java:237)
        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)


> MDB - Failed to acquire the pool semaphore
> ------------------------------------------
>
>                 Key: JBAS-6528
>                 URL: https://jira.jboss.org/jira/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.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list