javax.sql
Class ConnectionEvent

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.util.EventObject sample code for java.util.EventObject definition code for java.util.EventObject 
      extended by javax.sql.ConnectionEvent
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable

public class ConnectionEvent
extends EventObject sample code for java.util.EventObject definition code for java.util.EventObject

An Event object that provides information about the source of a connection-related event. ConnectionEvent objects are generated when an application closes a pooled connection and when an error occurs. The ConnectionEvent object contains two kinds of information:

Since:
1.4
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject sample code for java.util.EventObject definition code for java.util.EventObject
source sample code for java.util.EventObject.source definition code for java.util.EventObject.source
 
Constructor Summary
ConnectionEvent sample code for javax.sql.ConnectionEvent.ConnectionEvent(javax.sql.PooledConnection) definition code for javax.sql.ConnectionEvent.ConnectionEvent(javax.sql.PooledConnection) (PooledConnection sample code for javax.sql.PooledConnection definition code for javax.sql.PooledConnection  con)
          Constructs a ConnectionEvent object initialized with the given PooledConnection object.
ConnectionEvent sample code for javax.sql.ConnectionEvent.ConnectionEvent(javax.sql.PooledConnection, java.sql.SQLException) definition code for javax.sql.ConnectionEvent.ConnectionEvent(javax.sql.PooledConnection, java.sql.SQLException) (PooledConnection sample code for javax.sql.PooledConnection definition code for javax.sql.PooledConnection  con, SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException  ex)
          Constructs a ConnectionEvent object initialized with the given PooledConnection object and SQLException object.
 
Method Summary
 SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException getSQLException sample code for javax.sql.ConnectionEvent.getSQLException() definition code for javax.sql.ConnectionEvent.getSQLException() ()
          Retrieves the SQLException for this ConnectionEvent object.
 
Methods inherited from class java.util.EventObject sample code for java.util.EventObject definition code for java.util.EventObject
getSource sample code for java.util.EventObject.getSource() definition code for java.util.EventObject.getSource() , toString sample code for java.util.EventObject.toString() definition code for java.util.EventObject.toString()
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

ConnectionEvent sample code for javax.sql.ConnectionEvent(javax.sql.PooledConnection) definition code for javax.sql.ConnectionEvent(javax.sql.PooledConnection)

public ConnectionEvent(PooledConnection sample code for javax.sql.PooledConnection definition code for javax.sql.PooledConnection  con)

Constructs a ConnectionEvent object initialized with the given PooledConnection object. SQLException defaults to null.

Parameters:
con - the pooled connection that is the source of the event

ConnectionEvent sample code for javax.sql.ConnectionEvent(javax.sql.PooledConnection, java.sql.SQLException) definition code for javax.sql.ConnectionEvent(javax.sql.PooledConnection, java.sql.SQLException)

public ConnectionEvent(PooledConnection sample code for javax.sql.PooledConnection definition code for javax.sql.PooledConnection  con,
                       SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException  ex)

Constructs a ConnectionEvent object initialized with the given PooledConnection object and SQLException object.

Parameters:
con - the pooled connection that is the source of the event
ex - the SQLException about to be thrown to the application
Method Detail

getSQLException sample code for javax.sql.ConnectionEvent.getSQLException() definition code for javax.sql.ConnectionEvent.getSQLException()

public SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException  getSQLException()

Retrieves the SQLException for this ConnectionEvent object. May be null.

Returns:
the SQLException about to be thrown or null