public static HostInfo fromModelNode(final ModelNode hostInfo) { return new HostInfo(hostInfo, null); }
private synchronized void initialize(final String hostName, final ModelNode hostInfo, final ManagementRequestContext<RegistrationContext> responseChannel) { this.hostName = hostName; this.hostInfo = HostInfo.fromModelNode(hostInfo, domainHostExcludeRegistry); this.responseChannel = responseChannel; }
Long getRemoteConnectionId() { return hostInfo.getRemoteConnectionId(); }
final int major = hostInfo.getManagementMajorVersion(); final int minor = hostInfo.getManagementMinorVersion(); final int micro = hostInfo.getManagementMicroVersion(); boolean as711 = (major == 1 && minor == 1); if (as711) { final TransformationTarget target = TransformationTargetImpl.createForHost(hostInfo.getHostName(), transformerRegistry, ModelVersion.create(major, minor, micro), Collections.<PathAddress, ModelVersion>emptyMap(), hostInfo); final Transformers transformers = Transformers.Factory.create(target); final Collection<Resource.ResourceEntry> resources = transformed.getChildren(EXTENSION); for (final Resource.ResourceEntry entry : resources) { if (!hostInfo.isResourceTransformationIgnored(PathAddress.pathAddress(entry.getPathElement()))) { extensions.add(entry.getName());
final int major = hostInfo.getManagementMajorVersion(); final int minor = hostInfo.getManagementMinorVersion(); final int micro = hostInfo.getManagementMicroVersion(); boolean as711 = (major == 1 && minor == 1); if(as711) {
/** * Once the "read-domain-mode" operation is in operationPrepared, send the model back to registering HC. * When the model was applied successfully on the client, we process registering the proxy in the domain, * otherwise we rollback. * * @param transaction the model controller tx * @param result the prepared result (domain model) * @throws SlaveRegistrationException */ void registerHost(final ModelController.OperationTransaction transaction, final ModelNode result) throws SlaveRegistrationException { // if (sendResultToHost(transaction, result)) return; synchronized (this) { Long pingPongId = hostInfo.getRemoteConnectionId(); // Register the slave domainController.registerRemoteHost(hostName, handler, transformers, pingPongId, registerProxyController); // Complete registration if(! failed) { transaction.commit(); } else { transaction.rollback(); return; } } if (registerProxyController) { DOMAIN_LOGGER.registeredRemoteSlaveHost(hostName, hostInfo.getPrettyProductName()); } }
/** * Calculates the metadata required when connecting to the master {@link org.jboss.as.domain.controller.DomainController} * This value does not require locking during use, as {@link org.jboss.as.host.controller.mgmt.HostInfo createLocalHostHostInfo()} uses * '/domain-controller', which is read-only, and '/core-service=ignored-resources/ignored-resource-type' which has handlers on * add, remove and write-attribute that will place the host into reload-required. * @return */ @Override public ModelNode createLocalHostInfo() { return HostInfo.createLocalHostHostInfo(localHostInfo, productConfig, ignoredDomainResourceRegistry, ReadRootResourceHandler.grabDomainResource(operationExecutor).getChildren(HOST).iterator().next()); }
public static Transformers.ResourceIgnoredTransformationRegistry createIgnoredRegistry(final ModelNode modelNode) { return createIgnoredRegistry(modelNode, null); }
final int major = hostInfo.getManagementMajorVersion(); final int minor = hostInfo.getManagementMinorVersion(); final int micro = hostInfo.getManagementMicroVersion(); boolean as711 = (major == 1 && minor == 1); if (as711) { final TransformationTarget target = TransformationTargetImpl.createForHost(hostInfo.getHostName(), transformerRegistry, ModelVersion.create(major, minor, micro), Collections.<PathAddress, ModelVersion>emptyMap(), hostInfo); final Transformers transformers = Transformers.Factory.create(target); final Collection<Resource.ResourceEntry> resources = transformed.getChildren(EXTENSION); for (final Resource.ResourceEntry entry : resources) { if (!hostInfo.isResourceTransformationIgnored(PathAddress.pathAddress(entry.getPathElement()))) { extensions.add(entry.getName());
/** * Once the "read-domain-mode" operation is in operationPrepared, send the model back to registering HC. * When the model was applied successfully on the client, we process registering the proxy in the domain, * otherwise we rollback. * * @param transaction the model controller tx * @param result the prepared result (domain model) * @throws SlaveRegistrationException */ void registerHost(final ModelController.OperationTransaction transaction, final ModelNode result) throws SlaveRegistrationException { // if (sendResultToHost(transaction, result)) return; synchronized (this) { Long pingPongId = hostInfo.getRemoteConnectionId(); // Register the slave domainController.registerRemoteHost(hostName, handler, transformers, pingPongId, registerProxyController); // Complete registration if(! failed) { transaction.commit(); } else { transaction.rollback(); return; } } if (registerProxyController) { DOMAIN_LOGGER.registeredRemoteSlaveHost(hostName, hostInfo.getPrettyProductName()); } }
/** * Calculates the metadata required when connecting to the master {@link org.jboss.as.domain.controller.DomainController} * This value does not require locking during use, as {@link org.jboss.as.host.controller.mgmt.HostInfo createLocalHostHostInfo()} uses * '/domain-controller', which is read-only, and '/core-service=ignored-resources/ignored-resource-type' which has handlers on * add, remove and write-attribute that will place the host into reload-required. * @return */ @Override public ModelNode createLocalHostInfo() { return HostInfo.createLocalHostHostInfo(localHostInfo, productConfig, ignoredDomainResourceRegistry, ReadRootResourceHandler.grabDomainResource(operationExecutor).getChildren(HOST).iterator().next()); }
public static Transformers.ResourceIgnoredTransformationRegistry createIgnoredRegistry(final ModelNode modelNode) { return createIgnoredRegistry(modelNode, null); }
Long pingPongId = hostInfo.getRemoteConnectionId(); DOMAIN_LOGGER.registeredRemoteSlaveHost(hostName, hostInfo.getPrettyProductName());
private synchronized void initialize(final String hostName, final ModelNode hostInfo, final ManagementRequestContext<RegistrationContext> responseChannel) { this.hostName = hostName; this.hostInfo = HostInfo.fromModelNode(hostInfo); this.responseChannel = responseChannel; }
public static HostInfo fromModelNode(final ModelNode hostInfo) { return new HostInfo(hostInfo); }
final ModelNode hostInfo = HostInfo.createLocalHostHostInfo(localHostInfo, productConfig, ignoredDomainResourceRegistry); final OptionMap options = OptionMap.builder().set(RemotingOptions.HEARTBEAT_INTERVAL, 15000) .set(Options.READ_TIMEOUT, 45000)
Long getRemoteConnectionId() { return hostInfo.getRemoteConnectionId(); }
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { context.acquireControllerLock(); // Filter the information to only include configuration for the given server-group or socket-binding group final Set<ServerConfigInfo> serverConfigs = IgnoredNonAffectedServerGroupsUtil.createConfigsFromModel(operation); final ReadMasterDomainModelUtil.RequiredConfigurationHolder rc = new ReadMasterDomainModelUtil.RequiredConfigurationHolder(); for (final ServerConfigInfo serverConfig : serverConfigs) { ReadMasterDomainModelUtil.processServerConfig(context.readResourceFromRoot(PathAddress.EMPTY_ADDRESS), rc, serverConfig, extensionRegistry); } final Transformers.ResourceIgnoredTransformationRegistry manualExcludes = HostInfo.createIgnoredRegistry(operation); final Transformers.ResourceIgnoredTransformationRegistry ignoredTransformationRegistry = ReadMasterDomainModelUtil.createServerIgnoredRegistry(rc, manualExcludes); final ReadDomainModelHandler handler = new ReadDomainModelHandler(ignoredTransformationRegistry, transformers, true); context.addStep(handler, OperationContext.Stage.MODEL); }
private synchronized void initialize(final String hostName, final ModelNode hostInfo, final ManagementRequestContext<RegistrationContext> responseChannel) { this.hostName = hostName; this.hostInfo = HostInfo.fromModelNode(hostInfo, domainHostExcludeRegistry); this.responseChannel = responseChannel; }
public static HostInfo fromModelNode(final ModelNode hostInfo, DomainHostExcludeRegistry hostIgnoreRegistry) { return new HostInfo(hostInfo, hostIgnoreRegistry); }