try{
namingService.publishObject(resourceInfo, ref, true);
_registry.addResourceInfo(resourceInfo);
}catch(NamingException ne){
ConnectorRuntimeException cre = new ConnectorRuntimeException(ne.getMessage());
cre.initCause(ne);
Object params[] = new Object[]{resourceInfo, cre};
_logger.log(Level.SEVERE, "rardeployment.resource_jndi_bind_failure", params);
throw cre;
}
/*
ConnectorObjectFactory cof = new ConnectorObjectFactory(jndiName, ccp.getConnectorDescriptorInfo().
getConnectionFactoryClass(), cdi.getRarName(), poolName);
_runtime.getNamingManager().publishObject(jndiName, cof, true);
*/
//To notify that a connector resource rebind has happened.
ConnectorResourceNamingEventNotifier.getInstance().
notifyListeners(new ConnectorNamingEvent(resourceInfo.toString(),
ConnectorNamingEvent.EVENT_OBJECT_REBIND));
} catch (NamingException ne) {
ConnectorRuntimeException cre = new ConnectorRuntimeException(ne.getMessage());
cre.initCause(ne);
Object params[] = new Object[]{resourceInfo, cre};
_logger.log(Level.SEVERE, "rardeployment.jndi_lookup_failed", params);
throw cre;
}
}