[ http://jira.jboss.com/jira/browse/JBMQ-106?page=comments#action_12314961 ] Adrian Brock commented on JBMQ-106: -----------------------------------
Three things I do see from reading the code: None of this looks relevent to your problem. 1) The JMSCI should give up its reference to the connection regardless of whether the connection.close() worked or threw an exception: // close the connection if (connection != null) { try { connection.close(); - connection = null; } catch (Exception e) { log.error("Failed to close connection", e); } + connection = null; } 2) The code in Connection.stop() after it does doStop() is redundant since it is just repeating what doStop() does. 3) The code that does catch (Exception e) should really be doing catch (Throwable t) so we also handle java.lang.Errors > Could not stop JMS connection > ----------------------------- > > Key: JBMQ-106 > URL: http://jira.jboss.com/jira/browse/JBMQ-106 > Project: JBoss MQ > Type: Bug > Components: Server > Versions: JBossAS-4.0.1 > Reporter: Tim McCune > Assignee: Adrian Brock > Attachments: patch.txt > > > Sometimes my JBoss client will lose its connection to the server and it gets > into a never-ending loop of spewing errors because Connection.doStop throws > an exception. The stack trace looks like this: > ******** ERROR Jan 26 08:53:25 [plugins.jms.JMSContainerInvoker] - Could not > stop JMS connectionorg.jboss.mq.SpyJMSException: Cannot disable the > connection with the JMS server; - nested throwable: (java.io.IOException: > Client is not connected) at > org.jboss.mq.Connection.doStop(Connection.java:1289) at > org.jboss.mq.Connection.stop(Connection.java:718) at > org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerStop(JMSContainerInvoker.java:876) > at > org.jboss.ejb.plugins.jms.JMSContainerInvoker$ExceptionListenerImpl.run(JMSContainerInvoker.java:1316) > at java.lang.Thread.run(Thread.java:595)Caused by: > java.io.IOException: Client is not connected at > org.jboss.mq.il.uil2.SocketManager.internalSendMessage(SocketManager.java:232) > at > org.jboss.mq.il.uil2.SocketManager.sendMessage(SocketManager.java:200) > at org.jboss.mq.il.uil2.UILServerIL.setEnabled(UILServerIL.java:189) > at org.jboss.mq.Connection.doStop(Connection.java:1285) ... 4 more > This error occurs every 2 minutes until I restart the server. I patched > Connection.java inside doStop to just log a warning if the call to > serverIL.setEnabled throws an exception instead of wrapping it in a > JMSException and rethrowing it. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development