org.apache.activemq.store.jdbc
Class JdbcMemoryTransactionStore

java.lang.Object
  extended by org.apache.activemq.store.memory.MemoryTransactionStore
      extended by org.apache.activemq.store.jdbc.JdbcMemoryTransactionStore
All Implemented Interfaces:
Service, TransactionStore

public class JdbcMemoryTransactionStore
extends MemoryTransactionStore

respect 2pc prepare uses local transactions to maintain prepared state xid column provides transaction flag for additions and removals a commit clears that context and completes the work a rollback clears the flag and removes the additions Essentially a prepare is an insert &| update transaction commit|rollback is an update &| remove


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.activemq.store.memory.MemoryTransactionStore
MemoryTransactionStore.AddMessageCommand, MemoryTransactionStore.RemoveMessageCommand, MemoryTransactionStore.Tx
 
Field Summary
 
Fields inherited from class org.apache.activemq.store.memory.MemoryTransactionStore
inflightTransactions, persistenceAdapter, preparedTransactions
 
Constructor Summary
JdbcMemoryTransactionStore(JDBCPersistenceAdapter jdbcPersistenceAdapter)
           
 
Method Summary
 void acknowledge(TopicMessageStore topicMessageStore, String clientId, String subscriptionName, MessageId messageId, MessageAck ack)
           
protected  void onProxyTopicStore(ProxyTopicMessageStore proxyTopicMessageStore)
           
protected  void onRecovered(MemoryTransactionStore.Tx tx)
           
 void prepare(TransactionId txid)
           
 void recover(TransactionRecoveryListener listener)
           
 void recoverAck(long id, byte[] xid, byte[] message)
           
 void recoverAdd(long id, byte[] messageBytes)
           
 void recoverLastAck(byte[] encodedXid, ActiveMQDestination destination, String subName, String clientId)
           
 void rollback(TransactionId txid)
           
 
Methods inherited from class org.apache.activemq.store.memory.MemoryTransactionStore
commit, delete, getPreparedTx, getTx, proxy, proxy, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcMemoryTransactionStore

public JdbcMemoryTransactionStore(JDBCPersistenceAdapter jdbcPersistenceAdapter)
Method Detail

prepare

public void prepare(TransactionId txid)
             throws IOException
Specified by:
prepare in interface TransactionStore
Overrides:
prepare in class MemoryTransactionStore
Throws:
IOException
See Also:
TransactionStore.prepare(TransactionId)

rollback

public void rollback(TransactionId txid)
              throws IOException
Specified by:
rollback in interface TransactionStore
Overrides:
rollback in class MemoryTransactionStore
Throws:
IOException
See Also:
TransactionStore.rollback(TransactionId)

recover

public void recover(TransactionRecoveryListener listener)
             throws IOException
Specified by:
recover in interface TransactionStore
Overrides:
recover in class MemoryTransactionStore
Throws:
IOException

recoverAdd

public void recoverAdd(long id,
                       byte[] messageBytes)
                throws IOException
Throws:
IOException

recoverAck

public void recoverAck(long id,
                       byte[] xid,
                       byte[] message)
                throws IOException
Throws:
IOException

recoverLastAck

public void recoverLastAck(byte[] encodedXid,
                           ActiveMQDestination destination,
                           String subName,
                           String clientId)
                    throws IOException
Throws:
IOException

onProxyTopicStore

protected void onProxyTopicStore(ProxyTopicMessageStore proxyTopicMessageStore)
Overrides:
onProxyTopicStore in class MemoryTransactionStore

onRecovered

protected void onRecovered(MemoryTransactionStore.Tx tx)
Overrides:
onRecovered in class MemoryTransactionStore

acknowledge

public void acknowledge(TopicMessageStore topicMessageStore,
                        String clientId,
                        String subscriptionName,
                        MessageId messageId,
                        MessageAck ack)
                 throws IOException
Overrides:
acknowledge in class MemoryTransactionStore
Throws:
IOException


Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.