fixed the web console so it works fine with spring 2.0 along with adding XMPP support so you can chat with the broker using a Jabber client or use the web front end to send / browse messages

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@468029 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2006-10-26 15:00:48 +00:00
parent 9f000ec235
commit b1ed273f83
4 changed files with 19 additions and 5 deletions

View File

@ -98,6 +98,13 @@
<artifactId>activemq-web</artifactId> <artifactId>activemq-web</artifactId>
</dependency> </dependency>
<!-- XMPP support -->
<dependency>
<groupId>${pom.groupId}</groupId>
<artifactId>activemq-xmpp</artifactId>
<version>${pom.version}</version>
</dependency>
<!-- TODO this should not be needed, but transitive dependencies are not working --> <!-- TODO this should not be needed, but transitive dependencies are not working -->
<dependency> <dependency>
<groupId>${pom.groupId}</groupId> <groupId>${pom.groupId}</groupId>

View File

@ -19,6 +19,8 @@ package org.apache.activemq.web.handler;
import org.springframework.web.bind.ServletRequestDataBinder; import org.springframework.web.bind.ServletRequestDataBinder;
import org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping; import org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
@ -27,6 +29,7 @@ import javax.servlet.http.HttpServletRequest;
* @version $Revision$ * @version $Revision$
*/ */
public class BindingBeanNameUrlHandlerMapping extends BeanNameUrlHandlerMapping { public class BindingBeanNameUrlHandlerMapping extends BeanNameUrlHandlerMapping {
private static final transient Log log = LogFactory.getLog(BindingBeanNameUrlHandlerMapping.class);
protected Object getHandlerInternal(HttpServletRequest request) throws Exception { protected Object getHandlerInternal(HttpServletRequest request) throws Exception {
Object object = super.getHandlerInternal(request); Object object = super.getHandlerInternal(request);
@ -36,9 +39,12 @@ public class BindingBeanNameUrlHandlerMapping extends BeanNameUrlHandlerMapping
object = getApplicationContext().getBean(handlerName); object = getApplicationContext().getBean(handlerName);
} }
ServletRequestDataBinder binder = new ServletRequestDataBinder(object, null); ServletRequestDataBinder binder = new ServletRequestDataBinder(object, "request");
binder.bind(request); binder.bind(request);
System.out.println("Bound POJO is now: " + object); binder.setIgnoreUnknownFields(true);
if (log.isDebugEnabled()) {
log.debug("Bound POJO is now: " + object);
}
return object; return object;
} }

View File

@ -18,7 +18,7 @@
# #
# The logging properties used during tests.. # The logging properties used during tests..
# #
log4j.rootLogger=INFO, stdout log4j.rootLogger=DEBUG, stdout
log4j.logger.org.apache.activemq.spring=WARN log4j.logger.org.apache.activemq.spring=WARN
log4j.logger.org.springframework=warn log4j.logger.org.springframework=warn

View File

@ -62,13 +62,14 @@
</persistenceAdapter> </persistenceAdapter>
<transportConnectors> <transportConnectors>
<transportConnector name="default" uri="tcp://localhost:61616" discoveryUri="multicast://default"/> <transportConnector name="openwire" uri="tcp://localhost:61616" discoveryUri="multicast://default"/>
<transportConnector name="stomp" uri="stomp://localhost:61613"/> <transportConnector name="stomp" uri="stomp://localhost:61613"/>
<transportConnector name="xmpp" uri="xmpp://localhost:61222"/>
</transportConnectors> </transportConnectors>
<networkConnectors> <networkConnectors>
<!-- by default just auto discover the other brokers --> <!-- by default just auto discover the other brokers -->
<networkConnector name="default" uri="multicast://default"/> <networkConnector name="defaultNetork" uri="multicast://default"/>
<!-- <!--
<networkConnector name="host1 and host2" uri="static://(tcp://host1:61616,tcp://host2:61616)" failover="true"/> <networkConnector name="host1 and host2" uri="static://(tcp://host1:61616,tcp://host2:61616)" failover="true"/>
--> -->