@Override public void execute(ManagedServer server) throws Exception { assert Thread.holdsLock(ManagedServer.this); // Call under lock final List<String> command = bootConfiguration.getServerLaunchCommand(); final Map<String, String> env = bootConfiguration.getServerLaunchEnvironment(); final HostControllerEnvironment environment = bootConfiguration.getHostControllerEnvironment(); // Add the process to the process controller processControllerClient.addProcess(serverProcessName, authKey, command.toArray(new String[command.size()]), environment.getHomeDir().getAbsolutePath(), env); }
@Override public boolean execute(ManagedServer server) throws Exception { assert Thread.holdsLock(ManagedServer.this); // Call under lock final List<String> command = bootConfiguration.getServerLaunchCommand(); final Map<String, String> env = bootConfiguration.getServerLaunchEnvironment(); final HostControllerEnvironment environment = bootConfiguration.getHostControllerEnvironment(); final int processId = bootConfiguration.getServerProcessId(); // Add the process to the process controller processControllerClient.addProcess(serverProcessName, processId, authKey, command.toArray(new String[command.size()]), environment.getHomeDir().getAbsolutePath(), env); return true; }
@Override public boolean execute(ManagedServer server) throws Exception { assert Thread.holdsLock(ManagedServer.this); // Call under lock final List<String> command = bootConfiguration.getServerLaunchCommand(); final Map<String, String> env = bootConfiguration.getServerLaunchEnvironment(); final HostControllerEnvironment environment = bootConfiguration.getHostControllerEnvironment(); final int processId = bootConfiguration.getServerProcessId(); // Add the process to the process controller processControllerClient.addProcess(serverProcessName, processId, authKey, command.toArray(new String[command.size()]), environment.getHomeDir().getAbsolutePath(), env); return true; }
public static ServiceController<?> addService(ServiceTarget serviceTarget, HostPathManagerService service, HostControllerEnvironment hostEnvironment) { ServiceBuilder<?> serviceBuilder = serviceTarget.addService(SERVICE_NAME, service); service.addHardcodedAbsolutePath(serviceTarget, HostControllerEnvironment.HOME_DIR, hostEnvironment.getHomeDir().getAbsolutePath()); service.addHardcodedAbsolutePath(serviceTarget, HostControllerEnvironment.DOMAIN_CONFIG_DIR, hostEnvironment.getDomainConfigurationDir().getAbsolutePath()); service.addHardcodedAbsolutePath(serviceTarget, HostControllerEnvironment.DOMAIN_DATA_DIR, hostEnvironment.getDomainDataDir().getAbsolutePath()); service.addHardcodedAbsolutePath(serviceTarget, HostControllerEnvironment.DOMAIN_LOG_DIR, hostEnvironment.getDomainLogDir().getAbsolutePath()); service.addHardcodedAbsolutePath(serviceTarget, HostControllerEnvironment.DOMAIN_TEMP_DIR, hostEnvironment.getDomainTempDir().getAbsolutePath()); service.addHardcodedAbsolutePath(serviceTarget, HostControllerEnvironment.CONTROLLER_TEMP_DIR, hostEnvironment.getDomainTempDir().getAbsolutePath()); return serviceBuilder.install(); } }
command.add(getAbsolutePath(environment.getHomeDir(), "jboss-modules.jar")); command.add("-mp"); command.add(environment.getModulePath());
command.add(getAbsolutePath(environment.getHomeDir(), "jboss-modules.jar")); command.add("-mp"); command.add(environment.getModulePath());
command.add(getAbsolutePath(environment.getHomeDir(), "jboss-modules.jar")); command.add("-mp"); command.add(environment.getModulePath());
public static ServiceController<?> addService(ServiceTarget serviceTarget, HostPathManagerService service, HostControllerEnvironment hostEnvironment) { ServiceBuilder<?> serviceBuilder = serviceTarget.addService(AbstractControllerService.PATH_MANAGER_CAPABILITY.getCapabilityServiceName(), service).addAliases(SERVICE_NAME); // Add resources and capabilities for the always-present paths service.addHardcodedAbsolutePath(serviceTarget, HostControllerEnvironment.HOME_DIR, hostEnvironment.getHomeDir().getAbsolutePath()); service.addHardcodedAbsolutePath(serviceTarget, HostControllerEnvironment.DOMAIN_BASE_DIR, hostEnvironment.getDomainConfigurationDir().getAbsolutePath()); service.addHardcodedAbsolutePath(serviceTarget, HostControllerEnvironment.DOMAIN_CONFIG_DIR, hostEnvironment.getDomainConfigurationDir().getAbsolutePath()); service.addHardcodedAbsolutePath(serviceTarget, HostControllerEnvironment.DOMAIN_DATA_DIR, hostEnvironment.getDomainDataDir().getAbsolutePath()); service.addHardcodedAbsolutePath(serviceTarget, HostControllerEnvironment.DOMAIN_LOG_DIR, hostEnvironment.getDomainLogDir().getAbsolutePath()); service.addHardcodedAbsolutePath(serviceTarget, HostControllerEnvironment.DOMAIN_TEMP_DIR, hostEnvironment.getDomainTempDir().getAbsolutePath()); service.addHardcodedAbsolutePath(serviceTarget, HostControllerEnvironment.CONTROLLER_TEMP_DIR, hostEnvironment.getDomainTempDir().getAbsolutePath()); // Registering the actual standard server path capabilities so server config resources can reference them //TODO look if those registrations could be moved to ServerService/DomainModelControllerService.initModel registerServerPathCapability(service.localCapRegRef, ServerEnvironment.SERVER_BASE_DIR); registerServerPathCapability(service.localCapRegRef, ServerEnvironment.SERVER_CONFIG_DIR); registerServerPathCapability(service.localCapRegRef, ServerEnvironment.SERVER_DATA_DIR); registerServerPathCapability(service.localCapRegRef, ServerEnvironment.SERVER_LOG_DIR); registerServerPathCapability(service.localCapRegRef, ServerEnvironment.SERVER_TEMP_DIR); return serviceBuilder.install(); }
public static ServiceController<?> addService(ServiceTarget serviceTarget, HostPathManagerService service, HostControllerEnvironment hostEnvironment) { ServiceBuilder<?> serviceBuilder = serviceTarget.addService(AbstractControllerService.PATH_MANAGER_CAPABILITY.getCapabilityServiceName(), service).addAliases(SERVICE_NAME); // Add resources and capabilities for the always-present paths service.addHardcodedAbsolutePath(serviceTarget, HostControllerEnvironment.HOME_DIR, hostEnvironment.getHomeDir().getAbsolutePath()); service.addHardcodedAbsolutePath(serviceTarget, HostControllerEnvironment.DOMAIN_BASE_DIR, hostEnvironment.getDomainConfigurationDir().getAbsolutePath()); service.addHardcodedAbsolutePath(serviceTarget, HostControllerEnvironment.DOMAIN_CONFIG_DIR, hostEnvironment.getDomainConfigurationDir().getAbsolutePath()); service.addHardcodedAbsolutePath(serviceTarget, HostControllerEnvironment.DOMAIN_DATA_DIR, hostEnvironment.getDomainDataDir().getAbsolutePath()); service.addHardcodedAbsolutePath(serviceTarget, HostControllerEnvironment.DOMAIN_LOG_DIR, hostEnvironment.getDomainLogDir().getAbsolutePath()); service.addHardcodedAbsolutePath(serviceTarget, HostControllerEnvironment.DOMAIN_TEMP_DIR, hostEnvironment.getDomainTempDir().getAbsolutePath()); service.addHardcodedAbsolutePath(serviceTarget, HostControllerEnvironment.CONTROLLER_TEMP_DIR, hostEnvironment.getDomainTempDir().getAbsolutePath()); // Registering the actual standard server path capabilities so server config resources can reference them //TODO look if those registrations could be moved to ServerService/DomainModelControllerService.initModel registerServerPathCapability(service.localCapRegRef, ServerEnvironment.SERVER_BASE_DIR); registerServerPathCapability(service.localCapRegRef, ServerEnvironment.SERVER_CONFIG_DIR); registerServerPathCapability(service.localCapRegRef, ServerEnvironment.SERVER_DATA_DIR); registerServerPathCapability(service.localCapRegRef, ServerEnvironment.SERVER_LOG_DIR); registerServerPathCapability(service.localCapRegRef, ServerEnvironment.SERVER_TEMP_DIR); return serviceBuilder.install(); }
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final ModelNode patchingInfo = new ModelNode(); PathAddress patchingAddress = PathAddress.pathAddress( PathElement.pathElement(HOST, environment.getHostControllerName()), PathElement.pathElement(CORE_SERVICE, "patching")); OperationEntry opEntry = context.getRootResourceRegistration().getOperationEntry(patchingAddress, "show-history"); if(opEntry != null) { context.addStep(patchingInfo, Util.createOperation("show-history", patchingAddress), opEntry.getOperationHandler(), OperationContext.Stage.RUNTIME); } final Path installationDir = environment.getHomeDir().toPath(); context.addStep(new OperationStepHandler() { @Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { ModelNode result = context.getResult(); result.get(SUMMARY_DEFINITION.getName()).set(createProductNode(context, new InstallationConfiguration( environment, environment.getProductConfig(), patchingInfo, installationDir))); } }, OperationContext.Stage.RUNTIME); } }
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final ModelNode patchingInfo = new ModelNode(); PathAddress patchingAddress = PathAddress.pathAddress( PathElement.pathElement(HOST, environment.getHostControllerName()), PathElement.pathElement(CORE_SERVICE, "patching")); OperationEntry opEntry = context.getRootResourceRegistration().getOperationEntry(patchingAddress, "show-history"); if(opEntry != null) { context.addStep(patchingInfo, Util.createOperation("show-history", patchingAddress), opEntry.getOperationHandler(), OperationContext.Stage.RUNTIME); } final Path installationDir = environment.getHomeDir().toPath(); context.addStep(new OperationStepHandler() { @Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { ModelNode result = context.getResult(); result.get(SUMMARY_DEFINITION.getName()).set(createProductNode(context, new InstallationConfiguration( environment, environment.getProductConfig(), patchingInfo, installationDir))); } }, OperationContext.Stage.RUNTIME); } }
set(result, environment.getHostControllerPort()); } else if (equals(name, HOME_DIR)) { set(result, environment.getHomeDir()); } else if (equals(name, MODULES_DIR)) { set (result, environment.getModulesDir());
set(result, environment.getHostControllerPort()); } else if (equals(name, HOME_DIR)) { set(result, environment.getHomeDir()); } else if (equals(name, MODULES_DIR)) { set (result, environment.getModulesDir());
set(result, environment.getHostControllerPort()); } else if (equals(name, HOME_DIR)) { set(result, environment.getHomeDir()); } else if (equals(name, MODULES_DIR)) { set (result, environment.getModulesDir());