com.informix.jdbcx
Class IfxPooledConnection

java.lang.Object
  extended bycom.informix.jdbcx.IfxPooledConnection
All Implemented Interfaces:
javax.sql.PooledConnection

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 Summary
IfxPooledConnection()
           Empty constructor
IfxPooledConnection(java.lang.String luser, java.lang.String lpasswd, IfxConnectionPoolDataSource tcpds)
           Construct a IfxPooledConnection object with a given IfxConnectionPoolDataSource object.
 
Method Summary
 void addConnectionEventListener(javax.sql.ConnectionEventListener listener)
           Add an event 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 setTimeInPool()
          Sets timeInPool to the Current time.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IfxPooledConnection

public IfxPooledConnection()
                    throws java.sql.SQLException

Empty constructor

Throws:
java.sql.SQLException - if an error occurs while instantiating a IfxPooledConnection object.

IfxPooledConnection

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.

Parameters:
tcpds - a IfxConnectionPoolDataSource object
Throws:
java.sql.SQLException - if an error occurs while instantiating a IfxPooledConnection object.
Method Detail

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException

Extract the physical connection from this handle.

Specified by:
getConnection in interface javax.sql.PooledConnection
Returns:
a Connection object
Throws:
java.sql.SQLException - if a database-access error occurs.

close

public void close()
           throws java.sql.SQLException

Close the database connection.

Specified by:
close in interface javax.sql.PooledConnection
Throws:
java.sql.SQLException - if a database-access error occurs.

addConnectionEventListener

public void addConnectionEventListener(javax.sql.ConnectionEventListener listener)

Add an event listener.

Specified by:
addConnectionEventListener in interface javax.sql.PooledConnection
Parameters:
listener - a ConnectionEventListener object

removeConnectionEventListener

public void removeConnectionEventListener(javax.sql.ConnectionEventListener listener)

Remove an event listener.

Specified by:
removeConnectionEventListener in interface javax.sql.PooledConnection
Parameters:
listener - a ConnectionEventListener object

setTimeInPool

public void setTimeInPool()

Sets timeInPool to the Current time.