0

I deployed a CMT MDB on Websphere 7, which gets messages from a Websphere MQ 7 queue and through a resource adapter it sends them to an external system. After the messages get through the MDB logic and I try to make a connection with the external system through the resource adapter I'm getting the error:

Connection Error Request Stack: java.lang.Throwable 
    at com.ibm.ejs.j2c.ConnectionEventListener.connectionErrorOccurred(ConnectionEventListener.java:441)
    at com.jbase.jremote.jca.EventNotifier$1.notify(Unknown Source)
    at com.jbase.jremote.jca.JRemoteManagedConnection.notify(Unknown Source)
    at com.jbase.jremote.jca.JRemoteManagedConnection.isAlive(Unknown Source)
    at com.jbase.jremote.jca.JRemoteManagedConnectionFactory.matchManagedConnections(Unknown Source)
    at com.ibm.ejs.j2c.PoolManager.getMCWrapperFromMatch(PoolManager.java:3909)
    at com.ibm.ejs.j2c.PoolManager.claimVictim(PoolManager.java:3784)
    at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:2474)
    at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:1064)
    at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:701)
    at com.jbase.jremote.jca.JRemoteConnectionFactoryImpl.getConnection(Unknown Source)
    at com.jbase.jremote.jca.JRemoteConnectionFactoryImpl.getConnection(Unknown Source)
    at com.temenos.tocf.grouping.mdb.MessageGroupingMDB.processRequest(MessageGroupingMDB.java:192)
    at com.temenos.tocf.grouping.mdb.MessageGroupingMDB.sendMessage(MessageGroupingMDB.java:166)
    at com.temenos.tocf.grouping.mdb.MessageGroupingMDB.onMessage(MessageGroupingMDB.java:123)
    at com.ibm.ejs.container.MessageEndpointHandler.invokeMdbMethod(MessageEndpointHandler.java:1093)
    at com.ibm.ejs.container.MessageEndpointHandler.invoke(MessageEndpointHandler.java:778)
    at $Proxy28.onMessage(Unknown Source)
    at com.ibm.mq.connector.inbound.MessageEndpointWrapper.onMessage(MessageEndpointWrapper.java:131)
    at com.ibm.mq.jms.MQSession$FacadeMessageListener.onMessage(MQSession.java:147)
    at com.ibm.msg.client.jms.internal.JmsSessionImpl.run(JmsSessionImpl.java:2598)
    at com.ibm.mq.jms.MQSession.run(MQSession.java:862)
    at com.ibm.mq.connector.inbound.WorkImpl.run(WorkImpl.java:229)
    at com.ibm.ejs.j2c.work.WorkProxy.run(WorkProxy.java:399)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1662)

If I deploy the same MDB with the same resource adapter in WebSphere 8.5 it works without any error. So I assume it's something related to WebSphere 7 and the way it fails to open/find a connection in the connection pool. It's not a load test so it's not the case that too many resources are trying to get a free connection.

Thanks in advance for any suggestion about this issue!

Gas
  • 17,601
  • 4
  • 46
  • 93
kien
  • 11
  • 4
  • Are you trying to connect to JBoss messaging from WAS? The com.jbase.jremote.jca.JRemoteManagedConnection suggests that. – Gas Nov 04 '14 at 09:15
  • I am trying to connect to an EIS from Websphere through a resource adaptor.The resource adaptor I have contains the archive jremote.jar that includes com.jbase.jremote.jca.JRemoteManagedConnection class. – kien Nov 04 '14 at 09:21
  • The extended log also shows:Exception (not XA_RB*) from end javax.transaction.xa.XAException: Failed to receive message - Server disconnected at com.jbase.jremote.io.JConnectionImpl.end(Unknown Source) at com.ibm.ejs.j2c.XATransactionWrapper.end(XATransactionWrapper.java:603) at com.ibm.ws.Transaction.JTA.JTAResourceBase.end(JTAResourceBase.java:240) at com.ibm.tx.jta.RegisteredResources.sendEnd(RegisteredResources.java:1152) at com.ibm.tx.jta.RegisteredResources.distributeEnd(RegisteredResources.java:1126) – kien Nov 04 '14 at 09:25

1 Answers1

0

It looks like your MDB is attempting to get a connection using the com.jbase resource adapter and the IBM JCA is searching for any matching connections in the free pool. It calls the com.jbase resource adapters matchManagedConnection method, and the resource adapter has done an isAlive check that appears to then call the connectionErrorOccurred callback that you can see at the top of the stack. This happens when the resource adapter wants the JCA component to remove a 'bad' connection from the pool, i.e. the resource you was connected to has been stopped or network connection removed.

Having said all of the above, the reason why you see the error message in the log is because tracing is on :), the exception is only generated to obtain the stack trace to output to the log file. The exception is never 'thrown' and processing should continue as normal.

whitfiea
  • 1,943
  • 10
  • 15
  • I enabled tracing to get more information about the issue.I also assume that the resource adapter cannot get a connection from the pool but this is blocking the flow MQ-MDB-Resource Adapter-EIS.The message doesn't get to the EIS as connection through the resource adapter fails.On Websphere 8.5 having the same MDB deployed and the same resource adapter,the message gets successfully to the EIS.Might be a configuration issue on Websphere? – kien Nov 04 '14 at 10:57
  • I would say it is more likely a config issue with the connection to the EIS system. Can you compare the configuration of the WAS8.5 and WAS7 systems? Check the first connection attempt to the EIS system to see why it might not be processing. – whitfiea Nov 04 '14 at 12:55
  • j2cConnectionFactory is the same on both Websphere versions.In their respective custom properties both refer to the same ip and port of the EIS – kien Nov 04 '14 at 13:43
  • In the end, I have set the MDB to Bean mode and when catching the connection exception that the resource adapter is throwing I rolled back myself the messages to the input queue to reprocess them once the connection is reestablished – kien Nov 12 '14 at 16:10