public class ManagedConnectionImpl extends java.lang.Object implements ManagedConnection, javax.sql.ConnectionEventListener
Closing the connection will return the real connection to the pool and close any statements.
Modifier and Type | Field and Description |
---|---|
protected static L10N |
L |
protected static java.util.logging.Logger |
log |
Modifier and Type | Method and Description |
---|---|
void |
addConnectionEventListener(ConnectionEventListener listener)
Adds a connection event listener.
|
void |
associateConnection(java.lang.Object connection)
Associates the associate connection.
|
void |
cleanup()
Cleans up the instance.
|
void |
closeEvent(UserConnection userConn)
Sends the close event.
|
void |
connectionClosed(javax.sql.ConnectionEvent event) |
void |
connectionErrorOccurred(javax.sql.ConnectionEvent event) |
void |
destroy()
Destroys the physical connection.
|
void |
fatalEvent()
Sends the fatal event.
|
void |
fatalEvent(java.lang.Exception e)
Sends the fatal event.
|
java.lang.Object |
getConnection(javax.security.auth.Subject subject,
ConnectionRequestInfo info)
Returns the underlying connection.
|
java.lang.Class<?> |
getDriverClass() |
LocalTransaction |
getLocalTransaction()
Returns the XA resource for the connection.
|
java.io.PrintWriter |
getLogWriter()
Gets the log writer.
|
ManagedConnectionMetaData |
getMetaData()
Returns the meta data.
|
java.lang.String |
getURL() |
XAResource |
getXAResource()
Returns the XA resource for the connection.
|
boolean |
isClosed() |
void |
onRuntimeException(java.lang.RuntimeException e) |
void |
onSqlException(java.sql.SQLException e) |
void |
removeConnectionEventListener(ConnectionEventListener listener)
Removes a connection event listener.
|
void |
sendFatalEvent(java.lang.Exception e)
Sends the fatal event.
|
void |
setAutoCommit(boolean autoCommit)
Sets the auto-commit.
|
void |
setCatalog(java.lang.String catalog)
Sets the JDBC catalog.
|
void |
setIsolation(int isolation)
Sets the isolation.
|
void |
setLogWriter(java.io.PrintWriter out)
Sets the log writer.
|
void |
setPastActiveTime(boolean isPastActiveTime) |
void |
setPingRequired() |
void |
setReadOnly(boolean readOnly)
Sets the read only attribute.
|
void |
setTransactionIsolation(int isolation)
Sets the connection's isolation.
|
void |
setTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>> map)
Sets the connection's type map.
|
java.lang.String |
toString() |
protected static final java.util.logging.Logger log
protected static L10N L
public boolean isClosed()
public java.lang.Object getConnection(javax.security.auth.Subject subject, ConnectionRequestInfo info) throws ResourceException
getConnection
in interface ManagedConnection
ResourceException
public void associateConnection(java.lang.Object connection) throws ResourceException
associateConnection
in interface ManagedConnection
ResourceException
public void addConnectionEventListener(ConnectionEventListener listener)
addConnectionEventListener
in interface ManagedConnection
public void removeConnectionEventListener(ConnectionEventListener listener)
removeConnectionEventListener
in interface ManagedConnection
public java.lang.Class<?> getDriverClass()
public java.lang.String getURL()
public XAResource getXAResource() throws ResourceException
getXAResource
in interface ManagedConnection
ResourceException
public LocalTransaction getLocalTransaction() throws ResourceException
getLocalTransaction
in interface ManagedConnection
ResourceException
public ManagedConnectionMetaData getMetaData() throws ResourceException
getMetaData
in interface ManagedConnection
ResourceException
public void setLogWriter(java.io.PrintWriter out) throws ResourceException
setLogWriter
in interface ManagedConnection
ResourceException
public java.io.PrintWriter getLogWriter() throws ResourceException
getLogWriter
in interface ManagedConnection
ResourceException
public void setIsolation(int isolation) throws java.sql.SQLException
java.sql.SQLException
public void connectionClosed(javax.sql.ConnectionEvent event)
connectionClosed
in interface javax.sql.ConnectionEventListener
public void connectionErrorOccurred(javax.sql.ConnectionEvent event)
connectionErrorOccurred
in interface javax.sql.ConnectionEventListener
public void closeEvent(UserConnection userConn)
public void fatalEvent()
public void fatalEvent(java.lang.Exception e)
public void sendFatalEvent(java.lang.Exception e)
public void onSqlException(java.sql.SQLException e)
public void onRuntimeException(java.lang.RuntimeException e)
public void setPingRequired()
public void setAutoCommit(boolean autoCommit) throws java.sql.SQLException
java.sql.SQLException
public void setReadOnly(boolean readOnly) throws java.sql.SQLException
java.sql.SQLException
public void setCatalog(java.lang.String catalog) throws java.sql.SQLException
java.sql.SQLException
public void setTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>> map) throws java.sql.SQLException
java.sql.SQLException
public void setTransactionIsolation(int isolation) throws java.sql.SQLException
java.sql.SQLException
public void cleanup() throws ResourceException
cleanup
in interface ManagedConnection
ResourceException
public void destroy() throws ResourceException
destroy
in interface ManagedConnection
ResourceException
public java.lang.String toString()
toString
in class java.lang.Object
public void setPastActiveTime(boolean isPastActiveTime)