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. |
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.
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 |
getSQLException
public java.sql.SQLException getSQLException()
This gets the SQLException associated with the event object.
Returns: The SQLException to be thrown after notification