/** {@inheritDoc} */ public synchronized void start(final StartContext context) throws StartException { //If the platform MBeanServer was set up to be the PluggableMBeanServer, use that otherwise create a new one and delegate MBeanServer platform = ManagementFactory.getPlatformMBeanServer(); PluggableMBeanServerImpl pluggable = platform instanceof PluggableMBeanServerImpl ? (PluggableMBeanServerImpl)platform : new PluggableMBeanServerImpl(platform, null); MBeanServerDelegate delegate = platform instanceof PluggableMBeanServerImpl ? ((PluggableMBeanServerImpl)platform).getMBeanServerDelegate() : null; pluggable.setAuditLogger(auditLoggerInfo); pluggable.setAuthorizer(authorizer); authorizer.setNonFacadeMBeansSensitive(coreMBeanSensitivity); if (resolvedDomainName != null || expressionsDomainName != null) { //TODO make these configurable ConfiguredDomains configuredDomains = new ConfiguredDomains(resolvedDomainName, expressionsDomainName); showModelPlugin = new ModelControllerMBeanServerPlugin(configuredDomains, modelControllerValue.getValue(), delegate, legacyWithProperPropertyFormat, forStandalone); pluggable.addPlugin(showModelPlugin); } mBeanServer = pluggable; }
/** {@inheritDoc} */ public synchronized void start(final StartContext context) throws StartException { //If the platform MBeanServer was set up to be the PluggableMBeanServer, use that otherwise create a new one and delegate MBeanServer platform = ManagementFactory.getPlatformMBeanServer(); PluggableMBeanServerImpl pluggable = platform instanceof PluggableMBeanServerImpl ? (PluggableMBeanServerImpl)platform : new PluggableMBeanServerImpl(platform, null); MBeanServerDelegate delegate = platform instanceof PluggableMBeanServerImpl ? ((PluggableMBeanServerImpl)platform).getMBeanServerDelegate() : null; pluggable.setAuditLogger(auditLoggerInfo); pluggable.setAuthorizer(authorizer); pluggable.setSecurityIdentitySupplier(securityIdentitySupplier); pluggable.setJmxEffect(jmxEffect); authorizer.setNonFacadeMBeansSensitive(coreMBeanSensitivity); if (resolvedDomainName != null || expressionsDomainName != null) { //TODO make these configurable ConfiguredDomains configuredDomains = new ConfiguredDomains(resolvedDomainName, expressionsDomainName); showModelPlugin = new ModelControllerMBeanServerPlugin(pluggable, configuredDomains, modelControllerValue.getValue(), notificationRegistryValue.getValue(), delegate, legacyWithProperPropertyFormat, processType, managementModelProviderValue.getValue(), isMasterHc); pluggable.addPlugin(showModelPlugin); } mBeanServer = pluggable; }