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 ManagedConnectionResourceExceptionpublic void associateConnection(java.lang.Object connection)
throws ResourceException
associateConnection in interface ManagedConnectionResourceExceptionpublic void addConnectionEventListener(ConnectionEventListener listener)
addConnectionEventListener in interface ManagedConnectionpublic void removeConnectionEventListener(ConnectionEventListener listener)
removeConnectionEventListener in interface ManagedConnectionpublic java.lang.Class<?> getDriverClass()
public java.lang.String getURL()
public XAResource getXAResource() throws ResourceException
getXAResource in interface ManagedConnectionResourceExceptionpublic LocalTransaction getLocalTransaction() throws ResourceException
getLocalTransaction in interface ManagedConnectionResourceExceptionpublic ManagedConnectionMetaData getMetaData() throws ResourceException
getMetaData in interface ManagedConnectionResourceExceptionpublic void setLogWriter(java.io.PrintWriter out)
throws ResourceException
setLogWriter in interface ManagedConnectionResourceExceptionpublic java.io.PrintWriter getLogWriter()
throws ResourceException
getLogWriter in interface ManagedConnectionResourceExceptionpublic void setIsolation(int isolation)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void connectionClosed(javax.sql.ConnectionEvent event)
connectionClosed in interface javax.sql.ConnectionEventListenerpublic void connectionErrorOccurred(javax.sql.ConnectionEvent event)
connectionErrorOccurred in interface javax.sql.ConnectionEventListenerpublic 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.SQLExceptionpublic void setReadOnly(boolean readOnly)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void setCatalog(java.lang.String catalog)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void setTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>> map)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void setTransactionIsolation(int isolation)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void cleanup()
throws ResourceException
cleanup in interface ManagedConnectionResourceExceptionpublic void destroy()
throws ResourceException
destroy in interface ManagedConnectionResourceExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic void setPastActiveTime(boolean isPastActiveTime)