public class StandardPooledConnection
extends java.lang.Object
implements javax.sql.PooledConnection
Modifier and Type | Field and Description |
---|---|
java.sql.Connection |
con |
StandardConnectionHandle |
connectionHandle |
protected StandardConnectionPoolDataSource |
dataSource |
Logger |
log |
Constructor and Description |
---|
StandardPooledConnection(StandardConnectionPoolDataSource dataSource,
java.lang.String user,
java.lang.String password)
Creates the physical database connection.
|
Modifier and Type | Method and Description |
---|---|
void |
addConnectionEventListener(javax.sql.ConnectionEventListener listener) |
void |
addStatementEventListener(javax.sql.StatementEventListener listener) |
void |
close() |
void |
connectionErrorOccurred(javax.sql.ConnectionEvent event)
Invoked when a fatal connection error occurs,
just before an SQLException is thrown to the application
This method is automatically called when a fatal error
is detected on the base connection.
|
java.sql.Connection |
getConnection()
Creates a new StandardConnectionHandle for use by an application.
|
java.sql.Connection |
getPhysicalConnection()
Access method allowing access to the underlying physical connection.
|
protected void |
newConnectionHandle() |
void |
removeConnectionEventListener(javax.sql.ConnectionEventListener listener) |
void |
removeStatementEventListener(javax.sql.StatementEventListener listener) |
void |
setLogger(Logger alog) |
java.lang.String |
toString() |
protected StandardConnectionPoolDataSource dataSource
public java.sql.Connection con
public StandardConnectionHandle connectionHandle
public Logger log
public StandardPooledConnection(StandardConnectionPoolDataSource dataSource, java.lang.String user, java.lang.String password) throws java.sql.SQLException
java.sql.SQLException
public java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface javax.sql.PooledConnection
java.sql.SQLException
protected void newConnectionHandle()
public void close() throws java.sql.SQLException
close
in interface javax.sql.PooledConnection
java.sql.SQLException
public void addConnectionEventListener(javax.sql.ConnectionEventListener listener)
addConnectionEventListener
in interface javax.sql.PooledConnection
public void removeConnectionEventListener(javax.sql.ConnectionEventListener listener)
removeConnectionEventListener
in interface javax.sql.PooledConnection
public void connectionErrorOccurred(javax.sql.ConnectionEvent event)
public java.sql.Connection getPhysicalConnection()
public void setLogger(Logger alog)
public java.lang.String toString()
toString
in class java.lang.Object
public void removeStatementEventListener(javax.sql.StatementEventListener listener)
removeStatementEventListener
in interface javax.sql.PooledConnection
public void addStatementEventListener(javax.sql.StatementEventListener listener)
addStatementEventListener
in interface javax.sql.PooledConnection