org.apache.activemq.store.jdbc
Class TransactionContext

java.lang.Object
  extended by org.apache.activemq.store.jdbc.TransactionContext

public class TransactionContext
extends java.lang.Object

Helps keep track of the current transaction/JDBC connection.


Constructor Summary
TransactionContext(JDBCPersistenceAdapter persistenceAdapter)
           
 
Method Summary
 void begin()
           
 void close()
           
 void commit()
           
 void executeBatch()
           
 java.sql.PreparedStatement getAddMessageStatement()
           
 java.sql.Connection getConnection()
           
 java.sql.PreparedStatement getRemovedMessageStatement()
           
 java.sql.PreparedStatement getUpdateLastAckStatement()
           
 void rollback()
           
 void setAddMessageStatement(java.sql.PreparedStatement addMessageStatement)
           
 void setRemovedMessageStatement(java.sql.PreparedStatement removedMessageStatement)
           
 void setTransactionIsolation(int transactionIsolation)
           
 void setUpdateLastAckStatement(java.sql.PreparedStatement ackMessageStatement)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionContext

public TransactionContext(JDBCPersistenceAdapter persistenceAdapter)
                   throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getConnection

public java.sql.Connection getConnection()
                                  throws java.io.IOException
Throws:
java.io.IOException

executeBatch

public void executeBatch()
                  throws java.sql.SQLException
Throws:
java.sql.SQLException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

begin

public void begin()
           throws java.io.IOException
Throws:
java.io.IOException

commit

public void commit()
            throws java.io.IOException
Throws:
java.io.IOException

rollback

public void rollback()
              throws java.io.IOException
Throws:
java.io.IOException

getAddMessageStatement

public java.sql.PreparedStatement getAddMessageStatement()

setAddMessageStatement

public void setAddMessageStatement(java.sql.PreparedStatement addMessageStatement)

getUpdateLastAckStatement

public java.sql.PreparedStatement getUpdateLastAckStatement()

setUpdateLastAckStatement

public void setUpdateLastAckStatement(java.sql.PreparedStatement ackMessageStatement)

getRemovedMessageStatement

public java.sql.PreparedStatement getRemovedMessageStatement()

setRemovedMessageStatement

public void setRemovedMessageStatement(java.sql.PreparedStatement removedMessageStatement)

setTransactionIsolation

public void setTransactionIsolation(int transactionIsolation)


Copyright © 2005-2015. All Rights Reserved.