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 Object
- implements javax.resource.spi.ManagedConnection
JdbcManagedConnection
public JdbcManagedConnection(javax.resource.spi.ManagedConnectionFactory managedFactory,
Connection sqlConn,
JdbcConnectionRequestInfo rxInfo)
throws javax.resource.spi.ResourceAdapterInternalException
getSQLConnection
protected 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(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 Object getConnection(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 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 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(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,
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 String toString()
Copyright © 1999-2007 OpenEJB. All Rights Reserved.