public void init()
{
if (this.deploymentService == null)
{
final String msg = String.format("Deployment service ref wasn't provided for privileged app '%s'", getAppName());
throw new DeploymentInitException(MessageFactory.createStaticMessage(msg));
}
super.init();
try
{
if (getDescriptor().isPrivileged())
{
getMuleContext().getRegistry().registerObject(REGISTRY_KEY_DEPLOYMENT_SERVICE, deploymentService);
getMuleContext().getRegistry().registerObject(REGISTRY_KEY_CORE_EXTENSIONS, coreExtensions);
}
}
catch (RegistrationException e)
{
final String msg = String.format("Failed to init a privileged app: [%s]", getDescriptor().getAppName());
throw new DeploymentInitException(MessageFactory.createStaticMessage(msg), e);
}
}