Methods Summary |
---|
public void | decrementCount()
if (shareCount == 0) {
throw new IllegalStateException("shareCount cannot be negative");
} else {
shareCount--;
}
|
public boolean | equals(java.lang.Object other)
if (other == null) return false;
if (other instanceof ResourceHandle) {
return this.id == (((ResourceHandle) other).id);
}
return false;
|
public void | fillInResourceObjects(java.lang.Object userConnection, javax.transaction.xa.XAResource xaRes)
if (userConnection != null) usercon = userConnection;
if (xaRes !=null) {
if(logger.isLoggable(Level.FINEST)){
//When Log level is Finest, XAResourceWrapper is used to log
//all XA interactions - Don't wrap XAResourceWrapper if it is
//already wrapped
if ((xaRes instanceof XAResourceWrapper) ||
(xaRes instanceof ConnectorXAResource)) {
this.xares = xaRes;
} else {
this.xares = new XAResourceWrapper(xaRes);
}
} else {
this.xares = xaRes;
}
}
|
public ClientSecurityInfo | getClientSecurityInfo()
return info;
|
public java.lang.Object | getComponentInstance()
return instance;
|
public long | getLastValidated()
return lastValidated;
|
public javax.resource.spi.ConnectionEventListener | getListener()
return listener;
|
private static long | getNextId() //holds the no. of times the handle(connection) is used so far.
synchronized (ResourceHandle.class) {
idSequence++;
return idSequence;
}
|
public java.lang.Object | getResource()
return resource;
|
public ResourceAllocator | getResourceAllocator()
return alloc;
|
public ResourceSpec | getResourceSpec()
return spec;
|
public ResourceState | getResourceState()
return state;
|
public int | getShareCount()
return shareCount;
|
public javax.security.auth.Subject | getSubject()
return subject;
|
public long | getThreadId()
return threadId_;
|
public int | getUsageCount()
return usageCount;
|
public java.lang.Object | getUserConnection()
return usercon;
|
public javax.transaction.xa.XAResource | getXAResource()
return xares;
|
public boolean | hasConnectionErrorOccurred()
return connectionErrorOccurred;
|
public int | hashCode()
return Long.valueOf(id).hashCode();
|
public void | incrementCount()
shareCount++;
|
public void | incrementUsageCount()
usageCount++;
|
public boolean | isAssociated()
return associated_;
|
public boolean | isDirty()
return dirty_;
|
public boolean | isEnlisted()
return state != null && state.isEnlisted();
|
public boolean | isEnlistmentSuspended()To check whether lazy enlistment is suspended or not.
If true, TM will not do enlist/lazy enlist.
return enlistmentSuspended;
|
public boolean | isShareable()
return alloc.shareableWithinComponent();
|
public boolean | isTransactional()Does this resource need enlistment to transaction manager?
return alloc.isTransactional();
|
public void | setAssociated(boolean flag)
associated_ = flag;
|
public void | setComponentInstance(java.lang.Object instance)
this.instance = instance;
|
public void | setConnectionErrorOccurred()
connectionErrorOccurred = true;
|
public void | setDirty()
dirty_ = true;
|
public void | setEnlistmentSuspended(boolean enlistmentSuspended)
this.enlistmentSuspended = enlistmentSuspended;
|
public void | setLastValidated(long lastValidated)
this.lastValidated = lastValidated;
|
public void | setListener(javax.resource.spi.ConnectionEventListener l)
this.listener = l;
|
public void | setResourceSpec(ResourceSpec spec)
this.spec = spec;
|
public void | setResourceState(ResourceState state)
this.state = state;
|
public void | setSubject(javax.security.auth.Subject subject)
this.subject = subject;
|
public void | setThreadId(long threadId)
threadId_ = threadId;
|
public boolean | supportsLazyAssociation()
return supportsLazyAssoc_;
|
public boolean | supportsLazyEnlistment()
return supportsLazyEnlistment_;
|
public boolean | supportsXA()
return supportsXAResource;
|
public java.lang.String | toString()
return String.valueOf(id);
|