com.bankframe.ei.txnhandler.connector.offline
Class OffLineConnectionManager

java.lang.Object
  |
  +--com.bankframe.ei.txnhandler.connector.offline.OffLineConnectionManager
All Implemented Interfaces:
EConnectionEventListener, EConnectionManager, java.util.EventListener, java.io.Serializable

public class OffLineConnectionManager
extends java.lang.Object
implements EConnectionManager, EConnectionEventListener

This class acts as a resource manager for the OffLine Connector. It provides connection pooling and management for an application that is using a group of OffLine Connectors. This implementation utilizes JDBC DataSource objects and should only be used when JDBC DataSource functionality is available within the application server that you are running in.

See Also:
Serialized Form

Method Summary
 java.lang.Object allocateConnection(EManagedConnectionFactory mcf, java.lang.String properties)
          This method gets called by the host connector's connection factory instance.
 void connectionClosed(EConnectionEvent event)
          This method is called when an application closes it's connection handle.
 void connectionErrorOccurred(EConnectionEvent event)
          This method is called when connection error occurs.
 void freeConnection(EManagedConnection con)
          This method is called to free a connection from the Connection Pool.
static OffLineConnectionManager getInstance()
          This method is used to get an instance of the OffLineConnection manager.
 OffLineConnectionPool getPool()
          This method is used to obtain the Connection Pool object associated with this manager.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

allocateConnection

public java.lang.Object allocateConnection(EManagedConnectionFactory mcf,
                                           java.lang.String properties)
This method gets called by the host connector's connection factory instance. Based on the properties passed in, it allocates an appropriate connection.

Specified by:
allocateConnection in interface EConnectionManager
Parameters:
mcf - The ManagedConnectionFactory used by the Connection Manager to delegate connection matching or creation.
properties - Property values associated with the desired connection.
Returns:
A Connection object.

connectionClosed

public void connectionClosed(EConnectionEvent event)
This method is called when an application closes it's connection handle. The source connection gets released back to connection pool for further re-use.

Specified by:
connectionClosed in interface EConnectionEventListener
Parameters:
event - The Connection Event associated with this connection closing.

connectionErrorOccurred

public void connectionErrorOccurred(EConnectionEvent event)
This method is called when connection error occurs.

Specified by:
connectionErrorOccurred in interface EConnectionEventListener
Parameters:
event - The Connection Event associated with this connection error.

freeConnection

public void freeConnection(EManagedConnection con)
This method is called to free a connection from the Connection Pool.

Parameters:
con - The managed connection to be freed from the pool.

getInstance

public static OffLineConnectionManager getInstance()
This method is used to get an instance of the OffLineConnection manager.

Returns:
A single instance of an OffLineConnectionManager.

getPool

public OffLineConnectionPool getPool()
This method is used to obtain the Connection Pool object associated with this manager.

Returns:
The OffLineConnectionPool instance.


Copyright © 2005 Siebel Systems, Inc. All rights reserved.