Package org.jboss.as.domain.controller

Examples of org.jboss.as.domain.controller.ServerIdentity


    @Override
    public void execute() {
        final Set<ServerIdentity> outstanding = new HashSet<ServerIdentity>();
        final ServerTaskExecutor.ServerOperationListener listener = new ServerTaskExecutor.ServerOperationListener();
        for(final ServerUpdateTask task : tasks) {
            final ServerIdentity identity = task.getServerIdentity();
            if(updatePolicy.canUpdateServer(identity)) {
                // Execute the task
                if(executor.executeTask(listener, task)) {
                    outstanding.add(task.getServerIdentity());
                }
            } else {
                sendCancelledResponse(identity);
            }
        }
        boolean interrupted = false;
        while(! outstanding.isEmpty()) {
            try {
                // Wait for all prepared results
                final TransactionalProtocolClient.PreparedOperation<ServerTaskExecutor.ServerOperation> prepared = listener.retrievePreparedOperation();
                final ServerIdentity identity = prepared.getOperation().getIdentity();
                recordPreparedOperation(identity, prepared);
                outstanding.remove(identity);
            } catch (InterruptedException e) {
                interrupted = true;
            }
View Full Code Here


                if (server.hasDefined(PATH) && server.get(PATH).keys().contains(pathName)) {
                    // Server takes precedence; ignore domain
                    continue;
                }

                ServerIdentity groupedServer = new ServerIdentity(localHostInfo.getLocalHostName(), serverGroupName, serverName);
                servers.add(groupedServer);
            }
            return servers;
        }
        return Collections.emptySet();
View Full Code Here

                String serverName = serverProp.getName();
                ModelNode server = serverProp.getValue();
                if (!hasSystemProperty(server, propName)) {
                    String groupName = server.require(GROUP).asString();
                    if (groups == null || groups.contains(groupName)) {
                        servers.add(new ServerIdentity(localHostInfo.getLocalHostName(), groupName, serverName));
                    }
                }
            }
        }
        if (servers != null) {
View Full Code Here

                if (server.hasDefined(INTERFACE) && server.get(INTERFACE).keys().contains(interfaceName)) {
                    // Server takes precedence; ignore domain
                    continue;
                }

                ServerIdentity groupedServer = new ServerIdentity(localHostInfo.getLocalHostName(), serverGroupName, serverName);
                servers.add(groupedServer);
            }
            return servers;
        }
        return Collections.emptySet();
View Full Code Here

        Set<ServerIdentity> result = new HashSet<ServerIdentity>();
        for (String bindingGroup : relatedBindingGroups) {
            result.addAll(getServersForType(SOCKET_BINDING_GROUP, bindingGroup, domain, host, localHostInfo.getLocalHostName(), serverProxies));
        }
        for (Iterator<ServerIdentity> iter = result.iterator(); iter.hasNext(); ) {
            ServerIdentity gs = iter.next();
            ModelNode server = host.get(SERVER_CONFIG, gs.getServerName());
            if (server.hasDefined(SOCKET_BINDING_GROUP) && !bindingGroupName.equals(server.get(SOCKET_BINDING_GROUP).asString())) {
                iter.remove();
            }
        }
        return result;
View Full Code Here

    @Override
    public void execute() {
        boolean interrupted = false;
        final ServerTaskExecutor.ServerOperationListener listener = new ServerTaskExecutor.ServerOperationListener();
        for(final ServerUpdateTask task : tasks) {
            final ServerIdentity identity = task.getServerIdentity();
            if(interrupted || ! updatePolicy.canUpdateServer(identity)) {
                sendCancelledResponse(identity);
                continue;
            }
            // Execute the task
View Full Code Here

                final String localHostName = domainOperationContext.getLocalHostInfo().getLocalHostName();
                for(final ServerTaskExecutor.ServerPreparedResponse preparedResult : preparedResults) {
                    boolean rollback = completeRollback || domainOperationContext.isServerGroupRollback(preparedResult.getServerGroupName());
                    // Require a server reload, in case the operation failed, but the overall state was commit
                    if(! preparedResult.finalizeTransaction(! rollback)) {
                        final ServerIdentity identity = preparedResult.getServerIdentity();
                        try {
                            // Replace the original proxyTask with the requireReloadTask
                            final ModelNode result = preparedResult.getPreparedOperation().getPreparedResult();
                            ProxyController proxy = hostProxies.get(identity.getHostName());
                            if (proxy == null) {
                                if (localHostName.equals(identity.getHostName())) {
                                    // Use our server proxies
                                    proxy = serverProxies.get(identity.getServerName());
                                    if (proxy == null) {
                                        if (trace) {
                                            HOST_CONTROLLER_LOGGER.tracef("No proxy for %s", identity);
                                        }
                                        continue;
View Full Code Here

                        Map<ServerIdentity, ModelNode> groupMap = result.get(group);
                        if (groupMap == null) {
                            groupMap = new HashMap<ServerIdentity, ModelNode>();
                            result.put(group, groupMap);
                        }
                        groupMap.put(new ServerIdentity(host, group, prop.getName()), op);
                    }
                }
            }
        }
        return result;
View Full Code Here

                if (server.hasDefined(PATH) && server.get(PATH).keys().contains(pathName)) {
                    // Server takes precedence; ignore domain
                    continue;
                }

                ServerIdentity groupedServer = new ServerIdentity(localHostInfo.getLocalHostName(), serverGroupName, serverName);
                servers.add(groupedServer);
            }
            return servers;
        }
        return Collections.emptySet();
View Full Code Here

                String serverName = serverProp.getName();
                ModelNode server = serverProp.getValue();
                if (!hasSystemProperty(server, propName)) {
                    String groupName = server.require(GROUP).asString();
                    if (groups == null || groups.contains(groupName)) {
                        servers.add(new ServerIdentity(localHostInfo.getLocalHostName(), groupName, serverName));
                    }
                }
            }
        }
        if (servers != null) {
View Full Code Here

TOP

Related Classes of org.jboss.as.domain.controller.ServerIdentity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.