javax.resource.spi
Class ConnectionEvent

java.lang.Object
  extended by java.util.EventObject
      extended by javax.resource.spi.ConnectionEvent
All Implemented Interfaces:
java.io.Serializable

public class ConnectionEvent
extends java.util.EventObject

A listener for connection events, implemented by the application server.

See Also:
Serialized Form

Field Summary
static int CONNECTION_CLOSED
           
static int CONNECTION_ERROR_OCCURRED
           
protected  int id
           
static int LOCAL_TRANSACTION_COMMITTED
           
static int LOCAL_TRANSACTION_ROLLEDBACK
           
static int LOCAL_TRANSACTION_STARTED
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ConnectionEvent(ManagedConnection source, int eid)
          Creates an event.
ConnectionEvent(ManagedConnection source, int eid, java.lang.Exception exception)
          Creates an event.
 
Method Summary
 java.lang.Object getConnectionHandle()
          Returns the connection handle.
 java.lang.Exception getException()
          Returns the exception
 int getId()
          Returns the type of the event.
 void setConnectionHandle(java.lang.Object handle)
          Sets the connection handle.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONNECTION_CLOSED

public static final int CONNECTION_CLOSED
See Also:
Constant Field Values

CONNECTION_ERROR_OCCURRED

public static final int CONNECTION_ERROR_OCCURRED
See Also:
Constant Field Values

LOCAL_TRANSACTION_COMMITTED

public static final int LOCAL_TRANSACTION_COMMITTED
See Also:
Constant Field Values

LOCAL_TRANSACTION_ROLLEDBACK

public static final int LOCAL_TRANSACTION_ROLLEDBACK
See Also:
Constant Field Values

LOCAL_TRANSACTION_STARTED

public static final int LOCAL_TRANSACTION_STARTED
See Also:
Constant Field Values

id

protected int id
Constructor Detail

ConnectionEvent

public ConnectionEvent(ManagedConnection source,
                       int eid)
Creates an event.


ConnectionEvent

public ConnectionEvent(ManagedConnection source,
                       int eid,
                       java.lang.Exception exception)
Creates an event.

Method Detail

getConnectionHandle

public java.lang.Object getConnectionHandle()
Returns the connection handle.


setConnectionHandle

public void setConnectionHandle(java.lang.Object handle)
Sets the connection handle.


getException

public java.lang.Exception getException()
Returns the exception


getId

public int getId()
Returns the type of the event.