|
Enterprise Information Portal APIs |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mm.sdk.server.DKPoolJDBC
DKPoolJDBC: A DKPoolJDBC object will manage the JDBC url Connections pool. It has two internal pools, one is for the unused connections and the other one is for the used connections. With getConnection, it will find a matched connection based on the passed userid & password from the free_pool and return the Connection to user. If no match found, it will create a new one.
Fields inherited from interface com.ibm.mm.sdk.common.DKConstant |
For details, see the class or interface |
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageId |
For details, see the class or interface |
Constructor Summary | |
DKPoolJDBC()
Constructs the database connection pool |
Method Summary | |
void |
destroy()
Destroy this pool object including all connections in both free pool and used pool |
java.lang.String |
getConfigurationString()
Gets the configuration string which supplies the specific initialization parameters for connection. |
DKHandle |
getConnection(java.lang.String userId,
java.lang.String passwd)
Gets a connection from the pool If no matched userid and password, it will create new one based on the passed userid-passwd |
int |
getConnTimeOut()
Gets the number of seconds that an application waits for a connection from the pool before time out and throwing exception. |
int |
getIdleTimeOut()
Gets the number of seconds that a connection should remain unused in the pool. |
int |
getMaxPoolSize()
Gets the maximum number of connections that the pool should contain. |
int |
getMinPoolSize()
Gets the minimum number of connections that the pool should keep when all the connections are idle. |
int |
getOrphanTimeOut()
Gets the number of seconds that an application is allowed to hold an inactive connection. |
java.lang.String |
getServerName()
Gets the name of the data source's server name. |
void |
initConnections(java.lang.String userId,
java.lang.String passwd,
int initSize)
Initialize number of connections and store them in the pool |
java.lang.String |
poolConnectType()
Gets the pool connect type for this connection pool For ICM in java, this will be JDBC |
void |
returnConnection(DKHandle handle)
Returns a connection to the pool |
void |
setConfigurationString(java.lang.String configString)
Sets the configuration string which supplies the specific initialization parameters for connection. |
void |
setConnTimeOut(int connTime)
Sets the number of seconds that an application waits for a connection from the pool before time out and throwing exception. |
void |
setIdleTimeOut(int idleTime)
Sets the number of seconds that a connection should remain unused in the pool before the connection is disconnect & destroyed. |
void |
setMaxPoolSize(int poolSize)
Sets the maximum number of connections that the pool should contain. |
void |
setMinPoolSize(int poolSize)
Sets the minimum number of connections that the pool should keep when all connections are idle. |
void |
setOrphanTimeOut(int orphanTime)
Sets the number of seconds that an application is allowed to hold an inactive connection. |
void |
setServerName(java.lang.String aDSName)
Sets the name of the data source's server name. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DKPoolJDBC()
Method Detail |
public java.lang.String getServerName()
getServerName
in interface dkPool
public void setServerName(java.lang.String aDSName) throws DKException, java.lang.Exception
setServerName
in interface dkPool
aDSName
- the url name for creating connectionpublic java.lang.String getConfigurationString()
getConfigurationString
in interface dkPool
public void setConfigurationString(java.lang.String configString) throws DKException, java.lang.Exception
Once the connection has been created, you can not set this to a different configuration string
setConfigurationString
in interface dkPool
configString
- info about connection driverpublic int getMaxPoolSize()
getMaxPoolSize
in interface dkPool
public void setMaxPoolSize(int poolSize) throws DKException, java.lang.Exception
setMaxPoolSize
in interface dkPool
poolSize
- the maximum number of connection pool sizepublic int getMinPoolSize()
getMinPoolSize
in interface dkPool
public void setMinPoolSize(int poolSize) throws DKException, java.lang.Exception
setMinPoolSize
in interface dkPool
poolSize
- the minimum number of connection pool sizepublic int getIdleTimeOut()
getIdleTimeOut
in interface dkPool
public void setIdleTimeOut(int idleTime) throws DKException, java.lang.Exception
setIdleTimeOut
in interface dkPool
idleTime
- the number of secondspublic int getConnTimeOut()
getConnTimeOut
in interface dkPool
public void setConnTimeOut(int connTime) throws DKException, java.lang.Exception
setConnTimeOut
in interface dkPool
connTime
- the number of seconds
(this is not implemented for WAS. Use WebSphere Adm. Console to configure this.public int getOrphanTimeOut()
getOrphanTimeOut
in interface dkPool
public void setOrphanTimeOut(int orphanTime) throws DKException, java.lang.Exception
setOrphanTimeOut
in interface dkPool
orphanTime
- the number of seconds
(this is not implemented for WAS. Use WebSphere Adm. Console to configure this.public DKHandle getConnection(java.lang.String userId, java.lang.String passwd) throws DKException, java.lang.Exception
getConnection
in interface dkPool
userId
- the user name used for connectionpasswd
- the password used for connectionto obtain the true Connection object call like: Connection con = (Connection)aDKHandle.handle();
public void returnConnection(DKHandle handle) throws DKException, java.lang.Exception
returnConnection
in interface dkPool
handle
- a DKHandle that contains the Connection objectpublic void initConnections(java.lang.String userId, java.lang.String passwd, int initSize) throws DKException, java.lang.Exception
initConnections
in interface dkPool
userId
- the user Id used for connectionpasswd
- the password used for connectioninitSize
- the number of connection to be createdpublic void destroy() throws DKException, java.lang.Exception
destroy
in interface dkPool
public java.lang.String poolConnectType() throws java.lang.Exception
poolConnectType
in interface dkPool
|
EIP Java APIs | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |