applied patch for AMQ-1261

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@546502 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2007-06-12 14:37:02 +00:00
parent 5cb9419373
commit 2d3106f56e
1 changed files with 8 additions and 1 deletions

View File

@ -36,6 +36,7 @@ import javax.servlet.http.HttpServletResponse;
import org.apache.activemq.util.FactoryFinder; import org.apache.activemq.util.FactoryFinder;
import org.apache.activemq.util.IntrospectionSupport; import org.apache.activemq.util.IntrospectionSupport;
import org.apache.activemq.web.view.MessageRenderer; 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 * Renders the contents of a queue using some kind of view. The URI is assumed
@ -72,8 +73,14 @@ public class QueueBrowseServlet extends HttpServlet {
public ConnectionFactory getConnectionFactory() { public ConnectionFactory getConnectionFactory() {
if (connectionFactory == null) { if (connectionFactory == null) {
String uri = getServletContext().getInitParameter("org.apache.activemq.brokerURL");
if (uri != null) {
connectionFactory = new ActiveMQConnectionFactory(uri);
}
else {
throw new IllegalStateException("missing ConnectionFactory in QueueBrowserServlet"); throw new IllegalStateException("missing ConnectionFactory in QueueBrowserServlet");
} }
}
return connectionFactory; return connectionFactory;
} }