Package org.jboss.as.model

Examples of org.jboss.as.model.UpdateFailedException


    }

    /** {@inheritDoc} */
    protected void applyUpdate(JMSSubsystemElement element) throws UpdateFailedException {
        if(! element.removeTopic(topicName)) {
            throw new UpdateFailedException(String.format("topic (%s) does not exist", topicName));
        }
    }
View Full Code Here


    /** {@inheritDoc} */
    protected void applyUpdate(JMSSubsystemElement element) throws UpdateFailedException {
        final JMSQueueElement queue = element.addQueue(name);
        if(queue == null) {
            throw new UpdateFailedException("duplicate queue " + name);
        }
        queue.setBindings(bindings);
        queue.setSelector(selector);
        queue.setDurable(durable);
    }
View Full Code Here

        socketBinding.setMulticastAddress(multicastAddress);
        if(multicastAddress != null) {
            socketBinding.setMulticastPort(multicastPort);
        }
        if(group.addSocketBinding(name, socketBinding)) {
            throw new UpdateFailedException(String.format("duplicate socket-binding (%s) in binding-group (%s)", name, group.getName()));
        }
    }
View Full Code Here

    public List<UpdateResultHandlerResponse<?>> applyServerUpdates(final String serverName, final List<AbstractServerModelUpdate<?>> updates,
            boolean allowOverallRollback) {
        final ManagedServer server = servers.get(ManagedServer.getServerProcessName(serverName));
        if(server == null) {
            log.debugf("Cannot apply updates to unknown server %s", serverName);
            UpdateResultHandlerResponse<?> urhr = UpdateResultHandlerResponse.createFailureResponse(new UpdateFailedException("No server available with name " + serverName));
            int size = updates.size();
            List<UpdateResultHandlerResponse<?>> list = new ArrayList<UpdateResultHandlerResponse<?>>(size);
            for (int i = 0; i < size; i++) {
                list.add(urhr);
            }
View Full Code Here

    }

    protected void applyUpdate(final LoggingSubsystemElement element) throws UpdateFailedException {
        final AbstractLoggerElement<?> logger = loggerName.length() == 0 ? element.getRootLogger() : element.getLogger(loggerName);
        if (logger == null) {
            throw new UpdateFailedException("No logger element with a name of '" + loggerName + "' exists");
        }
        logger.getHandlers().add(handlerName);
    }
View Full Code Here

    protected AbstractLoggerElement<?> addNewElement(final LoggingSubsystemElement element) throws UpdateFailedException {
        final LoggerElement newElement = new LoggerElement(name);
        newElement.setUseParentHandlers(useParentHandlers);
        if (!element.addLogger(newElement)) {
            throw new UpdateFailedException("Logger " + name + " already exists");
        }
        return newElement;
    }
View Full Code Here

     * {@inheritDoc}
     */
    protected void applyUpdate(LoggingSubsystemElement element) throws UpdateFailedException {
        AbstractHandlerElement<?> handler = element.removeHandler(name);
        if (handler == null) {
            throw new UpdateFailedException("failed to remove handler " + name);
        }
    }
View Full Code Here

            List<StandaloneUpdateResult<?>> results = new ArrayList<StandaloneUpdateResult<?>>();
            for (int i = 0; i < updateCount; i++) {
                expectHeader(unmarshaller, StandaloneClientProtocol.PARAM_APPLY_UPDATE_RESULT);
                byte resultCode = unmarshaller.readByte();
                if (resultCode == (byte) StandaloneClientProtocol.PARAM_APPLY_UPDATE_RESULT_EXCEPTION) {
                    final UpdateFailedException failure = unmarshal(unmarshaller, UpdateFailedException.class);
                    results.add(new StandaloneUpdateResult<Object>(null, failure));
                } else {
                    final Object result = unmarshal(unmarshaller, Object.class);
                    results.add(new StandaloneUpdateResult<Object>(result, null));
                }
View Full Code Here

                    }
                    // else this host didn't get this far
                } catch (InterruptedException e) {
                    log.debug("Interrupted reading server manager response");
                    Thread.currentThread().interrupt();
                    hostFailures.put(entry.getKey(), new UpdateFailedException(e));
                } catch (ExecutionException e) {
                    log.debug("Execution exception reading server manager response", e);
                    hostFailures.put(entry.getKey(), new UpdateFailedException(e));
                }
            }
            if (hostFailures.size() == 0) {
                log.debugf("%s servers affected by update %s", servers.size(), i);
                result.add(new DomainUpdateApplierResponse(servers));
View Full Code Here

        switch (status) {
            case STARTED:
            case STARTING:
                return UpdateResultHandlerResponse.createRestartResponse();
            default: {
                UpdateFailedException ufe = new UpdateFailedException("Server " + server + " did not restart. Server status is " + status);
                return UpdateResultHandlerResponse.createFailureResponse(ufe);
            }

        }
    }
View Full Code Here

TOP

Related Classes of org.jboss.as.model.UpdateFailedException

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.