if (name != null) {
RegistryContext ctx = new RegistryContext();
try {
ec = (EventCentral) ctx.lookup(name);
} catch(ClassCastException ex) {
error("Object bound in registry under " + name + " is not a valid EventCentral object: " + ctx.lookup(name));
return;
} catch(NamingException ex) {
log.error("Failed to retrieve EventCentral: ", ex);
error("Failed to find EventCentral with registry name: " + name);
return;