|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.activemq.broker.BrokerFilter
org.apache.activemq.broker.TransactionBroker
public class TransactionBroker
This broker filter handles the transaction related operations in the Broker interface.
Field Summary |
---|
Fields inherited from class org.apache.activemq.broker.BrokerFilter |
---|
next |
Constructor Summary | |
---|---|
TransactionBroker(Broker next,
TransactionStore transactionStore)
|
Method Summary | |
---|---|
void |
acknowledge(ConsumerBrokerExchange consumerExchange,
MessageAck ack)
Used to acknowledge the receipt of a message by a client. |
void |
beginTransaction(ConnectionContext context,
TransactionId xid)
Starts a transaction. |
void |
brokerServiceStarted()
called when the brokerService starts |
void |
commitTransaction(ConnectionContext context,
TransactionId xid,
boolean onePhase)
Commits a transaction. |
void |
forgetTransaction(ConnectionContext context,
TransactionId xid)
Forgets a transaction. |
TransactionId[] |
getPreparedTransactions(ConnectionContext context)
Gets a list of all the prepared xa transactions. |
Transaction |
getTransaction(ConnectionContext context,
TransactionId xid,
boolean mightBePrepared)
|
int |
prepareTransaction(ConnectionContext context,
TransactionId xid)
Prepares a transaction. |
void |
removeConnection(ConnectionContext context,
ConnectionInfo info,
java.lang.Throwable error)
A client is disconnecting from the broker. |
void |
removeTransaction(XATransactionId xid)
|
void |
rollbackTransaction(ConnectionContext context,
TransactionId xid)
Rollsback a transaction. |
void |
send(ProducerBrokerExchange producerExchange,
Message message)
Send a message to the broker to using the specified destination. |
void |
start()
Recovers any prepared transactions. |
void |
stop()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TransactionBroker(Broker next, TransactionStore transactionStore)
Method Detail |
---|
public void start() throws java.lang.Exception
start
in interface Service
start
in class BrokerFilter
java.lang.Exception
public void stop() throws java.lang.Exception
stop
in interface Service
stop
in class BrokerFilter
java.lang.Exception
public TransactionId[] getPreparedTransactions(ConnectionContext context) throws java.lang.Exception
Broker
getPreparedTransactions
in interface Broker
getPreparedTransactions
in class BrokerFilter
context
- transaction ids
java.lang.Exception
- TODOpublic void beginTransaction(ConnectionContext context, TransactionId xid) throws java.lang.Exception
Broker
beginTransaction
in interface Broker
beginTransaction
in class BrokerFilter
java.lang.Exception
- TODOpublic int prepareTransaction(ConnectionContext context, TransactionId xid) throws java.lang.Exception
Broker
prepareTransaction
in interface Broker
prepareTransaction
in class BrokerFilter
java.lang.Exception
- TODOpublic void commitTransaction(ConnectionContext context, TransactionId xid, boolean onePhase) throws java.lang.Exception
Broker
commitTransaction
in interface Broker
commitTransaction
in class BrokerFilter
java.lang.Exception
- TODOpublic void rollbackTransaction(ConnectionContext context, TransactionId xid) throws java.lang.Exception
Broker
rollbackTransaction
in interface Broker
rollbackTransaction
in class BrokerFilter
java.lang.Exception
- TODOpublic void forgetTransaction(ConnectionContext context, TransactionId xid) throws java.lang.Exception
Broker
forgetTransaction
in interface Broker
forgetTransaction
in class BrokerFilter
java.lang.Exception
public void acknowledge(ConsumerBrokerExchange consumerExchange, MessageAck ack) throws java.lang.Exception
Region
acknowledge
in interface Region
acknowledge
in class BrokerFilter
consumerExchange
- the environment the operation is being executed under.
java.lang.Exception
- TODOpublic void send(ProducerBrokerExchange producerExchange, Message message) throws java.lang.Exception
Region
send
in interface Region
send
in class BrokerFilter
producerExchange
- the environment the operation is being executed under.
java.lang.Exception
- TODOpublic void removeConnection(ConnectionContext context, ConnectionInfo info, java.lang.Throwable error) throws java.lang.Exception
Broker
removeConnection
in interface Broker
removeConnection
in class BrokerFilter
context
- the environment the operation is being executed under.error
- null if the client requested the disconnect or the error
that caused the client to disconnect.
java.lang.Exception
- TODOpublic Transaction getTransaction(ConnectionContext context, TransactionId xid, boolean mightBePrepared) throws javax.jms.JMSException, javax.transaction.xa.XAException
javax.jms.JMSException
javax.transaction.xa.XAException
public void removeTransaction(XATransactionId xid)
public void brokerServiceStarted()
Broker
brokerServiceStarted
in interface Broker
brokerServiceStarted
in class BrokerFilter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |