public class IfxPooledConnection
extends java.lang.Object
implements javax.sql.PooledConnection
A PooledConnection object is a connection object that provides hooks for connection pool management.
Constructor and Description |
---|
IfxPooledConnection()
Empty constructor
|
IfxPooledConnection(java.lang.String luser,
java.lang.String lpasswd,
IfxConnectionPoolDataSource tcpds)
Construct a IfxPooledConnection object with a given
IfxConnectionPoolDataSource object.
|
Modifier and Type | Method and Description |
---|---|
void |
addConnectionEventListener(javax.sql.ConnectionEventListener listener)
Add an event listener.
|
void |
addStatementEventListener(javax.sql.StatementEventListener listener) |
void |
close()
Close the database connection.
|
java.sql.Connection |
getConnection()
Extract the physical connection from this handle.
|
void |
removeConnectionEventListener(javax.sql.ConnectionEventListener listener)
Remove an event listener.
|
void |
removeStatementEventListener(javax.sql.StatementEventListener listener) |
void |
setTimeInPool()
Sets timeInPool to the Current time.
|
public IfxPooledConnection() throws java.sql.SQLException
Empty constructor
java.sql.SQLException
- if an error occurs while instantiating
a IfxPooledConnection object.public IfxPooledConnection(java.lang.String luser, java.lang.String lpasswd, IfxConnectionPoolDataSource tcpds) throws java.sql.SQLException
Construct a IfxPooledConnection object with a given IfxConnectionPoolDataSource object.
tcpds
- a IfxConnectionPoolDataSource objectjava.sql.SQLException
- if an error occurs while instantiating
a IfxPooledConnection object.public java.sql.Connection getConnection() throws java.sql.SQLException
Extract the physical connection from this handle.
getConnection
in interface javax.sql.PooledConnection
java.sql.SQLException
- if a database-access error occurs.public void close() throws java.sql.SQLException
Close the database connection.
close
in interface javax.sql.PooledConnection
java.sql.SQLException
- if a database-access error occurs.public void addConnectionEventListener(javax.sql.ConnectionEventListener listener)
Add an event listener.
addConnectionEventListener
in interface javax.sql.PooledConnection
listener
- a ConnectionEventListener objectpublic void removeConnectionEventListener(javax.sql.ConnectionEventListener listener)
Remove an event listener.
removeConnectionEventListener
in interface javax.sql.PooledConnection
listener
- a ConnectionEventListener objectpublic void setTimeInPool()
Sets timeInPool to the Current time.
public void addStatementEventListener(javax.sql.StatementEventListener listener)
addStatementEventListener
in interface javax.sql.PooledConnection
public void removeStatementEventListener(javax.sql.StatementEventListener listener)
removeStatementEventListener
in interface javax.sql.PooledConnection