public class ConnectionEvent extends EventObject implements Serializable
PooledConnection
object. These
events are a facility to report when an application closes the pooled
connection or when an error occurs in the pooled connection.source
Constructor and Description |
---|
ConnectionEvent(PooledConnection theConnection)
Creates a connection event initialized with the supplied
PooledConnection reporting that the application has closed the
connection. |
ConnectionEvent(PooledConnection theConnection,
SQLException theException)
Creates a
ConnectionEvent initialized with the supplied PooledConnection and with the supplied SQLException indicating
that an error has occurred within the PooledConnection . |
Modifier and Type | Method and Description |
---|---|
SQLException |
getSQLException()
Gets the
SQLException which holds information about the error
which occurred in the PooledConnection . |
getSource, toString
public ConnectionEvent(PooledConnection theConnection)
PooledConnection
reporting that the application has closed the
connection.theConnection
- the connection for which this event is created.public ConnectionEvent(PooledConnection theConnection, SQLException theException)
ConnectionEvent
initialized with the supplied PooledConnection
and with the supplied SQLException
indicating
that an error has occurred within the PooledConnection
.theConnection
- the connection for which this event is created.theException
- information about the state of error that has occurred on the
application side.public SQLException getSQLException()
SQLException
which holds information about the error
which occurred in the PooledConnection
.SQLException
containing information about the error.
May be null
if no error has occurred.