[jbossts-issues] [JBoss JIRA] (JBTM-2331) TransactionalDriver may leave a JDBC Connection associated after transaction termination

Michael Musgrove (JIRA) issues at jboss.org
Mon Jan 12 09:23:49 EST 2015


Michael Musgrove created JBTM-2331:
--------------------------------------

             Summary: TransactionalDriver may leave a JDBC Connection associated after transaction termination
                 Key: JBTM-2331
                 URL: https://issues.jboss.org/browse/JBTM-2331
             Project: JBoss Transaction Manager
          Issue Type: Bug
          Components: JTA
    Affects Versions: 5.0.4
            Reporter: Michael Musgrove
            Assignee: Michael Musgrove
             Fix For: 5.0.5


1) Start a transaction;
2) Obtain a connection via the TransactionalDriver 
3) End transaction
4) start another transaction
5) Call connection.isClosed()

this will produce the following exception because the transactional driver thinks the connection is still associated:

{code}
java.lang.RuntimeException: java.sql.SQLException: ARJUNA017003: Checking transaction and found that this connection is already associated with a different transaction! Obtain a new connection for this transaction.
	at ceylon.modules.bootstrap.CeylonRunTool.run(CeylonRunTool.java:228)
	at com.redhat.ceylon.common.tools.CeylonTool.run(CeylonTool.java:368)
	at com.redhat.ceylon.common.tools.CeylonTool.execute(CeylonTool.java:305)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.redhat.ceylon.launcher.Launcher.runInJava7Checked(Launcher.java:113)
	at com.redhat.ceylon.launcher.Launcher.run(Launcher.java:40)
	at com.redhat.ceylon.launcher.Launcher.run(Launcher.java:33)
	at com.redhat.ceylon.launcher.Launcher.main(Launcher.java:26)
Caused by: java.sql.SQLException: ARJUNA017003: Checking transaction and found that this connection is already associated with a different transaction! Obtain a new connection for this transaction.
	at com.arjuna.ats.internal.jdbc.ConnectionImple.checkTransaction(ConnectionImple.java:1078)
	at com.arjuna.ats.internal.jdbc.ConnectionImple.isClosed(ConnectionImple.java:417)
	at ceylon.dbc.ConnectionStatus.connection(ConnectionStatus.ceylon:22)
	at ceylon.dbc.Sql.prepareStatement$priv$(Sql.ceylon:89)
	at ceylon.dbc.Sql.access$100(Sql.ceylon:701)
	at ceylon.dbc.Sql$Update.execute$canonical$(Sql.ceylon:346)
	at ceylon.dbc.Sql$Update.execute(Sql.ceylon:343)
	at example.ceylon.transaction.tm.runTx_.runTx(transaction.ceylon:199)
	at example.ceylon.transaction.tm.run_.run(transaction.ceylon:225)
	at example.ceylon.transaction.tm.run_.main(transaction.ceylon)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at ceylon.modules.api.runtime.SecurityActions.invokeRunInternal(SecurityActions.java:58)
	at ceylon.modules.api.runtime.SecurityActions.invokeRun(SecurityActions.java:48)
	at ceylon.modules.api.runtime.AbstractRuntime.invokeRun(AbstractRuntime.java:101)
	at ceylon.modules.api.runtime.AbstractRuntime.execute(AbstractRuntime.java:167)
	at ceylon.modules.api.runtime.AbstractRuntime.execute(AbstractRuntime.java:151)
	at ceylon.modules.Main.execute(Main.java:69)
	at ceylon.modules.Main.main(Main.java:42)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.jboss.modules.Module.run(Module.java:312)
	at org.jboss.modules.Main.main(Main.java:460)
	at ceylon.modules.bootstrap.CeylonRunTool.run(CeylonRunTool.java:208)
	... 10 more
{code}



--
This message was sent by Atlassian JIRA
(v6.3.11#6341)


More information about the jbossts-issues mailing list