org.tranql.connector
Class AbstractManagedConnection
java.lang.Object
org.tranql.connector.AbstractManagedConnection
- All Implemented Interfaces:
- javax.resource.spi.DissociatableManagedConnection, javax.resource.spi.ManagedConnection, ManagedConnectionHandle
- Direct Known Subclasses:
- ManagedXAConnection
- public abstract class AbstractManagedConnection
- extends java.lang.Object
- implements javax.resource.spi.ManagedConnection, ManagedConnectionHandle, javax.resource.spi.DissociatableManagedConnection
- Version:
- $Revision: 251 $ $Date: 2005-09-08 02:15:48 +0200 (Thu, 08 Sep 2005) $
Field Summary |
protected javax.resource.spi.ConnectionRequestInfo |
cri
|
protected java.util.LinkedList |
handles
|
protected java.util.ArrayList |
listeners
|
protected java.io.PrintWriter |
log
|
protected javax.resource.spi.ManagedConnectionFactory |
mcf
|
protected java.lang.Object |
physicalConnection
|
protected javax.security.auth.Subject |
subject
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.resource.spi.ManagedConnection |
getLocalTransaction, getMetaData, getXAResource |
mcf
protected final javax.resource.spi.ManagedConnectionFactory mcf
physicalConnection
protected final java.lang.Object physicalConnection
handles
protected final java.util.LinkedList handles
listeners
protected final java.util.ArrayList listeners
log
protected java.io.PrintWriter log
subject
protected javax.security.auth.Subject subject
cri
protected javax.resource.spi.ConnectionRequestInfo cri
AbstractManagedConnection
public AbstractManagedConnection(javax.resource.spi.ManagedConnectionFactory mcf,
java.lang.Object physicalConnection,
ExceptionSorter exceptionSorter)
getPhysicalConnection
public java.lang.Object getPhysicalConnection()
- Specified by:
getPhysicalConnection
in interface ManagedConnectionHandle
cleanup
public void cleanup()
throws javax.resource.ResourceException
- Default implementation dissociates the connection handles.
Sub-classes should override to perform any cleanup needed on the physical connection.
- Specified by:
cleanup
in interface javax.resource.spi.ManagedConnection
- Throws:
javax.resource.ResourceException
destroy
public void destroy()
throws javax.resource.ResourceException
- Specified by:
destroy
in interface javax.resource.spi.ManagedConnection
- Throws:
javax.resource.ResourceException
closePhysicalConnection
protected abstract void closePhysicalConnection()
throws javax.resource.ResourceException
- Throws:
javax.resource.ResourceException
associateConnection
public void associateConnection(java.lang.Object o)
throws javax.resource.ResourceException
- Specified by:
associateConnection
in interface javax.resource.spi.ManagedConnection
- Throws:
javax.resource.ResourceException
dissociateConnections
public void dissociateConnections()
throws javax.resource.ResourceException
- Specified by:
dissociateConnections
in interface javax.resource.spi.DissociatableManagedConnection
- Throws:
javax.resource.ResourceException
connectionClosed
public void connectionClosed(java.lang.Object handle)
- Specified by:
connectionClosed
in interface ManagedConnectionHandle
connectionError
public void connectionError(java.lang.Exception e)
- Specified by:
connectionError
in interface ManagedConnectionHandle
unfilteredConnectionError
protected void unfilteredConnectionError(java.lang.Exception e)
addConnectionEventListener
public void addConnectionEventListener(javax.resource.spi.ConnectionEventListener connectionEventListener)
- Specified by:
addConnectionEventListener
in interface javax.resource.spi.ManagedConnection
removeConnectionEventListener
public void removeConnectionEventListener(javax.resource.spi.ConnectionEventListener connectionEventListener)
- Specified by:
removeConnectionEventListener
in interface javax.resource.spi.ManagedConnection
getLogWriter
public java.io.PrintWriter getLogWriter()
throws javax.resource.ResourceException
- Specified by:
getLogWriter
in interface javax.resource.spi.ManagedConnection
- Throws:
javax.resource.ResourceException
setLogWriter
public void setLogWriter(java.io.PrintWriter printWriter)
throws javax.resource.ResourceException
- Specified by:
setLogWriter
in interface javax.resource.spi.ManagedConnection
- Throws:
javax.resource.ResourceException
localTransactionStart
protected void localTransactionStart(boolean isSPI)
throws javax.resource.ResourceException
- Throws:
javax.resource.ResourceException
localTransactionCommit
protected void localTransactionCommit(boolean isSPI)
throws javax.resource.ResourceException
- Throws:
javax.resource.ResourceException
localTransactionRollback
protected void localTransactionRollback(boolean isSPI)
throws javax.resource.ResourceException
- Throws:
javax.resource.ResourceException
getConnection
public java.lang.Object getConnection(javax.security.auth.Subject subject,
javax.resource.spi.ConnectionRequestInfo connectionRequestInfo)
throws javax.resource.ResourceException
- Specified by:
getConnection
in interface javax.resource.spi.ManagedConnection
- Throws:
javax.resource.ResourceException
Copyright © -2006 The Codehaus. All Rights Reserved.