public class ConnectionEvent
extends java.util.EventObject
This class defines following types of event notifications:
ConnectionEventListener,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
private static int |
CONN_HANDLE_IDX |
static int |
CONNECTION_CLOSED
Event notification that an application component has closed the
connection
|
static int |
CONNECTION_ERROR_OCCURRED
Event notification that an error occurred on the connection.
|
private java.lang.Object |
connectionHandle |
private java.lang.Exception |
e
Exception associated with the
ConnectionEvent
instance. |
private static int |
EXCEPTION_IDX |
protected int |
id
Type of the event
|
private static int |
ID_IDX |
static int |
LOCAL_TRANSACTION_COMMITTED
Event notification that a Resource Manager Local Transaction was
committed on the connection
|
static int |
LOCAL_TRANSACTION_ROLLEDBACK
Event notification that a Resource Manager Local Transaction was
rolled back on the connection
|
static int |
LOCAL_TRANSACTION_STARTED
Event notification that a Resource Manager Local Transaction was
started on the connection
|
private static java.io.ObjectStreamField[] |
serialPersistentFields
Persistence field information
|
private static long |
serialVersionUID
Serial version uid
|
| Constructor and Description |
|---|
ConnectionEvent(ManagedConnection source,
int eid)
Construct a ConnectionEvent object.
|
ConnectionEvent(ManagedConnection source,
int eid,
java.lang.Exception exception)
Construct a ConnectionEvent object.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getConnectionHandle()
Get the connection handle associated with the Managed
Connection instance.
|
java.lang.Exception |
getException()
Get the exception.
|
int |
getId()
Get the type of event
|
private void |
readObject(java.io.ObjectInputStream ois)
Read object
|
void |
setConnectionHandle(java.lang.Object connectionHandle)
Set the connection handle.
|
private void |
writeObject(java.io.ObjectOutputStream oos)
Write object
|
private static final long serialVersionUID
private static final java.io.ObjectStreamField[] serialPersistentFields
private static final int ID_IDX
private static final int EXCEPTION_IDX
private static final int CONN_HANDLE_IDX
public static final int CONNECTION_CLOSED
public static final int LOCAL_TRANSACTION_STARTED
public static final int LOCAL_TRANSACTION_COMMITTED
public static final int LOCAL_TRANSACTION_ROLLEDBACK
public static final int CONNECTION_ERROR_OCCURRED
private java.lang.Exception e
ConnectionEvent
instance.protected int id
private java.lang.Object connectionHandle
public ConnectionEvent(ManagedConnection source, int eid)
source - ManagedConnection that is the
source of the eventeid - type of the Connection eventpublic ConnectionEvent(ManagedConnection source, int eid, java.lang.Exception exception)
source - ManagedConnection that is the
source of the eventexception - exception about to be thrown to the applicationeid - type of the Connection eventpublic java.lang.Object getConnectionHandle()
public void setConnectionHandle(java.lang.Object connectionHandle)
connectionHandle - The connection handlepublic java.lang.Exception getException()
public int getId()
private void readObject(java.io.ObjectInputStream ois)
throws java.lang.ClassNotFoundException,
java.io.IOException
ois - The object input streamjava.lang.ClassNotFoundException - If a class can not be foundjava.io.IOException - Thrown if an error occursprivate void writeObject(java.io.ObjectOutputStream oos)
throws java.io.IOException
oos - The object output streamjava.io.IOException - Thrown if an error occurs