ca.idms.jdbc
Class IdmsCommonPoolDataSource

java.lang.Object
  extended by ca.idms.jdbc.IdmsCommonDataSource
      extended by ca.idms.jdbc.IdmsCommonPoolDataSource
All Implemented Interfaces:
IdmsDriverInterface, javax.sql.CommonDataSource
Direct Known Subclasses:
IdmsConnectionPoolDataSource, IdmsXADataSource

public class IdmsCommonPoolDataSource
extends IdmsCommonDataSource

This class contains additional properties for connection pools.

Connection pool implementations typically provide equivalent properties and may not use these properties.

Author:
rosda01

Field Summary
 
Fields inherited from class ca.idms.jdbc.IdmsCommonDataSource
CCI, IDMS, TCP
 
Fields inherited from interface ca.idms.jdbc.IdmsDriverInterface
ACCOUNT, BATCH, CCIHOST, CCIPORT, CSUSPEND, CUSTOM, DEF_CCIPORT, DEF_TASK, DEFSCHEM, EWAIT, INFO, INTERACTIVE, NODE, PASSWORD, PROGRAM, RSINT, SBUFLEN, SERVICE, SSL, STRACE, SUSPEND, TASK, USER, VIA
 
Constructor Summary
IdmsCommonPoolDataSource()
          Creates an IdmsConnectionPoolDataSource object.
 
Method Summary
 int getInitialPoolSize()
          Gets the initialPoolSize property for this data source.
 int getMaxIdleTime()
          Gets the maxIdleTime property for this data source.
 int getMaxPoolSize()
          Gets the maxPoolSize property for this data source.
 int getMaxStatements()
          Gets the maxStatements property for this data source.
 int getMinPoolSize()
          Gets the minPoolSize property for this data source.
 int getPropertyCycle()
          Gets the propertyCycle property for this data source.
 void list(TraceOutput out)
          Lists the data source properties.
 void setInitialPoolSize(int p)
          Sets the initialPoolSize property for this data source.
 void setMaxIdleTime(int p)
          Sets the maxIdleTime property for this data source.
 void setMaxPoolSize(int p)
          Sets the maxPoolSize property for this data source.
 void setMaxStatements(int p)
          Sets the maxStatements property for this data source.
 void setMinPoolSize(int p)
          Sets the minPoolSize property for this data source.
 void setPropertyCycle(int p)
          Sets the propertyCycle property for this data source.
 
Methods inherited from class ca.idms.jdbc.IdmsCommonDataSource
getAccountInfo, getConnectSuspend, getDatabaseName, getDataSourceName, getDefaultSchema, getDescription, getExternalWait, getIdmsConnection, getIdmsConnection, getLoginTimeout, getLogWriter, getNetworkProtocol, getNodeName, getPassword, getPortNumber, getProgramName, getResourceInterval, getRoleName, getServerLength, getServerName, getServerTrace, getSuspendStrategy, getTaskCode, getUser, getViaNodeName, isIdentityAudited, isSsl, list, setAccountInfo, setConnectSuspend, setDatabaseName, setDataSourceName, setDefaultSchema, setDescription, setExternalWait, setIdentityAudited, setLoginTimeout, setLogWriter, setNetworkProtocol, setNodeName, setPassword, setPortNumber, setProgramName, setResourceInterval, setRoleName, setServerLength, setServerName, setServerTrace, setSsl, setSuspendStrategy, setTaskCode, setUser, setViaNodeName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdmsCommonPoolDataSource

public IdmsCommonPoolDataSource()
Creates an IdmsConnectionPoolDataSource object. Enables connectSuspend by default to prevent connections created to satisfy a minPoolSize (or equivalent) property from tying up unused tasks.

See Also:
IdmsCommonDataSource.setConnectSuspend(boolean)
Method Detail

setMaxStatements

public void setMaxStatements(int p)
Sets the maxStatements property for this data source. CA IDMS does not currently support statement pooling, so this value is effectively set to 0, which disables statement pooling.

Parameters:
p - the maximum statement pool size, ignored

getMaxStatements

public int getMaxStatements()
Gets the maxStatements property for this data source.

Returns:
0
See Also:
setMaxStatements(int)

setInitialPoolSize

public void setInitialPoolSize(int p)
Sets the initialPoolSize property for this data source. This is the number of physical connections to be allocated by the connection pool manager (when it chooses to do it).

Parameters:
p - the initial connection pool size

getInitialPoolSize

public int getInitialPoolSize()
Gets the initialPoolSize property for this data source.

Returns:
the initial connection pool size
See Also:
setInitialPoolSize(int)

setMinPoolSize

public void setMinPoolSize(int p)
Sets the minPoolSize property for this data source. This is the minimum number of avaialable connections that the pool manager will maintain. 0 means that the manager will allocate physical connections as needed.

Parameters:
p - the minimum connection pool size

getMinPoolSize

public int getMinPoolSize()
Gets the minPoolSize property for this data source.

Returns:
the minimum connection pool size
See Also:
setMinPoolSize(int)

setMaxPoolSize

public void setMaxPoolSize(int p)
Sets the maxPoolSize property for this data source. This is the total number of physical connections that the pool manager will allocate at one time. 0 means no that the pool manager will not enforced any maximum, and limits will depend on the number of connections allowed by the CA IDMS system.

Parameters:
p - the maximum connection pool size

getMaxPoolSize

public int getMaxPoolSize()
Gets the maxPoolSize property for this data source.

Returns:
the maximum connection pool size
See Also:
setMaxPoolSize(int)

setMaxIdleTime

public void setMaxIdleTime(int p)
Sets the maxIdleTime property for this data source. This is the timeout interval that the pool manager will wait before closing an available physical connection. 0 means that the pool manager will not enforce a timeout interval, and timeouts will depend on the intervals set for the task on the CA IDMS system. Setting this property adjusts the resourceInterval to the value specified plus twice the propertyCycle value.

Parameters:
p - the interval in seconds

getMaxIdleTime

public int getMaxIdleTime()
Gets the maxIdleTime property for this data source.

Returns:
the interval in seconds
See Also:
setMaxIdleTime(int)

setPropertyCycle

public void setPropertyCycle(int p)
Sets the propertyCycle property for this data source. This is the interval that the pool manager will wait before enforcing the other properties for this data source. Setting this property adjusts the resourceInterval.

Parameters:
p - the interval in seconds
See Also:
setMaxIdleTime(int)

getPropertyCycle

public int getPropertyCycle()
Gets the propertyCycle property for this data source.

Returns:
the interval in seconds
See Also:
setPropertyCycle(int)

list

public void list(TraceOutput out)
Lists the data source properties. This method is useful for debugging.

Overrides:
list in class IdmsCommonDataSource
Parameters:
out - the trace output log
See Also:
IdmsCommonDataSource.list(TraceOutput)


Copyright © 2009 CA, All rights reserved