* @return ConnectorConnectionPool created ConnectorConnectionPool instance
*/
public static ConnectorConnectionPool createSunRaConnectorPoolObject(
PoolInfo poolInfo, ConnectorDescriptor desc, String rarName) {
ConnectorConnectionPool connectorPoolObj =
new ConnectorConnectionPool(poolInfo);
SunConnector sundesc = desc.getSunDescriptor();
ResourceAdapter sunRAXML = sundesc.getResourceAdapter();
connectorPoolObj.setMaxPoolSize(
(String) sunRAXML.getValue(ResourceAdapter.MAX_POOL_SIZE));
connectorPoolObj.setSteadyPoolSize(
(String) sunRAXML.getValue(ResourceAdapter.STEADY_POOL_SIZE));
connectorPoolObj.setMaxWaitTimeInMillis((String) sunRAXML.getValue(
ResourceAdapter.MAX_WAIT_TIME_IN_MILLIS));
connectorPoolObj.setIdleTimeoutInSeconds((String) sunRAXML.getValue(
ResourceAdapter.IDLE_TIMEOUT_IN_SECONDS));
connectorPoolObj.setPoolResizeQuantity((String) "2");
connectorPoolObj.setFailAllConnections(false);
connectorPoolObj.setMatchConnections(true); //always
setDefaultAdvancedPoolAttributes(connectorPoolObj);
try {
connectorPoolObj.setTransactionSupport(getTransactionSupportFromRaXml(rarName));
} catch (Exception ex) {
if(_logger.isLoggable(Level.FINE)) {
_logger.fine("error in setting txSupport");
}
}
boolean validateAtmostEveryIdleSecs = false;
//For SunRAPool, get the value of system property VALIDATE_ATMOST_EVERY_IDLE_SECS.
if (validateAtmostEveryIdleSecsProperty != null && validateAtmostEveryIdleSecsProperty.equalsIgnoreCase("TRUE")) {
validateAtmostEveryIdleSecs = true;
if (_logger.isLoggable(Level.FINE)) {
_logger.log(Level.FINE, "CCP.ValidateAtmostEveryIdleSecs.Set", poolInfo);
}
}
connectorPoolObj.setValidateAtmostEveryIdleSecs(validateAtmostEveryIdleSecs);
return connectorPoolObj;
}