Skip to main content

JMS Session Creation Hanging When Message Producer Not Available

No replies
Joined: 2011-11-21

Morning All,

We are running GlassFish in a two node clustered environment with Open MQ as our message broker and whilst doing some resiliance testing, we have spotted that when the message broker is not available, the following line of code hangs on JMS session creation?

Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);

We have tried setting the following activation specification property to get it to fail after a given period of time but the session creation continues to hand indefinately when the message consumer is not available ...

@ActivationConfigProperty(propertyName = "maxWaitTime", propertyValue = "5"),

Is there a better way to handle the scenario when the message producer is not available?

Thanks in advance for any help!


GlassFish (build 5)
Open MQ 4.5.2 Patch 1 (Build 3-d)