|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atomikos.jdbc.ExternalXAPooledConnectionImp
public class ExternalXAPooledConnectionImp
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 XPooledConnection
toString
in class Object
public TransactionalResource getTransactionalResource()
DTPPooledConnection
getTransactionalResource
in interface DTPPooledConnection
public void setResourceTransaction(ResourceTransaction restx) throws SQLException
DTPPooledConnection
setResourceTransaction
in interface DTPPooledConnection
restx
- 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 XPooledConnection
getConnection
in interface PooledConnection
SQLException
public void setInvalidated()
setInvalidated
in interface XPooledConnection
public boolean getInvalidated()
getInvalidated
in interface XPooledConnection
public void close() throws SQLException
XPooledConnection
close
in interface XPooledConnection
close
in interface PooledConnection
SQLException
public void addConnectionEventListener(ConnectionEventListener l)
addConnectionEventListener
in interface PooledConnection
public void removeConnectionEventListener(ConnectionEventListener l)
removeConnectionEventListener
in interface PooledConnection
public void setLastUse(Date date)
XPooledConnection
setLastUse
in interface XPooledConnection
public Date getLastUse()
XPooledConnection
getLastUse
in interface XPooledConnection
public boolean isDiscarded()
DTPPooledConnection
isDiscarded
in interface DTPPooledConnection
protected void setDiscarded()
public void connectionClosed(ConnectionEvent e)
connectionClosed
in interface ConnectionEventListener
public void connectionErrorOccurred(ConnectionEvent e)
connectionErrorOccurred
in interface ConnectionEventListener
public Connection getConnection(HeuristicMessage msg) throws SQLException
DTPPooledConnection
getConnection
in interface DTPPooledConnection
msg
- The message to include in the tx logs.
SQLException
DTPPooledConnection.getConnection(com.atomikos.icatch.HeuristicMessage)
public boolean isInResourceTransaction()
DTPPooledConnection
isInResourceTransaction
in interface DTPPooledConnection
DTPPooledConnection.isInResourceTransaction()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |