public static ServiceController<?> addService(final ServiceTarget batchBuilder, final String resolvedDomainName, final String expressionsDomainName, final boolean legacyWithProperPropertyFormat, final ServiceListener<Object>... listeners) { MBeanServerService service = new MBeanServerService(resolvedDomainName, expressionsDomainName, legacyWithProperPropertyFormat); return batchBuilder.addService(MBeanServerService.SERVICE_NAME, service) .addListener(listeners) .setInitialMode(ServiceController.Mode.ACTIVE) .addDependency(DependencyType.OPTIONAL, Services.JBOSS_SERVER_CONTROLLER, ModelController.class, service.modelControllerValue) .install(); }
void launchServices(OperationContext context, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException { ModelNode recursiveModel = Resource.Tools.readModel(context.readResource(PathAddress.EMPTY_ADDRESS)); // Add the MBean service String resolvedDomain = getDomainName(context, recursiveModel, CommonAttributes.RESOLVED); String expressionsDomain = getDomainName(context, recursiveModel, CommonAttributes.EXPRESSION); boolean legacyWithProperPropertyFormat = false; if (model.hasDefined(CommonAttributes.PROPER_PROPERTY_FORMAT)) { legacyWithProperPropertyFormat = ExposeModelResourceExpression.DOMAIN_NAME.resolveModelAttribute(context, recursiveModel).asBoolean(); } ServiceController<?> controller = verificationHandler != null ? MBeanServerService.addService(context.getServiceTarget(), resolvedDomain, expressionsDomain, legacyWithProperPropertyFormat, verificationHandler) : MBeanServerService.addService(context.getServiceTarget(), resolvedDomain, expressionsDomain, legacyWithProperPropertyFormat); if (newControllers != null) { newControllers.add(controller); } }
static void launchServices(OperationContext context, ModelNode model, ServiceVerificationHandler verificationHandler, ManagedAuditLogger auditLoggerInfo, JmxAuthorizer authorizer, List<ServiceController<?>> newControllers) throws OperationFailedException { ModelNode recursiveModel = Resource.Tools.readModel(context.readResource(PathAddress.EMPTY_ADDRESS)); // Add the MBean service String resolvedDomain = getDomainName(context, recursiveModel, CommonAttributes.RESOLVED); String expressionsDomain = getDomainName(context, recursiveModel, CommonAttributes.EXPRESSION); boolean legacyWithProperPropertyFormat = false; if (model.hasDefined(CommonAttributes.PROPER_PROPERTY_FORMAT)) { legacyWithProperPropertyFormat = ExposeModelResourceExpression.DOMAIN_NAME.resolveModelAttribute(context, recursiveModel).asBoolean(); } boolean coreMBeanSensitivity = JMXSubsystemRootResource.CORE_MBEAN_SENSITIVITY.resolveModelAttribute(context, recursiveModel).asBoolean(); boolean forStandalone = context.getProcessType() == ProcessType.STANDALONE_SERVER; ServiceController<?> controller = verificationHandler != null ? MBeanServerService.addService(context.getServiceTarget(), resolvedDomain, expressionsDomain, legacyWithProperPropertyFormat, coreMBeanSensitivity, auditLoggerInfo, authorizer, forStandalone, verificationHandler) : MBeanServerService.addService(context.getServiceTarget(), resolvedDomain, expressionsDomain, legacyWithProperPropertyFormat, coreMBeanSensitivity, auditLoggerInfo, authorizer, forStandalone); if (newControllers != null) { newControllers.add(controller); } }
@SafeVarargs public static ServiceController<?> addService(final ServiceTarget batchBuilder, final String resolvedDomainName, final String expressionsDomainName, final boolean legacyWithProperPropertyFormat, final boolean coreMBeanSensitivity, final ManagedAuditLogger auditLoggerInfo, final JmxAuthorizer authorizer, boolean forStandalone, final ServiceListener<? super PluggableMBeanServer>... listeners) { MBeanServerService service = new MBeanServerService(resolvedDomainName, expressionsDomainName, legacyWithProperPropertyFormat, coreMBeanSensitivity, auditLoggerInfo, authorizer, forStandalone); return batchBuilder.addService(MBeanServerService.SERVICE_NAME, service) .addListener(listeners) .setInitialMode(ServiceController.Mode.ACTIVE) .addDependency(Services.JBOSS_SERVER_CONTROLLER, ModelController.class, service.modelControllerValue) .install(); }
MBeanServerService.addService(context, resolvedDomain, expressionsDomain, legacyWithProperPropertyFormat, coreMBeanSensitivity, auditLoggerInfo, authorizer, securityIdentitySupplier, jmxEffect, context.getProcessType(), isMasterHc);
public static ServiceController<?> addService(final OperationContext context, final String resolvedDomainName, final String expressionsDomainName, final boolean legacyWithProperPropertyFormat, final boolean coreMBeanSensitivity, final ManagedAuditLogger auditLoggerInfo, final JmxAuthorizer authorizer, final Supplier<SecurityIdentity> securityIdentitySupplier, final JmxEffect jmxEffect, final ProcessType processType, final boolean isMasterHc) { final MBeanServerService service = new MBeanServerService(resolvedDomainName, expressionsDomainName, legacyWithProperPropertyFormat, coreMBeanSensitivity, auditLoggerInfo, authorizer, securityIdentitySupplier, jmxEffect, processType, isMasterHc); final ServiceName modelControllerName = processType.isHostController() ? DOMAIN_CONTROLLER_NAME : Services.JBOSS_SERVER_CONTROLLER; return context.getServiceTarget().addService(MBeanServerService.SERVICE_NAME, service) .setInitialMode(ServiceController.Mode.ACTIVE) .addDependency(modelControllerName, ModelController.class, service.modelControllerValue) .addDependency(context.getCapabilityServiceName("org.wildfly.management.notification-handler-registry", null), NotificationHandlerRegistry.class, service.notificationRegistryValue) .addDependency(ManagementModelIntegration.SERVICE_NAME, ManagementModelIntegration.ManagementModelProvider.class, service.managementModelProviderValue) .addAliases(LEGACY_MBEAN_SERVER_NAME) .install(); }