Package com.sun.enterprise.resource.rm
Class NoTxResourceManagerImpl
- java.lang.Object
-
- com.sun.enterprise.resource.rm.NoTxResourceManagerImpl
-
- All Implemented Interfaces:
ResourceManager
public class NoTxResourceManagerImpl extends Object implements ResourceManager
Resource Manager for a resource request from a component that is not to be associated with a transaction.- Author:
- Aditya Gore
-
-
Constructor Summary
Constructors Constructor Description NoTxResourceManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelistResource(ResourceHandle resource, int xaresFlag)delist theResourceHandlefrom the transaction This implementation of the method is expected to be a no-opvoidenlistResource(ResourceHandle h)Enlist theResourceHandlein the transaction This implementation of the method is expected to be a no-opObjectgetComponent()Returns the component invoking resource request.jakarta.transaction.TransactiongetTransaction()Returns null since this connection is outside any tx contextvoidlogFine(String message)voidregisterResource(ResourceHandle handle)Register theResourceHandlein the transaction This implementation of the method is expected to be a no-opvoidrollBackTransaction()Get's the component's transaction and marks it for rolling back.voidunregisterResource(ResourceHandle resource, int xaresFlag)Unregister theResourceHandlefrom the transaction This implementation of the method is expected to be a no-op
-
-
-
Method Detail
-
getTransaction
public jakarta.transaction.Transaction getTransaction() throws PoolingExceptionReturns null since this connection is outside any tx context- Specified by:
getTransactionin interfaceResourceManager- Returns:
- An instance of Transaction object.
- Throws:
PoolingException- when unable to get current 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 This implementation of the method is expected to be a no-op- Specified by:
enlistResourcein interfaceResourceManager- Parameters:
h-ResourceHandleobject- Throws:
PoolingException- when unable to enlist resource
-
registerResource
public void registerResource(ResourceHandle handle) throws PoolingException
Register theResourceHandlein the transaction This implementation of the method is expected to be a no-op- Specified by:
registerResourcein interfaceResourceManager- Parameters:
handle-ResourceHandleobject- Throws:
PoolingException- when unable to register resource
-
rollBackTransaction
public void rollBackTransaction()
Get's the component's transaction and marks it for rolling back. This implementation of the method is expected to be a no-op- Specified by:
rollBackTransactionin interfaceResourceManager
-
delistResource
public void delistResource(ResourceHandle resource, int xaresFlag)
delist theResourceHandlefrom the transaction This implementation of the method is expected to be a no-op- 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 This implementation of the method is expected to be a no-op- Specified by:
unregisterResourcein interfaceResourceManager- Parameters:
resource-ResourceHandleobjectxaresFlag- flag indicating transaction success. This can be XAResource.TMSUCCESS or XAResource.TMFAIL
-
logFine
public void logFine(String message)
-
-