Package org.apache.activemq.store.jdbc
Class JdbcMemoryTransactionStore
java.lang.Object
org.apache.activemq.store.memory.MemoryTransactionStore
org.apache.activemq.store.jdbc.JdbcMemoryTransactionStore
- All Implemented Interfaces:
org.apache.activemq.Service,TransactionStore
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
brokerService, inflightTransactions, persistenceAdapter, preparedTransactions -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidacknowledge(TopicMessageStore topicMessageStore, String clientId, String subscriptionName, org.apache.activemq.command.MessageId messageId, org.apache.activemq.command.MessageAck ack) protected voidvoidprepare(org.apache.activemq.command.TransactionId txid) voidrecover(TransactionRecoveryListener listener) voidrecoverAck(long id, byte[] xid, byte[] message) voidrecoverAdd(long id, byte[] messageBytes) voidrecoverLastAck(byte[] encodedXid, org.apache.activemq.command.ActiveMQDestination destination, String subName, String clientId) voidrollback(org.apache.activemq.command.TransactionId txid) Methods inherited from class org.apache.activemq.store.memory.MemoryTransactionStore
commit, delete, getPreparedTx, getTx, onProxyQueueStore, onProxyTopicStore, proxy, proxy, start, stop
-
Constructor Details
-
JdbcMemoryTransactionStore
-
-
Method Details
-
prepare
- Specified by:
preparein interfaceTransactionStore- Overrides:
preparein classMemoryTransactionStore- Throws:
IOException
-
rollback
- Specified by:
rollbackin interfaceTransactionStore- Overrides:
rollbackin classMemoryTransactionStore- Throws:
IOException
-
recover
- Specified by:
recoverin interfaceTransactionStore- Overrides:
recoverin classMemoryTransactionStore- Throws:
IOException
-
recoverAdd
- Throws:
IOException
-
recoverAck
- Throws:
IOException
-
recoverLastAck
public void recoverLastAck(byte[] encodedXid, org.apache.activemq.command.ActiveMQDestination destination, String subName, String clientId) throws IOException - Throws:
IOException
-
onRecovered
- Overrides:
onRecoveredin classMemoryTransactionStore
-
acknowledge
public void acknowledge(TopicMessageStore topicMessageStore, String clientId, String subscriptionName, org.apache.activemq.command.MessageId messageId, org.apache.activemq.command.MessageAck ack) throws IOException - Overrides:
acknowledgein classMemoryTransactionStore- Throws:
IOException
-