Package com.sun.enterprise.resource.pool
Class PoolTxHelper
- java.lang.Object
-
- com.sun.enterprise.resource.pool.PoolTxHelper
-
public class PoolTxHelper extends Object
Transaction helper for the pool to check various states of a resource that is taking part in the transaction.- Author:
- Jagadish Ramu
-
-
Constructor Summary
Constructors Constructor Description PoolTxHelper(PoolInfo poolInfo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisLocalResourceEligibleForReuse(ResourceHandle h)Check whether the local resource can be put back to pool If true, unenlist the resourcebooleanisLocalResourceInTransaction(ResourceHandle h)Check whether the local resource in question is the one participating in transaction.booleanisLocalTransactionInProgress()Check whether a local transaction is in progress.booleanisNonXAResource(ResourceHandle resource)Check whether the resource is non-xabooleanisNonXAResourceAndFree(JavaEETransaction tran, ResourceHandle resource)Check whether the resource is non-xa, free and is enlisted in transaction.voidresourceEnlisted(jakarta.transaction.Transaction tran, ResourceHandle resource)this method is called when a resource is enlisted in transation tranList<ResourceHandle>transactionCompleted(jakarta.transaction.Transaction tran, int status, PoolInfo poolInfo)this method is called when transaction tran is completed
-
-
-
Field Detail
-
_logger
protected static final Logger _logger
-
-
Constructor Detail
-
PoolTxHelper
public PoolTxHelper(PoolInfo poolInfo)
-
-
Method Detail
-
isLocalResourceEligibleForReuse
public boolean isLocalResourceEligibleForReuse(ResourceHandle h)
Check whether the local resource can be put back to pool If true, unenlist the resource- Parameters:
h- ResourceHandle to be verified- Returns:
- boolean
-
isLocalTransactionInProgress
public boolean isLocalTransactionInProgress()
Check whether a local transaction is in progress.- Returns:
- true if a local transaction is in progress.
-
isLocalResourceInTransaction
public boolean isLocalResourceInTransaction(ResourceHandle h)
Check whether the local resource in question is the one participating in transaction.- Parameters:
h- ResourceHandle- Returns:
- true if the resource is participating in the transaction
-
isNonXAResource
public boolean isNonXAResource(ResourceHandle resource)
Check whether the resource is non-xa- Parameters:
resource- Resource to be verified- Returns:
- boolean indicating whether the resource is non-xa
-
isNonXAResourceAndFree
public boolean isNonXAResourceAndFree(JavaEETransaction tran, ResourceHandle resource)
Check whether the resource is non-xa, free and is enlisted in transaction.- Parameters:
tran- Transactionresource- Resource to be verified- Returns:
- boolean indicating whether the resource is free, non-xa and is enlisted in transaction
-
resourceEnlisted
public void resourceEnlisted(jakarta.transaction.Transaction tran, ResourceHandle resource)this method is called when a resource is enlisted in transation tran- Parameters:
tran- Transaction to which the resource need to be enlistedresource- Resource to be enlisted in the transaction
-
transactionCompleted
public List<ResourceHandle> transactionCompleted(jakarta.transaction.Transaction tran, int status, PoolInfo poolInfo)
this method is called when transaction tran is completed- Parameters:
tran- transaction which has completedstatus- transaction statuspoolInfo- Pool name- Returns:
- delisted resources
-
-