org.codehaus.activemq.jca
Class DefaultEndpointFactory

java.lang.Object
  extended byorg.codehaus.activemq.jca.DefaultEndpointFactory
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, MessageEndpointFactory

public class DefaultEndpointFactory
extends Object
implements MessageEndpointFactory, org.springframework.beans.factory.InitializingBean

A factory of MessageEndpoint instances, either using XA transactions, Local (JMS) transactions or regular JMS message acknowledgements.

To use XA you must set the transactionManager property via the setTransactionManager(javax.transaction.TransactionManager) method. To use a local JMS transaction, then the XAResouce object passed in the createEndpoint(XAResource) call must implement LocalTransaction.

Version:
$Revision: 1.2 $

Constructor Summary
DefaultEndpointFactory()
           
DefaultEndpointFactory(MessageListener messageListener)
           
DefaultEndpointFactory(MessageListener messageListener, TransactionManager transactionManager)
           
 
Method Summary
 void afterPropertiesSet()
           
 MessageEndpoint createEndpoint(XAResource xaResource)
           
 MessageListener getMessageListener()
           
 TransactionManager getTransactionManager()
           
 boolean isDeliveryTransacted(Method method)
           
 void setMessageListener(MessageListener messageListener)
           
 void setTransactionManager(TransactionManager transactionManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultEndpointFactory

public DefaultEndpointFactory()

DefaultEndpointFactory

public DefaultEndpointFactory(MessageListener messageListener)

DefaultEndpointFactory

public DefaultEndpointFactory(MessageListener messageListener,
                              TransactionManager transactionManager)
Method Detail

createEndpoint

public MessageEndpoint createEndpoint(XAResource xaResource)
                               throws UnavailableException
Specified by:
createEndpoint in interface MessageEndpointFactory
Throws:
UnavailableException

isDeliveryTransacted

public boolean isDeliveryTransacted(Method method)
                             throws NoSuchMethodException
Specified by:
isDeliveryTransacted in interface MessageEndpointFactory
Throws:
NoSuchMethodException

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception

getMessageListener

public MessageListener getMessageListener()

setMessageListener

public void setMessageListener(MessageListener messageListener)

getTransactionManager

public TransactionManager getTransactionManager()

setTransactionManager

public void setTransactionManager(TransactionManager transactionManager)


Copyright © 2004-2005 Protique, Ltd.. All Rights Reserved.