|
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.beans.CMBConnectionPool
Manages a pool of CMBConnection objects. Since connections are expensive, a server may choose to obtain connections using this connection pooling bean. Properties on this bean provide for:
user can switch to different types of datastores by doing the following:
connectionPool.connectionPool.setDsType(newdstype);
CMBConnection newconnection = connectionPool.getConnection(userid, password);
CMBConnection
, Serialized FormConstructor Summary | |
CMBConnectionPool()
Constructs the connection pool bean. |
Method Summary | |
void |
clearConnections()
Clears this object instance including all the setted data and the connections in the free pool. |
void |
destroy()
Destroys the connection pool. |
void |
freeConnection(CMBConnection connection)
Frees a connection previously obtained using getConnection() |
java.lang.String |
getCC2MimeURL()
Returns the value of the CC2MimeURL property. |
java.lang.String |
getClientURLString()
Returns the value of the ClientURLString property. |
CMBConnection |
getConnection(java.lang.String userid,
java.lang.String password)
Returns a connected instance of CMBConnection. |
CMBConnection |
getConnection(java.lang.String userid,
java.lang.String password,
int sessionid)
Returns a connected instance of CMBConnection. |
CMBConnection |
getConnection(java.lang.String serverName,
java.lang.String userid,
java.lang.String password)
Returns a connected instance of CMBConnection. |
short |
getConnectionType()
Returns the value of the ConnectionType property. |
java.lang.String |
getConnectString()
Returns the value of the connectString property. |
boolean |
getConnectToWorkFlow()
Returns the value of the connectToWorkFlow property. |
java.lang.String |
getCsURLString()
Returns the value of the CSURLString property. |
boolean |
getDataManagementEnabled()
Deprecated. This property no longer exists on the CMBConnection bean. |
java.lang.String |
getDsType()
Returns the value of the DsType property. |
int |
getMaxFreeConnections()
Returns the maximum number of free connections. |
int |
getMaxFreeConnectionsPerUserid()
Get the maximum number of connections pooled per userid. |
int |
getPortNumber()
Returns the value of the PortNumber property. |
java.lang.String |
getRMIHostname()
Returns the value of the RMIHostname property. |
boolean |
getSchemaManagementEnabled()
Deprecated. This property no longer exists on the CMBConnection bean. |
java.lang.String |
getServerName()
Returns the value of the ServerName property. |
java.lang.String |
getServiceClientURLString()
Returns the value of the ServiceClientURLString property. |
short |
getServiceConnectionType()
Returns the value of the ServiceConnectionType property. |
java.lang.String |
getServiceCsURLString()
Returns the value of the ServiceCSURLString property. |
int |
getServicePortNumber()
Returns the value of the ServicePortNumber property. |
java.lang.String |
getServiceRMIHostname()
Returns the value of the ServiceRMIHostname property. |
long |
getTimeOut()
Returns the time duration after which a free connection will be disconnected and destroyed. |
boolean |
getTraceEnabled()
Deprecated. use isTraceEnabled |
boolean |
getWorkflowDataManagementEnabled()
Deprecated. use isWorkflowDataManagementEnabled |
boolean |
isTraceEnabled()
Returns the value of the TraceEnabled property. |
boolean |
isWorkflowDataManagementEnabled()
Returns the value of the WorkflowDataManagementEnabled property. |
void |
setCC2MimeURL(java.lang.String CC2MimeURL)
Sets the like named CMBConnection property on any new connections created to this value. |
void |
setClientURLString(java.lang.String clientURLString)
Specifies the client URL string. |
void |
setConfigurationString(java.lang.String config)
set the configuration string |
void |
setConnectionType(short connectionType)
Sets the like named CMBConnection property on any new connections created to this value. |
void |
setConnectString(java.lang.String connectString)
Specifies the connect string. |
void |
setConnectToWorkFlow(boolean newvalue)
Sets the connectToWorkFlow property value. |
void |
setCsURLString(java.lang.String csURLString)
Specifies the cs URL string. |
void |
setDataManagementEnabled(boolean dataManagementEnabled)
Deprecated. This property no longer exists on the CMBConnection bean. |
void |
setDsType(java.lang.String dsType)
Sets the like named CMBConnection property on any new connections created to this value. |
void |
setMaxFreeConnections(int maxFreeConnections)
Sets the maximum number of free connections. |
void |
setMaxFreeConnectionsPerUserid(int maxFreeConnectionsPerUserid)
Sets the maximum number of connections pooled per userid. |
void |
setMinFreeConnections(int minFreeConnections)
|
void |
setPortNumber(int portNumber)
Sets the like named CMBConnection property on any new connections created to this value. |
void |
setRMIHostname(java.lang.String RMIHostname)
Sets the like named CMBConnection property on any new connections created to this value. |
void |
setSchemaManagementEnabled(boolean schemaManagementEnabled)
Deprecated. This property no longer exists on the CMBConnection bean. |
void |
setServerName(java.lang.String serverName)
Sets the like named CMBConnection property on any new connections created to this value. |
void |
setServiceClientURLString(java.lang.String serviceClientURLString)
Specifies the service client URL string. |
void |
setServiceConnectionType(short serviceConnectionType)
Sets the like named CMBConnection property on any new connections created to this value. |
void |
setServiceCsURLString(java.lang.String serviceCsURLString)
Specifies the service cs URL string. |
void |
setServicePortNumber(int servicePortNumber)
Sets the like named CMBConnection property on any new connections created to this value. |
void |
setServiceRMIHostname(java.lang.String serviceRMIHostname)
Sets the like named CMBConnection property on any new connections created to this value. |
void |
setTimeOut(long timeOut)
Sets the time duration after which a freed connection will be disconnected and destroyed. |
void |
setTraceEnabled(boolean traceEnabled)
Sets the like named CMBConnection property on any new connections created to this value. |
void |
setWorkflowDataManagementEnabled(boolean workflowDataManagementEnabled)
Sets the like named CMBConnection property on any new connections created to this value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CMBConnectionPool()
Method Detail |
public void destroy() throws CMBException
public void setConfigurationString(java.lang.String config) throws CMBException
public void clearConnections() throws CMBException
public void setConnectToWorkFlow(boolean newvalue)
newvalue
- if false the connect method will not attempt a connection
to the workflow server. The default value is true.public boolean getConnectToWorkFlow()
CMBConnection.setConnectToWorkFlow(boolean)
,
CMBConnection.connect()
public int getMaxFreeConnections()
public void setMaxFreeConnections(int maxFreeConnections)
maxFreeConnections
- the maximum number of free connections that will be pooled. If this value is
zero, then there is no maximum.public int getMaxFreeConnectionsPerUserid()
public void setMinFreeConnections(int minFreeConnections)
public void setMaxFreeConnectionsPerUserid(int maxFreeConnectionsPerUserid)
maxFreeConnectionsPerUserid
- the maximum number of connections that will be pooled for a single userid. If
this value is zero, then there is no maximum.public long getTimeOut()
public void setTimeOut(long timeOut)
timeOut
- the time duration in milliseconds. If this value is zero, then there is no
time limit -- connections will be pooled indefinitely.public java.lang.String getCC2MimeURL()
CMBConnection
public void setCC2MimeURL(java.lang.String CC2MimeURL)
CMBConnection
public short getConnectionType()
CMBConnection
public void setConnectionType(short connectionType)
CMBConnection
public short getServiceConnectionType()
CMBConnection
public void setServiceConnectionType(short serviceConnectionType)
CMBConnection
public java.lang.String getDsType()
CMBConnection
public void setDsType(java.lang.String dsType)
CMBConnection
public int getPortNumber()
CMBConnection
public void setPortNumber(int portNumber)
CMBConnection
public java.lang.String getRMIHostname()
CMBConnection
public void setRMIHostname(java.lang.String RMIHostname)
CMBConnection
public int getServicePortNumber()
CMBConnection
public void setServicePortNumber(int servicePortNumber)
CMBConnection
public java.lang.String getServiceRMIHostname()
CMBConnection
public void setServiceRMIHostname(java.lang.String serviceRMIHostname)
CMBConnection
public java.lang.String getServerName()
CMBConnection
public void setServerName(java.lang.String serverName)
CMBConnection
public boolean getTraceEnabled()
CMBConnection
public boolean isTraceEnabled()
CMBConnection
public void setTraceEnabled(boolean traceEnabled)
CMBConnection
public boolean getDataManagementEnabled()
CMBConnection
public void setDataManagementEnabled(boolean dataManagementEnabled)
CMBConnection
public boolean getWorkflowDataManagementEnabled()
CMBConnection
public boolean isWorkflowDataManagementEnabled()
CMBConnection
public void setWorkflowDataManagementEnabled(boolean workflowDataManagementEnabled)
CMBConnection
public boolean getSchemaManagementEnabled()
CMBConnection
public void setSchemaManagementEnabled(boolean schemaManagementEnabled)
CMBConnection
public java.lang.String getClientURLString()
CMBConnection
public void setClientURLString(java.lang.String clientURLString)
CMBConnection
public java.lang.String getServiceClientURLString()
CMBConnection
public void setServiceClientURLString(java.lang.String serviceClientURLString)
CMBConnection
public java.lang.String getCsURLString()
CMBConnection
public void setCsURLString(java.lang.String csURLString)
CMBConnection
public java.lang.String getServiceCsURLString()
CMBConnection
public void setServiceCsURLString(java.lang.String serviceCsURLString)
CMBConnection
public java.lang.String getConnectString()
CMBConnection
public void setConnectString(java.lang.String connectString)
CMBConnection
public CMBConnection getConnection(java.lang.String userid, java.lang.String password) throws java.lang.Exception, CMBException, java.beans.PropertyVetoException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException, java.net.MalformedURLException, java.lang.NoClassDefFoundError
Note: If the connection obtained from the pool is a federated connection (dsType == "Fed") the userid and password will be verified. Otherwise, the userid and password must match the userid and password specified when the pooled connection was originally created.
userid
- the userid of the connection.password
- the password of the connection.public CMBConnection getConnection(java.lang.String userid, java.lang.String password, int sessionid) throws java.lang.Exception, CMBException, java.beans.PropertyVetoException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException, java.net.MalformedURLException, java.lang.NoClassDefFoundError
userid
- the userid of the connection.password
- the password of the connection.sessionid
- the session id of a connectionpublic CMBConnection getConnection(java.lang.String serverName, java.lang.String userid, java.lang.String password) throws java.lang.Exception, CMBException, java.beans.PropertyVetoException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException, java.net.MalformedURLException, java.lang.NoClassDefFoundError
Note: If a connection is obtained from the pool of free connections, the userid and password when the connection was originally created must match the userid and password on this method.
serverName
- the server to use for the connection.userid
- the userid of the connection.password
- the password of the connection.public void freeConnection(CMBConnection connection)
connection
- the connection being freed. This must be a connection obtained with
getConnection().
|
EIP JavaBeans | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |