Sample code:
...
public static String CONNECTION_TIMEOUT = "60";
public static String MAX_CONNECTIONS = "100";
public static String MIN_CONNECTIONS = "10";
public static String REAP_TIME = "180";
public static String UNUSED_TIMEOUT = "1800";
public static String PURGEPOLICY = "FailingConnectionOnly";
...
/**
* @param configService
* @param session
* @param newDataSource
* @throws ConfigServiceException
* @throws ConnectorException
*/
private void addConnectionPoolProperties(
ConfigService
configService,
Session session,
ObjectName
newDataSource)
throws
ConfigServiceException, ConnectorException
{
AttributeList
connectionPool = new AttributeList();
ConfigServiceHelper.setAttributeValue(connectionPool, "connectionTimeout",
CONNECTION_TIMEOUT);
ConfigServiceHelper.setAttributeValue(connectionPool, "maxConnections",
MAX_CONNECTIONS);
ConfigServiceHelper.setAttributeValue(connectionPool, "minConnections",
MIN_CONNECTIONS);
ConfigServiceHelper.setAttributeValue(connectionPool, "reapTime",
REAP_TIME);
ConfigServiceHelper.setAttributeValue(connectionPool, "unusedTimeout",
UNUSED_TIMEOUT);
ConfigServiceHelper.setAttributeValue(connectionPool, "purgePolicy",
PURGEPOLICY);
ObjectName
connectionPoolSet =
configService.createConfigData(session,newDataSource,"connectionPool","",connectionPool);
}
...
|
After setting the connectionTimeout type to both Integer
and String, you continue to receive the following error message:
5/27/04 11:29:11:751 EDT] 65d907f8 SystemOut O
com.ibm.websphere.management.exception.InvalidAttributeValException:
ADMG0012E: Invalid attribute value for attribute
connectionTimeout.
[5/27/04 11:29:11:751 EDT] 65d907f8 SystemOut O
at
com.ibm.ws.management.configservice.MOFUtil.validateAttribute(MOFUtil.java:850)
[5/27/04 11:29:11:751 EDT] 65d907f8 SystemOut O
at
com.ibm.ws.management.configservice.MOFUtil.validateAttributeList(MOFUtil.java:766)
[5/27/04 11:29:11:751 EDT] 65d907f8 SystemOut O
at
com.ibm.ws.management.configservice.MOFUtil.validateConfigData(MOFUtil.java:124)
WebSphere Configuration Documentation
Within the package resources.jdbc, the attribute
connectionTimeout, for the connection pool manager, has different
data types based on the data source style:
|