0

I am dropping messages on an MDB in a loop and I can see in my logs that I keep running out of available connections.

Caused by: com.sun.messaging.jms.JMSException: MQRA:CFA:allocation failure:createConnection:Error in allocating a connection. Cause: In-use connections equal max-pool-size and expired max-wait-time. Cannot allocate more connections.
    at com.sun.messaging.jms.ra.ConnectionFactoryAdapter._allocateConnection(ConnectionFactoryAdapter.java:209)
    at com.sun.messaging.jms.ra.ConnectionFactoryAdapter.createConnection(ConnectionFactoryAdapter.java:162)
    at com.sun.messaging.jms.ra.ConnectionFactoryAdapter.createConnection(ConnectionFactoryAdapter.java:144)

After dropping each message on the queue I am closing all the connections but still I do not know how I run out of available connections.

I am thinking of increasing the pool size instead. But havent been able to find that setting.

Can anyone guide me how to change that setting for the Glassfish server.

john.p.doe
  • 411
  • 2
  • 10
  • 21

1 Answers1

0

For an MDB you can set this via the MaxPoolSize of the activation spec. This property is the "Maximum size of server session pool internally created by the resource adapter for achieving concurrent message delivery. This should be equal to the maximum pool size of MDB objects".

John Harris
  • 322
  • 1
  • 9