public class ResourceHandle extends Object implements ResourceHandle, TransactionalResource
| Constructor and Description |
|---|
ResourceHandle(Object resource,
ResourceSpec spec,
ResourceAllocator alloc,
ClientSecurityInfo info) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeUserConnection() |
void |
decrementCount() |
void |
destroyResource() |
void |
enlistedInTransaction(Transaction tran)
Indicates that a resource has been enlisted in the transaction.
|
boolean |
equals(Object other) |
void |
fillInResourceObjects(Object userConnection,
XAResource xaRes) |
ClientSecurityInfo |
getClientSecurityInfo() |
Object |
getComponentInstance() |
long |
getId() |
long |
getLastValidated() |
javax.resource.spi.ConnectionEventListener |
getListener() |
String |
getName() |
int |
getPartition() |
Object |
getResource() |
ResourceAllocator |
getResourceAllocator() |
ResourceSpec |
getResourceSpec() |
ResourceState |
getResourceState() |
int |
getShareCount() |
Subject |
getSubject() |
int |
getUsageCount() |
Object |
getUserConnection() |
XAResource |
getXAResource() |
boolean |
hasConnectionErrorOccurred() |
int |
hashCode() |
void |
incrementCount() |
void |
incrementUsageCount() |
boolean |
isBusy() |
boolean |
isEnlisted() |
boolean |
isEnlistmentSuspended()
To check whether lazy enlistment is suspended or not.
If true, TM will not do enlist/lazy enlist. |
boolean |
isMarkedForReclaim()
To check if the resourceHandle is marked for leak reclaim or not.
|
boolean |
isShareable() |
boolean |
isTransactional()
Does this resource need enlistment to transaction manager?
|
void |
markForReclaim(boolean reclaim) |
void |
setBusy(boolean isBusy) |
void |
setComponentInstance(Object instance) |
void |
setConnectionErrorOccurred() |
void |
setEnlistmentSuspended(boolean enlistmentSuspended) |
void |
setLastValidated(long lastValidated) |
void |
setListener(javax.resource.spi.ConnectionEventListener l) |
void |
setPartition(int partition) |
void |
setResourceSpec(ResourceSpec spec) |
void |
setResourceState(ResourceState state) |
void |
setSubject(Subject subject) |
boolean |
supportsLazyAssociation() |
boolean |
supportsLazyEnlistment() |
boolean |
supportsXA() |
String |
toString() |
public final Object lock
public ResourceHandle(Object resource, ResourceSpec spec, ResourceAllocator alloc, ClientSecurityInfo info)
public boolean isTransactional()
isTransactional in interface ResourceHandleisTransactional in interface TransactionalResourcepublic boolean isEnlistmentSuspended()
isEnlistmentSuspended in interface ResourceHandleisEnlistmentSuspended in interface TransactionalResourcepublic void setEnlistmentSuspended(boolean enlistmentSuspended)
setEnlistmentSuspended in interface ResourceHandlepublic void markForReclaim(boolean reclaim)
public boolean isMarkedForReclaim()
public boolean supportsXA()
supportsXA in interface ResourceHandlesupportsXA in interface TransactionalResourcepublic ResourceAllocator getResourceAllocator()
public Object getResource()
public ClientSecurityInfo getClientSecurityInfo()
public void setResourceSpec(ResourceSpec spec)
public ResourceSpec getResourceSpec()
public XAResource getXAResource()
getXAResource in interface ResourceHandlegetXAResource in interface TransactionalResourcepublic Object getUserConnection()
public void setComponentInstance(Object instance)
setComponentInstance in interface ResourceHandlesetComponentInstance in interface TransactionalResourcepublic void closeUserConnection()
throws PoolingException
closeUserConnection in interface ResourceHandlecloseUserConnection in interface TransactionalResourcePoolingExceptionpublic Object getComponentInstance()
getComponentInstance in interface ResourceHandlegetComponentInstance in interface TransactionalResourcepublic long getId()
public void fillInResourceObjects(Object userConnection, XAResource xaRes)
public void incrementCount()
public void decrementCount()
public int getShareCount()
public void setSubject(Subject subject)
public Subject getSubject()
public void setConnectionErrorOccurred()
public boolean hasConnectionErrorOccurred()
public void setResourceState(ResourceState state)
public ResourceState getResourceState()
public void setListener(javax.resource.spi.ConnectionEventListener l)
public javax.resource.spi.ConnectionEventListener getListener()
public boolean isShareable()
isShareable in interface ResourceHandleisShareable in interface TransactionalResourcepublic void destroyResource()
destroyResource in interface ResourceHandledestroyResource in interface TransactionalResourcepublic boolean isEnlisted()
isEnlisted in interface ResourceHandleisEnlisted in interface TransactionalResourcepublic long getLastValidated()
public void setLastValidated(long lastValidated)
public int getUsageCount()
public void incrementUsageCount()
public int getPartition()
public void setPartition(int partition)
public String getName()
getName in interface TransactionalResourcepublic boolean supportsLazyEnlistment()
public boolean supportsLazyAssociation()
public void enlistedInTransaction(Transaction tran) throws IllegalStateException
TransactionalResourceenlistedInTransaction in interface TransactionalResourcetran - Transaction to which the resource is enlistedIllegalStateException - when unable to enlist the resourcepublic void setBusy(boolean isBusy)
public boolean isBusy()
Copyright © 2019. All rights reserved.