activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Tully (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMQ-4021) jdbc TransactionContext close does unnecessary checks on autocommit - revisit
Date Wed, 05 Sep 2012 12:37:09 GMT
Gary Tully created AMQ-4021:
-------------------------------

             Summary: jdbc TransactionContext close does unnecessary checks on autocommit
- revisit
                 Key: AMQ-4021
                 URL: https://issues.apache.org/jira/browse/AMQ-4021
             Project: ActiveMQ
          Issue Type: Bug
          Components: Message Store
    Affects Versions: 5.6.0
            Reporter: Gary Tully


org.apache.activemq.broker.ft.DbRestartJDBCQueueMasterSlaveTest.testSendReceive intermittent
failure shows odd exceptions on occasion. This points to the need to revisit to cleanup this
code path. Stack trace below
{code}2012-09-05 00:47:45,110 [0.1:42083@62001] - WARN  LocalTransaction               - Store
COMMIT FAILED: 
java.io.IOException: No current connection.
	at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:45)
	at org.apache.activemq.store.jdbc.TransactionContext.close(TransactionContext.java:138)
	at org.apache.activemq.store.jdbc.TransactionContext.commit(TransactionContext.java:178)
	at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.commitTransaction(JDBCPersistenceAdapter.java:544)
	at org.apache.activemq.store.memory.MemoryTransactionStore$Tx.commit(MemoryTransactionStore.java:111)
	at org.apache.activemq.store.memory.MemoryTransactionStore.commit(MemoryTransactionStore.java:260)
	at org.apache.activemq.transaction.LocalTransaction.commit(LocalTransaction.java:72)
	at org.apache.activemq.broker.TransactionBroker.commitTransaction(TransactionBroker.java:263)
	at org.apache.activemq.broker.MutableBrokerFilter.commitTransaction(MutableBrokerFilter.java:103)
	at org.apache.activemq.broker.TransportConnection.processCommitTransactionOnePhase(TransportConnection.java:410)
	at org.apache.activemq.command.TransactionInfo.visit(TransactionInfo.java:100)
	at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
	at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
	at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
	at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
	at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229)
	at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
	at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)
	at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
	at java.lang.Thread.run(Thread.java:662)
Caused by: java.sql.SQLNonTransientConnectionException: No current connection.
	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.Util.noCurrentConnection(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.checkIfClosed(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.getAutoCommit(Unknown Source)
	at org.apache.activemq.store.jdbc.TransactionContext.close(TransactionContext.java:131)
	... 18 more
Caused by: java.sql.SQLException: No current connection.
	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
Source)
	... 25 more{code}

see: org.apache.activemq.store.jdbc.TransactionContext#close
{code}} finally {
                    if (connection != null && !connection.getAutoCommit()) {
                        connection.commit();
                    }
                }{code} why the state check on getAutoCommit? This state is explicitly set
by the context so it should always be known.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message