com.ca.jcs
Interface ConnectionManager

All Superinterfaces:
Activatable
All Known Implementing Classes:
GenericObjectPoolConnectionManager, JDBCConnectionManager, JNDIConnectionPool, JNDIKerberosConnectionPool, SDKConnectionManager, SDKWSConnectionPool, StubMetaConnectionPool

public interface ConnectionManager
extends Activatable

Simple interface implemented by connectors to provide active connections to their endpoint systems, which is generally expected to be a facade on top of a configurable underlying connection pool.

The following are examples of situations where a connection to the managed endpoint system is needed:

  1. When the connector itself needs to query information from the endpoint system at activation (or to simply test validity of their connection configuration information, if they wish to do this immediately).
  2. When instances of the processor styles that the connector implements (i.e attribute-style, method-style, script-style) need to access the endpoint system.
  3. When an external connector wishes to use this connector to wrap one of its processor styles, therefore creating a composite connector (e.g. a JNDI connector which wraps some of its operations with opbindings causing method-style JDBC stored procedures to be executed).

See Also:
GenericObjectPoolConnectionManager

Method Summary
 Object borrowConnection()
          Needs to be abstract for force implementers to very carefully review any exceptions that might be thrown and decide which ones are retriable soft failures (in which case should throw LdapServiceUnavailableException with code ResultCodeEnum.UNAVAILABLE) and which ones are hard failures (in which can throw LdapServiceUnavailableException with any other code, or any other NamingException variety which implements LdapException).
 void clearConnection()
          This method can be called to clear all existing connections in the pool when one is found to be in a in stale or inconsistent state.
 void returnConnection(Object connection)
           
 
Methods inherited from interface com.ca.jcs.Activatable
activate, deactivate
 

Method Detail

borrowConnection

Object borrowConnection()
                        throws NamingException
Needs to be abstract for force implementers to very carefully review any exceptions that might be thrown and decide which ones are retriable soft failures (in which case should throw LdapServiceUnavailableException with code ResultCodeEnum.UNAVAILABLE) and which ones are hard failures (in which can throw LdapServiceUnavailableException with any other code, or any other NamingException variety which implements LdapException).

Returns:
Non-null live connection.
Throws:
NamingException - If connection can't be borrowed, can't return null.

returnConnection

void returnConnection(Object connection)

clearConnection

void clearConnection()
                     throws NamingException
This method can be called to clear all existing connections in the pool when one is found to be in a in stale or inconsistent state. See RetryOpProcessorProxy for an example.

Throws:
NamingException


Created 2011-07-14 13:27 EST