|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.atomikos.jdbc.ExternalXAPooledConnectionImp
public class ExternalXAPooledConnectionImp
Copyright © 2004, Atomikos. An implementation of a DTPPooledConnection that can be managed by internal as well as external pools.
| Field Summary | |
|---|---|
protected Connection |
connectionProxy_
|
protected Date |
creationTime_
|
protected boolean |
discarded_
|
protected boolean |
invalidated_
|
protected Date |
lastUse_
|
protected Vector |
listeners_
|
protected PrintWriter |
logWriter_
|
protected HeuristicMessage |
msg_
|
protected XAConnection |
myConn_
|
protected TransactionalResource |
resource_
|
protected XAResourceTransaction |
restx_
|
| Constructor Summary | |
|---|---|
|
ExternalXAPooledConnectionImp(XAConnection c,
TransactionalResource resource)
|
protected |
ExternalXAPooledConnectionImp(XAConnection c,
TransactionalResource resource,
PrintWriter logWriter)
|
| Method Summary | |
|---|---|
void |
addConnectionEventListener(ConnectionEventListener l)
|
void |
close()
Closes the underlying connection for keeps. |
void |
connectionClosed(ConnectionEvent e)
|
void |
connectionErrorOccurred(ConnectionEvent e)
|
Connection |
getConnection()
To get the connection to work with. |
Connection |
getConnection(HeuristicMessage msg)
Get a connection with a given heuristic message. |
boolean |
getInvalidated()
|
Date |
getLastUse()
For pool management . |
TransactionalResource |
getTransactionalResource()
Get the transactional resource for this connection. |
boolean |
isDiscarded()
Tests if the connection can be put back into the pool. |
boolean |
isInResourceTransaction()
Test if the connection is currently associated with a resource transaction. |
void |
removeConnectionEventListener(ConnectionEventListener l)
|
protected void |
setDiscarded()
|
void |
setInvalidated()
|
void |
setLastUse(Date date)
For pool management reasons. |
void |
setResourceTransaction(ResourceTransaction restx)
Associate a resource transaction with this connection. |
protected static void |
suspendResourceTransaction(ResourceTransaction restx)
|
String |
toString()
|
ResourceTransaction |
unsetResourceTransaction()
Unsets the resource transaction property for this connection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Date lastUse_
protected XAConnection myConn_
protected Vector listeners_
protected boolean invalidated_
protected Date creationTime_
protected boolean discarded_
protected TransactionalResource resource_
protected XAResourceTransaction restx_
protected PrintWriter logWriter_
protected HeuristicMessage msg_
protected Connection connectionProxy_
| Constructor Detail |
|---|
public ExternalXAPooledConnectionImp(XAConnection c,
TransactionalResource resource)
protected ExternalXAPooledConnectionImp(XAConnection c,
TransactionalResource resource,
PrintWriter logWriter)
| Method Detail |
|---|
protected static void suspendResourceTransaction(ResourceTransaction restx)
public String toString()
toString in interface XPooledConnectiontoString in class Objectpublic TransactionalResource getTransactionalResource()
DTPPooledConnection
getTransactionalResource in interface DTPPooledConnection
public void setResourceTransaction(ResourceTransaction restx)
throws SQLException
DTPPooledConnection
setResourceTransaction in interface DTPPooledConnectionrestx - The resource transaction to be associated with this
connection.
SQLException - If a SQL error occurs.public ResourceTransaction unsetResourceTransaction()
DTPPooledConnection
unsetResourceTransaction in interface DTPPooledConnection
public Connection getConnection()
throws SQLException
getConnection in interface XPooledConnectiongetConnection in interface PooledConnectionSQLExceptionpublic void setInvalidated()
setInvalidated in interface XPooledConnectionpublic boolean getInvalidated()
getInvalidated in interface XPooledConnection
public void close()
throws SQLException
XPooledConnection
close in interface XPooledConnectionclose in interface PooledConnectionSQLExceptionpublic void addConnectionEventListener(ConnectionEventListener l)
addConnectionEventListener in interface PooledConnectionpublic void removeConnectionEventListener(ConnectionEventListener l)
removeConnectionEventListener in interface PooledConnectionpublic void setLastUse(Date date)
XPooledConnection
setLastUse in interface XPooledConnectionpublic Date getLastUse()
XPooledConnection
getLastUse in interface XPooledConnectionpublic boolean isDiscarded()
DTPPooledConnection
isDiscarded in interface DTPPooledConnectionprotected void setDiscarded()
public void connectionClosed(ConnectionEvent e)
connectionClosed in interface ConnectionEventListenerpublic void connectionErrorOccurred(ConnectionEvent e)
connectionErrorOccurred in interface ConnectionEventListener
public Connection getConnection(HeuristicMessage msg)
throws SQLException
DTPPooledConnection
getConnection in interface DTPPooledConnectionmsg - The message to include in the tx logs.
SQLExceptionDTPPooledConnection.getConnection(com.atomikos.icatch.HeuristicMessage)public boolean isInResourceTransaction()
DTPPooledConnection
isInResourceTransaction in interface DTPPooledConnectionDTPPooledConnection.isInResourceTransaction()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||