IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.services.jdbc
Class JDBCServicesConnMgrWS40

java.lang.Object
  extended by com.ibm.btt.services.jdbc.JDBCServicesConnMgrWS40
All Implemented Interfaces:
JDBCServicesConnectionManagementInterface

public class JDBCServicesConnMgrWS40
extends java.lang.Object
implements JDBCServicesConnectionManagementInterface

Implementation of the JDBCServicesConnectionManagementInterface interface to use the pool of connections provided by WebSphere 4.0.


Field Summary
protected  Hashtable dataSourcesHashtable
          Keeps a hashtable containing the different data sources that have been obtained from the naming service.
protected  javax.naming.Context nsInitialContext
          Keeps the naming service initial context where the connection pooling data source is defined.
 
Constructor Summary
JDBCServicesConnMgrWS40()
          This constructor creates a JDBCServicesConnMgrWS40 instance.
 
Method Summary
 void disconnect(Hashtable connProperties, java.sql.Connection connection)
          Releases the database connection to the pool of connections managed by WebSphere 4.0.
protected  Hashtable getDataSourcesHashtable()
          Returns the Hashtable containing the different data sources for connection pooling.
protected  javax.naming.Context getNsInitialContext()
          Returns the naming service initial context.
 java.sql.Connection requestConnection(Hashtable connProperties)
          Requests the database connection to the WebSphere 4.0 pool of connections using the connection properties set in the connProperties Hashtable.
protected  void setDataSourcesHashtable(Hashtable newDataSourcesHashtable)
          Sets the datasource Hashtable to a new value.
protected  void setNsInitialContext(javax.naming.Context newNsInitialContext)
          Sets the nsInitialContext attribute to the naming service context newNsInitialContext.
 boolean verifyConnection(java.sql.Connection aConnection)
          Checks for the availability of the database connection by catching the ConnectionPreemptedException that is thrown if the connection is an orphaned connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nsInitialContext

protected javax.naming.Context nsInitialContext
Keeps the naming service initial context where the connection pooling data source is defined.


dataSourcesHashtable

protected Hashtable dataSourcesHashtable
Keeps a hashtable containing the different data sources that have been obtained from the naming service.

Constructor Detail

JDBCServicesConnMgrWS40

public JDBCServicesConnMgrWS40()
This constructor creates a JDBCServicesConnMgrWS40 instance.

Method Detail

disconnect

public void disconnect(Hashtable connProperties,
                       java.sql.Connection connection)
                throws DSESQLException
Releases the database connection to the pool of connections managed by WebSphere 4.0.

Specified by:
disconnect in interface JDBCServicesConnectionManagementInterface
Parameters:
connProperties - com.ibm.btt.base.Hashtable
connection - java.sql.Connection
Throws:
DSESQLException - if an SQLException is caught

getDataSourcesHashtable

protected Hashtable getDataSourcesHashtable()
Returns the Hashtable containing the different data sources for connection pooling.

Returns:
com.ibm.btt.base.Hashtable

getNsInitialContext

protected javax.naming.Context getNsInitialContext()
Returns the naming service initial context.

Returns:
javax.naming.Context

requestConnection

public java.sql.Connection requestConnection(Hashtable connProperties)
                                      throws DSESQLException,
                                             DSEException
Requests the database connection to the WebSphere 4.0 pool of connections using the connection properties set in the connProperties Hashtable.

Specified by:
requestConnection in interface JDBCServicesConnectionManagementInterface
Parameters:
connProperties - com.ibm.btt.base.Hashtable
Returns:
java.sql.Connection
Throws:
DSESQLException - if an SQLException is caught
DSEException - if an exception is thrown when calling the pool of connections manager

setDataSourcesHashtable

protected void setDataSourcesHashtable(Hashtable newDataSourcesHashtable)
Sets the datasource Hashtable to a new value.

Parameters:
newDataSourcesHashtable - com.ibm.btt.base.Hashtable

setNsInitialContext

protected void setNsInitialContext(javax.naming.Context newNsInitialContext)
Sets the nsInitialContext attribute to the naming service context newNsInitialContext.

Parameters:
newNsInitialContext - javax.naming.Context

verifyConnection

public boolean verifyConnection(java.sql.Connection aConnection)
                         throws DSESQLException
Checks for the availability of the database connection by catching the ConnectionPreemptedException that is thrown if the connection is an orphaned connection.

Specified by:
verifyConnection in interface JDBCServicesConnectionManagementInterface
Parameters:
aConnection - java.sql.Connection
Throws:
DSESQLException - if an SQLException is caught

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2010