Class Selector
- java.lang.Object
-
- net.sf.ehcache.transaction.manager.selector.Selector
-
- Direct Known Subclasses:
ClassSelector,FactorySelector,JndiSelector,NullSelector
public abstract class Selector extends java.lang.ObjectAbstract class which is used to do various things related to JTA transaction managers, like looking them up, registering XAResources for recovery...- Author:
- Ludovic Orban
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSelector(java.lang.String vendor)Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract javax.transaction.TransactionManagerdoLookup()Lookup the transaction manager.javax.transaction.TransactionManagergetTransactionManager()Get the transaction manager, looking it up if necessary.java.lang.StringgetVendor()Get the vendor namevoidregisterResource(EhcacheXAResource ehcacheXAResource, boolean forRecovery)Register an XAResource with the transaction manager.voidunregisterResource(EhcacheXAResource ehcacheXAResource, boolean forRecovery)Unregister an XAResource from the transaction manager.
-
-
-
Method Detail
-
getVendor
public java.lang.String getVendor()
Get the vendor name- Returns:
- the vendor name
-
getTransactionManager
public javax.transaction.TransactionManager getTransactionManager()
Get the transaction manager, looking it up if necessary. Once the transaction manager has been looked up, its reference is cached.- Returns:
- the transaction manager
-
registerResource
public void registerResource(EhcacheXAResource ehcacheXAResource, boolean forRecovery)
Register an XAResource with the transaction manager.- Parameters:
ehcacheXAResource- the XAResourceforRecovery- true if this XAResource is being registered purely for recovery purpose
-
unregisterResource
public void unregisterResource(EhcacheXAResource ehcacheXAResource, boolean forRecovery)
Unregister an XAResource from the transaction manager.- Parameters:
ehcacheXAResource- the XAResourceforRecovery- true if this XAResource was registered purely for recovery purpose
-
doLookup
protected abstract javax.transaction.TransactionManager doLookup()
Lookup the transaction manager.- Returns:
- the transaction manager, or null if it could not be looked up.
-
-