javax.sql
Class ConnectionEvent
java.lang.Object
java.util.EventObject
javax.sql.ConnectionEvent
- All Implemented Interfaces:
- Serializable
public class ConnectionEvent
- extends EventObject
- implements Serializable
An Event object which is sent when specific events happen on a
PooledConnection object. The events involved are when the application closing
the PooledConnection and when an error occurs in the PooledConnection.
- See Also:
- Serialized Form
|
Constructor Summary |
ConnectionEvent(PooledConnection theConnection)
Creates a connection event initialized with a supplied PooledConnection. |
ConnectionEvent(PooledConnection theConnection,
SQLException theException)
Creates a ConnectionEvent initialized with a supplied PooledConnection
and with a supplied SQLException indicating that an error has occurred
within the PooledConnection. |
|
Method Summary |
SQLException |
getSQLException()
Gets the SQLException which holds information about the error which
occurred in the PooledConnection. |
ConnectionEvent
public ConnectionEvent(PooledConnection theConnection)
- Creates a connection event initialized with a supplied PooledConnection.
- Parameters:
theConnection - the PooledConnection
ConnectionEvent
public ConnectionEvent(PooledConnection theConnection,
SQLException theException)
- Creates a ConnectionEvent initialized with a supplied PooledConnection
and with a supplied SQLException indicating that an error has occurred
within the PooledConnection.
- Parameters:
theConnection - the PooledConnectiontheException - the SQLException holding information about the error that has
occurred, which is about to be returned to the application.
getSQLException
public SQLException getSQLException()
- Gets the SQLException which holds information about the error which
occurred in the PooledConnection.
- Returns:
- an SQLException containing information about the error. May be
null if no error has occurred.
Please submit a feedback, bug or feature