|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.btt.base.DSENotifier
com.ibm.btt.base.Service
com.ibm.btt.services.jdbc.JDBCService
public abstract class JDBCService
Field Summary | |
---|---|
protected java.sql.PreparedStatement |
addPstmt
Keeps the preparedStatement attribute value. |
protected java.lang.String |
addString
Keeps the SQL sentence used when adding a records. |
protected boolean |
autoCommit
Keeps the commit criteria the JDBCTable service must follow. |
protected Hashtable |
connectionProperties
Keeps the details of the connection being used by the service. |
protected java.sql.Connection |
databaseConnection
Each JDBCService instance must have its own connection to the database so that when the application commits or rolls back, only the changes made by that application are affected. |
protected java.lang.String |
databaseURL
The database URL. |
protected java.lang.String |
dataSourceName
Keeps the name of the DataSource factory object in the naming system. |
protected java.sql.DatabaseMetaData |
metaData
Each JDBCService instance must have its own connection to the database so that when the application commits or rolls back, only the changes made by that application are affected. |
protected java.lang.String |
password
The user password to connect to the database. |
protected java.lang.String |
poolName
Keeps the name of the pool when using the connection pooling for WebSphere 2.0. |
protected java.lang.String |
sharedConnection
Keeps the alias of the database connection that the service instance would like to share with another service. |
protected static int |
STMT_POOL_SIZE_DEFAULT
Default number of elements of the array. |
protected java.util.ArrayList |
stmtPool
Array to keep different statements |
protected int |
stmtPoolSize
Number of elements of the array. |
protected java.lang.String |
updateString
Keeps the SQL sentence used when updating all columns of a record. |
protected java.lang.String |
user
The user identification to connect to the database. |
protected boolean |
waitRetry
Keeps the waitRetry attribute used by the WebSphere 2.0 connection pooling. |
Fields inherited from class com.ibm.btt.base.Service |
---|
externalizer, name |
Fields inherited from class com.ibm.btt.base.DSENotifier |
---|
handlersList |
Constructor Summary | |
---|---|
JDBCService()
* This constructor creates a JDBCService object. |
|
JDBCService(java.lang.String aName)
This constructor creates a JDBCService object. |
Method Summary | |
---|---|
protected abstract void |
buildAddString()
Builds an instance variable that will be used when adding a records. |
protected void |
buildConnectionProperties()
Build the hashtable containing all details needed to request the database connection. |
protected void |
buildStatementArray()
Builds the array of statements. |
protected abstract void |
buildUpdateString()
Builds an instance variable that will be used when updating all columns of a record. |
void |
connect()
Connects to the Database set with the DataSource definition . |
void |
connect(java.lang.String aDatabaseURL)
Connects to the Database. |
void |
connect(java.lang.String aDatabaseURL,
Context aContext)
Connects to the Database. |
void |
connect(java.lang.String aUser,
java.lang.String aPassword)
Connects to the Database set in the DataSource definition using aUser and aPassword. |
void |
connect(java.lang.String aUser,
java.lang.String aPassword,
Context aContext)
Connects to the Database set in the DataSource definition using aUser and aPassword. |
void |
connect(java.lang.String aDatabaseURL,
java.lang.String aUser,
java.lang.String aPassword)
Connects to the Database in the URL aDatabaseURL using aUser and aPassword. |
void |
connect(java.lang.String aDatabaseURL,
java.lang.String aUser,
java.lang.String aPassword,
Context aContext)
Connects to the Database in the URL aDatabaseURL using aUser and aPassword. |
void |
disconnect()
Closes the Database connection. |
protected java.sql.PreparedStatement |
getAddPstmt()
Returns the preparedStatement attribute value. |
protected java.lang.String |
getAddString()
Returns the addString attribute value. |
boolean |
getAutoCommit()
Returns the autoCommit attribute value. |
protected JDBCServicesConnectionManager |
getConnectionManager()
Returns the connection manager instance used by the service to request the connections. |
protected Hashtable |
getConnectionProperties()
Returns the Hashtable containing the connection details. |
java.lang.String |
getConnMgrID()
Returns the connMgrID. |
protected java.sql.Connection |
getDatabaseConnection()
Returns the database connection being used by the service. |
java.lang.String |
getDatabaseURL()
Returns the databaseURL attribute value. |
java.lang.String |
getDataSourceName()
Returns the dataSourceName attribute value. |
java.lang.String |
getPassword()
Returns the password attribute value. |
java.lang.String |
getPoolName()
Returns the poolName attribute value. |
java.lang.String |
getSharedConnection()
Returns the sharedConnection attribute value. |
protected java.lang.String |
getUpdateString()
Returns the updateString attribute value. |
java.lang.String |
getUser()
Returns the user attribute value. |
boolean |
isConnected()
Returns true if there is a connection to the database or false if there is not. |
boolean |
isWaitRetry()
Returns the waitRetry attribute value. |
void |
requestConnectionToConnectionManager(Hashtable connProperties)
Requests the connection to the connection manager defined in the operation root context. |
void |
requestConnectionToConnectionManager(Hashtable connProperties,
Context aContext)
Requests the connection to the connection manager defined in the operation provided context. |
protected void |
setAddPstmt(java.sql.PreparedStatement pstmt_aux)
Sets the AddPstmt attribute to the preparedStatement provided as an argument. |
protected void |
setAddString(java.lang.StringBuffer s)
Sets the addString attribute to the stringBuffer provided as an argument. |
void |
setAutoCommit(boolean b)
Sets the autoCommit attribute to a boolean. |
protected void |
setConnectionManager(JDBCServicesConnectionManager newConnectionManager)
Sets the connectionManager attribute value with the JDBCServicesConnectionManager instance. |
protected void |
setConnectionProperties(Hashtable newConnectionProperties)
Sets the connectionProperties attribute value with the newConnectionProperties Hashtable instance. |
void |
setConnMgrID(java.lang.String connMgrID)
Sets the connMgrID. |
protected void |
setDatabaseConnection(java.sql.Connection newDatabaseConnection)
Sets the databaseConnection attribute to the newDatabaseConnection Connection instance. |
void |
setDatabaseURL(java.lang.String s)
Sets the databaseURL attribute to the string provided as an argument. |
void |
setDataSourceName(java.lang.String newDataSourceName)
Sets the dataSourceName attribute value to newDataSourceName. |
void |
setPassword(java.lang.String s)
Sets the password attribute to the string provided as an argument. |
void |
setPoolName(java.lang.String newPoolName)
Sets the poolName attribute value to newPoolName. |
void |
setSharedConnection(java.lang.String newSharedConnection)
Sets the sharedConnection attribute value to newSharedConnection. |
void |
setStatementPoolSize(int poolSize)
Sets the array of statements size value. |
protected void |
setUpdateString(java.lang.StringBuffer s)
Sets the updateString attribute to the stringBuffer provided as an argument. |
void |
setUser(java.lang.String s)
Sets the user attribute to the string provided as an argument. |
void |
setWaitRetry(boolean newWaitRetry)
Sets the waitRetry attribute value to newWaitRetry. |
boolean |
verifyConnection()
Checks for the database connection availability by calling the Connection Manager. |
Methods inherited from class com.ibm.btt.base.Service |
---|
externalizer, getExternalizer, getTagName, initializeFrom, readExternal, readExternal, readObject, removeExternal, setExternalizer, terminate, toString, toStrings, toTags, writeExternal, writeExternal |
Methods inherited from class com.ibm.btt.base.DSENotifier |
---|
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 |
---|
protected java.sql.Connection databaseConnection
protected boolean autoCommit
protected java.lang.String databaseURL
protected java.lang.String user
protected java.lang.String password
protected java.lang.String poolName
protected boolean waitRetry
protected java.lang.String dataSourceName
protected java.sql.DatabaseMetaData metaData
protected java.lang.String sharedConnection
protected Hashtable connectionProperties
protected java.lang.String addString
protected java.lang.String updateString
protected java.sql.PreparedStatement addPstmt
protected static final int STMT_POOL_SIZE_DEFAULT
protected int stmtPoolSize
protected java.util.ArrayList stmtPool
Constructor Detail |
---|
public JDBCService()
public JDBCService(java.lang.String aName) throws java.io.IOException
aName
- java.lang.String
java.io.IOException
Method Detail |
---|
protected abstract void buildAddString() throws DSESQLException, DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSEException
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSESQLException
- if an SQLException is caught
DSEObjectNotFoundException
- if the JDBCServicesConnectionManager cannot be found
DSEException
- if an exception is thrown when calling the pool of
connections managerprotected void buildConnectionProperties()
protected void buildStatementArray()
protected abstract void buildUpdateString() throws DSESQLException, DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSEException
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSESQLException
- if an SQLException is caught
DSEObjectNotFoundException
- if the JDBCServicesConnectionManager cannot be found
DSEException
- if an exception is thrown when calling the pool of
connections managerpublic void connect() throws DSEInternalErrorException, DSEInvalidRequestException, DSESQLException, DSEObjectNotFoundException, DSEException
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEObjectNotFoundException
- if the JDBCServicesConnectionManager cannot be found
DSEException
- if an exception is thrown when calling the pool of
connections managerpublic void connect(java.lang.String aDatabaseURL) throws DSEInternalErrorException, DSEInvalidRequestException, DSESQLException, DSEObjectNotFoundException, DSEException
connect
in interface DatabaseConnect
aDatabaseURL
- java.lang.String - the database URL
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEObjectNotFoundException
- if the JDBCServicesConnectionManager cannot be found
DSEException
- if an exception is thrown when calling the pool of
connections managerpublic void connect(java.lang.String aUser, java.lang.String aPassword) throws DSEInternalErrorException, DSEInvalidRequestException, DSESQLException, DSEObjectNotFoundException, DSEException
connect
in interface DatabaseConnect
aUser
- java.lang.String - the user identificationaPassword
- java.lang.String - the user password
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEObjectNotFoundException
- if the JDBCServicesConnectionManager cannot be found
DSEException
- if an exception is thrown when calling the pool of
connections managerpublic void connect(java.lang.String aDatabaseURL, java.lang.String aUser, java.lang.String aPassword) throws DSESQLException, DSEInvalidRequestException, DSEInternalErrorException, DSEObjectNotFoundException, DSEException
connect
in interface DatabaseConnect
aDatabaseURL
- java.lang.String - the database URLaUser
- java.lang.String - the user identificationaPassword
- java.lang.String - the user password
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEObjectNotFoundException
- if the JDBCServicesConnectionManager cannot be found
DSEException
- if an exception is thrown when calling the pool of
connections managerpublic void connect(java.lang.String aDatabaseURL, Context aContext) throws DSEInternalErrorException, DSEInvalidRequestException, DSESQLException, DSEObjectNotFoundException, DSEException
connect
in interface DatabaseConnect
aDatabaseURL
- java.lang.String - the database URLaContext
- com.ibm.btt.base.Context, the context where the
JDBCServiceConnectionManager is defined
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEObjectNotFoundException
- if the JDBCServicesConnectionManager cannot be found
DSEException
- if an exception is thrown when calling the pool of
connections managerpublic void connect(java.lang.String aUser, java.lang.String aPassword, Context aContext) throws DSESQLException, DSEInvalidRequestException, DSEInternalErrorException, DSEObjectNotFoundException, DSEException
connect
in interface DatabaseConnect
aUser
- java.lang.String - the user identificationaPassword
- java.lang.String - the user passwordaContext
- com.ibm.btt.base.Context, the context where the
JDBCServiceConnectionManager is defined
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEObjectNotFoundException
- if the JDBCServicesConnectionManager cannot be found
DSEException
- if an exception is thrown when calling the pool of
connections managerpublic void connect(java.lang.String aDatabaseURL, java.lang.String aUser, java.lang.String aPassword, Context aContext) throws DSESQLException, DSEInvalidRequestException, DSEInternalErrorException, DSEObjectNotFoundException, DSEException
connect
in interface DatabaseConnect
aDatabaseURL
- java.lang.String - the database URLaUser
- java.lang.String - the user identificationaPassword
- java.lang.String - the user passwordaContext
- com.ibm.btt.base.Context - the context where the
JDBCServiceConnectionManager is defined
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEObjectNotFoundException
- if the JDBCServicesConnectionManager cannot be found
DSEException
- if an exception is thrown when calling the pool of
connections managerpublic void disconnect() throws DSEInvalidRequestException, DSESQLException, DSEException
disconnect
in interface DatabaseConnect
DSESQLException
- if a SQLException occurs
DSEException
- if an exception is thrown when calling the pool of
connections manager
DSEInvalidRequestException
- if the database connection is nullprotected java.sql.PreparedStatement getAddPstmt()
protected java.lang.String getAddString()
public boolean getAutoCommit()
protected JDBCServicesConnectionManager getConnectionManager()
protected Hashtable getConnectionProperties()
protected java.sql.Connection getDatabaseConnection()
public java.lang.String getDatabaseURL()
getDatabaseURL
in interface DatabaseConnect
public java.lang.String getDataSourceName()
getDataSourceName
in interface DatabaseConnect
public java.lang.String getPassword()
public java.lang.String getPoolName()
getPoolName
in interface DatabaseConnect
public java.lang.String getSharedConnection()
getSharedConnection
in interface DatabaseConnect
protected java.lang.String getUpdateString()
public java.lang.String getUser()
public boolean isConnected() throws DSEInvalidRequestException, DSEInternalErrorException, DSESQLException, DSEObjectNotFoundException, DSEException
isConnected
in interface DatabaseConnect
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQL Exception is caught
DSEObjectNotFoundException
DSEException
public boolean isWaitRetry()
isWaitRetry
in interface DatabaseConnect
public void requestConnectionToConnectionManager(Hashtable connProperties) throws DSEInvalidRequestException, DSESQLException, DSEObjectNotFoundException, DSEException
connProperties
- Hashtable, the connection properties
DSEInvalidRequestException
- if the request is not valid
DSESQLException
- if an SQLException is caught
DSEObjectNotFoundException
- if the JDBCServicesConnectionManager cannot be found
DSEException
- if an exception is thrown when calling the pool of
connections managerpublic void requestConnectionToConnectionManager(Hashtable connProperties, Context aContext) throws DSEInvalidRequestException, DSESQLException, DSEObjectNotFoundException, DSEException
connProperties
- Hashtable the connection propertiesaContext
- Context the Context where to look for the connection manager
DSEInvalidRequestException
- if the request is not valid
DSESQLException
- if an SQLException is caught
DSEObjectNotFoundException
- if the JDBCServicesConnectionManager cannot be found
DSEException
- if an exception is thrown when calling the pool of
connections managerprotected void setAddPstmt(java.sql.PreparedStatement pstmt_aux)
pstmt_aux
- PreparedStatementprotected void setAddString(java.lang.StringBuffer s)
s
- java.lang.Stringpublic void setAutoCommit(boolean b)
boolean
- protected void setConnectionManager(JDBCServicesConnectionManager newConnectionManager)
newConnectionManager
- com.ibm.btt.services.jdbc.JDBCServicesConnectionManagerprotected void setConnectionProperties(Hashtable newConnectionProperties)
newConnectionProperties
- com.ibm.btt.base.Hashtableprotected void setDatabaseConnection(java.sql.Connection newDatabaseConnection)
newDatabaseConnection
- java.sql.Connectionpublic void setDatabaseURL(java.lang.String s)
setDatabaseURL
in interface DatabaseConnect
s
- java.lang.Stringpublic void setDataSourceName(java.lang.String newDataSourceName)
setDataSourceName
in interface DatabaseConnect
newDataSourceName
- java.lang.Stringpublic void setPassword(java.lang.String s)
s
- java.lang.Stringpublic void setPoolName(java.lang.String newPoolName)
setPoolName
in interface DatabaseConnect
newPoolName
- java.lang.Stringpublic void setSharedConnection(java.lang.String newSharedConnection)
setSharedConnection
in interface DatabaseConnect
newSharedConnection
- java.lang.Stringpublic void setStatementPoolSize(int poolSize)
poolSize
- integerprotected void setUpdateString(java.lang.StringBuffer s)
s
- java.lang.StringBufferpublic void setUser(java.lang.String s)
s
- java.lang.Stringpublic void setWaitRetry(boolean newWaitRetry)
setWaitRetry
in interface DatabaseConnect
newWaitRetry
- booleanpublic boolean verifyConnection() throws DSESQLException, DSEException
DSESQLException
- if an SQLException is caught
DSEException
- if an exception is thrown when calling the pool of
connectionspublic java.lang.String getConnMgrID()
public void setConnMgrID(java.lang.String connMgrID)
connMgrID
- The connMgrID to set
|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |