mirror of https://github.com/apache/activemq.git
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:
parent
5cb9419373
commit
2d3106f56e
|
@ -36,6 +36,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||
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,8 +73,14 @@ public class QueueBrowseServlet extends HttpServlet {
|
|||
|
||||
public ConnectionFactory getConnectionFactory() {
|
||||
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");
|
||||
}
|
||||
}
|
||||
return connectionFactory;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue