org.mule.transaction.lookup
Class GenericTransactionManagerLookupFactory
java.lang.Object
org.mule.transaction.lookup.GenericTransactionManagerLookupFactory
- All Implemented Interfaces:
- Initialisable, TransactionManagerFactory
- Direct Known Subclasses:
- JBossTransactionManagerLookupFactory, JRunTransactionManagerLookupFactory, Resin3TransactionManagerLookupFactory, WeblogicTransactionManagerLookupFactory
public class GenericTransactionManagerLookupFactory
- extends Object
- implements TransactionManagerFactory, Initialisable
A factory performing a JNDI lookup for TransactionManager.
NOTE: Java EE 1.4
specification does not mandate application server vendors to expose a
TransactionManager for direct use, nor does it name the standard way to locate it.
For some servers the TransactionManager is not even available in the global JNDI
namespace, so your only bet is to run Mule in the same JVM as the application
server.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected final Log logger
context
protected Context context
GenericTransactionManagerLookupFactory
public GenericTransactionManagerLookupFactory()
getJndiName
public String getJndiName()
setJndiName
public void setJndiName(String jndiName)
getTxManager
public TransactionManager getTxManager()
setTxManager
public void setTxManager(TransactionManager txManager)
getEnvironment
public Map getEnvironment()
setEnvironment
public void setEnvironment(Map environment)
getContext
public Context getContext()
setContext
public void setContext(Context context)
create
public TransactionManager create()
throws Exception
- Description copied from interface:
TransactionManagerFactory
- Creates of obtains the jta transaction manager to use for mule transactions
- Specified by:
create
in interface TransactionManagerFactory
- Returns:
- the transaction manager to use
- Throws:
Exception
- if the transaction manager cannot be located or created- See Also:
TransactionManagerFactory.create()
initialise
public void initialise()
throws InitialisationException
- Method used to perform any initialisation work. If a fatal error occurs during
initialisation an
InitialisationException
should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException
should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.
- Specified by:
initialise
in interface Initialisable
- Throws:
InitialisationException
- if a fatal error occurs
causing the Mule instance to shutdown
RecoverableException
- if an error occurs that can be recovered from
Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.