IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.services.jdbc
Class JDBCServicesConnectionManager

java.lang.Object
  extended by com.ibm.btt.base.BTTProcessorNotifier
      extended by com.ibm.btt.base.Service
          extended by com.ibm.btt.services.jdbc.JDBCServicesConnectionManager
All Implemented Interfaces:
ProcessorNotifier, java.io.Externalizable, java.io.Serializable

@ATTR(value={"poolManager#String#IMPLIED","connMgrClass#String#IMPLIED"})
public class JDBCServicesConnectionManager
extends Service

See Also:
Serialized Form

Field Summary
static java.lang.String COMPID
          Keeps the component identification that will be used by the traces tool.
protected  java.lang.String poolManager
          Keeps the name of the manager of the pool of connections.
 
Fields inherited from class com.ibm.btt.base.Service
externalizer, name
 
Fields inherited from class com.ibm.btt.base.BTTProcessorNotifier
handlersList
 
Constructor Summary
JDBCServicesConnectionManager()
          This constructor creates a JDBCServicesConnectionManager instance.
JDBCServicesConnectionManager(java.lang.String aName)
          This constructor creates a JDBCServicesConnectionManager instance with name aName.
 
Method Summary
 void disconnect(Hashtable connProperties, java.sql.Connection aDatabaseConnection)
          Calls the connection pooling implementation to either close the database connection or release it to be used by other application.
 java.sql.Connection getConnection(Hashtable connProperties)
          Returns the database connection.
protected  JDBCServicesConnectionManagementInterface getConnMgr()
          Returns the connMgr attribute value.
protected  java.lang.String getConnMgrClass()
          Retuns the connMgrClass attribute value.
 java.lang.String getPoolManager()
          Returns the poolManager attribute value.
 java.lang.Object initializeFrom(Tag aTag)
          Called by the externalizer to set JDBCServiceConnectionManager instance attributes to the values set in the services SGML file.
protected  void setConnMgr(JDBCServicesConnectionManagementInterface newConnMgr)
          Sets the connMgr attribute value to newConnMgr, an instance of a Java object implementing the JDBCServicesConnectionManagerInterface.
protected  void setConnMgrClass(java.lang.String newConnMgrClass)
          Sets the connMgrClass attribute value to newConnMgrClass, the new name of the class implementing the connection pooling.
 void setPoolManager(java.lang.String newPoolManager)
          Sets the poolManager attribute value to newPoolManager.
 java.lang.String toString()
          Returns a visual representation of this service.
protected  boolean verifyConnection(java.sql.Connection aDatabaseConnection)
          Calls the connection pooling implementation to check for the database connection availability.
 
Methods inherited from class com.ibm.btt.base.Service
externalizer, getExternalizer, getTagName, readExternal, readExternal, readObject, removeExternal, setExternalizer, terminate, toStrings, toTags, writeExternal, writeExternal
 
Methods inherited from class com.ibm.btt.base.BTTProcessorNotifier
addHandler, getHandlersList, getName, removeHandler, setName, signalEvent, signalEvent, signalEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.btt.base.Externalizable
getName, setName
 

Field Detail

COMPID

public static final java.lang.String COMPID
Keeps the component identification that will be used by the traces tool.

See Also:
Constant Field Values

poolManager

protected java.lang.String poolManager
Keeps the name of the manager of the pool of connections. It can be JDBC, WebSphere2.0 or WebSphere3.0

Constructor Detail

JDBCServicesConnectionManager

public JDBCServicesConnectionManager()
This constructor creates a JDBCServicesConnectionManager instance.


JDBCServicesConnectionManager

public JDBCServicesConnectionManager(java.lang.String aName)
                              throws java.io.IOException
This constructor creates a JDBCServicesConnectionManager instance with name aName.

Parameters:
aName - java.lang.String
Throws:
java.io.IOException - if an I/O exception has occurred.
Method Detail

disconnect

public void disconnect(Hashtable connProperties,
                       java.sql.Connection aDatabaseConnection)
                throws DSESQLException,
                       DSEException
Calls the connection pooling implementation to either close the database connection or release it to be used by other application.

Parameters:
connProperties - com.ibm.btt.base.Hashtable - the database connection properties
aDatabaseConnection - java.sql.Connection - the database connection instance
Throws:
DSESQLException
DSEException

getConnection

public java.sql.Connection getConnection(Hashtable connProperties)
                                  throws DSESQLException,
                                         DSEException,
                                         DSEInvalidRequestException
Returns the database connection. The process to get the connection is based in the database properties provided as argument

Parameters:
aDatabaseURL - java.lang.String
aUser - java.lang.String
aPassword - java.lang.String
sharedConnection - java.lang.String
usePoolManager - boolean
Throws:
DSESQLException
DSEException
DSEInvalidRequestException

getConnMgr

protected JDBCServicesConnectionManagementInterface getConnMgr()
Returns the connMgr attribute value. This attibute keeps the instance that implements the connection pooling.

Returns:
com.ibm.btt.services.jdbc.JDBCServicesConnectionManagementInterface

getConnMgrClass

protected java.lang.String getConnMgrClass()
Retuns the connMgrClass attribute value. This attribute keeps the name of the class that implements the connection pooling.

Returns:
java.lang.String

getPoolManager

public java.lang.String getPoolManager()
Returns the poolManager attribute value.

Returns:
java.lang.String

initializeFrom

public java.lang.Object initializeFrom(Tag aTag)
                                throws java.io.IOException
Called by the externalizer to set JDBCServiceConnectionManager instance attributes to the values set in the services SGML file.

Overrides:
initializeFrom in class Service
Parameters:
aTag - com.ibm.btt.base.Tag
Returns:
java.lang.Object - the JDBCServiceConnectionManager instance
Throws:
java.io.IOException - if an I/O Exception has occurred

setConnMgr

protected void setConnMgr(JDBCServicesConnectionManagementInterface newConnMgr)
Sets the connMgr attribute value to newConnMgr, an instance of a Java object implementing the JDBCServicesConnectionManagerInterface.

Parameters:
newConnMgr - com.ibm.btt.services.jdbc.JDBCServicesConnectionManagementInterface

setConnMgrClass

protected void setConnMgrClass(java.lang.String newConnMgrClass)
Sets the connMgrClass attribute value to newConnMgrClass, the new name of the class implementing the connection pooling.

Parameters:
newConnMgrClass - java.lang.String

setPoolManager

public void setPoolManager(java.lang.String newPoolManager)
Sets the poolManager attribute value to newPoolManager.

Parameters:
newPoolManager - java.lang.String

toString

public java.lang.String toString()
Returns a visual representation of this service.

Overrides:
toString in class Service
Returns:
java.lang.String

verifyConnection

protected boolean verifyConnection(java.sql.Connection aDatabaseConnection)
                            throws DSEException
Calls the connection pooling implementation to check for the database connection availability.

Parameters:
aConnection - com.ibm.servlet.connmgr.IBMConnection
Returns:
boolean
Throws:
DSEException

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2009