activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r546502 - /activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/QueueBrowseServlet.java
Date Tue, 12 Jun 2007 14:37:03 GMT
Author: jstrachan
Date: Tue Jun 12 07:37:02 2007
New Revision: 546502

URL: http://svn.apache.org/viewvc?view=rev&rev=546502
Log:
applied patch for AMQ-1261

Modified:
    activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/QueueBrowseServlet.java

Modified: activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/QueueBrowseServlet.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/QueueBrowseServlet.java?view=diff&rev=546502&r1=546501&r2=546502
==============================================================================
--- activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/QueueBrowseServlet.java
(original)
+++ activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/QueueBrowseServlet.java
Tue Jun 12 07:37:02 2007
@@ -36,6 +36,7 @@
 import org.apache.activemq.util.FactoryFinder;
 import org.apache.activemq.util.IntrospectionSupport;
 import org.apache.activemq.web.view.MessageRenderer;
+import org.apache.activemq.ActiveMQConnectionFactory;
 
 /**
  * Renders the contents of a queue using some kind of view. The URI is assumed
@@ -72,7 +73,13 @@
 
     public ConnectionFactory getConnectionFactory() {
         if (connectionFactory == null) {
-        	throw new IllegalStateException("missing ConnectionFactory in QueueBrowserServlet");
+            String uri = getServletContext().getInitParameter("org.apache.activemq.brokerURL");
+            if (uri != null) {
+                connectionFactory = new ActiveMQConnectionFactory(uri);
+            }
+            else {
+                throw new IllegalStateException("missing ConnectionFactory in QueueBrowserServlet");
+            }
         }
         return connectionFactory;
     }



Mime
View raw message