You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by js...@apache.org on 2007/03/13 15:29:29 UTC
svn commit: r517706 -
/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/SingletonBrokerFacade.java
Author: jstrachan
Date: Tue Mar 13 07:29:28 2007
New Revision: 517706
URL: http://svn.apache.org/viewvc?view=rev&rev=517706
Log:
added a better error message if there is no broker available
Modified:
activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/SingletonBrokerFacade.java
Modified: activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/SingletonBrokerFacade.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/SingletonBrokerFacade.java?view=diff&rev=517706&r1=517705&r2=517706
==============================================================================
--- activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/SingletonBrokerFacade.java (original)
+++ activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/SingletonBrokerFacade.java Tue Mar 13 07:29:28 2007
@@ -31,6 +31,11 @@
}
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;
}
}