org.openejb.resource.jdbc
Class JdbcManagedConnection
java.lang.Object
org.openejb.resource.jdbc.JdbcManagedConnection
- All Implemented Interfaces:
- javax.resource.spi.ManagedConnection
public class JdbcManagedConnection
- extends java.lang.Object
- implements javax.resource.spi.ManagedConnection
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
JdbcManagedConnection
public JdbcManagedConnection(javax.resource.spi.ManagedConnectionFactory managedFactory,
java.sql.Connection sqlConn,
JdbcConnectionRequestInfo rxInfo)
throws javax.resource.spi.ResourceAdapterInternalException
- Throws:
javax.resource.spi.ResourceAdapterInternalException
getSQLConnection
protected java.sql.Connection getSQLConnection()
getRequestInfo
protected JdbcConnectionRequestInfo getRequestInfo()
addConnectionEventListener
public void addConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
- Specified by:
addConnectionEventListener
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
- Throws:
javax.resource.ResourceException
cleanup
public void cleanup()
throws javax.resource.ResourceException
- This method will invalidate any JdbcConnection handles that have not already been invalidated (they self invalidate when they are explicitly closed).
- 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
getConnection
public java.lang.Object getConnection(javax.security.auth.Subject subject,
javax.resource.spi.ConnectionRequestInfo cxRequestInfo)
throws javax.resource.ResourceException
- Specified by:
getConnection
in interface javax.resource.spi.ManagedConnection
- Throws:
javax.resource.ResourceException
getLocalTransaction
public javax.resource.spi.LocalTransaction getLocalTransaction()
throws javax.resource.ResourceException
- Specified by:
getLocalTransaction
in interface javax.resource.spi.ManagedConnection
- Throws:
javax.resource.ResourceException
getLogWriter
public java.io.PrintWriter getLogWriter()
throws javax.resource.ResourceException
- Specified by:
getLogWriter
in interface javax.resource.spi.ManagedConnection
- Throws:
javax.resource.ResourceException
getMetaData
public javax.resource.spi.ManagedConnectionMetaData getMetaData()
throws javax.resource.ResourceException
- Specified by:
getMetaData
in interface javax.resource.spi.ManagedConnection
- Throws:
javax.resource.ResourceException
getXAResource
public javax.transaction.xa.XAResource getXAResource()
throws javax.resource.ResourceException
- Specified by:
getXAResource
in interface javax.resource.spi.ManagedConnection
- Throws:
javax.resource.ResourceException
removeConnectionEventListener
public void removeConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
- Specified by:
removeConnectionEventListener
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
- Throws:
javax.resource.ResourceException
localTransactionCommitted
protected void localTransactionCommitted()
localTransactionRolledback
protected void localTransactionRolledback()
localTransactionStarted
protected void localTransactionStarted()
connectionErrorOccurred
protected void connectionErrorOccurred(JdbcConnection jdbcConn,
java.sql.SQLException sqlE)
connectionClose
protected void connectionClose(JdbcConnection jdbcConn)
- Invoked by the JdbcConneciton when its close() method is called.
This method invalidates the JdbcConnection handle, removes it from
the list of active handles and notifies all the ConnectionEventListeners.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 1999-2011 OpenEJB. All Rights Reserved.