if (kernel == null)
{
throw new IllegalStateException("Server cannot be started without the presence of an underlying "
+ Kernel.class.getName());
}
final KernelController controller = kernel.getController();
final BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(mcServerBindName, getClass().getName());
builder.addMethodInstallCallback("addBootstrap");
builder.addMethodUninstallCallback("removeBootstrap");
builder.ignoreStart(); // We invoke start manually, don't let MC do it
try
{
log.debug("Installing " + this + " into MC under key: " + mcServerBindName);
controller.install(builder.getBeanMetaData(), this);
}
catch (Throwable t)
{
throw new Exception("Error in installing " + mcServerBindName + " during startup", t);
}