Package com.sun.enterprise.resource.rm
Class ResourceManagerImpl
- java.lang.Object
-
- com.sun.enterprise.resource.rm.ResourceManagerImpl
-
- All Implemented Interfaces:
ResourceManager
- Direct Known Subclasses:
LazyEnlistableResourceManagerImpl
public class ResourceManagerImpl extends Object implements ResourceManager
Resource Manager for any resource request from a component.- Author:
- Binod PG
-
-
Constructor Summary
Constructors Constructor Description ResourceManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelistResource(ResourceHandle resource, int xaresFlag)delist theResourceHandlefrom the transactionprotected voidenlist(JavaEETransactionManager tm, jakarta.transaction.Transaction tran, ResourceHandle h)voidenlistResource(ResourceHandle h)Enlist theResourceHandlein the transactionObjectgetComponent()Returns the component invoking resource request.jakarta.transaction.TransactiongetTransaction()Returns the transaction component is participating.voidregisterResource(ResourceHandle handle)Register theResourceHandlein the transactionvoidrollBackTransaction()Get's the component's transaction and marks it for rolling back.voidunregisterResource(ResourceHandle resource, int xaresFlag)Unregister theResourceHandlefrom the transaction
-
-
-
Method Detail
-
getTransaction
public jakarta.transaction.Transaction getTransaction() throws PoolingExceptionReturns the transaction component is participating.- Specified by:
getTransactionin interfaceResourceManager- Returns:
- Handle to the
Transactionobject. - Throws:
PoolingException- If there is any error in getting the transaction
-
getComponent
public Object getComponent()
Returns the component invoking resource request.- Specified by:
getComponentin interfaceResourceManager- Returns:
- Handle to the component.
-
enlistResource
public void enlistResource(ResourceHandle h) throws PoolingException
Enlist theResourceHandlein the transaction- Specified by:
enlistResourcein interfaceResourceManager- Parameters:
h-ResourceHandleobject- Throws:
PoolingException- If there is any error in enlisting.
-
registerResource
public void registerResource(ResourceHandle handle) throws PoolingException
Register theResourceHandlein the transaction- Specified by:
registerResourcein interfaceResourceManager- Parameters:
handle-ResourceHandleobject- Throws:
PoolingException- If there is any error in registering.
-
enlist
protected void enlist(JavaEETransactionManager tm, jakarta.transaction.Transaction tran, ResourceHandle h) throws PoolingException
- Throws:
PoolingException
-
rollBackTransaction
public void rollBackTransaction()
Get's the component's transaction and marks it for rolling back.- Specified by:
rollBackTransactionin interfaceResourceManager
-
delistResource
public void delistResource(ResourceHandle resource, int xaresFlag)
delist theResourceHandlefrom the transaction- Specified by:
delistResourcein interfaceResourceManager- Parameters:
resource-ResourceHandleobjectxaresFlag- flag indicating transaction success. This can be XAResource.TMSUCCESS or XAResource.TMFAIL
-
unregisterResource
public void unregisterResource(ResourceHandle resource, int xaresFlag)
Unregister theResourceHandlefrom the transaction- Specified by:
unregisterResourcein interfaceResourceManager- Parameters:
resource-ResourceHandleobjectxaresFlag- flag indicating transaction success. This can be XAResource.TMSUCCESS or XAResource.TMFAIL
-
-