com.bankframe.ei.txnhandler.connector
Interface EConnectionEventListener

All Superinterfaces:
java.util.EventListener
All Known Implementing Classes:
CobolTestConnectionManager, JDBCConnectionManager, OffLineConnectionManager, TestCustomerConnectionManager

public interface EConnectionEventListener
extends java.util.EventListener

The EConnectionEventListener interface provides an event callback mechanism to enable a Connection Manager to receive notifications from a EManagedConnection instance. The Connection Manager uses these event notifications to manage its connection pool, and to clean up any invalid or terminated connections. In cases Typically, the Connection Manager (or one of it's helper classes) will implement a ConnectionEventListener interface. The connection manager registers a connection listener with a ManagedConnection instance by using EManagedConnection.addConnectionEventListener method.


Method Summary
 void connectionClosed(EConnectionEvent event)
          This method notifies that an application component has closed the connection.
 void connectionErrorOccurred(EConnectionEvent event)
          This method notifies a connection related error.
 

Method Detail

connectionClosed

public void connectionClosed(EConnectionEvent event)
This method notifies that an application component has closed the connection. A EManagedConnection instance notifies its registered set of listeners by calling the EConnectionEventListener.connectionClosed method when an application component closes a connection handle. The application server or default Connection Manager uses this connection close event to put the EManagedConnection instance back in to the connection pool.

Parameters:
event - event object describing the source of the event.

connectionErrorOccurred

public void connectionErrorOccurred(EConnectionEvent event)
This method notifies a connection related error. The EManagedConnection instance calls the method EConnectionEventListener.connectionErrorOccurred to notify its registered listeners of the occurrence of a physical connection-related error. The event notification happens just before a connector throws an exception to the application component using the connection handle. The connectionErrorOccurred method indicates that the associated EManagedConnection instance is now invalid and unusable. The application server or Connection Manager handles the connection error event notification by initiating cleanup (for example, removing EManagedConnection instance from the connection pool) and then calling EManagedConnection.destroy method to destroy the physical connection.

Parameters:
event - event object describing the source of the event.


Copyright © 2005, 2007, Oracle. All rights reserved.