"ccp_adm.null_pool_name");
throw new ConnectorRuntimeException( i18nMsg );
}
boolean errorOccured=false;
ResourcesUtil resUtil = ResourcesUtil.createInstance();
Object[] connectorResourcesJndiNames =
resUtil.getConnectorResourcesJndiNames(poolName);
if(cascade==true && connectorResourcesJndiNames != null) {
for(int i=0;i<connectorResourcesJndiNames.length;++i) {
try {
getRuntime().deleteConnectorResource(
(String)connectorResourcesJndiNames[i]);
} catch(ConnectorRuntimeException cre) {
errorOccured=true;
}
}
} else if(connectorResourcesJndiNames != null &&
connectorResourcesJndiNames.length != 0) {
// FIXME: ResourcesUtil class needs to change so that
// it is reference friendly.
// Refer to bug 5004451
/*
String i18nMsg = localStrings.getString(
"ccp_adm.connector_res_exist");
ConnectorRuntimeException cre = new
ConnectorRuntimeException( i18nMsg );
_logger.log(Level.SEVERE,"rardeployment.resources_exist",
poolName);
_logger.log(Level.SEVERE,"",cre);
throw cre;
*/
}
killPool(poolName);
boolean result = _registry.removeManagedConnectionFactory(poolName);
if(result == false && !resUtil.poolBelongsToSystemRar(poolName)) {
_logger.log( Level.FINE,
"rardeployment.mcf_removal_failure",poolName);
return;
}
try {
String jndiNameForPool = ConnectorAdminServiceUtils.
getReservePrefixedJNDINameForPool( poolName );
InitialContext ic = new InitialContext();
ic.unbind(jndiNameForPool);
} catch(NamingException ne) {
if(resUtil.poolBelongsToSystemRar(poolName)) {
return;
}
_logger.log(Level.SEVERE,
"rardeployment.connectionpool_removal_from_jndi_error",
poolName);
String i18nMsg = localStrings.getString(
"ccp_adm.failed_to_remove_from_jndi", poolName);
ConnectorRuntimeException cre = new
ConnectorRuntimeException( i18nMsg );
cre.initCause(ne);
_logger.log(Level.SEVERE,"",cre);
throw cre;
}
if(errorOccured==true && !resUtil.poolBelongsToSystemRar(poolName)) {
String i18nMsg = localStrings.getString(
"ccp_adm.failed_to_delete_conn_res", poolName);
ConnectorRuntimeException cre = new
ConnectorRuntimeException( i18nMsg );
_logger.log(Level.SEVERE,