* @since 8.1 pe/se/ee
*/
private void checkAndDeletePool(com.sun.enterprise.config.serverbeans.JdbcResource
cr) throws Exception {
String poolName = cr.getPoolName();
Resources res = (Resources) cr.parent();
try {
boolean poolReferred =
ResourcesUtil.createInstance().isJdbcPoolReferredInServerInstance(poolName);
if (!poolReferred) {
_logger.fine("Deleting JDBC pool " + poolName + "as there is no more " +
"resource-refs to the pool in this server instance");
com.sun.enterprise.config.serverbeans.JdbcConnectionPool jcp
= res.getJdbcConnectionPoolByName(poolName);
//Delete/Undeploy Pool
JdbcConnectionPoolDeployer deployer =
new JdbcConnectionPoolDeployer();
deployer.actualUndeployResource(jcp);
}