0
votes

I create a queue connection factory in Websphere using WebSphere MQ messaging provider. Using JNDI to get this resource, and try to create queue connection in the same host. The first time, everything works, but When I will to second time , it will throw a JMS Exception:

javax.jms.JMSException: Failed to create queue connection
    at com.ibm.ejs.jms.JMSCMUtils.mapToJMSException(JMSCMUtils.java:141)
    at com.ibm.ejs.jms.JMSQueueConnectionFactoryHandle.createQueueConnection(
         JMSQueueConnectionFactoryHandle.java:90)
2
Please provide the portion of the stack trace that shows the linked exception. (JMS Exceptions are a multi-tiered data structure where the linked exception exists to hold vendor-specific exception diagnostic data. You are printing out linked exceptions wherever you trap a JMS exception, right?)T.Rob
there are few information about the JMSException.that is all I get from log.niken

2 Answers

0
votes

There is SO little information in the post it is hard to do anything but guess. First thing I'd look for is if the application or queue are set for exclusive use. Of course this assumes that you are opening the queue for input and that detail isn't mentioned in the question. Having the linked exception which would provide the actual WMQ reason and completion codes could tell you for sure but these also are not provided in the question.

Many shops consider it a Sev-1 defect if JMS code does not print linked exceptions. This is not a WMQ-specific thing but rather a case of printing out all the diagnostic information available regardless of the transport provider. In case you want more info on this, please see the WMQ Ifocenter JMS exception handling topic.

0
votes

The Max Connection is there in WAS console. if connection getting more than Max connection and not release the resource (QueueConnection, QueueSender and QueueSession) than at the time of next connection it will fail to get the connection from connection pool. After restarting the Server only you can release the connection. this can be resolve by close all the resource(QueueConnection, QueueSender and QueueSession) properly in code.