org.sourceforge.bdbadapter.cci
Class ManagedConnectionImpl
java.lang.Object
|
+--org.sourceforge.bdbadapter.cci.ManagedConnectionImpl
- All Implemented Interfaces:
- javax.resource.spi.ManagedConnection
- public class ManagedConnectionImpl
- extends java.lang.Object
- implements javax.resource.spi.ManagedConnection
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
logWriter
private java.io.PrintWriter logWriter
listeners
private java.util.Vector listeners
connections
private java.util.Set connections
mcf
private ManagedConnectionFactoryImpl mcf
destroyed
private boolean destroyed
env
private AdapterEnv env
db
private com.sleepycat.db.Db db
info
private ConnectionRequestInfoImpl info
props
private java.util.Properties props
spiTxn
private SpiLocalTransactionImpl spiTxn
ManagedConnectionImpl
ManagedConnectionImpl(AdapterEnv env,
com.sleepycat.db.Db db,
ManagedConnectionFactoryImpl mcf,
java.util.Properties props,
ConnectionRequestInfoImpl info)
throws javax.resource.ResourceException
addConnectionEventListener
public void addConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
- Specified by:
addConnectionEventListener
in interface javax.resource.spi.ManagedConnection
removeConnectionEventListener
public void removeConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
- Specified by:
removeConnectionEventListener
in interface javax.resource.spi.ManagedConnection
getConnection
public java.lang.Object getConnection(javax.security.auth.Subject subject,
javax.resource.spi.ConnectionRequestInfo info)
throws javax.resource.ResourceException
- Specified by:
getConnection
in interface javax.resource.spi.ManagedConnection
cleanup
public void cleanup()
throws javax.resource.ResourceException
- Specified by:
cleanup
in interface javax.resource.spi.ManagedConnection
destroy
public void destroy()
throws javax.resource.ResourceException
- Specified by:
destroy
in interface javax.resource.spi.ManagedConnection
associateConnection
public void associateConnection(java.lang.Object connection)
throws javax.resource.ResourceException
- Specified by:
associateConnection
in interface javax.resource.spi.ManagedConnection
getXAResource
public javax.transaction.xa.XAResource getXAResource()
throws javax.resource.ResourceException
- Specified by:
getXAResource
in interface javax.resource.spi.ManagedConnection
getLocalTransaction
public javax.resource.spi.LocalTransaction getLocalTransaction()
throws javax.resource.ResourceException
- Specified by:
getLocalTransaction
in interface javax.resource.spi.ManagedConnection
getTxn
com.sleepycat.db.DbTxn getTxn()
getMetaData
public javax.resource.spi.ManagedConnectionMetaData getMetaData()
throws javax.resource.ResourceException
- Specified by:
getMetaData
in interface javax.resource.spi.ManagedConnection
setLogWriter
public void setLogWriter(java.io.PrintWriter out)
throws javax.resource.ResourceException
- Specified by:
setLogWriter
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
getProperties
java.util.Properties getProperties()
throws javax.resource.ResourceException
isDestroyed
boolean isDestroyed()
checkIfDestroyed
private void checkIfDestroyed()
throws javax.resource.ResourceException
getMcf
ManagedConnectionFactoryImpl getMcf()
getDb
com.sleepycat.db.Db getDb()
throws javax.resource.ResourceException
closeDb
private void closeDb()
throws javax.resource.ResourceException
getDatabasePath
java.lang.String getDatabasePath()
getInfo
ConnectionRequestInfoImpl getInfo()
removeConnection
void removeConnection(ConnectionImpl con)
addConnection
void addConnection(ConnectionImpl con)
getConnections
java.util.Set getConnections()
connectionClosed
void connectionClosed(java.lang.Exception ex,
ConnectionImpl con)
throws java.sql.SQLException
connectionErrorOccurred
void connectionErrorOccurred(java.lang.Exception ex,
ConnectionImpl con)
removeUnusedLogs
private void removeUnusedLogs()