[jboss-user] [Messaging, JMS & JBossMQ] - Re: UIL2 ReadTask / WriteTask thread leak on 4.0.5 GA

gogoasa do-not-reply at jboss.com
Fri Feb 15 05:55:41 EST 2008


Ok, so here is how I solved the problem.

It is due effectively to the fact that a connection is not closed. I thought I knew all the points in the application that interacted with JMS, I checked and double checked them, still there was a place that did its own JMS sending without closing connections (and using the non XA /ConnectionFactory).

What allowed me to realize where the problem was is that by enabling TRACE on org.jboss.mq, every time a message is sent you have a stacktrace of where that call is coming from. So in my case here PublisherToJmsTopic was the class I had completely forgotten about.


  | 2008-02-15 11:20:51,498 TRACE [JMS SessionPool Worker-1-org.jboss.mq.il.uil2.SocketManager] start called
  | java.lang.Exception: Start stack trace
  | 	at org.jboss.mq.il.uil2.SocketManager.start(SocketManager.java:112)
  | 	at org.jboss.mq.il.uil2.UILServerIL.createConnection(UILServerIL.java:523)
  | 	at org.jboss.mq.il.uil2.UILServerIL.getSocketMgr(UILServerIL.java:390)
  | 	at org.jboss.mq.il.uil2.UILServerIL.authenticate(UILServerIL.java:277)
  | 	at org.jboss.mq.Connection.authenticate(Connection.java:1067)
  | 	at org.jboss.mq.Connection.<init>(Connection.java:252)
  | 	at org.jboss.mq.Connection.<init>(Connection.java:323)
  | 	at org.jboss.mq.SpyConnection.<init>(SpyConnection.java:116)
  | 	at org.jboss.mq.SpyConnectionFactory.internalCreateConnection(SpyConnectionFactory.java:137)
  | 	at org.jboss.mq.SpyConnectionFactory.createTopicConnection(SpyConnectionFactory.java:118)
  | 	at fr.bnf.entrychain.internalservice.impl.PublisherToJmsTopic.publishEvent(PublisherToJmsTopic.java:31)
  | 	at fr.bnf.entrychain.internalservice.impl.InternalOrchestrationServiceImpl.publishEvent(InternalOrchestrationServiceImpl.java:59)
  | 	at fr.bnf.entrychain.internalservice.impl.InternalOrchestrationServiceBean.publishEvent(InternalOrchestrationServiceBean.java:40)
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | 

The JDBC pool in JBoss has a nice feature that closes unclosed connections showing the stracktrace of the point that opened the connection. Not that developers should use that as connection closing mechanism but it is helpful for debugging.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4129603#4129603

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4129603



More information about the jboss-user mailing list