public class TransactionBroker extends BrokerFilter
next
Constructor and Description |
---|
TransactionBroker(Broker next,
TransactionStore transactionStore) |
Modifier and Type | Method and Description |
---|---|
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 |
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,
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() |
addBroker, addConnection, addConsumer, addDestination, addDestinationInfo, addProducer, addSession, brokerServiceStarted, fastProducer, gc, getAdaptor, getAdminConnectionContext, getBrokerId, getBrokerName, getBrokerSequenceId, getBrokerService, getClients, getDestinationMap, getDestinationMap, getDestinations, getDestinations, getDurableDestinations, getExecutor, getNext, getPeerBrokerInfos, getRoot, getScheduler, getTempDataStore, getVmConnectorURI, isExpired, isFaultTolerantConfiguration, isFull, isStopped, messageConsumed, messageDelivered, messageDiscarded, messageExpired, messagePull, networkBridgeStarted, networkBridgeStopped, nowMasterBroker, postProcessDispatch, preProcessDispatch, processConsumerControl, processDispatchNotification, reapplyInterceptor, removeBroker, removeConsumer, removeDestination, removeDestinationInfo, removeProducer, removeSession, removeSubscription, sendToDeadLetterQueue, setAdminConnectionContext, slowConsumer, virtualDestinationAdded, virtualDestinationRemoved
public TransactionBroker(Broker next, TransactionStore transactionStore)
public void start() throws Exception
start
in interface Service
start
in class BrokerFilter
Exception
public void stop() throws Exception
stop
in interface Service
stop
in class BrokerFilter
Exception
public TransactionId[] getPreparedTransactions(ConnectionContext context) throws Exception
Broker
getPreparedTransactions
in interface Broker
getPreparedTransactions
in class BrokerFilter
context
- transaction idsException
- TODOpublic void beginTransaction(ConnectionContext context, TransactionId xid) throws Exception
Broker
beginTransaction
in interface Broker
beginTransaction
in class BrokerFilter
Exception
- TODOpublic int prepareTransaction(ConnectionContext context, TransactionId xid) throws Exception
Broker
prepareTransaction
in interface Broker
prepareTransaction
in class BrokerFilter
Exception
- TODOpublic void commitTransaction(ConnectionContext context, TransactionId xid, boolean onePhase) throws Exception
Broker
commitTransaction
in interface Broker
commitTransaction
in class BrokerFilter
Exception
- TODOpublic void rollbackTransaction(ConnectionContext context, TransactionId xid) throws Exception
Broker
rollbackTransaction
in interface Broker
rollbackTransaction
in class BrokerFilter
Exception
- TODOpublic void forgetTransaction(ConnectionContext context, TransactionId xid) throws Exception
Broker
forgetTransaction
in interface Broker
forgetTransaction
in class BrokerFilter
Exception
public void acknowledge(ConsumerBrokerExchange consumerExchange, MessageAck ack) throws Exception
Region
acknowledge
in interface Region
acknowledge
in class BrokerFilter
consumerExchange
- the environment the operation is being executed under.Exception
- TODOpublic void send(ProducerBrokerExchange producerExchange, Message message) throws Exception
Region
send
in interface Region
send
in class BrokerFilter
producerExchange
- the environment the operation is being executed under.Exception
- TODOpublic void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws 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.Exception
- TODOpublic Transaction getTransaction(ConnectionContext context, TransactionId xid, boolean mightBePrepared) throws javax.jms.JMSException, XAException
javax.jms.JMSException
XAException
public void removeTransaction(XATransactionId xid)
Copyright © 2005–2019 The Apache Software Foundation. All rights reserved.