public class XAMessenger extends DefaultMessenger implements XACapable
XAMessenger
is a default implementation of
Messenger which can also support XA transactions by enlisting and delisting
XAResources.
This is implemented as a seperate Messenger implementation to avoid the core
Messenger having a dependency on JTA.
.
Modifier and Type | Field and Description |
---|---|
private static org.apache.commons.logging.Log |
log
Logger
|
Constructor and Description |
---|
XAMessenger() |
Modifier and Type | Method and Description |
---|---|
void |
delistResources(javax.transaction.Transaction transaction,
int flag)
This method is called to delist any XA resources the given object
has previously enlisted to this XA transaction.
|
void |
enlistResources(javax.transaction.Transaction transaction)
This method is called to enlist any XA resources the given object
has to be part of the XA transaction.
|
protected javax.transaction.xa.XAResource |
getXAResource() |
borrowMessengerSession, call, call, clearReplyToDestination, close, createMessengerSession, createServerSessionPool, createSessionFactory, getAsyncSession, getConnection, getMessengerSession, getQueue, getReplyToConsumer, getReplyToDestination, getSession, getSessionFactory, getTopic, isTopic, isTopic, returnMessengerSession, setSessionFactory
addListener, addListener, borrowMessageConsumer, borrowMessageConsumer, commit, createBrowser, createBrowser, createBytesMessage, createConnectionConsumer, createConnectionConsumer, createConsumer, createConsumer, createMapMessage, createMessage, createMessageConsumer, createMessageConsumer, createMessageProducer, createObjectMessage, createObjectMessage, createStreamMessage, createTemporaryDestination, createTextMessage, createTextMessage, getDeliveryMode, getDeliveryMode, getDestination, getDisableMessageID, getDisableMessageTimestamp, getDurableName, getName, getPriority, getTimeToLive, isCacheProducers, isCacheRequestors, isDurable, isJndiDestinations, isNoLocal, receive, receive, receive, receive, receiveNoWait, receiveNoWait, removeListener, removeListener, returnMessageConsumer, rollback, run, send, send, setCacheProducers, setCacheRequestors, setDeliveryMode, setDeliveryMode, setDisableMessageID, setDisableMessageTimestamp, setDurable, setDurableName, setJndiDestinations, setName, setNoLocal, setPersistentDelivery, setPriority, setTimeToLive, toString
public void enlistResources(javax.transaction.Transaction transaction) throws java.lang.Exception
XACapable
enlistResources
in interface XACapable
transaction
- the transaction to enlist tojava.lang.Exception
public void delistResources(javax.transaction.Transaction transaction, int flag) throws java.lang.Exception
XACapable
delistResources
in interface XACapable
transaction
- the transaction to delist resources fromflag
- is the flag used by JTA when delisting resources.
It is either XAResource.TMSUCCESS, XAResource.TMSUSPEND, or XAResource.TMFAILjava.lang.Exception
protected javax.transaction.xa.XAResource getXAResource() throws java.lang.Exception
java.lang.Exception