org.jboss.as.controller.RunningMode Java Examples

The following examples show how to use org.jboss.as.controller.RunningMode. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DeploymentHandlerUtil.java    From wildfly-core with GNU Lesser General Public License v2.1 6 votes vote down vote up
public static byte[] addFromHash(ContentRepository contentRepository, ModelNode contentItemNode, String deploymentName, PathAddress address, OperationContext context) throws OperationFailedException {
    byte[] hash = contentItemNode.require(CONTENT_HASH.getName()).asBytes();
    ContentReference reference = ModelContentReference.fromModelAddress(address, hash);
    if (!contentRepository.syncContent(reference)) {
        if (context.isBooting()) {
            if (context.getRunningMode() == RunningMode.ADMIN_ONLY) {
                // The deployment content is missing, which would be a fatal boot error if we were going to actually
                // install services. In ADMIN-ONLY mode we allow it to give the admin a chance to correct the problem
                ServerLogger.ROOT_LOGGER.reportAdminOnlyMissingDeploymentContent(reference.getHexHash(), deploymentName);
            } else {
                throw ServerLogger.ROOT_LOGGER.noSuchDeploymentContentAtBoot(reference.getHexHash(), deploymentName);
            }
        } else {
            throw ServerLogger.ROOT_LOGGER.noSuchDeploymentContent(reference.getHexHash());
        }
    }
    return hash;
}
 
Example #2
Source File: DeploymentOverlayContentAdd.java    From wildfly-core with GNU Lesser General Public License v2.1 6 votes vote down vote up
byte[] addFromHash(byte[] hash, String deploymentOverlayName, final String contentName, final PathAddress address, final OperationContext context) throws OperationFailedException {
    ContentReference reference = ModelContentReference.fromModelAddress(address, hash);
    if(remoteRepository != null) {
        remoteRepository.getDeploymentFiles(reference);
    }
    if (!contentRepository.syncContent(reference)) {
        if (context.isBooting()) {
            if (context.getRunningMode() == RunningMode.ADMIN_ONLY) {
                // The deployment content is missing, which would be a fatal boot error if we were going to actually
                // install services. In ADMIN-ONLY mode we allow it to give the admin a chance to correct the problem
                ServerLogger.ROOT_LOGGER.reportAdminOnlyMissingDeploymentOverlayContent(HashUtil.bytesToHexString(hash), deploymentOverlayName, contentName);

            } else {
                throw ServerLogger.ROOT_LOGGER.noSuchDeploymentOverlayContentAtBoot(HashUtil.bytesToHexString(hash), deploymentOverlayName, contentName);
            }
        } else {
            throw ServerLogger.ROOT_LOGGER.noSuchDeploymentOverlayContent(HashUtil.bytesToHexString(hash));
        }
    }
    return hash;
}
 
Example #3
Source File: RemoteDomainConnection.java    From wildfly-core with GNU Lesser General Public License v2.1 6 votes vote down vote up
@Override
public void connectionOpened(final Connection connection) throws IOException {
    final Channel channel = openChannel(connection, CHANNEL_SERVICE_TYPE, configuration.getOptionMap());
    if(setChannel(channel)) {
        channel.receiveMessage(channelHandler.getReceiver());
        channel.addCloseHandler(channelHandler);
        try {
            if (runningMode == RunningMode.ADMIN_ONLY) {
                // Fetch the domain configuration
                channelHandler.executeRequest(new FetchDomainConfigurationRequest(), null).getResult().get();
            } else {
                // Start the registration process
                channelHandler.executeRequest(new RegisterHostControllerRequest(), null).getResult().get();
            }
        } catch (Exception e) {
            if(e.getCause() instanceof IOException) {
                throw (IOException) e.getCause();
            }
            throw new IOException(e);
        }
        // Registered
        registered();
    } else {
        channel.closeAsync();
    }
}
 
Example #4
Source File: HostControllerEnvironment.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
/** Only for test cases */
public HostControllerEnvironment(Map<String, String> hostSystemProperties, boolean isRestart, String modulePath,
                                 InetAddress processControllerAddress, Integer processControllerPort, InetAddress hostControllerAddress,
                                 Integer hostControllerPort, String defaultJVM, String domainConfig, String initialDomainConfig, String hostConfig,
                                 String initialHostConfig, RunningMode initialRunningMode, boolean backupDomainFiles, boolean useCachedDc, ProductConfig productConfig) {
    this(hostSystemProperties, isRestart, modulePath, processControllerAddress, processControllerPort, hostControllerAddress, hostControllerPort, defaultJVM,
            domainConfig, initialDomainConfig, hostConfig, initialHostConfig, initialRunningMode, backupDomainFiles, useCachedDc, productConfig, false,
            System.currentTimeMillis(), ProcessType.HOST_CONTROLLER, ConfigurationFile.InteractionPolicy.STANDARD, ConfigurationFile.InteractionPolicy.STANDARD);
}
 
Example #5
Source File: ChildFirstClassLoaderKernelServicesFactory.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
public static KernelServices create(String mainSubsystemName, String extensionClassName, AdditionalInitialization additionalInit, ModelTestOperationValidatorFilter validateOpsFilter,
        List<ModelNode> bootOperations, ModelVersion legacyModelVersion, boolean persistXml) throws Exception {
    Extension extension = (Extension) Class.forName(extensionClassName).newInstance();

    ExtensionRegistry extensionRegistry = new ExtensionRegistry(ProcessType.DOMAIN_SERVER, new RunningModeControl(RunningMode.ADMIN_ONLY));
    ModelTestParser testParser = new TestParser(mainSubsystemName, extensionRegistry);

    //TODO this should get serialized properly
    if (additionalInit == null) {
        additionalInit = AdditionalInitialization.MANAGEMENT;
    }
    return AbstractKernelServicesImpl.create(null, mainSubsystemName, additionalInit, validateOpsFilter,
            extensionRegistry, bootOperations, testParser, extension, legacyModelVersion, false, persistXml);
}
 
Example #6
Source File: SyncModelServerStateTestCase.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
public void setDelegate() {
    final ExtensibleConfigurationPersister configurationPersister = new EmptyConfigurationPersister();
    final boolean isMaster = false;
    final IgnoredDomainResourceRegistry ignoredDomainResourceRegistry = new IgnoredDomainResourceRegistry(hostControllerInfo);
    final PathManagerService pathManager = new HostPathManagerService(capabilityRegistry);
    final DelegatingConfigurableAuthorizer authorizer = new DelegatingConfigurableAuthorizer();
    final ManagementSecurityIdentitySupplier securityIdentitySupplier = new ManagementSecurityIdentitySupplier();
    final HostRegistrations hostRegistrations = null;
    final DomainHostExcludeRegistry domainHostExcludeRegistry = new DomainHostExcludeRegistry();
    final MutableRootResourceRegistrationProvider rootResourceRegistrationProvider = new MutableRootResourceRegistrationProvider() {
        @Override
        public ManagementResourceRegistration getRootResourceRegistrationForUpdate(OperationContext context) {
            return managementModel.getRootResourceRegistration();
        }
    };
    DomainRootDefinition domain = new DomainRootDefinition(domainController, hostControllerEnvironment, configurationPersister,
            repository, repository, isMaster, hostControllerInfo, extensionRegistry, ignoredDomainResourceRegistry,
            pathManager, authorizer, securityIdentitySupplier, hostRegistrations, domainHostExcludeRegistry, rootResourceRegistrationProvider);
    getDelegatingResourceDefiniton().setDelegate(domain);

    final String hostName = hostControllerEnvironment.getHostName();
    final HostControllerConfigurationPersister hostControllerConfigurationPersister =
            new HostControllerConfigurationPersister(hostControllerEnvironment,
                    hostControllerInfo, Executors.newCachedThreadPool(), extensionRegistry, extensionRegistry);
    final HostRunningModeControl runningModeControl = new HostRunningModeControl(RunningMode.NORMAL, RestartMode.SERVERS);
    final ServerInventory serverInventory = null;
    final HostFileRepository remoteFileRepository = repository;
    final AbstractVaultReader vaultReader = null;
    final ControlledProcessState processState = null;
    final ManagedAuditLogger auditLogger = null;
    final BootErrorCollector bootErrorCollector = null;
    //Save this for later since setDelegate() gets called before initModel....
    hostResourceDefinition = new HostResourceDefinition(hostName, hostControllerConfigurationPersister,
            hostControllerEnvironment, runningModeControl, repository, hostControllerInfo, serverInventory, remoteFileRepository,
            repository, domainController, extensionRegistry, vaultReader, ignoredDomainResourceRegistry, processState,
            pathManager, authorizer, securityIdentitySupplier, auditLogger, bootErrorCollector);
}
 
Example #7
Source File: SecurityRealmAddHandler.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
protected void performRuntime(OperationContext context, ModelNode operation, Resource resource) throws OperationFailedException {
    // Install another RUNTIME handler to actually install the services. This will run after the
    // RUNTIME handler for any child resources. Doing this will ensure that child resource handlers don't
    // see the installed services and can just ignore doing any RUNTIME stage work
    if(!context.isBooting() && context.getProcessType() == ProcessType.EMBEDDED_SERVER && context.getRunningMode() == RunningMode.ADMIN_ONLY) {
        context.reloadRequired();
    } else {
        context.addStep(ServiceInstallStepHandler.INSTANCE, OperationContext.Stage.RUNTIME);
    }
}
 
Example #8
Source File: ServerEnvironmentTestCase.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Test
public void testUUIDLifeCycle() throws IOException {
    Properties props = new Properties();
    Path standaloneDir = homeDir.resolve("standalone");
    Files.createDirectories(standaloneDir.resolve("configuration"));
    Files.createFile(standaloneDir.resolve("configuration").resolve("standalone.xml"));
    Path uuidPath = standaloneDir.resolve("data").resolve("kernel").resolve("process-uuid");
    assertThat(Files.notExists(uuidPath), is(true));
    props.put(HOME_DIR, homeDir.toAbsolutePath().toString());
    //Check creation on startup
    ServerEnvironment serverEnvironment = new ServerEnvironment(null, props, System.getenv(), "standalone.xml",
            ConfigurationFile.InteractionPolicy.READ_ONLY, ServerEnvironment.LaunchType.STANDALONE, RunningMode.NORMAL, null, false);
    assertThat(Files.exists(uuidPath), is(true));
    List<String> uuids = Files.readAllLines(uuidPath);
    assertThat(uuids, is(not(nullValue())));
    assertThat(uuids.size(), is(1));
    String uuid = uuids.get(0);
    //Check nothing happens on startup if file is already there
    serverEnvironment = new ServerEnvironment(null, props, System.getenv(), "standalone.xml",
            ConfigurationFile.InteractionPolicy.READ_ONLY, ServerEnvironment.LaunchType.STANDALONE, RunningMode.NORMAL, null, false);
    assertThat(Files.exists(uuidPath), is(true));
    uuids = Files.readAllLines(uuidPath);
    assertThat(uuids, is(not(nullValue())));
    assertThat(uuids.size(), is(1));
    assertThat(uuids.get(0), is(uuid));
    //Check re-creation on startup
    Files.delete(uuidPath);
    assertThat(Files.notExists(uuidPath), is(true));
    serverEnvironment = new ServerEnvironment(null, props, System.getenv(), "standalone.xml",
            ConfigurationFile.InteractionPolicy.READ_ONLY, ServerEnvironment.LaunchType.STANDALONE, RunningMode.NORMAL, null, false);
    assertThat(Files.exists(uuidPath), is(true));
    uuids = Files.readAllLines(uuidPath);
    assertThat(uuids, is(not(nullValue())));
    assertThat(uuids.size(), is(1));
    assertThat(uuids.get(0), is(not(uuid)));
    Files.delete(uuidPath);
}
 
Example #9
Source File: BootCliHookTestCase.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Test(expected = IllegalStateException.class)
public void testNotAdminOnlyFails() throws Exception {
    runningModeControl = new RunningModeControl(RunningMode.NORMAL);
    createCliScript("One\nTwo");
    WildFlySecurityManager.setPropertyPrivileged(AdditionalBootCliScriptInvoker.CLI_SCRIPT_PROPERTY, cliFile.getAbsolutePath());
    startController();
}
 
Example #10
Source File: TestModelControllerService.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
protected TestModelControllerService(final ProcessType processType, final ConfigurationPersister configurationPersister, final ControlledProcessState processState,
                                     final ResourceDefinition rootResourceDefinition, final ManagedAuditLogger auditLogger,
                                     final AbstractControllerTestBase.DelegatingResourceDefinitionInitializer initializer,
                                     final CapabilityRegistry capabilityRegistry) {
    super(processType, new RunningModeControl(RunningMode.NORMAL), configurationPersister, processState, rootResourceDefinition,
            null, ExpressionResolver.TEST_RESOLVER, auditLogger, new DelegatingConfigurableAuthorizer(), new ManagementSecurityIdentitySupplier(), capabilityRegistry);
    this.processState = processState;
    internalExecutor = new InternalExecutor();
    this.initializer = initializer;
}
 
Example #11
Source File: ThreadsSubsystem11TestCase.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
protected AdditionalInitialization createAdditionalInitialization() {
    return new AdditionalInitialization() {

        @Override
        protected ProcessType getProcessType() {
            return ProcessType.HOST_CONTROLLER;
        }

        @Override
        protected RunningMode getRunningMode() {
            return RunningMode.ADMIN_ONLY;
        }
    };
}
 
Example #12
Source File: ResourceTransformationContextImpl.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
static ResourceTransformationContext create(TransformationTarget target, Resource model,
                                            ImmutableManagementResourceRegistration registration,
                                            RunningMode runningMode, ProcessType type,
                                            TransformerOperationAttachment attachment,
                                            final Transformers.ResourceIgnoredTransformationRegistry ignoredTransformationRegistry) {
    final Resource root = Resource.Factory.create();
    final OriginalModel originalModel = new OriginalModel(model, runningMode, type, target, registration);
    return new ResourceTransformationContextImpl(root, PathAddress.EMPTY_ADDRESS,
            originalModel, attachment, ignoredTransformationRegistry);
}
 
Example #13
Source File: HostControllerLogger.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
/**
 * Logs an error message indicating this host had no domain controller configuration and cannot start if not in
 * {@link org.jboss.as.controller.RunningMode#ADMIN_ONLY} mode.
 */
@LogMessage(level = Level.ERROR)
@Message(id = 12, value = "No <domain-controller> configuration was provided and the current running mode ('%s') " +
        "requires access to the Domain Controller host. Startup will be aborted. Use the %s command line argument " +
        "to start in %s mode if you need to start without a domain controller connection and then use the management " +
        "tools to configure one.")
void noDomainControllerConfigurationProvided(RunningMode currentRunningMode, String adminOnlyCmdLineArg, RunningMode validRunningMode);
 
Example #14
Source File: HostControllerLogger.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
@LogMessage(level = Level.ERROR)
@Message(id = 144, value = "The host cannot start because it was started in running mode '%s' with no access " +
        "to a local copy of the domain wide configuration policy, the '%s' attribute was set to '%s' and the " +
        "domain wide configuration policy could not be obtained from the Domain Controller host. Startup will be " +
        "aborted. Use the '%s' command line argument to start if you need to start without connecting to " +
        "a domain controller connection.")
void fetchConfigFromDomainMasterFailed(RunningMode currentRunningMode, String policyAttribute,
                                           AdminOnlyDomainConfigPolicy policy,
                                           String cachedDcCmdLineArg);
 
Example #15
Source File: HostControllerLogger.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
@LogMessage(level = Level.ERROR)
@Message(id = 145, value = "The host cannot start because it was started in running mode '%s' with no access " +
        "to a local copy of the domain wide configuration policy, and the '%s' attribute was set to '%s'. Startup " +
        "will be aborted. Use the '%s' command line argument to start in running mode '%s'.")
void noAccessControlConfigurationAvailable(RunningMode currentRunningMode, String policyAttribute,
                                           AdminOnlyDomainConfigPolicy policy,
                                           String cachedDcCmdLineArg, RunningMode desiredRunningMode);
 
Example #16
Source File: HostXml_12.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
HostXml_12(String defaultHostControllerName, RunningMode runningMode, boolean isCachedDC,
           final ExtensionRegistry extensionRegistry, final ExtensionXml extensionXml, final Namespace namespace) {
    super(new SocketBindingsXml.HostSocketBindingsXml());
    this.auditLogDelegate = AuditLogXml.newInstance(namespace, true);
    this.defaultHostControllerName = defaultHostControllerName;
    this.runningMode = runningMode;
    this.isCachedDc = isCachedDC;
    this.extensionRegistry = extensionRegistry;
    this.extensionXml = extensionXml;
    this.namespace = namespace;
}
 
Example #17
Source File: HostXml_4.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
HostXml_4(String defaultHostControllerName, RunningMode runningMode, boolean isCachedDC,
        final ExtensionRegistry extensionRegistry, final ExtensionXml extensionXml, final Namespace namespace) {
    super(new SocketBindingsXml.HostSocketBindingsXml());
    this.auditLogDelegate = AuditLogXml.newInstance(namespace, true);
    this.defaultHostControllerName = defaultHostControllerName;
    this.runningMode = runningMode;
    this.isCachedDc = isCachedDC;
    this.extensionRegistry = extensionRegistry;
    this.extensionXml = extensionXml;
    this.namespace = namespace;
}
 
Example #18
Source File: RemoteDomainConnectionService.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
private RemoteDomainConnectionService(final ModelController controller,
                                      final ExtensionRegistry extensionRegistry,
                                      final LocalHostControllerInfo localHostControllerInfo,
                                      final RemoteFileRepository remoteFileRepository,
                                      final ContentRepository contentRepository,
                                      final IgnoredDomainResourceRegistry ignoredDomainResourceRegistry,
                                      final HostControllerRegistrationHandler.OperationExecutor operationExecutor,
                                      final DomainController domainController,
                                      final HostControllerEnvironment hostControllerEnvironment,
                                      final ExecutorService executor,
                                      final RunningMode runningMode,
                                      final Map<String, ProxyController> serverProxies,
                                      final AtomicBoolean domainConfigAvailable){
    this.controller = controller;
    this.extensionRegistry = extensionRegistry;
    this.productConfig = hostControllerEnvironment.getProductConfig();
    this.localHostInfo = localHostControllerInfo;
    this.remoteFileRepository = remoteFileRepository;
    this.contentRepository = contentRepository;
    remoteFileRepository.setRemoteFileRepositoryExecutor(remoteFileRepositoryExecutor);
    this.ignoredDomainResourceRegistry = ignoredDomainResourceRegistry;
    this.operationExecutor = operationExecutor;
    this.domainController = domainController;
    this.hostControllerEnvironment = hostControllerEnvironment;
    this.executor = executor;
    this.runningMode = runningMode;
    this.tempDir = hostControllerEnvironment.getDomainTempDir();
    this.serverProxies = serverProxies;
    this.domainConfigAvailable = domainConfigAvailable;
}
 
Example #19
Source File: ResourceTransformationContextImpl.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
OriginalModel(Resource original, RunningMode mode, ProcessType type, TransformationTarget target, ImmutableManagementResourceRegistration registration) {
    this.original = original.clone();
    this.mode = mode;
    this.type = type;
    this.target = target;
    this.registration = registration;
}
 
Example #20
Source File: HostXml_8.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
HostXml_8(String defaultHostControllerName, RunningMode runningMode, boolean isCachedDC,
          final ExtensionRegistry extensionRegistry, final ExtensionXml extensionXml, final Namespace namespace) {
    super(new SocketBindingsXml.HostSocketBindingsXml());
    this.auditLogDelegate = AuditLogXml.newInstance(namespace, true);
    this.defaultHostControllerName = defaultHostControllerName;
    this.runningMode = runningMode;
    this.isCachedDc = isCachedDC;
    this.extensionRegistry = extensionRegistry;
    this.extensionXml = extensionXml;
    this.namespace = namespace;
}
 
Example #21
Source File: HostXml_9.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
HostXml_9(String defaultHostControllerName, RunningMode runningMode, boolean isCachedDC,
          final ExtensionRegistry extensionRegistry, final ExtensionXml extensionXml, final Namespace namespace) {
    super(new SocketBindingsXml.HostSocketBindingsXml());
    this.auditLogDelegate = AuditLogXml.newInstance(namespace, true);
    this.defaultHostControllerName = defaultHostControllerName;
    this.runningMode = runningMode;
    this.isCachedDc = isCachedDC;
    this.extensionRegistry = extensionRegistry;
    this.extensionXml = extensionXml;
    this.namespace = namespace;
}
 
Example #22
Source File: HostXml_11.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
HostXml_11(String defaultHostControllerName, RunningMode runningMode, boolean isCachedDC,
           final ExtensionRegistry extensionRegistry, final ExtensionXml extensionXml, final Namespace namespace) {
    super(new SocketBindingsXml.HostSocketBindingsXml());
    this.auditLogDelegate = AuditLogXml.newInstance(namespace, true);
    this.defaultHostControllerName = defaultHostControllerName;
    this.runningMode = runningMode;
    this.isCachedDc = isCachedDC;
    this.extensionRegistry = extensionRegistry;
    this.extensionXml = extensionXml;
    this.namespace = namespace;
}
 
Example #23
Source File: HostXml_13.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
HostXml_13(String defaultHostControllerName, RunningMode runningMode, boolean isCachedDC,
           final ExtensionRegistry extensionRegistry, final ExtensionXml extensionXml, final Namespace namespace) {
    super(new SocketBindingsXml.HostSocketBindingsXml());
    this.auditLogDelegate = AuditLogXml.newInstance(namespace, true);
    this.defaultHostControllerName = defaultHostControllerName;
    this.runningMode = runningMode;
    this.isCachedDc = isCachedDC;
    this.extensionRegistry = extensionRegistry;
    this.extensionXml = extensionXml;
    this.namespace = namespace;
}
 
Example #24
Source File: HostXml_7.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
HostXml_7(String defaultHostControllerName, RunningMode runningMode, boolean isCachedDC,
          final ExtensionRegistry extensionRegistry, final ExtensionXml extensionXml, final Namespace namespace) {
    super(new SocketBindingsXml.HostSocketBindingsXml());
    this.auditLogDelegate = AuditLogXml.newInstance(namespace, true);
    this.defaultHostControllerName = defaultHostControllerName;
    this.runningMode = runningMode;
    this.isCachedDc = isCachedDC;
    this.extensionRegistry = extensionRegistry;
    this.extensionXml = extensionXml;
    this.namespace = namespace;
}
 
Example #25
Source File: CoreManagementSubsystemTestCase.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
protected AdditionalInitialization createAdditionalInitialization() {
    return new AdditionalInitialization() {

        @Override
        protected ProcessType getProcessType() {
            return ProcessType.HOST_CONTROLLER;
        }

        @Override
        protected RunningMode getRunningMode() {
            return RunningMode.ADMIN_ONLY;
        }
    };
}
 
Example #26
Source File: HostXml_6.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
HostXml_6(String defaultHostControllerName, RunningMode runningMode, boolean isCachedDC,
          final ExtensionRegistry extensionRegistry, final ExtensionXml extensionXml, final Namespace namespace) {
    super(new SocketBindingsXml.HostSocketBindingsXml());
    this.auditLogDelegate = AuditLogXml.newInstance(namespace, true);
    this.defaultHostControllerName = defaultHostControllerName;
    this.runningMode = runningMode;
    this.isCachedDc = isCachedDC;
    this.extensionRegistry = extensionRegistry;
    this.extensionXml = extensionXml;
    this.namespace = namespace;
}
 
Example #27
Source File: HostXml_10.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
HostXml_10(String defaultHostControllerName, RunningMode runningMode, boolean isCachedDC,
           final ExtensionRegistry extensionRegistry, final ExtensionXml extensionXml, final Namespace namespace) {
    super(new SocketBindingsXml.HostSocketBindingsXml());
    this.auditLogDelegate = AuditLogXml.newInstance(namespace, true);
    this.defaultHostControllerName = defaultHostControllerName;
    this.runningMode = runningMode;
    this.isCachedDc = isCachedDC;
    this.extensionRegistry = extensionRegistry;
    this.extensionXml = extensionXml;
    this.namespace = namespace;
}
 
Example #28
Source File: HostXml_5.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
HostXml_5(String defaultHostControllerName, RunningMode runningMode, boolean isCachedDC,
        final ExtensionRegistry extensionRegistry, final ExtensionXml extensionXml, final Namespace namespace) {
    super(new SocketBindingsXml.HostSocketBindingsXml());
    this.auditLogDelegate = AuditLogXml.newInstance(namespace, true);
    this.defaultHostControllerName = defaultHostControllerName;
    this.runningMode = runningMode;
    this.isCachedDc = isCachedDC;
    this.extensionRegistry = extensionRegistry;
    this.extensionXml = extensionXml;
    this.namespace = namespace;
}
 
Example #29
Source File: ChildFirstClassLoaderKernelServicesFactory.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
public static KernelServices create(List<ModelNode> bootOperations, ModelTestOperationValidatorFilter validateOpsFilter, ModelVersion legacyModelVersion,
        List<LegacyModelInitializerEntry> modelInitializerEntries) throws Exception {

    TestModelType type = TestModelType.DOMAIN;
    XMLMapper xmlMapper = XMLMapper.Factory.create();
    TestParser testParser = TestParser.create(null, xmlMapper, type);
    ModelInitializer modelInitializer = null;
    if (modelInitializerEntries != null && modelInitializerEntries.size() > 0) {
        modelInitializer = new LegacyModelInitializer(modelInitializerEntries);
    }

    RunningModeControl runningModeControl = new HostRunningModeControl(RunningMode.ADMIN_ONLY, RestartMode.HC_ONLY);
    ExtensionRegistry extensionRegistry = new ExtensionRegistry(ProcessType.HOST_CONTROLLER, runningModeControl);
    return AbstractKernelServicesImpl.create(ProcessType.HOST_CONTROLLER, runningModeControl, validateOpsFilter, bootOperations, testParser, legacyModelVersion, type, modelInitializer, extensionRegistry, null);
}
 
Example #30
Source File: HostXml_Legacy.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
HostXml_Legacy(String defaultHostControllerName, RunningMode runningMode, boolean isCachedDC,
        final ExtensionRegistry extensionRegistry, final ExtensionXml extensionXml, final Namespace namespace) {
    super(null);
    this.auditLogDelegate = AuditLogXml.newInstance(namespace, true);
    this.defaultHostControllerName = defaultHostControllerName;
    this.runningMode = runningMode;
    this.isCachedDc = isCachedDC;
    this.extensionRegistry = extensionRegistry;
    this.extensionXml = extensionXml;
    this.namespace = namespace;
}