Skip to content

Most visited

Recently visited

navigation
Added in API level 1

ConnectionEvent

public class ConnectionEvent
extends EventObject implements Serializable

java.lang.Object
   ↳ java.util.EventObject
     ↳ javax.sql.ConnectionEvent


Sent when specific events happen on a 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.

Summary

Inherited fields

From class java.util.EventObject

Public constructors

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.

Public methods

SQLException getSQLException()

Gets the SQLException which holds information about the error which occurred in the PooledConnection.

Inherited methods

From class java.util.EventObject
From class java.lang.Object

Public constructors

ConnectionEvent

Added in API level 1
ConnectionEvent (PooledConnection theConnection)

Creates a connection event initialized with the supplied PooledConnection reporting that the application has closed the connection.

Parameters
theConnection PooledConnection: the connection for which this event is created.

ConnectionEvent

Added in API level 1
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.

Parameters
theConnection PooledConnection: the connection for which this event is created.
theException SQLException: information about the state of error that has occurred on the application side.

Public methods

getSQLException

Added in API level 1
SQLException getSQLException ()

Gets the SQLException which holds information about the error which occurred in the PooledConnection.

Returns
SQLException a SQLException containing information about the error. May be null if no error has occurred.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.