mirror of https://github.com/apache/activemq.git
added a better error message if there is no broker available
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@517706 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a51a7d53e2
commit
a7344588c9
|
@ -31,6 +31,11 @@ public class SingletonBrokerFacade extends LocalBrokerFacade {
|
|||
}
|
||||
|
||||
protected static BrokerService findSingletonBroker() {
|
||||
return BrokerRegistry.getInstance().findFirst();
|
||||
BrokerService broker = BrokerRegistry.getInstance().findFirst();
|
||||
if (broker == null) {
|
||||
throw new IllegalArgumentException("No BrokerService is registered with the BrokerRegistry." +
|
||||
" Are you sure there is a configured broker in the same ClassLoader?");
|
||||
}
|
||||
return broker;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue