users@glassfish.java.net

Glassfish-IMQ refuses to close the JMS connection

From: <glassfish_at_javadesktop.org>
Date: Fri, 28 Dec 2007 18:10:51 PST

Hi all,

In our Enterprise Application, we use JMS as an "Event Dispatcher"; we have Glassfish V2ur1 with several sesion beans deployed that publish messages to a topic, and we have a lot of swing clients that subscribe to that topic in order to receive events (=those messages).
I've noticed that for each client, when the session is created, n+1 TCP connections are established between that client and Glassfish-IMQ (where n is the "JMS Connection Factory Initial and Minimum Pool Size"). The problem is that when the client exits, I'm always closing all the JMS objects: subscriber, sesion, connection,..., but it seems that the connections are not beeing disposed correctly. In fact, in the server logs, we can see:

[i]
[29/dic/2007:02:44:43 CET] [B1066]: Closing: guest_at_192.168.0.10:3889->jms:4065 because "java.io.IOException: An existing connection was forcibly closed by the remote host". Count: service=0 broker=0

[29/dic/2007:02:44:43 CET] [B1066]: Closing: guest_at_192.168.0.10:3622->jms:4065 because "java.io.IOException: An existing connection was forcibly closed by the remote host". Count: service=0 broker=1[/i]

      ...

After session.close() and connection.close(), the client no longer receives messages, that's ok, but the related TCP conecctions are not closed (I do not know why). When the aplication exits, the JVM closes forcibly the connections, and Glassfish logs the above.

What are we doing wrong?

IMQ version is 4.1 Patch 1 (Build 4-b)

Thanks in advance!
[Message sent by forum member 'abelmj' (abelmj)]

http://forums.java.net/jive/thread.jspa?messageID=251666