-
1. Re: afterCompletion() & database connection closing
davidjencks Nov 24, 2002 12:57 AM (in response to danjw)Can you provide any more concrete information about what is happening, perhaps a log excerpt and anything you know about the actions the toplink code does? What you say doesn't make any sense to me yet, because jboss never closes connections for you, ever. In fact it is a spec requirement that you can leave them open between method calls, and my tests indicate this works.
Also, closing a connection does not have any relationship to committing a transaction the connection may be enrolled in. -
2. Re: afterCompletion() & database connection closing
danjw Nov 26, 2002 2:04 PM (in response to danjw)David:
I've attached a trace which shows what happens in one transaction, with toplink logging and trace logging enabled on tm, resource, and ejb.
Eventually, if I run enough transactions, I wind up with the following exception:
org.jboss.util.NestedSQLException: No ManagedConnections Available!; - nested throwable: (javax.resource.ResourceException: No ManagedConnections Available!)
at org.jboss.resource.adapter.jdbc.local.LocalDataSource.getConnection(LocalDataSource.java:106)
at oracle.toplink.jndi.JNDIConnector.connect(Unknown Source)
at oracle.toplink.sessions.DatabaseLogin.connect(Unknown Source)
My current workaround involves letting TopLink do its own connection pooling, but I'd much rather leave that to the app server.
Thanks for your assistance,
-Dan -
3. Re: afterCompletion() & database connection closing
natebowler Oct 27, 2004 2:27 PM (in response to danjw)This is the exact same problem I am having, but this thread died without an explanation of the fix.
What was the trick here? How did you modify the TopLink JTSSynchronizationListener to play nice with JBoss?
Nate