try {
ServiceController<?> controller = context.getController();
this.controller = controller;
final Reference reference = ManagedReferenceObjectFactory.createReference(controller.getName());
final Name name = NameParser.INSTANCE.parse(this.name);
namingStore.bind(name, reference);
logger.tracef("Bound resource %s into naming store %s", name, namingStore);
} catch (NamingException e) {
throw new StartException("Failed to bind resource into naming store [" + namingStore + "] at location [" + name + "]", e);
}
}