[ openjms-Bugs-1611385 ] Client-Server Connection hangs and locks clients

"SourceForge.net" <[email protected]> Fri, 08 Dec 2006 01:59:37 -0800
Newsgroups gmane.comp.java.openjms.devel
Message-ID <[email protected]>
Bugs item #1611385, was opened at 2006-12-08 10:59
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=1611385&group_id=54559

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: server
Group: v0.7.7-alpha-3
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Peter De Leuze (cajundust)
Assigned to: Nobody/Anonymous (nobody)
Summary: Client-Server Connection hangs and locks clients

Initial Comment:
OpenJMS works fine for 2-3 days, then suddenly, client connections seem to keep hanging on the server side. 

When doing a netstat:
tcp        0      0 ::ffff:192.168.111.190:3035 ::ffff:192.168.111.166:1397 ESTABLISHED
tcp        0      0 ::ffff:192.168.111.190:3035 ::ffff:192.168.111.162:1389 ESTABLISHED
tcp        0      0 ::ffff:192.168.111.190:3035 ::ffff:192.168.111.161:1193 ESTABLISHED

And these hanging connections cause all new incoming client connections to lock on creating a session on the connection. 
The place where the client JMS implementation blocks is:

 javax.jms.ConnectionFactory factory = (ConnectionFactory) context.lookup("TCPConnectionFactory");
 javax.jms.Connection connection = factory.createConnection();

 // blocks here forever !
 // -----------------------
 javax.jms.Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
 // -----------------------

This situation is only resolved when stopping the jms server and restarting it. Then it works fine again for 2-3 days, and the whole problem reoccurs.

The problem mostly occurs when client applications connect through a VPN, and when the connection is then lost because the VPN disconnects. 
There should be a (server.xml) configurable option that stalled connections should be disconnected after a while, but there is no configuration option.

Also in the JMS client API, there is no way to set a connection timeout when creating a session from a connection object or when sending a message on a disconnected connection.
connection.stop,close or session.close does not do anything !!! The client keeps blocked on the connection.createSession !

Please take this bug serious, because it seems that others also have this problem.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=1611385&group_id=54559

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV