This class defines following types of event notifications:
javax.resource.spi.ConnectionEventListener
| Modifier and Type | Field and Description |
|---|---|
| public static final int | CONNECTION_CLOSED
Event notification that an application component has closed the connection |
| public static final int | CONNECTION_ERROR_OCCURRED
Event notification that an error occurred on the connection. |
| private Object | |
| private Exception | exception
Exception associated with the |
| protected int | id
Type of the event |
| public static final int | LOCAL_TRANSACTION_COMMITTED
Event notification that a Resource Manager Local Transaction was committed on the connection |
| public static final int | LOCAL_TRANSACTION_ROLLEDBACK
Event notification that a Resource Manager Local Transaction was rolled back on the connection |
| public static final int | LOCAL_TRANSACTION_STARTED
Event notification that a Resource Manager Local Transaction was started on the connection |
| Access | Constructor and Description |
|---|---|
| public | ConnectionEvent(ManagedConnection
ManagedConnection that is the
source of the event source, int type of the Connection event eid)Construct a ConnectionEvent object. |
| public | ConnectionEvent(ManagedConnection
ManagedConnection that is the
source of the event source, int type of the Connection event eid, Exception exception about to be thrown to the application exception)Construct a ConnectionEvent object. |
| Modifier and Type | Method and Description |
|---|---|
| public Object | Returns: the connection handle. May be nullGet the connection handle associated with the Managed Connection instance. |
| public Exception | |
| public int | |
| public void |
| CONNECTION_CLOSED | back to summary |
|---|---|
| public static final int CONNECTION_CLOSED Event notification that an application component has closed the connection | |
| CONNECTION_ERROR_OCCURRED | back to summary |
|---|---|
| public static final int CONNECTION_ERROR_OCCURRED Event notification that an error occurred on the connection. This event indicates that the ManagedConnection instance is now invalid and unusable. | |
| connectionHandle | back to summary |
|---|---|
| private Object connectionHandle | |
| exception | back to summary |
|---|---|
| private Exception exception Exception associated with the | |
| id | back to summary |
|---|---|
| protected int id Type of the event | |
| LOCAL_TRANSACTION_COMMITTED | back to summary |
|---|---|
| public static final int LOCAL_TRANSACTION_COMMITTED Event notification that a Resource Manager Local Transaction was committed on the connection | |
| LOCAL_TRANSACTION_ROLLEDBACK | back to summary |
|---|---|
| public static final int LOCAL_TRANSACTION_ROLLEDBACK Event notification that a Resource Manager Local Transaction was rolled back on the connection | |
| LOCAL_TRANSACTION_STARTED | back to summary |
|---|---|
| public static final int LOCAL_TRANSACTION_STARTED Event notification that a Resource Manager Local Transaction was started on the connection | |
| ConnectionEvent | back to summary |
|---|---|
| public ConnectionEvent(ManagedConnection source, int eid) Construct a ConnectionEvent object. Exception defaults to null.
| |
| ConnectionEvent | back to summary |
|---|---|
| public ConnectionEvent(ManagedConnection source, int eid, Exception exception) Construct a ConnectionEvent object.
| |
| getConnectionHandle | back to summary |
|---|---|
| public Object getConnectionHandle() Get the connection handle associated with the Managed Connection instance. Used for CONNECTION_CLOSED event.
| |
| getException | back to summary |
|---|---|
| public Exception getException() Get the exception. May be null.
| |
| getId | back to summary |
|---|---|
| public int getId() Get the type of event | |
| setConnectionHandle | back to summary |
|---|---|
| public void setConnectionHandle(Object connectionHandle) Set the connection handle. Used for CONNECTION_CLOSED event | |