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 void
delistResource(ResourceHandle resource, int xaresFlag)
delist theResourceHandle
from the transaction This implementation of the method is expected to be a no-opvoid
enlistResource(ResourceHandle h)
Enlist theResourceHandle
in the transaction This implementation of the method is expected to be a no-opObject
getComponent()
Returns the component invoking resource request.jakarta.transaction.Transaction
getTransaction()
Returns null since this connection is outside any tx contextvoid
logFine(String message)
void
registerResource(ResourceHandle handle)
Register theResourceHandle
in the transaction This implementation of the method is expected to be a no-opvoid
rollBackTransaction()
Get's the component's transaction and marks it for rolling back.void
unregisterResource(ResourceHandle resource, int xaresFlag)
Unregister theResourceHandle
from the transaction This implementation of the method is expected to be a no-op
-
-
-
Method Detail
-
getTransaction
public jakarta.transaction.Transaction getTransaction() throws PoolingException
Returns null since this connection is outside any tx context- Specified by:
getTransaction
in 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:
getComponent
in interfaceResourceManager
- Returns:
- Handle to the component
-
enlistResource
public void enlistResource(ResourceHandle h) throws PoolingException
Enlist theResourceHandle
in the transaction This implementation of the method is expected to be a no-op- Specified by:
enlistResource
in interfaceResourceManager
- Parameters:
h
-ResourceHandle
object- Throws:
PoolingException
- when unable to enlist resource
-
registerResource
public void registerResource(ResourceHandle handle) throws PoolingException
Register theResourceHandle
in the transaction This implementation of the method is expected to be a no-op- Specified by:
registerResource
in interfaceResourceManager
- Parameters:
handle
-ResourceHandle
object- 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:
rollBackTransaction
in interfaceResourceManager
-
delistResource
public void delistResource(ResourceHandle resource, int xaresFlag)
delist theResourceHandle
from the transaction This implementation of the method is expected to be a no-op- Specified by:
delistResource
in interfaceResourceManager
- Parameters:
resource
-ResourceHandle
objectxaresFlag
- flag indicating transaction success. This can be XAResource.TMSUCCESS or XAResource.TMFAIL
-
unregisterResource
public void unregisterResource(ResourceHandle resource, int xaresFlag)
Unregister theResourceHandle
from the transaction This implementation of the method is expected to be a no-op- Specified by:
unregisterResource
in interfaceResourceManager
- Parameters:
resource
-ResourceHandle
objectxaresFlag
- flag indicating transaction success. This can be XAResource.TMSUCCESS or XAResource.TMFAIL
-
logFine
public void logFine(String message)
-
-