IOUtils.createDirs(installDir);
IOUtils.createDirs(workspaceDir);
// Unzip all
IOUtils.unzip(f, installDir);
// Create component
RegistryComponent component;
if (engine) {
component = context.getRegistry().addComponent(name, ComponentType.JBI_ENGINE_COMPONENT);
} else {
component = context.getRegistry().addComponent(name, ComponentType.JBI_BINDING_COMPONENT);
}
component.setInstallRoot(installDir.getAbsolutePath());
component.setWorkspaceRoot(workspaceDir.getAbsolutePath());
component.setDescriptor(new JbiDescriptor(jbi));
// Create and register installer
Installer installer = new Installer(context, component);
installer.init();
ObjectName objName = createComponentInstallerName(name);
StandardMBean mbean = new StandardMBean(installer, InstallerMBean.class);