I've also added some diagnostics to aid in diagnosing where sessions were created that
subsequently weren't closed.
When gc closes a connection you will see something like this in the logs:
| Finalizer] 20:14:43,244 WARNING
[org.jboss.messaging.core.client.impl.DelegatingSession] I'm closing a ClientSession
you left open. Please make sure you close all ClientSessions explicitly before letting
them go out of scope!
| [Finalizer] 20:14:43,244 WARNING
[org.jboss.messaging.core.client.impl.DelegatingSession] The session you didn't close
was created here:
| java.lang.Exception
| at
org.jboss.messaging.core.client.impl.DelegatingSession.<init>(DelegatingSession.java:83)
| at
org.jboss.messaging.core.client.impl.ConnectionManagerImpl.createSession(ConnectionManagerImpl.java:375)
| at
org.jboss.messaging.core.client.impl.ClientSessionFactoryImpl.createSessionInternal(ClientSessionFactoryImpl.java:968)
| at
org.jboss.messaging.core.client.impl.ClientSessionFactoryImpl.createSession(ClientSessionFactoryImpl.java:758)
| at
org.jboss.messaging.tests.integration.client.CommitRollbackTest.testReceiveWithCommit(CommitRollbackTest.java:62)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at junit.framework.TestCase.runTest(TestCase.java:164)
| at junit.framework.TestCase.runBare(TestCase.java:130)
| at junit.framework.TestResult$1.protect(TestResult.java:106)
| at junit.framework.TestResult.runProtected(TestResult.java:124)
| at junit.framework.TestResult.run(TestResult.java:109)
| at junit.framework.TestCase.run(TestCase.java:120)
| at junit.framework.TestSuite.runTest(TestSuite.java:230)
| at junit.framework.TestSuite.run(TestSuite.java:225)
| at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421)
| at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912)
| at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:743)
|
The stack trace will tell you where in the code the session was created, that later
wasn't closed.
So we just need to run the test suite and look through the logs for these stack traces and
fix the tests that don't close the sessions.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4249764#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...