JMS API does not appear to close connections (Doc ID 1025788.1)

Last updated on OCTOBER 25, 2016

Applies to:

Sun e*Gate - Version 4.1.2 and later
Information in this document applies to any platform.
Sun SeeBeyond e*Gate - Version: 4.5.3 and later

Checked for relevance on 01-FEB-2011
***Checked for relevance on 01-July-2014***

Symptoms

Code creates a number of threads to send correlated messages to the JMS server, and then reads the replies back after they have been updated by a separate application. After about 4000 messages, the following messages appear in the client code:
javax.jms.JMSException: Could not connect to host: localhost, port: 24053
at com.seebeyond.jms.sockets.STCSocket.<init>(STCSocket.java:96)
at com.seebeyond.jms.sockets.ConsumerSocket.<init>(ConsumerSocket.java:58)
at com.seebeyond.jms.sockets.ReceiverSocket.<init>(ReceiverSocket.java:32)
at com.seebeyond.jms.sockets.SessionSocket.createConsumerSocket(SessionSocket.java:106)
at com.seebeyond.jms.sockets.SocketProtocolMgr.registerConsumer(SocketProtocolMgr.java:145)
at com.seebeyond.jms.client.STCSession.registerMessageConsumer(STCSession.java:797)
at com.seebeyond.jms.client.STCQueueReceiver.<init>(STCQueueReceiver.java:62)
at com.seebeyond.jms.client.STCQueueSession.createReceiver(STCQueueSession.java:132)
at uk.com.Client.getReceiver(Client.java:171)
at uk.com.Client.run(Client.java:103)
at java.lang.Thread.run(Thread.java:534)
JMS client thread 18: Exitting

If using temp queues with the same code the problem does not occur. Why?

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms