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 ; }
Error checking is done on the started MessageBroker to ensure configuration was successful .