Author: jstrachan
Date: Fri Feb 20 16:23:33 2009
New Revision: 746284

URL: http://svn.apache.org/viewvc?rev=746284&view=rev
Log:
Added a helper camel-web derivative which adds ActiveMQ and a broker

Added:
    camel/trunk/components/camel-activemq-web/
    camel/trunk/components/camel-activemq-web/pom.xml   (with props)
    camel/trunk/components/camel-activemq-web/src/
    camel/trunk/components/camel-activemq-web/src/main/
    camel/trunk/components/camel-activemq-web/src/main/webapp/
    camel/trunk/components/camel-activemq-web/src/main/webapp/WEB-INF/
    
camel/trunk/components/camel-activemq-web/src/main/webapp/WEB-INF/applicationContext.xml
   (with props)

Added: camel/trunk/components/camel-activemq-web/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-activemq-web/pom.xml?rev=746284&view=auto
==============================================================================
--- camel/trunk/components/camel-activemq-web/pom.xml (added)
+++ camel/trunk/components/camel-activemq-web/pom.xml Fri Feb 20 16:23:33 2009
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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";>
+  <parent>
+    <artifactId>components</artifactId>
+    <groupId>org.apache.camel</groupId>
+    <version>2.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>camel-activemq-web</artifactId>
+
+  <name>Camel :: ActiveMQ :: Web</name>
+  <description>Camel ActiveMQ Web Application with REST support</description>
+  <packaging>war</packaging>
+
+  <properties>
+    
<camel.osgi.export.pkg>org.apache.camel.activemq.web.*</camel.osgi.export.pkg>
+    <xbean-version>3.4</xbean-version>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-web</artifactId>
+      <version>${project.version}</version>
+      <type>war</type>
+      <scope>runtime</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.activemq</groupId>
+      <artifactId>activemq-camel</artifactId>
+      <version>5.3-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.xbean</groupId>
+      <artifactId>xbean-spring</artifactId>
+      <version>${xbean-version}</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.mortbay.jetty</groupId>
+        <artifactId>maven-jetty-plugin</artifactId>
+        <version>${jetty-version}</version>
+
+        <configuration>
+          <!--
+                    <connectors>
+                      <connector 
implementation="org.mortbay.jetty.nio.SelectChannelConnector">
+                        <port>${jetty.port}</port>
+                        <maxIdleTime>60000</maxIdleTime>
+                      </connector>
+                    </connectors>
+          -->
+
+          <webAppConfig>
+            <contextPath>/</contextPath>
+          </webAppConfig>
+
+          <systemProperties>
+            <!-- enable easy JMX connection to JConsole -->
+            <systemProperty>
+              <name>com.sun.management.jmxremote</name>
+              <value/>
+            </systemProperty>
+          </systemProperties>
+          <scanIntervalSeconds>10</scanIntervalSeconds>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: camel/trunk/components/camel-activemq-web/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 
camel/trunk/components/camel-activemq-web/src/main/webapp/WEB-INF/applicationContext.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-activemq-web/src/main/webapp/WEB-INF/applicationContext.xml?rev=746284&view=auto
==============================================================================
--- 
camel/trunk/components/camel-activemq-web/src/main/webapp/WEB-INF/applicationContext.xml
 (added)
+++ 
camel/trunk/components/camel-activemq-web/src/main/webapp/WEB-INF/applicationContext.xml
 Fri Feb 20 16:23:33 2009
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xmlns:context="http://www.springframework.org/schema/context";
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+       http://www.springframework.org/schema/context 
http://www.springframework.org/schema/context/spring-context-2.5.xsd
+       http://activemq.apache.org/schema/core 
http://activemq.apache.org/schema/core/activemq-core.xsd
+       http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd
+    ">
+
+
+  <broker xmlns="http://activemq.apache.org/schema/core"; 
brokerName="localhost" dataDirectory="activemq-data">
+
+    <persistenceAdapter>
+      <amqPersistenceAdapter syncOnWrite="false" 
directory="${activemq.base}/data" maxFileLength="20 mb"/>
+    </persistenceAdapter>
+
+    <!--  The maximum about of space the broker will use before slowing down 
producers -->
+    <systemUsage>
+      <systemUsage>
+        <memoryUsage>
+          <memoryUsage limit="20 mb"/>
+        </memoryUsage>
+        <storeUsage>
+          <storeUsage limit="1 gb" name="foo"/>
+        </storeUsage>
+        <tempUsage>
+          <tempUsage limit="100 mb"/>
+        </tempUsage>
+      </systemUsage>
+    </systemUsage>
+
+
+    <!-- The transport connectors ActiveMQ will listen to -->
+    <transportConnectors>
+      <transportConnector name="openwire" uri="tcp://localhost:61616"/>
+      <transportConnector name="stomp" uri="stomp://localhost:61613"/>
+    </transportConnectors>
+  </broker>
+
+
+
+  <!-- configure the camel activemq component to use the current broker -->
+  <bean id="activemq" 
class="org.apache.activemq.camel.component.ActiveMQComponent">
+    <property name="connectionFactory">
+      <bean class="org.apache.activemq.ActiveMQConnectionFactory">
+        <property name="brokerURL" 
value="vm://localhost?create=false&amp;waitForStart=10000"/>
+        <!--
+                  <property name="userName" value="${activemq.username}"/>
+                  <property name="password" value="${activemq.password}"/>
+        -->
+      </bean>
+    </property>
+  </bean>
+
+
+  <camelContext xmlns="http://camel.apache.org/schema/spring";>
+    <route>
+      <from uri="activemq:example.A"/>
+      <to uri="activemq:example.B"/>
+    </route>
+  </camelContext>
+
+</beans>

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


Reply via email to