JDBC Extension Reference

This reference provides information about the JDBC 3 Extension API. Note that JDBC 3–compliant drivers aren’t required to support this API, unlike the JDBC 3 API implementation, which is required by all JDBC drivers that claim to be JDBC 3 compliant.

Note 

The interfaces and classes in this reference are sorted alphabetically, as are the attributes and methods that they provide. Repeated method names indicate that several method signatures are available for the same purpose, each one supporting a different set of parameters. Those parameters and the return values are also described in this reference.

Class ConnectionEvent

public class ConnectionEvent extends java.util.EventObject 

Used in combination with the PooledConnection object, the ConnectionEvent notifies of changes such as a connection close, connection error, server crash, and so on. The ConnectionEventListener can be added to PooledConnection objects in order to manage this kind of event.

Constructors

ConnectionEvent

public ConnectionEvent(PooledConnection con)

This builds a ConnectionEvent object with a null SQLException in case of connection error.

Parameters:

con:

The source object of the event

ConnectionEvent

public ConnectionEvent(PooledConnection con, java.sql.SQLException ex)

This builds a ConnectionEvent object with the SQLException provided as a parameter.

Parameters:

con:

The source object of the event

ex:

The SQLException to be thrown after notification

Methods

getSQLException

public java.sql.SQLException getSQLException()

This gets the SQLException associated with the event object.

Returns: The SQLException to be thrown after notification



JDBC 3. 0. JAVA Database Connectivity
JDBC 3: Java Database Connectivity
ISBN: 0764548751
EAN: 2147483647
Year: 2002
Pages: 148

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net