Top Description Methods
net.sf.ehcache.transaction.manager

public Interface TransactionManagerLookup

Known Direct Implementers
net.sf.ehcache.transaction.manager.DefaultTransactionManagerLookup
Imports
javax.transaction.TransactionManager, net.sf.ehcache.transaction.xa.EhcacheXAResource, java.util.Properties

Interface to enable a XA transactional cache to access the JTA TransactionManager. The implementing class can be configured in your xml file. It will then be instanciated by the Cache, during initialization. It'll then have the properties injected, should any have been specified. And finally, the TransactionManager will be queried for using #getTransactionManager.
Author
Alex Snaps

Method Summary

Modifier and TypeMethod and Description
public TransactionManager

Returns:

TransactionManager
getTransactionManager
()

Lookup available txnManagers

public void
init()

Switch the TransactionManagerLookup implementation to its initialized state.

public void
register(EhcacheXAResource
the XAResource to register for recovery in the choosen TM.
resource
,
boolean
true if the XAResource is meant to be registered for recovery purpose only.
forRecovery
)

execute txnManager specific code to register the XAResource for recovery.

public void
setProperties(Properties
the properties parsed from the config file's transactionManagerLookup tag's properties attribute
properties
)

Setter to the properties properties.

public void
unregister(EhcacheXAResource
the XAResource to register for recovery in the choosen TM.
resource
,
boolean
true if the XAResource is meant to be registered for recovery purpose only.
forRecovery
)

execute txnManager specific code to unregister the XAResource for recovery.

Method Detail

getTransactionManagerback to summary
public TransactionManager getTransactionManager()

Lookup available txnManagers

Returns:TransactionManager

TransactionManager

initback to summary
public void init()

Switch the TransactionManagerLookup implementation to its initialized state. All EhcacheXAResources registered before initialization are queued up internally and are only registered with the transaction manager during initialization.

registerback to summary
public void register(EhcacheXAResource resource, boolean forRecovery)

execute txnManager specific code to register the XAResource for recovery.

Parameters
resource:EhcacheXAResource

the XAResource to register for recovery in the choosen TM.

forRecovery:boolean

true if the XAResource is meant to be registered for recovery purpose only.

setPropertiesback to summary
public void setProperties(Properties properties)

Setter to the properties properties. This will be called right after the class has been instantiated.

Parameters
properties:Properties

the properties parsed from the config file's transactionManagerLookup tag's properties attribute

unregisterback to summary
public void unregister(EhcacheXAResource resource, boolean forRecovery)

execute txnManager specific code to unregister the XAResource for recovery.

Parameters
resource:EhcacheXAResource

the XAResource to register for recovery in the choosen TM.

forRecovery:boolean

true if the XAResource is meant to be registered for recovery purpose only.