/** * Install the installation manager service. * * @param serviceTarget * @return the service controller for the installed installation manager */ public static ServiceController<InstallationManager> installService(ServiceTarget serviceTarget) { final InstallationManagerService service = new InstallationManagerService(); return serviceTarget.addService(InstallationManagerService.NAME, service) .addDependency(JBOSS_PRODUCT_CONFIG_SERVICE, ProductConfig.class, service.productConfig) .setInitialMode(ServiceController.Mode.ACTIVE) .install(); }
protected static InstallationManager load(final File jbossHome, final ProductConfig productConfig) throws IOException { final InstalledImage installedImage = InstalledIdentity.installedImage(jbossHome); final List<File> moduleRoots = getModulePath(installedImage); final List<File> bundlesRoots = getBundlePath(installedImage); return InstallationManager.load(jbossHome, moduleRoots, bundlesRoots, productConfig); }
protected void initializeCoreServices(final ServiceTarget serviceTarget, final ManagementResourceRegistration resourceRegistration, final Resource resource) { // Install the installation manager service final ServiceController<InstallationManager> imController = InstallationManagerService.installService(serviceTarget); // Register the patch resource description resourceRegistration.registerSubModel(PatchResourceDefinition.INSTANCE); // and resource PatchResource patchResource = new PatchResource(imController); resource.registerChild(PatchResourceDefinition.PATH, patchResource); }
final File jbossHome = new File(SecurityActions.getSystemProperty("jboss.home.dir")); final ProductConfig productConfig = this.productConfig.getValue(); this.manager = load(jbossHome, productConfig);
protected void initializeCoreServices(final ServiceTarget serviceTarget, final ManagementResourceRegistration resourceRegistration, final Resource resource) { // Install the installation manager service final ServiceController<InstallationManager> imController = InstallationManagerService.installService(serviceTarget); // Register the patch resource description resourceRegistration.registerSubModel(PatchResourceDefinition.INSTANCE); // and resource PatchResource patchResource = new PatchResource(imController); resource.registerChild(PatchResourceDefinition.PATH, patchResource); }
final File jbossHome = new File(SecurityActions.getSystemProperty("jboss.home.dir")); final ProductConfig productConfig = this.productConfig.getValue(); this.manager = load(jbossHome, productConfig);
protected static InstallationManager load(final File jbossHome, final ProductConfig productConfig) throws IOException { final InstalledImage installedImage = InstalledIdentity.installedImage(jbossHome); final List<File> moduleRoots = getModulePath(installedImage); final List<File> bundlesRoots = getBundlePath(installedImage); return InstallationManager.load(jbossHome, moduleRoots, bundlesRoots, productConfig); }
/** * Install the installation manager service. * * @param serviceTarget * @return the service controller for the installed installation manager */ public static ServiceController<InstallationManager> installService(ServiceTarget serviceTarget) { final InstallationManagerService service = new InstallationManagerService(); return serviceTarget.addService(InstallationManagerService.NAME, service) .addDependency(JBOSS_PRODUCT_CONFIG_SERVICE, ProductConfig.class, service.productConfig) .setInitialMode(ServiceController.Mode.ACTIVE) .install(); }