org.openeai.config
Class DbConnectionPoolConfig

java.lang.Object
  extended by org.openeai.OpenEaiObject
      extended by org.openeai.config.EnterpriseConfigurationObjectImpl
          extended by org.openeai.config.DbConnectionPoolConfig
All Implemented Interfaces:
EnterpriseConfigurationObject

public class DbConnectionPoolConfig
extends EnterpriseConfigurationObjectImpl
implements EnterpriseConfigurationObject

A DbConnectionPoolConfig is a wrapper class that takes information stored in an OpenEAI Deployment document (DbConnectionPoolConfig Element) and stores it in a Java object. Then the configuration object is passed to the constructor of our EnterpriseConnectionPools and they are able to configure themselves with the information found in the config object.

These are the configuration parameters specified by the DbConnectionPoolConfig Element in the Deployment document. NOTE: Like all other OpenEAI configuration objects, there is a "container" level associated to DbConnectionPoolConfig objects. Many Elements and attributes are required at that level and may be optionally overridden at this level. This is to avoid having to enter redundant information in the Deployment document if all (or most) EnterpriseConnectionPool objects being configured should use the same configuration information. Therefore, many of the DbConnectionPool configuration parameters are optional at this level but required at the "container" level. Where this is the case, it will be indicated by an "*".

Configuration Parameters:

These are the configuration parameters specified by the DbConnectionPoolConfig Element in the Deployment document.

Name Required Description
ConfigClass no* Name of the configuration class that wraps the config Element (this class)
ObjectClass no* Name of the Java object that will be instantiated with this Config class
name yes Name of the pool
dbDriverName yes JDBC Database driver name
dbConnectString yes JDBC URL that is used to connect to the database
dbConnectUserId yes User id to connect as
dbConnectPassword yes password associated to the user id
dbPoolSize yes Initial size of the pool
dbPoolMaxSize no Maximum number of connections that may be created by this pool. if this parameter is left out or if zero is specified, the pool will not restrict how large the pool may get at a given time.
dbVerificationString no Some SQL string that can be used to test a connection prior to returning it from the pool. This should be a highly efficient statement. If this is not specified, ONLY the Connection.isClosed() method will be used. If the dbDriverName is an Oracle driver a default verification string will be used in addition to the Connection.isClosed

Version:
3.0 - 28 January 2003
Author:
Tod Jackson (tod@openeai.org), Steve Wheat (steve@openeai.org)

Field Summary
 
Fields inherited from class org.openeai.OpenEaiObject
logger
 
Constructor Summary
DbConnectionPoolConfig()
          This is the constructor used by AppConfig to instantiate the config object.
DbConnectionPoolConfig(org.jdom.Element configElement)
           
 
Method Summary
 java.lang.String getName()
          Returns the name asociated to the DbConnectionPoolConfig as specified in the deployment document.
 void init(org.jdom.Element configElement)
          Implements the init(Element) method that all EnterpriseConfiguration objects must implement.
 void setName(java.lang.String name)
          Sets the name asociated to the DbConnectionPoolConfig as specified in the deployment document.
 
Methods inherited from class org.openeai.config.EnterpriseConfigurationObjectImpl
addProperty, getAppName, getConfigDoc, getConfigElementByAttributeValue, getElementByAttributeValue, getType, getValidation, refresh, setAppName, setConfigDoc, setRefresh, setType, setValidation
 
Methods inherited from class org.openeai.OpenEaiObject
getDebug, getFromAddr, getMailHost, getMailService, getProperties, getToAddr, initializeLog4j, initializeLog4j, initializeLog4j, setDebug, setFromAddr, setMailHost, setMailService, setProperties, setToAddr
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openeai.config.EnterpriseConfigurationObject
getAppName, getProperties, refresh, setAppName
 

Constructor Detail

DbConnectionPoolConfig

public DbConnectionPoolConfig()
This is the constructor used by AppConfig to instantiate the config object. Then, AppConfig calls this object's init(Element) method passing the configuration element it retrieved from the XML configuration document which this object uses to configure itself. After this object has initialized itself, it will be used to instantiate and initialize the framework object (MessageObject, Producers, Consumers, ThreadPools etc.) with the properties it's been initialized with.


DbConnectionPoolConfig

public DbConnectionPoolConfig(org.jdom.Element configElement)
                       throws EnterpriseConfigurationObjectException
Throws:
EnterpriseConfigurationObjectException
Method Detail

setName

public void setName(java.lang.String name)
Sets the name asociated to the DbConnectionPoolConfig as specified in the deployment document. Specifically, this is the "name" attribute associated to the DbConnectionPoolConfig Element. This will be the name by which the DbConnectionPool Java object is known.

Overrides:
setName in class EnterpriseConfigurationObjectImpl
Parameters:
name - String the name found in the DbConnectionPoolConfig@name attribute.

getName

public java.lang.String getName()
Returns the name asociated to the DbConnectionPoolConfig as specified in the deployment document. Specifically, this is the "name" attribute associated to the DbConnectionPoolConfig Element. This will be the name by which the DbConnectionPool Java object is known.

Overrides:
getName in class EnterpriseConfigurationObjectImpl
Returns:
String the name found in the DbConnectionPoolConfig@name attribute.

init

public void init(org.jdom.Element configElement)
          throws EnterpriseConfigurationObjectException
Implements the init(Element) method that all EnterpriseConfiguration objects must implement. This init method takes the Configuration element passed in and pulls out configuration information specific to the EnterpriseConnectionPool Java object being initialized. Then it sets various instance variables and properties on itself which will be used by the EnterpriseConnectionPool Java object when AppConfig instantiates it passing this configuration object. The DbConnectionPool object will then use this configuration java object to initialize itself.

Specified by:
init in interface EnterpriseConfigurationObject
Overrides:
init in class EnterpriseConfigurationObjectImpl
Parameters:
configElement - Element the configuration element that AppConfig has pulled from the configuration document relevant to the EnterpriseConnectionPool being configured. Or, the element that was found in the init() method.
Throws:
EnterpriseConfigurationObjectException - if errors occur processing the configuration Element.
See Also:
EnterpriseConnectionPool


Copyright © 2002,2003 OpenEAI Software Foundation