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
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
|
Method Summary |
void |
acknowledge(TopicMessageStore topicMessageStore,
String clientId,
String subscriptionName,
org.apache.activemq.command.MessageId messageId,
org.apache.activemq.command.MessageAck ack)
|
protected void |
onProxyTopicStore(ProxyTopicMessageStore proxyTopicMessageStore)
|
protected void |
onRecovered(MemoryTransactionStore.Tx tx)
|
void |
prepare(org.apache.activemq.command.TransactionId txid)
|
void |
recover(TransactionRecoveryListener listener)
|
void |
recoverAck(long id,
byte[] xid,
byte[] message)
|
void |
recoverAdd(long id,
byte[] messageBytes)
|
void |
recoverLastAck(byte[] encodedXid,
org.apache.activemq.command.ActiveMQDestination destination,
String subName,
String clientId)
|
void |
rollback(org.apache.activemq.command.TransactionId txid)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JdbcMemoryTransactionStore
public JdbcMemoryTransactionStore(JDBCPersistenceAdapter jdbcPersistenceAdapter)
prepare
public void prepare(org.apache.activemq.command.TransactionId txid)
throws IOException
- Specified by:
prepare in interface TransactionStore- Overrides:
prepare in class MemoryTransactionStore
- Throws:
IOException
rollback
public void rollback(org.apache.activemq.command.TransactionId txid)
throws IOException
- Specified by:
rollback in interface TransactionStore- Overrides:
rollback in class MemoryTransactionStore
- Throws:
IOException
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,
org.apache.activemq.command.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,
org.apache.activemq.command.MessageId messageId,
org.apache.activemq.command.MessageAck ack)
throws IOException
- Overrides:
acknowledge in class MemoryTransactionStore
- Throws:
IOException
Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.