deploymentInfo.setServerName(serverEnvironmentInjectedValue.getValue().getProductConfig().getPrettyVersionString()); if (undertowService.getValue().isStatisticsEnabled()) { deploymentInfo.setMetricsCollector(new UndertowMetricsCollector());
public String getProductName() { if (serverEnvironment.getProductConfig() != null && serverEnvironment.getProductConfig().getProductName() != null) { return serverEnvironment.getProductConfig().getProductName(); } return null; } };
public String getProductName() { if (serverEnvironment.getProductConfig() != null && serverEnvironment.getProductConfig().getProductName() != null) { return serverEnvironment.getProductConfig().getProductName(); } return null; } };
public String getProductName() { if (serverEnvironment.getProductConfig() != null && serverEnvironment.getProductConfig().getProductName() != null) { return serverEnvironment.getProductConfig().getProductName(); } return null; } };
ManagedAuditLogger createAuditLogger() { return new ManagedAuditLoggerImpl(getProductConfig().resolveVersion(), true); } }
ManagedAuditLogger createAuditLogger() { return new ManagedAuditLoggerImpl(getProductConfig().resolveVersion(), true); } }
ManagedAuditLogger createAuditLogger() { return new ManagedAuditLoggerImpl(getProductConfig().resolveVersion(), true); } }
@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 { ModelNode result = context.getResult(); result.get(SUMMARY_DEFINITION.getName()).set(createProductNode(context, new InstallationConfiguration( environment, environment.getProductConfig(), patchingInfo, installationDir))); } }, OperationContext.Stage.RUNTIME);
@Override public synchronized void stop(final StopContext context) { processState.setStopping(); CurrentServiceContainer.setServiceContainer(null); String prettyVersion = configuration.getServerEnvironment().getProductConfig().getPrettyVersionString(); AS_ROOT_LOGGER.serverStopped(prettyVersion, Integer.valueOf((int) (context.getElapsedTime() / 1000000L))); }
@Override public synchronized void stop(final StopContext context) { processState.setStopping(); CurrentServiceContainer.setServiceContainer(null); String prettyVersion = configuration.getServerEnvironment().getProductConfig().getPrettyVersionString(); AS_ROOT_LOGGER.serverStopped(prettyVersion, Integer.valueOf((int) (context.getElapsedTime() / 1000000L))); }
@Override public synchronized void stop(final StopContext context) { //Moved to AbstractControllerService.stop() //processState.setStopping(); CurrentServiceContainer.setServiceContainer(null); String prettyVersion = configuration.getServerEnvironment().getProductConfig().getPrettyVersionString(); ServerLogger.AS_ROOT_LOGGER.serverStopped(prettyVersion, Integer.valueOf((int) (context.getElapsedTime() / 1000000L))); BootstrapListener.deleteStartupMarker(configuration.getServerEnvironment().getServerTempDir()); }
@Override public synchronized void stop(final StopContext context) { //Moved to AbstractControllerService.stop() //processState.setStopping(); CurrentServiceContainer.setServiceContainer(null); String prettyVersion = configuration.getServerEnvironment().getProductConfig().getPrettyVersionString(); ServerLogger.AS_ROOT_LOGGER.serverStopped(prettyVersion, Integer.valueOf((int) (context.getElapsedTime() / 1000000L))); BootstrapListener.deleteStartupMarker(configuration.getServerEnvironment().getServerTempDir()); }
final ServerEnvironment serverEnvironment = configuration.getServerEnvironment(); String prettyVersion = serverEnvironment.getProductConfig().getPrettyVersionString(); AS_ROOT_LOGGER.serverStarting(prettyVersion); if (CONFIG_LOGGER.isDebugEnabled()) {
@Override protected void initModel(Resource rootResource, ManagementResourceRegistration rootRegistration) { // TODO maybe make creating of empty nodes part of the MNR description rootResource.registerChild(PathElement.pathElement(ModelDescriptionConstants.CORE_SERVICE, ModelDescriptionConstants.MANAGEMENT), Resource.Factory.create()); rootResource.registerChild(PathElement.pathElement(ModelDescriptionConstants.CORE_SERVICE, ModelDescriptionConstants.SERVICE_CONTAINER), Resource.Factory.create()); rootResource.registerChild(ServerEnvironmentResourceDescription.RESOURCE_PATH, Resource.Factory.create()); ((PathManagerService)injectedPathManagerService.getValue()).addPathManagerResources(rootResource); VersionModelInitializer.registerRootResource(rootResource, configuration.getServerEnvironment() != null ? configuration.getServerEnvironment().getProductConfig() : null); // Platform MBeans rootResource.registerChild(PlatformMBeanConstants.ROOT_PATH, new RootPlatformMBeanResource()); }
@Override protected void initModel(Resource rootResource, ManagementResourceRegistration rootRegistration) { // TODO maybe make creating of empty nodes part of the MNR description Resource managementResource = Resource.Factory.create(); // TODO - Can we get a Resource direct from CoreManagementResourceDefinition? rootResource.registerChild(PathElement.pathElement(ModelDescriptionConstants.CORE_SERVICE, ModelDescriptionConstants.MANAGEMENT), managementResource); rootResource.registerChild(PathElement.pathElement(ModelDescriptionConstants.CORE_SERVICE, ModelDescriptionConstants.SERVICE_CONTAINER), Resource.Factory.create()); rootResource.registerChild(PathElement.pathElement(ModelDescriptionConstants.CORE_SERVICE, ModelDescriptionConstants.MODULE_LOADING), Resource.Factory.create()); managementResource.registerChild(AccessAuthorizationResourceDefinition.PATH_ELEMENT, AccessAuthorizationResourceDefinition.createResource(authorizer.getWritableAuthorizerConfiguration())); rootResource.registerChild(ServerEnvironmentResourceDescription.RESOURCE_PATH, Resource.Factory.create()); ((PathManagerService)injectedPathManagerService.getValue()).addPathManagerResources(rootResource); VersionModelInitializer.registerRootResource(rootResource, configuration.getServerEnvironment() != null ? configuration.getServerEnvironment().getProductConfig() : null); // Platform MBeans rootResource.registerChild(PlatformMBeanConstants.ROOT_PATH, new RootPlatformMBeanResource()); }
final UndertowHttpManagementService undertowService = new UndertowHttpManagementService(consoleMode, environment.getProductConfig().getConsoleSlot()); undertowService.getAllowedOriginsInjector().inject(commonPolicy.getAllowedOrigins()); CapabilityServiceBuilder<HttpManagement> undertowBuilder = serviceTarget.addCapability(EXTENSIBLE_HTTP_MANAGEMENT_CAPABILITY, undertowService).addDependency(Services.JBOSS_SERVER_CONTROLLER, ModelController.class, undertowService.getModelControllerInjector())
final UndertowHttpManagementService undertowService = new UndertowHttpManagementService(consoleMode, environment.getProductConfig().getConsoleSlot()); undertowService.getAllowedOriginsInjector().inject(commonPolicy.getAllowedOrigins()); CapabilityServiceBuilder<HttpManagement> undertowBuilder = serviceTarget.addCapability(EXTENSIBLE_HTTP_MANAGEMENT_CAPABILITY, undertowService).addDependency(Services.JBOSS_SERVER_CONTROLLER, ModelController.class, undertowService.getModelControllerInjector())
@Override protected void initModel(ManagementModel managementModel, Resource modelControllerResource) { Resource rootResource = managementModel.getRootResource(); // TODO maybe make creating of empty nodes part of the MNR description Resource managementResource = Resource.Factory.create(); // TODO - Can we get a Resource direct from CoreManagementResourceDefinition? managementResource.registerChild(PathElement.pathElement(ModelDescriptionConstants.SERVICE, ModelDescriptionConstants.MANAGEMENT_OPERATIONS), modelControllerResource); rootResource.registerChild(PathElement.pathElement(ModelDescriptionConstants.CORE_SERVICE, ModelDescriptionConstants.MANAGEMENT), managementResource); rootResource.registerChild(PathElement.pathElement(ModelDescriptionConstants.CORE_SERVICE, ModelDescriptionConstants.SERVICE_CONTAINER), Resource.Factory.create()); rootResource.registerChild(PathElement.pathElement(ModelDescriptionConstants.CORE_SERVICE, ModelDescriptionConstants.MODULE_LOADING), PlaceholderResource.INSTANCE); rootResource.registerChild(PathElement.pathElement(ModelDescriptionConstants.CORE_SERVICE, ModelDescriptionConstants.CAPABILITY_REGISTRY), Resource.Factory.create()); managementResource.registerChild(AccessAuthorizationResourceDefinition.PATH_ELEMENT, AccessAuthorizationResourceDefinition.createResource(authorizer.getWritableAuthorizerConfiguration())); rootResource.registerChild(ServerEnvironmentResourceDescription.RESOURCE_PATH, Resource.Factory.create()); ((PathManagerService)injectedPathManagerService.getValue()).addPathManagerResources(rootResource); VersionModelInitializer.registerRootResource(rootResource, configuration.getServerEnvironment() != null ? configuration.getServerEnvironment().getProductConfig() : null); // Platform MBeans rootResource.registerChild(PlatformMBeanConstants.ROOT_PATH, new RootPlatformMBeanResource()); final RuntimeCapabilityRegistry capabilityRegistry = managementModel.getCapabilityRegistry(); capabilityRegistry.registerCapability( new RuntimeCapabilityRegistration(PATH_MANAGER_CAPABILITY, CapabilityScope.GLOBAL, new RegistrationPoint(PathAddress.EMPTY_ADDRESS, null))); capabilityRegistry.registerCapability( new RuntimeCapabilityRegistration(EXECUTOR_CAPABILITY, CapabilityScope.GLOBAL, new RegistrationPoint(PathAddress.EMPTY_ADDRESS, null))); capabilityRegistry.registerCapability( new RuntimeCapabilityRegistration(SUSPEND_CONTROLLER_CAPABILITY, CapabilityScope.GLOBAL, new RegistrationPoint(PathAddress.EMPTY_ADDRESS, null))); // Record the core capabilities with the root MRR so reads of it will show it as their provider // This also gets them recorded as 'possible capabilities' in the capability registry ManagementResourceRegistration rootRegistration = managementModel.getRootResourceRegistration(); rootRegistration.registerCapability(PATH_MANAGER_CAPABILITY); rootRegistration.registerCapability(EXECUTOR_CAPABILITY); rootRegistration.registerCapability(SUSPEND_CONTROLLER_CAPABILITY); }
@Override protected void initModel(ManagementModel managementModel, Resource modelControllerResource) { Resource rootResource = managementModel.getRootResource(); // TODO maybe make creating of empty nodes part of the MNR description Resource managementResource = Resource.Factory.create(); // TODO - Can we get a Resource direct from CoreManagementResourceDefinition? managementResource.registerChild(PathElement.pathElement(ModelDescriptionConstants.SERVICE, ModelDescriptionConstants.MANAGEMENT_OPERATIONS), modelControllerResource); rootResource.registerChild(PathElement.pathElement(ModelDescriptionConstants.CORE_SERVICE, ModelDescriptionConstants.MANAGEMENT), managementResource); rootResource.registerChild(PathElement.pathElement(ModelDescriptionConstants.CORE_SERVICE, ModelDescriptionConstants.SERVICE_CONTAINER), Resource.Factory.create()); rootResource.registerChild(PathElement.pathElement(ModelDescriptionConstants.CORE_SERVICE, ModelDescriptionConstants.MODULE_LOADING), PlaceholderResource.INSTANCE); rootResource.registerChild(PathElement.pathElement(ModelDescriptionConstants.CORE_SERVICE, ModelDescriptionConstants.CAPABILITY_REGISTRY), Resource.Factory.create()); managementResource.registerChild(AccessAuthorizationResourceDefinition.PATH_ELEMENT, AccessAuthorizationResourceDefinition.createResource(authorizer.getWritableAuthorizerConfiguration())); rootResource.registerChild(ServerEnvironmentResourceDescription.RESOURCE_PATH, Resource.Factory.create()); ((PathManagerService)injectedPathManagerService.getValue()).addPathManagerResources(rootResource); VersionModelInitializer.registerRootResource(rootResource, configuration.getServerEnvironment() != null ? configuration.getServerEnvironment().getProductConfig() : null); // Platform MBeans rootResource.registerChild(PlatformMBeanConstants.ROOT_PATH, new RootPlatformMBeanResource()); final RuntimeCapabilityRegistry capabilityRegistry = managementModel.getCapabilityRegistry(); capabilityRegistry.registerCapability( new RuntimeCapabilityRegistration(PATH_MANAGER_CAPABILITY, CapabilityScope.GLOBAL, new RegistrationPoint(PathAddress.EMPTY_ADDRESS, null))); capabilityRegistry.registerCapability( new RuntimeCapabilityRegistration(EXECUTOR_CAPABILITY, CapabilityScope.GLOBAL, new RegistrationPoint(PathAddress.EMPTY_ADDRESS, null))); capabilityRegistry.registerCapability( new RuntimeCapabilityRegistration(SUSPEND_CONTROLLER_CAPABILITY, CapabilityScope.GLOBAL, new RegistrationPoint(PathAddress.EMPTY_ADDRESS, null))); // Record the core capabilities with the root MRR so reads of it will show it as their provider // This also gets them recorded as 'possible capabilities' in the capability registry ManagementResourceRegistration rootRegistration = managementModel.getRootResourceRegistration(); rootRegistration.registerCapability(PATH_MANAGER_CAPABILITY); rootRegistration.registerCapability(EXECUTOR_CAPABILITY); rootRegistration.registerCapability(SUSPEND_CONTROLLER_CAPABILITY); }