com.sun.enterprise.config.serverbeans.ConnectorConnectionPool
domainCcp =
(com.sun.enterprise.config.serverbeans.ConnectorConnectionPool)resource;
SecurityMap[] securityMaps = domainCcp.getSecurityMap();
String poolName = domainCcp.getName();
ConnectorRuntime crt = ConnectorRuntime.getRuntime();
//Since 8.1 PE/SE/EE, only if pool has already been deployed in this
//server-instance earlier, reconfig this pool
if (!crt.isConnectorConnectionPoolDeployed(poolName)) {
_logger.fine("The connector connection pool " + poolName
+ " is either not referred or not yet created in "
+ "this server instance and pool and hence "
+ "redeployment is ignored");
return;
}
String rarName = domainCcp.getResourceAdapterName();
String connDefName = domainCcp.getConnectionDefinitionName();
ElementProperty[] props = domainCcp.getElementProperty();
ConnectorConnectionPool ccp = getConnectorConnectionPool(domainCcp);
populateConnectorConnectionPool( ccp, connDefName, rarName, props,
securityMaps);
boolean poolRecreateRequired = false;
try {
_logger.fine("Calling reconfigure pool");
poolRecreateRequired = crt.reconfigureConnectorConnectionPool( ccp,
new HashSet());
} catch (ConnectorRuntimeException cre ) {
cre.printStackTrace();
}
if (poolRecreateRequired){
_logger.fine("Pool recreation required");
crt.recreateConnectorConnectionPool( ccp );
_logger.fine("Pool recreation done");
}
}