os = null;
}
protected synchronized void publishJNDI() {
try {
NamingManager namingManager = Switch.getSwitch().getNamingManager();
String jndiName1 = OverloadNotifier.class.getName();
if (LOGGER.isLoggable(Level.FINER)) {
LOGGER.log(Level.FINER, "Publishing the object " + jndiName1);
}
Object o1 = OverloadFactoryImpl.newInstance(jndiName1,
org.glassfish.comms.api.overload.OverloadNotifier.class);
namingManager.publishObject(jndiName1, o1, true);
String jndiName2 = OverloadDetectionRegistrar.class.getName();
if (LOGGER.isLoggable(Level.FINER)) {
LOGGER.log(Level.FINER, "Publishing the object " + jndiName2);
}
Object o2 = OverloadFactoryImpl
.newInstance(
jndiName1,
org.glassfish.comms.api.overload.OverloadDetectionRegistrar.class);
namingManager.publishObject(jndiName2, o2, true);
} catch (NamingException ne) {
ne.printStackTrace();
}
}