// Add the new instance to its parent component
ObjectName pname = new ObjectName(parent);
Server server = ServerFactory.getServer();
Service service = server.findService(pname.getKeyProperty("service"));
Engine engine = (Engine) service.getContainer();
engine.addChild(host);
// Return the corresponding MBean name
ManagedBean managed = registry.findManagedBean("StandardHost");
ObjectName oname =
MBeanUtils.createObjectName(managed.getDomain(), host);