activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r397209 [1/5] - in /incubator/activemq/trunk/activemq-web-console: ./ .settings/ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/activemq/ src/main/java/org/apache/activemq/web/ src/main/j...
Date Wed, 26 Apr 2006 14:45:12 GMT
Author: jstrachan
Date: Wed Apr 26 07:45:03 2006
New Revision: 397209

URL: http://svn.apache.org/viewcvs?rev=397209&view=rev
Log:
Initial import of a simple web based console for ActiveMQ

Added:
    incubator/activemq/trunk/activemq-web-console/
    incubator/activemq/trunk/activemq-web-console/.classpath
    incubator/activemq/trunk/activemq-web-console/.project
    incubator/activemq/trunk/activemq-web-console/.settings/
    incubator/activemq/trunk/activemq-web-console/.settings/org.eclipse.jdt.core.prefs
    incubator/activemq/trunk/activemq-web-console/README.txt   (with props)
    incubator/activemq/trunk/activemq-web-console/pom.xml   (with props)
    incubator/activemq/trunk/activemq-web-console/src/
    incubator/activemq/trunk/activemq-web-console/src/main/
    incubator/activemq/trunk/activemq-web-console/src/main/java/
    incubator/activemq/trunk/activemq-web-console/src/main/java/org/
    incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/
    incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/
    incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/
    incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/BrokerFacade.java   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/DestinationFacade.java   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/DurableSubscriberFacade.java   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/QueueBrowseQuery.java   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/SessionPool.java   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/
    incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CreateDestination.java   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CreateSubscriber.java   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteDestination.java   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteSubscriber.java   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/SendMessage.java   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/TODO.txt   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/filter/
    incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/filter/ApplicationContextFilter.java   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/handler/
    incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/handler/BindingBeanNameUrlHandlerMapping.java   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/resources/
    incubator/activemq/trunk/activemq-web-console/src/main/resources/log4j.properties   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/.cvsignore
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/activemq.xml   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/applicationContext.xml   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/decorators.xml   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/dispatcher-servlet.xml   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/jsp/
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/jspf/
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/jspf/headertags.jspf
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/jspf/old.jspf
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/form/
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/form/checkbox.tag
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/form/option.tag
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/form/text.tag
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/form/uri.tag
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/jms/
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/jms/forEachMessage.tag
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/jms/persistent.tag
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/web.xml   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/browse.jsp   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/decorators/
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/decorators/main.jsp   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/decorators/panel.jsp   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/decorators/printable.jsp   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/graph.jsp   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/images/
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/images/atombadge.png   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/images/rssbadge.gif   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/images/tableft10.gif   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/images/tabright10.gif   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/index.jsp   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/js/
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/js/common.js   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/js/css.js   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/js/prototype.js   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/js/rico.js   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/js/sorttable.js   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/js/standardista-table-sorting.js   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/message.jsp   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/queues.jsp   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/send.jsp   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/styles/
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/styles/deliciouslyblue.css   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/styles/forms.css   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/styles/layout-navtop-subright.css   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/styles/layout.css   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/styles/sorttable.css   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/styles/tools.css   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/styles/typo.css   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/subscribers.jsp   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/test/
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/test/dummy.jsp   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/test/index.jsp   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/test/systemProperties.jsp   (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/topics.jsp   (with props)
    incubator/activemq/trunk/activemq-web-console/src/test/
    incubator/activemq/trunk/activemq-web-console/src/test/java/
    incubator/activemq/trunk/activemq-web-console/src/test/java/org/
    incubator/activemq/trunk/activemq-web-console/src/test/java/org/apache/
    incubator/activemq/trunk/activemq-web-console/src/test/java/org/apache/activemq/
    incubator/activemq/trunk/activemq-web-console/src/test/java/org/apache/activemq/web/
    incubator/activemq/trunk/activemq-web-console/src/test/java/org/apache/activemq/web/tool/
    incubator/activemq/trunk/activemq-web-console/src/test/java/org/apache/activemq/web/tool/Main.java   (with props)

Added: incubator/activemq/trunk/activemq-web-console/.classpath
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-web-console/.classpath?rev=397209&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-web-console/.classpath (added)
+++ incubator/activemq/trunk/activemq-web-console/.classpath Wed Apr 26 07:45:03 2006
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/main/java"/>
+	<classpathentry kind="src" path="src/main/webapp"/>
+	<classpathentry kind="src" path="src/main/resources"/>
+	<classpathentry output="target/test-classes" kind="src" path="src/test/java"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="var" path="M2_REPO/mx4j/mx4j/2.1.1/mx4j-2.1.1.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/jetty/6.0.0beta14/jetty-6.0.0beta14.jar"/>
+	<classpathentry kind="var" path="M2_REPO/jdom/jdom/1.0/jdom-1.0.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/geronimo/specs/geronimo-jms_1.1_spec/1.0/geronimo-jms_1.1_spec-1.0.jar"/>
+	<classpathentry kind="var" path="M2_REPO/xstream/xstream/1.1.2/xstream-1.1.2.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/jetty-util/6.0.0beta14/jetty-util-6.0.0beta14.jar"/>
+	<classpathentry kind="var" path="M2_REPO/ant/ant/1.6.2/ant-1.6.2.jar"/>
+	<classpathentry kind="var" path="M2_REPO/rome/rome/0.8/rome-0.8.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-jcl/1.0-rc5/slf4j-jcl-1.0-rc5.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/xbean/xbean-spring/2.2/xbean-spring-2.2.jar"/>
+	<classpathentry kind="var" path="M2_REPO/incubator-activemq/activemq-jaas/4.0-SNAPSHOT/activemq-jaas-4.0-SNAPSHOT.jar"/>
+	<classpathentry kind="var" path="M2_REPO/javax/servlet/jstl/1.0/jstl-1.0.jar"/>
+	<classpathentry kind="var" path="M2_REPO/incubator-activemq/activeio-core/3.0-SNAPSHOT/activeio-core-3.0-SNAPSHOT.jar"/>
+	<classpathentry kind="var" path="M2_REPO/xmlpull/xmlpull/1.1.3.4d_b4_min/xmlpull-1.1.3.4d_b4_min.jar"/>
+	<classpathentry kind="var" path="M2_REPO/stax/stax-api/1.0/stax-api-1.0.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/springframework/spring/1.2.6/spring-1.2.6.jar"/>
+	<classpathentry kind="var" path="M2_REPO/backport-util-concurrent/backport-util-concurrent/2.1/backport-util-concurrent-2.1.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/geronimo/specs/geronimo-j2ee-management_1.0_spec/1.0/geronimo-j2ee-management_1.0_spec-1.0.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/servlet-api-2.5/6.0.0beta14/servlet-api-2.5-6.0.0beta14.jar"/>
+	<classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/geronimo/specs/geronimo-jta_1.0.1B_spec/1.0/geronimo-jta_1.0.1B_spec-1.0.jar"/>
+	<classpathentry kind="var" path="M2_REPO/taglibs/standard/1.1.2/standard-1.1.2.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/geronimo/specs/geronimo-j2ee-jacc_1.0_spec/1.0/geronimo-j2ee-jacc_1.0_spec-1.0.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/derby/derby/10.1.1.0/derby-10.1.1.0.jar"/>
+	<classpathentry kind="var" path="M2_REPO/opensymphony/sitemesh/2.2.1/sitemesh-2.2.1.jar"/>
+	<classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.0.3/commons-logging-1.0.3.jar"/>
+	<classpathentry kind="var" path="M2_REPO/qdox/qdox/1.5/qdox-1.5.jar"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/activemq-core"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/activemq-web"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

Added: incubator/activemq/trunk/activemq-web-console/.project
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-web-console/.project?rev=397209&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-web-console/.project (added)
+++ incubator/activemq/trunk/activemq-web-console/.project Wed Apr 26 07:45:03 2006
@@ -0,0 +1,14 @@
+<projectDescription>
+  <name>activemq-web-console</name>
+  <comment>Web Console for ActiveMQ</comment>
+  <projects/>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+      <arguments/>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file

Added: incubator/activemq/trunk/activemq-web-console/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-web-console/.settings/org.eclipse.jdt.core.prefs?rev=397209&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-web-console/.settings/org.eclipse.jdt.core.prefs (added)
+++ incubator/activemq/trunk/activemq-web-console/.settings/org.eclipse.jdt.core.prefs Wed Apr 26 07:45:03 2006
@@ -0,0 +1,5 @@
+#Wed Apr 26 13:41:43 BST 2006
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.source=1.4

Added: incubator/activemq/trunk/activemq-web-console/README.txt
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-web-console/README.txt?rev=397209&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-web-console/README.txt (added)
+++ incubator/activemq/trunk/activemq-web-console/README.txt Wed Apr 26 07:45:03 2006
@@ -0,0 +1,8 @@
+
+Welcome to the ActiveMQ Web Console
+
+To run the console, the jetty plugin may be used:
+
+  mvn jetty6:run
+
+

Propchange: incubator/activemq/trunk/activemq-web-console/README.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/trunk/activemq-web-console/README.txt
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/activemq/trunk/activemq-web-console/README.txt
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/activemq/trunk/activemq-web-console/README.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/activemq/trunk/activemq-web-console/pom.xml
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-web-console/pom.xml?rev=397209&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-web-console/pom.xml (added)
+++ incubator/activemq/trunk/activemq-web-console/pom.xml Wed Apr 26 07:45:03 2006
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+    Copyright 2005-2006 The Apache Software Foundation
+   
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+   
+    http://www.apache.org/licenses/LICENSE-2.0
+   
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<project
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns="http://maven.apache.org/POM/4.0.0">
+  
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>incubator-activemq</groupId>
+    <artifactId>activemq-parent</artifactId>
+    <version>4.0-SNAPSHOT</version>
+    <relativePath>../pom.xml</relativePath>
+  </parent>
+
+  <artifactId>activemq-web-console</artifactId>
+  <packaging>war</packaging>
+  <name>ActiveMQ :: Web Console</name>
+  <description>Web Console for ActiveMQ</description>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.mortbay.jetty</groupId>
+        <artifactId>maven-jetty6-plugin</artifactId>
+        <configuration>
+          
+	         <systemProperties>
+            
+              <!-- enable easy connection to JConsole -->
+              <systemProperty>
+								<name>com.sun.management.jmxremote</name>
+								<value></value>
+							</systemProperty>
+           </systemProperties>
+
+          <scanIntervalSeconds>10</scanIntervalSeconds>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  
+  <dependencies>
+  
+    <dependency>
+      <groupId>org.mortbay.jetty</groupId>
+      <artifactId>servlet-api-2.5</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    
+    <!-- j2ee jars -->
+    <dependency>
+      <groupId>org.apache.geronimo.specs</groupId>
+      <artifactId>geronimo-jms_1.1_spec</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.geronimo.specs</groupId>
+      <artifactId>geronimo-jta_1.0.1B_spec</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.geronimo.specs</groupId>
+      <artifactId>geronimo-j2ee-management_1.0_spec</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.geronimo.specs</groupId>
+      <artifactId>geronimo-j2ee-jacc_1.0_spec</artifactId>
+    </dependency>
+
+    <!-- activemq -->
+    <dependency>
+      <groupId>${pom.groupId}</groupId>
+      <artifactId>activemq-web</artifactId>
+    </dependency>
+
+    <!-- TODO this should not be needed, but transitive dependencies are not working -->
+    <dependency>
+      <groupId>${pom.groupId}</groupId>
+      <artifactId>activemq-core</artifactId>
+    </dependency>
+        <dependency>
+      <groupId>${pom.groupId}</groupId>
+      <artifactId>activeio-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>incubator-activemq</groupId>
+      <artifactId>activemq-jaas</artifactId>
+      <optional>true</optional>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.xbean</groupId>
+      <artifactId>xbean-spring</artifactId>
+    </dependency>
+    
+    <!-- web container -->
+    <dependency>
+      <groupId>org.mortbay.jetty</groupId>
+      <artifactId>jetty</artifactId>
+      <scope>test</scope>
+    </dependency>
+      <dependency>
+        <groupId>org.mortbay.jetty</groupId>
+        <artifactId>jetty-util</artifactId>
+        <scope>test</scope>
+      </dependency>
+
+      <!-- enable commons-logging when inside jetty6:run -->
+      <dependency>
+			  <groupId>org.slf4j</groupId>
+			  <artifactId>slf4j-jcl</artifactId>
+			  <version>1.0-rc5</version>
+        <!--
+        <scope>optional</scope>
+        -->
+      </dependency>
+
+  
+      <!-- SiteMesh for layout -->
+    <dependency>
+      <groupId>opensymphony</groupId>
+      <artifactId>sitemesh</artifactId>
+      <version>2.2.1</version>
+    </dependency>
+    
+    <!-- JSTL support -->
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>jstl</artifactId>
+      <version>1.0</version>
+    </dependency>
+    <dependency>
+      <groupId>taglibs</groupId>
+      <artifactId>standard</artifactId>
+      <version>1.1.2</version>
+    </dependency>
+    
+
+    <!-- XStream marshalling -->
+    <dependency>
+      <groupId>xmlpull</groupId>
+      <artifactId>xmlpull</artifactId>
+    </dependency>    
+
+    <dependency>
+      <groupId>xstream</groupId>
+      <artifactId>xstream</artifactId>
+    </dependency>    
+    
+    <!-- used for testing -->
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    
+    <!-- Derby SQL DB used for testing JDBC message store -->
+    <dependency>
+      <groupId>org.apache.derby</groupId>
+      <artifactId>derby</artifactId>
+    </dependency>
+  </dependencies>
+
+</project>

Propchange: incubator/activemq/trunk/activemq-web-console/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/trunk/activemq-web-console/pom.xml
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/activemq/trunk/activemq-web-console/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/activemq/trunk/activemq-web-console/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/BrokerFacade.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/BrokerFacade.java?rev=397209&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/BrokerFacade.java (added)
+++ incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/BrokerFacade.java Wed Apr 26 07:45:03 2006
@@ -0,0 +1,134 @@
+/**
+ *
+ * Copyright 2005-2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.web;
+
+import org.apache.activemq.broker.Broker;
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.broker.jmx.BrokerView;
+import org.apache.activemq.broker.jmx.BrokerViewMBean;
+import org.apache.activemq.broker.jmx.DurableSubscriptionViewMBean;
+import org.apache.activemq.broker.jmx.ManagedRegionBroker;
+import org.apache.activemq.broker.jmx.ManagementContext;
+import org.apache.activemq.broker.jmx.QueueViewMBean;
+import org.apache.activemq.broker.jmx.TopicViewMBean;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import javax.management.MBeanServer;
+import javax.management.MBeanServerInvocationHandler;
+import javax.management.ObjectName;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * 
+ * @version $Revision$
+ */
+public class BrokerFacade {
+    private static final Log log = LogFactory.getLog(BrokerFacade.class);
+
+    private BrokerService brokerService;
+
+    public BrokerFacade(BrokerService brokerService) {
+        this.brokerService = brokerService;
+    }
+
+    public BrokerService getBrokerService() {
+        return brokerService;
+    }
+
+    public Broker getBroker() throws Exception {
+        return brokerService.getBroker();
+    }
+
+    public ManagementContext getManagementContext() {
+        return brokerService.getManagementContext();
+    }
+
+    public BrokerViewMBean getBrokerAdmin() throws Exception {
+        // TODO could use JMX to look this up
+        return brokerService.getAdminView();
+    }
+
+    public ManagedRegionBroker getManagedBroker() throws Exception {
+        BrokerView adminView = brokerService.getAdminView();
+        if (adminView == null) {
+            return null;
+        }
+        return adminView.getBroker();
+    }
+
+    // TODO - we should not have to use JMX to implement the following methods...
+    public Collection getQueues() throws Exception {
+        BrokerView broker = brokerService.getAdminView();
+        if (broker == null) {
+            return Collections.EMPTY_LIST;
+        }
+        ObjectName[] queues = broker.getQueues();
+        return getManagedObjects(queues, QueueViewMBean.class);
+    }
+    
+    public Collection getTopics() throws Exception {
+        BrokerView broker = brokerService.getAdminView();
+        if (broker == null) {
+            return Collections.EMPTY_LIST;
+        }
+        ObjectName[] queues = broker.getTopics();
+        return getManagedObjects(queues, TopicViewMBean.class);
+    }
+    
+    public Collection getDurableTopicSubscribers() throws Exception {
+        BrokerView broker = brokerService.getAdminView();
+        if (broker == null) {
+            return Collections.EMPTY_LIST;
+        }
+        ObjectName[] queues = broker.getDurableTopicSubscribers();
+        return getManagedObjects(queues, DurableSubscriptionViewMBean.class);
+    }
+
+    protected Collection getManagedObjects(ObjectName[] names, Class type) {
+        List answer = new ArrayList();
+        MBeanServer mbeanServer = getManagementContext().getMBeanServer();
+        if (mbeanServer != null) {
+            for (int i = 0; i < names.length; i++) {
+                ObjectName name = names[i];
+                Object value = MBeanServerInvocationHandler.newProxyInstance(mbeanServer, name, type, true);
+                if (value != null) {
+                    answer.add(value);
+                }
+            }
+        }
+        return answer;
+    }
+
+    /**
+     * public Collection getQueues() throws Exception { ManagedRegionBroker
+     * broker = getManagedBroker(); if (broker == null) { return new
+     * ArrayList(); } return
+     * broker.getQueueRegion().getDestinationMap().values(); }
+     * 
+     * 
+     * public Collection getTopics() throws Exception { ManagedRegionBroker
+     * broker = getManagedBroker(); if (broker == null) { return new
+     * ArrayList(); } return
+     * broker.getTopicRegion().getDestinationMap().values(); }
+     */
+
+}

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/BrokerFacade.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/BrokerFacade.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/BrokerFacade.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/DestinationFacade.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/DestinationFacade.java?rev=397209&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/DestinationFacade.java (added)
+++ incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/DestinationFacade.java Wed Apr 26 07:45:03 2006
@@ -0,0 +1,121 @@
+/**
+ *
+ * Copyright 2005-2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.web;
+
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.command.ActiveMQDestination;
+import org.apache.activemq.command.ActiveMQQueue;
+import org.apache.activemq.command.ActiveMQTopic;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ *
+ * @version $Revision$
+ */
+public class DestinationFacade extends BrokerFacade {
+
+    private String JMSDestination;
+    private String JMSDestinationType;
+
+    public DestinationFacade(BrokerService brokerService) {
+        super(brokerService);
+    }
+
+    
+    public String toString() {
+        return super.toString() + "[destination:" + JMSDestination + "; type=" + JMSDestinationType + "]";
+    }
+
+
+    // Operations
+    // -------------------------------------------------------------------------
+    public void removeDestination() throws Exception {
+        getValidDestination();
+        if (isQueue()) {
+            getBrokerAdmin().removeQueue(getJMSDestination());
+        }
+        else {
+            getBrokerAdmin().removeTopic(getJMSDestination());
+        }
+    }
+
+    public void addDestination() throws Exception {
+        if (isQueue()) {
+            getBrokerAdmin().addQueue(getValidDestination());
+        }
+        else {
+            getBrokerAdmin().addTopic(getValidDestination());
+        }
+    }
+    
+    // Properties
+    // -------------------------------------------------------------------------
+    public boolean isQueue() {
+        if (JMSDestinationType != null && JMSDestinationType.equalsIgnoreCase("topic")) {
+            return false;
+        }
+        return true;
+    }
+
+    public String getJMSDestination() {
+        return JMSDestination;
+    }
+
+    public void setJMSDestination(String destination) {
+        this.JMSDestination = destination;
+    }
+
+    public String getJMSDestinationType() {
+        return JMSDestinationType;
+    }
+
+    public void setJMSDestinationType(String type) {
+        this.JMSDestinationType = type;
+    }
+
+    protected ActiveMQDestination createDestination() {
+        if (isQueue()) {
+            return new ActiveMQQueue(getValidDestination());
+        }
+        else {
+            return new ActiveMQTopic(getValidDestination());
+        }
+    }
+
+    protected String getValidDestination() {
+        if (JMSDestination == null) {
+            throw new IllegalArgumentException("No JMSDestination parameter specified");
+        }
+        return JMSDestination;
+    }
+
+
+    protected ModelAndView redirectToRequest(HttpServletRequest request) {
+        String view = "redirect:" + request.getRequestURI();
+        System.out.println("Redirecting to: " + view);
+        return new ModelAndView(view);
+    }
+
+
+    protected ModelAndView redirectToBrowseView() {
+        return new ModelAndView("redirect:" + (isQueue() ? "queues.jsp" : "topics.jsp"));
+    }
+
+
+}

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/DestinationFacade.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/DestinationFacade.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/DestinationFacade.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/DurableSubscriberFacade.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/DurableSubscriberFacade.java?rev=397209&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/DurableSubscriberFacade.java (added)
+++ incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/DurableSubscriberFacade.java Wed Apr 26 07:45:03 2006
@@ -0,0 +1,50 @@
+/**
+ *
+ * Copyright 2005-2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.web;
+
+import org.apache.activemq.broker.BrokerService;
+
+/**
+ * 
+ * @version $Revision$
+ */
+public class DurableSubscriberFacade extends DestinationFacade {
+
+    private String clientId;
+    private String subscriberName;
+
+    public DurableSubscriberFacade(BrokerService brokerService) {
+        super(brokerService);
+    }
+
+    public String getClientId() {
+        return clientId;
+    }
+
+    public void setClientId(String clientId) {
+        this.clientId = clientId;
+    }
+
+    public String getSubscriberName() {
+        return subscriberName;
+    }
+
+    public void setSubscriberName(String subscriberName) {
+        this.subscriberName = subscriberName;
+    }
+
+}

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/DurableSubscriberFacade.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/DurableSubscriberFacade.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/DurableSubscriberFacade.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/QueueBrowseQuery.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/QueueBrowseQuery.java?rev=397209&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/QueueBrowseQuery.java (added)
+++ incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/QueueBrowseQuery.java Wed Apr 26 07:45:03 2006
@@ -0,0 +1,96 @@
+/**
+ *
+ * Copyright 2005-2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.web;
+
+import org.apache.activemq.broker.BrokerService;
+import org.springframework.beans.factory.DisposableBean;
+
+import javax.jms.JMSException;
+import javax.jms.Queue;
+import javax.jms.QueueBrowser;
+import javax.jms.Session;
+
+/**
+ * 
+ * @version $Revision$
+ */
+public class QueueBrowseQuery extends DestinationFacade implements DisposableBean {
+    private SessionPool sessionPool;
+    private String selector;
+    private Session session;
+    private Queue queue;
+    private QueueBrowser browser;
+
+    public QueueBrowseQuery(BrokerService brokerService, SessionPool sessionPool) throws JMSException {
+        super(brokerService);
+        this.sessionPool = sessionPool;
+        this.session = sessionPool.borrowSession();
+
+    }
+
+    public void destroy() throws Exception {
+        if (browser != null) {
+            browser.close();
+        }
+        sessionPool.returnSession(session);
+        session = null;
+    }
+
+    public QueueBrowser getBrowser() throws JMSException {
+        if (browser == null) {
+            browser = createBrowser();
+        }
+        return browser;
+    }
+
+    public void setBrowser(QueueBrowser browser) {
+        this.browser = browser;
+    }
+
+    public Queue getQueue() throws JMSException {
+        if (queue == null) {
+            queue = session.createQueue(getValidDestination());
+        }
+        return queue;
+    }
+
+    public void setQueue(Queue queue) {
+        this.queue = queue;
+    }
+
+    public String getSelector() {
+        return selector;
+    }
+
+    public void setSelector(String selector) {
+        this.selector = selector;
+    }
+
+    public Session getSession() {
+        return session;
+    }
+
+    public boolean isQueue() {
+        return true;
+    }
+
+    protected QueueBrowser createBrowser() throws JMSException {
+        return getSession().createBrowser(getQueue(), getSelector());
+    }
+
+    
+}

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/QueueBrowseQuery.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/QueueBrowseQuery.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/QueueBrowseQuery.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/SessionPool.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/SessionPool.java?rev=397209&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/SessionPool.java (added)
+++ incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/SessionPool.java Wed Apr 26 07:45:03 2006
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.web;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.JMSException;
+import javax.jms.Session;
+
+import java.util.LinkedList;
+
+/**
+ * A simple pool of JMS Session objects intended for use by Queue browsers.
+ * 
+ * @version $Revision$
+ */
+public class SessionPool {
+
+    private ConnectionFactory connectionFactory;
+    private Connection connection;
+    private LinkedList sessions = new LinkedList();
+
+    public Connection getConnection() throws JMSException {
+        if (connection == null) {
+            connection = getConnectionFactory().createConnection();
+            connection.start();
+        }
+        return connection;
+    }
+
+    public void setConnection(Connection connection) {
+        this.connection = connection;
+    }
+
+    public ConnectionFactory getConnectionFactory() {
+        if (connectionFactory == null) {
+            // TODO support remote brokers too
+            connectionFactory = new ActiveMQConnectionFactory("vm://localhost");
+        }
+        return connectionFactory;
+    }
+
+    public void setConnectionFactory(ConnectionFactory connectionFactory) {
+        this.connectionFactory = connectionFactory;
+    }
+
+
+    public Session borrowSession() throws JMSException {
+        Session answer = null;
+        synchronized (sessions) {
+            if (sessions.isEmpty()) {
+                answer = createSession();
+            }
+            else {
+                answer = (Session) sessions.removeLast();
+            }
+        }
+        return answer;
+    }
+
+    protected void returnSession(Session session) {
+        if (session != null) {
+            synchronized (sessions) {
+                sessions.add(session);
+            }
+        }
+    }
+
+    protected Session createSession() throws JMSException {
+        return getConnection().createSession(false, Session.AUTO_ACKNOWLEDGE);
+    }
+
+}

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/SessionPool.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/SessionPool.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/SessionPool.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CreateDestination.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CreateDestination.java?rev=397209&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CreateDestination.java (added)
+++ incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CreateDestination.java Wed Apr 26 07:45:03 2006
@@ -0,0 +1,43 @@
+/**
+ *
+ * Copyright 2005-2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.web.controller;
+
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.web.DestinationFacade;
+import org.apache.activemq.web.DurableSubscriberFacade;
+import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.servlet.mvc.Controller;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * 
+ * @version $Revision$
+ */
+public class CreateDestination extends DestinationFacade implements Controller {
+
+    public CreateDestination(BrokerService brokerService) {
+        super(brokerService);
+    }
+
+    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
+        addDestination();
+        return redirectToBrowseView();
+    }
+
+}

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CreateDestination.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CreateDestination.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CreateDestination.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CreateSubscriber.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CreateSubscriber.java?rev=397209&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CreateSubscriber.java (added)
+++ incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CreateSubscriber.java Wed Apr 26 07:45:03 2006
@@ -0,0 +1,54 @@
+/**
+ *
+ * Copyright 2005-2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.web.controller;
+
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.web.DurableSubscriberFacade;
+import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.servlet.mvc.Controller;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * 
+ * @version $Revision$
+ */
+public class CreateSubscriber extends DurableSubscriberFacade implements Controller {
+    private String selector;
+
+    public CreateSubscriber(BrokerService brokerService) {
+        super(brokerService);
+    }
+
+    public String getSelector() {
+        return selector;
+    }
+
+    public void setSelector(String selector) {
+        this.selector = selector;
+    }
+
+    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
+        if (selector != null && selector.length() == 0) {
+            selector = null;
+        }
+        getBrokerAdmin().createDurableSubscriber(getClientId(), getSubscriberName(), getValidDestination(), selector);
+        return new ModelAndView("redirect:subscribers.jsp");
+    }
+
+}

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CreateSubscriber.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CreateSubscriber.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CreateSubscriber.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteDestination.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteDestination.java?rev=397209&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteDestination.java (added)
+++ incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteDestination.java Wed Apr 26 07:45:03 2006
@@ -0,0 +1,44 @@
+/**
+ *
+ * Copyright 2005-2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.web.controller;
+
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.web.DestinationFacade;
+import org.apache.activemq.web.DurableSubscriberFacade;
+import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.servlet.mvc.Controller;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * 
+ * @version $Revision$
+ */
+public class DeleteDestination extends DestinationFacade implements Controller {
+
+    public DeleteDestination(BrokerService brokerService) {
+        super(brokerService);
+    }
+
+    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
+        removeDestination();
+        return redirectToBrowseView();
+    }
+
+    
+}

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteDestination.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteDestination.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteDestination.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteSubscriber.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteSubscriber.java?rev=397209&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteSubscriber.java (added)
+++ incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteSubscriber.java Wed Apr 26 07:45:03 2006
@@ -0,0 +1,42 @@
+/**
+ *
+ * Copyright 2005-2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.web.controller;
+
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.web.DurableSubscriberFacade;
+import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.servlet.mvc.Controller;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ *
+ * @version $Revision$
+ */
+public class DeleteSubscriber extends DurableSubscriberFacade implements Controller {
+
+    public DeleteSubscriber(BrokerService brokerService) {
+        super(brokerService);
+    }
+
+    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
+        getBrokerAdmin().destroyDurableSubscriber(getClientId(), getSubscriberName());
+        return new ModelAndView("redirect:subscribers.jsp");
+    }
+
+}

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteSubscriber.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteSubscriber.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteSubscriber.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/SendMessage.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/SendMessage.java?rev=397209&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/SendMessage.java (added)
+++ incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/SendMessage.java Wed Apr 26 07:45:03 2006
@@ -0,0 +1,199 @@
+/**
+ *
+ * Copyright 2005-2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.web.controller;
+
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.command.ActiveMQDestination;
+import org.apache.activemq.web.DestinationFacade;
+import org.apache.activemq.web.WebClient;
+import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.servlet.mvc.Controller;
+
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * Sends a message
+ * 
+ * @version $Revision$
+ */
+public class SendMessage extends DestinationFacade implements Controller {
+
+    private String JMSText;
+    private boolean JMSPersistent;
+    private int JMSPriority;
+    private int JMSTimeToLive = -1;
+    private String JMSCorrelationID;
+    private String JMSReplyTo;
+    private String JMSType;
+    private int JMSMessageCount = 1;
+    private String JMSMessageCountHeader = "JMSXMessageNumber";
+    private boolean redirectToBrowse;
+
+    public SendMessage(BrokerService brokerService) {
+        super(brokerService);
+    }
+
+    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
+        WebClient client = WebClient.getWebClient(request);
+        ActiveMQDestination dest = createDestination();
+
+        sendMessages(request, client, dest);
+        if (redirectToBrowse) {
+            if (isQueue()) {
+                return new ModelAndView("redirect:browse.jsp?destination=" + getJMSDestination());
+            }
+        }
+        return redirectToBrowseView();
+    }
+
+    protected void sendMessages(HttpServletRequest request, WebClient client, ActiveMQDestination dest) throws JMSException {
+        if (JMSMessageCount <= 1) {
+            JMSMessageCount = 1;
+        }
+        for (int i = 0; i < JMSMessageCount; i++) {
+            Message message = createMessage(client, request);
+            appendHeaders(message, request);
+            if (JMSMessageCount > 1) {
+                message.setIntProperty(JMSMessageCountHeader, i + 1);
+            }
+
+            client.send(dest, message, JMSPersistent, JMSPriority, JMSTimeToLive);
+
+            System.out.println("Sent message: " + message);
+        }
+    }
+
+    // Properties
+    // -------------------------------------------------------------------------
+
+    public String getJMSCorrelationID() {
+        return JMSCorrelationID;
+    }
+
+    public void setJMSCorrelationID(String correlationID) {
+        JMSCorrelationID = correlationID;
+    }
+
+    public String getJMSReplyTo() {
+        return JMSReplyTo;
+    }
+
+    public void setJMSReplyTo(String replyTo) {
+        JMSReplyTo = replyTo;
+    }
+
+    public String getJMSType() {
+        return JMSType;
+    }
+
+    public void setJMSType(String type) {
+        JMSType = type;
+    }
+
+    public boolean isJMSPersistent() {
+        return JMSPersistent;
+    }
+
+    public void setJMSPersistent(boolean persistent) {
+        this.JMSPersistent = persistent;
+    }
+
+    public int getJMSPriority() {
+        return JMSPriority;
+    }
+
+    public void setJMSPriority(int priority) {
+        this.JMSPriority = priority;
+    }
+
+    public String getJMSText() {
+        return JMSText;
+    }
+
+    public void setJMSText(String text) {
+        this.JMSText = text;
+    }
+
+    public int getJMSTimeToLive() {
+        return JMSTimeToLive;
+    }
+
+    public void setJMSTimeToLive(int timeToLive) {
+        this.JMSTimeToLive = timeToLive;
+    }
+
+    public int getJMSMessageCount() {
+        return JMSMessageCount;
+    }
+
+    public void setJMSMessageCount(int copies) {
+        JMSMessageCount = copies;
+    }
+
+    // Implementation methods
+    // -------------------------------------------------------------------------
+    protected Message createMessage(WebClient client, HttpServletRequest request) throws JMSException {
+        if (JMSText != null) {
+            return client.getSession().createTextMessage(JMSText);
+        }
+        // TODO create Bytes message from request body...
+        return client.getSession().createMessage();
+    }
+
+    protected void appendHeaders(Message message, HttpServletRequest request) throws JMSException {
+        message.setJMSCorrelationID(JMSCorrelationID);
+        if (JMSReplyTo != null) {
+            message.setJMSReplyTo(ActiveMQDestination.createDestination(JMSReplyTo, ActiveMQDestination.QUEUE_TYPE));
+        }
+        message.setJMSType(JMSType);
+
+        // now lets add all of the parameters
+        Map map = request.getParameterMap();
+        if (map != null) {
+            for (Iterator iter = map.entrySet().iterator(); iter.hasNext();) {
+                Map.Entry entry = (Map.Entry) iter.next();
+                String name = (String) entry.getKey();
+                Object value = entry.getValue();
+                if (isValidPropertyName(name)) {
+                    if (value instanceof String[]) {
+                        String[] array = (String[]) value;
+                        if (array.length > 0) {
+                            value = array[0];
+                        }
+                        else {
+                            value = null;
+                        }
+                    }
+                    if (value != null) {
+                        message.setObjectProperty(name, value);
+                    }
+                }
+            }
+        }
+    }
+
+    protected boolean isValidPropertyName(String name) {
+        // allow JMSX extensions or non JMS properties
+        return name.startsWith("JMSX") || !name.startsWith("JMS");
+    }
+}

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/SendMessage.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/SendMessage.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/SendMessage.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/TODO.txt
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/TODO.txt?rev=397209&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/TODO.txt (added)
+++ incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/TODO.txt Wed Apr 26 07:45:03 2006
@@ -0,0 +1,3 @@
+
+With a small amount of work to the controller, we should be able to delete these classes and instead
+just expose the methods of the facades directly

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/TODO.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/TODO.txt
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/TODO.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/filter/ApplicationContextFilter.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/filter/ApplicationContextFilter.java?rev=397209&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/filter/ApplicationContextFilter.java (added)
+++ incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/filter/ApplicationContextFilter.java Wed Apr 26 07:45:03 2006
@@ -0,0 +1,180 @@
+/**
+ *
+ * Copyright 2005-2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.web.filter;
+
+import org.springframework.web.bind.ServletRequestDataBinder;
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+
+import java.io.IOException;
+import java.util.AbstractMap;
+import java.util.Collections;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Exposes Spring ApplicationContexts to JSP EL and other view technologies.
+ * Currently a variable is placed in application scope (by default called
+ * 'applicationContext') so that POJOs can be pulled out of Spring in a JSP page
+ * to render things using EL expressions. <br/>
+ * 
+ * e.g. ${applicationContext.cheese} would access the cheese POJO. Or
+ * ${applicationContext.cheese.name} would access the name property of the
+ * cheese POJO. <br/>
+ * 
+ * You can then use JSTL to work with these POJOs such as &lt;c.set var="myfoo"
+ * value="${applicationContext.foo}"/&gt; <br/>
+ * 
+ * In addition to applicationContext a 'requestContext' variable is created
+ * which will automatically bind any request parameters to the POJOs extracted
+ * from the applicationContext - which is ideal for POJOs which implement
+ * queries in view technologies.
+ * 
+ * @version $Revision$
+ */
+public class ApplicationContextFilter implements Filter {
+
+    private ServletContext servletContext;
+    private String applicationContextName = "applicationContext";
+    private String requestContextName = "requestContext";
+    private String requestName = "request";
+
+    public void init(FilterConfig config) throws ServletException {
+        this.servletContext = config.getServletContext();
+        this.applicationContextName = getInitParameter(config, "applicationContextName", applicationContextName);
+        this.requestContextName = getInitParameter(config, "requestContextName", requestContextName);
+        this.requestName = getInitParameter(config, "requestName", requestName);
+
+        // register the application context in the applicationScope
+        WebApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(servletContext);
+        Map wrapper = createApplicationContextWrapper(context);
+        servletContext.setAttribute(applicationContextName, wrapper);
+    }
+
+    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
+        // lets register a requestContext in the requestScope
+        Map requestContextWrapper = createRequestContextWrapper(request);
+        request.setAttribute(requestContextName, requestContextWrapper);
+        request.setAttribute(requestName, request);
+        chain.doFilter(request, response);
+    }
+
+    public void destroy() {
+    }
+
+    public ServletContext getServletContext() {
+        return servletContext;
+    }
+
+    public String getApplicationContextName() {
+        return applicationContextName;
+    }
+
+    public void setApplicationContextName(String variableName) {
+        this.applicationContextName = variableName;
+    }
+
+    public String getRequestContextName() {
+        return requestContextName;
+    }
+
+    public void setRequestContextName(String requestContextName) {
+        this.requestContextName = requestContextName;
+    }
+
+    protected String getInitParameter(FilterConfig config, String key, String defaultValue) {
+        String parameter = config.getInitParameter(key);
+        return (parameter != null) ? parameter : defaultValue;
+    }
+
+    /**
+     * Creates a wrapper around the web application context so that it can be
+     * accessed easily from inside JSP EL (or other expression languages in
+     * other view technologies).
+     */
+    protected Map createApplicationContextWrapper(final WebApplicationContext context) {
+        Map wrapper = new AbstractMap() {
+
+            public WebApplicationContext getContext() {
+                return context;
+            }
+
+            public Object get(Object key) {
+                if (key == null) {
+                    return null;
+                }
+                return context.getBean(key.toString());
+            }
+
+            public Set entrySet() {
+                return Collections.EMPTY_SET;
+            }
+
+        };
+        return wrapper;
+    }
+
+    /**
+     * Creates a wrapper around the request context (e.g. to allow POJOs to be
+     * auto-injected from request parameter values etc) so that it can be
+     * accessed easily from inside JSP EL (or other expression languages in
+     * other view technologies).
+     */
+    protected Map createRequestContextWrapper(final ServletRequest request) {
+        final WebApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(servletContext);
+        Map wrapper = new AbstractMap() {
+
+            public WebApplicationContext getContext() {
+                return context;
+            }
+
+            public Object get(Object key) {
+                if (key == null) {
+                    return null;
+                }
+                return bindRequestBean(context.getBean(key.toString()), request);
+            }
+
+            public Set entrySet() {
+                return Collections.EMPTY_SET;
+            }
+
+        };
+        return wrapper;
+
+    }
+
+    /**
+     * Binds properties from the request parameters to the given POJO which is
+     * useful for POJOs which are configurable via request parameters such as
+     * for query/view POJOs
+     */
+    protected Object bindRequestBean(Object bean, ServletRequest request) {
+        ServletRequestDataBinder binder = new ServletRequestDataBinder(bean, null);
+        binder.bind(request);
+        return bean;
+    }
+
+}

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/filter/ApplicationContextFilter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/filter/ApplicationContextFilter.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/filter/ApplicationContextFilter.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/handler/BindingBeanNameUrlHandlerMapping.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/handler/BindingBeanNameUrlHandlerMapping.java?rev=397209&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/handler/BindingBeanNameUrlHandlerMapping.java (added)
+++ incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/handler/BindingBeanNameUrlHandlerMapping.java Wed Apr 26 07:45:03 2006
@@ -0,0 +1,44 @@
+/**
+ *
+ * Copyright 2005-2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.web.handler;
+
+import org.springframework.web.bind.ServletRequestDataBinder;
+import org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * 
+ * @version $Revision$
+ */
+public class BindingBeanNameUrlHandlerMapping extends BeanNameUrlHandlerMapping {
+
+    protected Object getHandlerInternal(HttpServletRequest request) throws Exception {
+        Object object = super.getHandlerInternal(request);
+
+        if (object instanceof String) {
+            String handlerName = (String) object;
+            object = getApplicationContext().getBean(handlerName);
+        }
+
+        ServletRequestDataBinder binder = new ServletRequestDataBinder(object, null);
+        binder.bind(request);
+        System.out.println("Bound POJO is now: " + object);
+        return object;
+    }
+
+}

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/handler/BindingBeanNameUrlHandlerMapping.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/handler/BindingBeanNameUrlHandlerMapping.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/handler/BindingBeanNameUrlHandlerMapping.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/activemq/trunk/activemq-web-console/src/main/resources/log4j.properties
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-web-console/src/main/resources/log4j.properties?rev=397209&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-web-console/src/main/resources/log4j.properties (added)
+++ incubator/activemq/trunk/activemq-web-console/src/main/resources/log4j.properties Wed Apr 26 07:45:03 2006
@@ -0,0 +1,20 @@
+#
+# The logging properties used during tests..
+#
+log4j.rootLogger=INFO, stdout
+
+log4j.logger.org.apache.activemq.spring=WARN
+log4j.logger.org.springframework=warn
+
+
+# CONSOLE appender not used by default
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+
+# File appender
+log4j.appender.out=org.apache.log4j.FileAppender
+log4j.appender.out.layout=org.apache.log4j.PatternLayout
+log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+log4j.appender.out.file=activemq-console.log
+log4j.appender.out.append=true

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/resources/log4j.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/resources/log4j.properties
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/resources/log4j.properties
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/resources/log4j.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/.cvsignore
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/.cvsignore?rev=397209&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/.cvsignore (added)
+++ incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/.cvsignore Wed Apr 26 07:45:03 2006
@@ -0,0 +1 @@
+classes

Added: incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/activemq.xml
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/activemq.xml?rev=397209&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/activemq.xml (added)
+++ incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/activemq.xml Wed Apr 26 07:45:03 2006
@@ -0,0 +1,99 @@
+<!-- START SNIPPET: xbean -->
+<beans xmlns="http://activemq.org/config/1.0">
+  
+  <broker useJmx="true">
+  
+    <!--  Use the following to set the broker memory limit (in bytes)
+  	<memoryManager>  
+	  	<usageManager id="memory-manager" limit="1048576"/>
+  	</memoryManager>
+  	-->
+  	
+	<!-- Use the following to configure how ActiveMQ is exposed in JMX
+	<managementContext>
+	   <managementContext connectorPort="1099" jmxDomainName="org.apache.activemq"/>
+	</managementContext>
+	-->
+
+	<!-- In ActiveMQ 4, you can setup destination policies -->  
+    <destinationPolicy>
+      <policyMap><policyEntries>
+        
+          <policyEntry topic="FOO.>">
+            <dispatchPolicy>
+              <strictOrderDispatchPolicy />
+            </dispatchPolicy>
+            <subscriptionRecoveryPolicy>
+              <lastImageSubscriptionRecoveryPolicy />
+            </subscriptionRecoveryPolicy>
+          </policyEntry>
+
+      </policyEntries></policyMap>
+    </destinationPolicy>
+  
+    <!--
+    <managementContext>
+      <managementContext findTigerMbeanServer="true"/>
+    </managementContext>
+    -->
+  
+    <persistenceAdapter>
+      <journaledJDBC journalLogFiles="5" dataDirectory="activemq-data"/>
+      <!-- To use a different datasource, use th following syntax : -->
+      <!-- 
+      <journaledJDBC journalLogFiles="5" dataDirectory="activemq-data" dataSource="#postgres-ds"/>
+       -->
+    </persistenceAdapter>
+  
+    <transportConnectors>
+       <transportConnector name="default" uri="tcp://localhost:61616" discoveryUri="multicast://default"/>
+       <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
+    </transportConnectors>
+    
+    <networkConnectors>
+      <!-- by default just auto discover the other brokers -->
+      <networkConnector name="default" uri="multicast://default"/>
+      <!--
+      <networkConnector name="host1 and host2" uri="static://(tcp://host1:61616,tcp://host2:61616)" failover="true"/>
+      -->
+    </networkConnectors>
+    
+  </broker>
+  
+  <!--  This xbean configuration file supports all the standard spring xml configuration options -->
+  
+  <!-- Postgres DataSource Sample Setup -->
+  <!-- 
+  <bean id="postgres-ds" class="org.postgresql.ds.PGPoolingDataSource">
+    <property name="serverName" value="localhost"/>
+    <property name="databaseName" value="activemq"/>
+    <property name="portNumber" value="0"/>
+    <property name="user" value="activemq"/>
+    <property name="password" value="activemq"/>
+    <property name="dataSourceName" value="postgres"/>
+    <property name="initialConnections" value="1"/>
+    <property name="maxConnections" value="10"/>
+  </bean>
+  -->
+  
+  <!-- MySql DataSource Sample Setup -->
+  <!-- 
+  <bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
+    <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+    <property name="url" value="jdbc:mysql://localhost/activemq?relaxAutoCommit=true"/>
+    <property name="username" value="activemq"/>
+    <property name="password" value="activemq"/>
+    <property name="poolPreparedStatements" value="true"/>
+  </bean>
+  -->  
+   
+  <!-- Embedded Derby DataSource Sample Setup -->
+  <!-- 
+  <bean id="derby-ds" class="org.apache.derby.jdbc.EmbeddedDataSource">
+    <property name="databaseName" value="derbydb"/>
+    <property name="createDatabase" value="create"/>
+  </bean>
+  -->  
+
+</beans>
+<!-- END SNIPPET: xbean -->

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/activemq.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/activemq.xml
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/activemq.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/activemq.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/applicationContext.xml
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/applicationContext.xml?rev=397209&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/applicationContext.xml (added)
+++ incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/applicationContext.xml Wed Apr 26 07:45:03 2006
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+<beans>
+
+  <bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" />
+  
+  
+	<bean id="brokerService" class="org.apache.activemq.xbean.BrokerFactoryBean">
+	  <property name="config" value="/WEB-INF/activemq.xml"/>
+	</bean>
+
+  <bean id="sessionPool" class="org.apache.activemq.web.SessionPool"/>
+  
+  <bean id="brokerQuery" class="org.apache.activemq.web.BrokerFacade" autowire='constructor'/>
+  <bean id="queueBrowser" class="org.apache.activemq.web.QueueBrowseQuery" autowire='constructor' singleton="false"/>
+
+</beans>

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/applicationContext.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/applicationContext.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/applicationContext.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/decorators.xml
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/decorators.xml?rev=397209&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/decorators.xml (added)
+++ incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/decorators.xml Wed Apr 26 07:45:03 2006
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<decorators defaultdir="/decorators">
+    <decorator name="main" page="main.jsp">
+        <pattern>/*</pattern>
+    </decorator>
+
+    <decorator name="panel" page="panel.jsp"/>
+    <decorator name="printable" page="printable.jsp"/>
+</decorators>
\ No newline at end of file

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/decorators.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/decorators.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/decorators.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message