tyrex.resource.jdbc

Class PoolEntry

final class PoolEntry extends Object implements XAResourceCallback

Represents an entry in the connection pool.

Version: $Revision: 1.4 $

Author: Assaf Arkin

Field Summary
protected int_enlistCount
The reference count to track the number of times the XA resource is enlisted in a transaction.
protected boolean_enlistedInTransaction
True if the XA resource has been enlisted in a transaction
protected int_hashCode
The hash code for this entry.
protected PoolEntry_nextEntry
Reference to the next connection entry in hash table.
protected String_password
The password.
protected PooledConnection_pooled
The pooled connection associated with this entry.
protected int_state
The state of the pooled connection.
protected long_timeStamp
The timestamp for a used connection returns the clock time at which the connection was made available to the application.
protected String_user
The user name.
protected XAResource_xaResource
The XA resource associated with this connection.
Constructor Summary
protected PoolEntry(ConnectionPool connectionPool, PooledConnection pooled, int hashCode, XAResource xaResource, String user, String password)
Constructs a new pool entry.
Method Summary
voidboundary(Xid xid, boolean commit)
Called when the XA resource associated with this callback has been committed/rolledback in a transaction,i.e. javax.transaction.XA.XAResource.commit() or javax.transaction.XA.XAResource.rollback() has been called.
voidenlist(Xid xid)
Called when the XA resource associated with this callback has been enlisted in a transaction,i.e. javax.transaction.XA.XAResource.start(javax.transaction.XA.XAResource.TMSTART) has been called.
voidfail(Xid xid)
Called when the XA resource associated with this callback has been delisted from a transaction,i.e. javax.transaction.XA.XAResource.end(javax.transaction.XA.XAResource.TMFAIL) has been called.

Field Detail

_enlistCount

protected int _enlistCount
The reference count to track the number of times the XA resource is enlisted in a transaction.

_enlistedInTransaction

protected boolean _enlistedInTransaction
True if the XA resource has been enlisted in a transaction

_hashCode

protected final int _hashCode
The hash code for this entry.

_nextEntry

protected PoolEntry _nextEntry
Reference to the next connection entry in hash table.

_password

protected final String _password
The password.

_pooled

protected final PooledConnection _pooled
The pooled connection associated with this entry.

_state

protected int _state
The state of the pooled connection. One of PoolEntry, PoolEntry or PoolEntry.

_timeStamp

protected long _timeStamp
The timestamp for a used connection returns the clock time at which the connection was made available to the application. The timestamp for an unused connection returns the clock time at which the connection was placed in the pool.

_user

protected final String _user
The user name.

_xaResource

protected final XAResource _xaResource
The XA resource associated with this connection. May be null.

Constructor Detail

PoolEntry

protected PoolEntry(ConnectionPool connectionPool, PooledConnection pooled, int hashCode, XAResource xaResource, String user, String password)
Constructs a new pool entry. A new pool entry is not available by default. The available variable must be set to false to make it available.

Parameters: connectionPool the connection pool to which this pool entry belongs pooled The pooled connection hashCode The managed connection hash code xaResource The XA resource interface, or null txManager The transaction manager in which this resource is enlisted user The user name or null password The password or null

Method Detail

boundary

public void boundary(Xid xid, boolean commit)
Called when the XA resource associated with this callback has been committed/rolledback in a transaction,i.e. javax.transaction.XA.XAResource.commit() or javax.transaction.XA.XAResource.rollback() has been called.

Parameters: xid the xid that was used to enlist the XA resource (required) commit True if the XA resource has been committed. False if the XA resource has been rolled back.

enlist

public void enlist(Xid xid)
Called when the XA resource associated with this callback has been enlisted in a transaction,i.e. javax.transaction.XA.XAResource.start(javax.transaction.XA.XAResource.TMSTART) has been called.

Parameters: xid the xid that was used to enlist the XA resource (required)

fail

public void fail(Xid xid)
Called when the XA resource associated with this callback has been delisted from a transaction,i.e. javax.transaction.XA.XAResource.end(javax.transaction.XA.XAResource.TMFAIL) has been called.

Parameters: xid the xid that was used to enlist the XA resource (required)

Original code is Copyright (c) 1999-2001, Intalio, Inc. All Rights Reserved. Contributions by MetaBoss team are Copyright (c) 2003-2005, Softaris Pty. Ltd. All Rights Reserved.