public Boolean isRunning() { return Boolean.valueOf(service.isStarted()); }
public Boolean isRunning() { return Boolean.valueOf(service.isStarted()); }
public Boolean isRunning() { return Boolean.valueOf(service.isStarted()); }
/** * Error checking is done on the started MessageBroker to ensure configuration was successful. * * @see MessageBrokerConfigProcessor#processAfterStartup(MessageBroker) */ public MessageBroker processAfterStartup(MessageBroker broker) { // Eagerly detect possible problems with the Service Service service = broker.getServiceByType(getServiceClassName()); Assert.notNull(service, "The MessageBroker with id '" + broker.getId() + "' does not have a service of type " + getServiceClassName() + " configured."); Assert.isTrue(service.isStarted(), "The Service with id '" + service.getId() + "' of MessageBroker with id '" + broker.getId() + "' was not started as expected."); return broker; }
/** * * Check that the destination permits access over the endpoint, the security * constraint of the destination permits the operation, and the service and * the destination the message is targeting are running, * * @param message The incoming message. * @param destination The destination to check against. */ public void inspectOperation(Message message, Destination destination) { inspectChannel(message, destination); loginManager.checkConstraint(destination.getSecurityConstraint()); Service service = destination.getService(); if (!service.isStarted()) { // {0} ''{1}'' cannot service message ''{2}'' in stopped state. MessageException me = new MessageException(); me.setMessage(ERR_MSG_CANNOT_SERVICE_STOPPED, new Object[]{SERVICE, service.getId(), message.getMessageId()}); throw me; } if (!destination.isStarted()) { // {0} ''{1}'' cannot service message ''{2}'' in stopped state. MessageException me = new MessageException(); me.setMessage(ERR_MSG_CANNOT_SERVICE_STOPPED, new Object[]{"Destination", destination.getId(), message.getMessageId()}); throw me; } }
/** * * Check that the destination permits access over the endpoint, the security * constraint of the destination permits the operation, and the service and * the destination the message is targeting are running, * * @param message The incoming message. * @param destination The destination to check against. */ public void inspectOperation(Message message, Destination destination) { inspectChannel(message, destination); loginManager.checkConstraint(destination.getSecurityConstraint()); Service service = destination.getService(); if (!service.isStarted()) { // {0} ''{1}'' cannot service message ''{2}'' in stopped state. MessageException me = new MessageException(); me.setMessage(ERR_MSG_CANNOT_SERVICE_STOPPED, new Object[]{SERVICE, service.getId(), message.getMessageId()}); throw me; } if (!destination.isStarted()) { // {0} ''{1}'' cannot service message ''{2}'' in stopped state. MessageException me = new MessageException(); me.setMessage(ERR_MSG_CANNOT_SERVICE_STOPPED, new Object[]{"Destination", destination.getId(), message.getMessageId()}); throw me; } }
if (!service.isStarted())
if (!service.isStarted())
if (!service.isStarted())