activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r517706 - /activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/SingletonBrokerFacade.java
Date Tue, 13 Mar 2007 14:29:29 GMT
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;
     }
 }



Mime
View raw message