Product Documentation : Ehcache Developer Guide : Transaction Support : Transaction Managers
Transaction Managers
Automatically Detected Transaction Managers
Ehcache automatically detects and uses the following transaction managers in the order shown below:
*GenericJNDI (e.g. GlassFish, JBoss, JTOM and any others that register themselves in JNDI at the standard location of java:/TransactionManager
*WebLogic (since 2.4.0)
*Bitronix
*Atomikos
No configuration is required. They work out-of-the-box. The first found is used.
Configuring a Transaction Manager
If your transaction manager is not in the list above or you want to change the priority, provide your own lookup class based on an implementation of net.sf.ehcache.transaction.manager.TransactionManagerLookup and specify it in place of the DefaultTransactionManagerLookup in ehcache.xml as shown below.
<transactionManagerLookup
class= "com.mycompany.transaction.manager.MyTransactionManagerLookupClass"
properties="" propertySeparator=":"/>
Another option is to provide a different location for the JNDI lookup by passing the jndiName property to the DefaultTransactionManagerLookup. The example below provides the proper location for the transaction manager in GlassFish v3:
<transactionManagerLookup
class="net.sf.ehcache.transaction.manager.DefaultTransactionManagerLookup"
properties="jndiName=java:appserver/TransactionManager" propertySeparator=";"/>
Copyright © 2010-2015 Software AG, Darmstadt, Germany.

Product Logo |   Feedback