org.apache.commons.messenger
Class XAMessenger
java.lang.Object
org.apache.commons.messenger.MessengerSupport
org.apache.commons.messenger.DefaultMessenger
org.apache.commons.messenger.XAMessenger
- All Implemented Interfaces:
- Messenger, XACapable
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.
.
- Version:
- $Revision: 155459 $
- Author:
- James Strachan
Methods inherited from class org.apache.commons.messenger.DefaultMessenger |
borrowMessengerSession, call, call, clearReplyToDestination, close, createMessengerSession, createServerSessionPool, createSessionFactory, getAsyncSession, getConnection, getMessengerSession, getQueue, getReplyToConsumer, getReplyToDestination, getSession, getSessionFactory, getTopic, isTopic, isTopic, returnMessengerSession, setSessionFactory |
Methods inherited from class org.apache.commons.messenger.MessengerSupport |
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 |
XAMessenger
public XAMessenger()
enlistResources
public void enlistResources(Transaction transaction)
throws Exception
- Description copied from interface:
XACapable
- This method is called to enlist any XA resources the given object
has to be part of the XA transaction.
- Specified by:
enlistResources
in interface XACapable
- Parameters:
transaction
- the transaction to enlist to
- Throws:
Exception
delistResources
public void delistResources(Transaction transaction,
int flag)
throws Exception
- Description copied from interface:
XACapable
- This method is called to delist any XA resources the given object
has previously enlisted to this XA transaction.
- Specified by:
delistResources
in interface XACapable
- Parameters:
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.TMFAIL
- Throws:
Exception
getXAResource
protected XAResource getXAResource()
throws Exception
- Returns:
- the XAResource associated with this Messenger if one exists
- Throws:
Exception
Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.