Oracle10g JDBC

oracle.jdbc.pool
Class OracleConnectionEventListener

java.lang.Object
  extended byoracle.jdbc.pool.OracleConnectionEventListener
All Implemented Interfaces:
javax.sql.ConnectionEventListener, java.util.EventListener, java.io.Serializable

public class OracleConnectionEventListener
extends java.lang.Object
implements javax.sql.ConnectionEventListener, java.io.Serializable

A ConnectionEventListener is an object that registers to receive events generated by a PooledConnection.

The ConnectionEventListener interface is implemented by a connection pooling component. A connection pooling component will usually be provided by a JDBC driver vendor, or another system software vendor. A ConnectionEventListener is notified by a JDBC driver when an application is finished using its Connection object. This event occurs after the application calls close on its representation of the PooledConnection. A ConnectionEventListener is also notified when a Connection error occurs due to the fact that the PooledConnection is unfit for future use---the server has crashed, for example. The listener is notified, by the JDBC driver, just before the driver throws an SQLException to the application using the PooledConnection.

OracleConnectionEventListener implements ConnectionEventListener

See Also:
Serialized Form

Field Summary
static java.lang.String BUILD_DATE
           
static boolean PRIVATE_TRACE
           
static boolean TRACE
           
 
Constructor Summary
OracleConnectionEventListener()
           Default constructor
OracleConnectionEventListener(javax.sql.DataSource ds)
           Construct an OracleConnectionEventListener with the DataSource as it's argument.
 
Method Summary
 void connectionClosed(javax.sql.ConnectionEvent ce)
          Invoked when the application calls close() on its representation of the connection.
 void connectionErrorOccurred(javax.sql.ConnectionEvent ce)
          Invoked when a fatal connection error occurs, just before an SQLException is thrown to the application.
 void setDataSource(javax.sql.DataSource ds)
          Set the DataSource corresponding to this listener.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRACE

public static final boolean TRACE
See Also:
Constant Field Values

PRIVATE_TRACE

public static final boolean PRIVATE_TRACE
See Also:
Constant Field Values

BUILD_DATE

public static final java.lang.String BUILD_DATE
See Also:
Constant Field Values
Constructor Detail

OracleConnectionEventListener

public OracleConnectionEventListener()

Default constructor


OracleConnectionEventListener

public OracleConnectionEventListener(javax.sql.DataSource ds)

Construct an OracleConnectionEventListener with the DataSource as it's argument.

Method Detail

setDataSource

public void setDataSource(javax.sql.DataSource ds)
Set the DataSource corresponding to this listener.


connectionClosed

public void connectionClosed(javax.sql.ConnectionEvent ce)

Invoked when the application calls close() on its representation of the connection.

Specified by:
connectionClosed in interface javax.sql.ConnectionEventListener

connectionErrorOccurred

public void connectionErrorOccurred(javax.sql.ConnectionEvent ce)

Invoked when a fatal connection error occurs, just before an SQLException is thrown to the application.

Specified by:
connectionErrorOccurred in interface javax.sql.ConnectionEventListener

Oracle10g JDBC

Copyright © 1998,2004, Oracle. All rights reserved