You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streams.apache.org by le...@apache.org on 2013/01/11 00:17:01 UTC
svn commit: r1431724 - in /incubator/streams/trunk/streams-web: ./
src/main/resources/META-INF/ src/main/webapp/WEB-INF/
src/main/webapp/WEB-INF/lib/ src/main/webapp/WEB-INF/spring/
Author: letourneau
Date: Thu Jan 10 23:17:01 2013
New Revision: 1431724
URL: http://svn.apache.org/viewvc?rev=1431724&view=rev
Log:
web app still in infancy, camel context will need to be played with to load beans and routes
Added:
incubator/streams/trunk/streams-web/src/main/webapp/WEB-INF/lib/
incubator/streams/trunk/streams-web/src/main/webapp/WEB-INF/lib/streams-components-all-0.1-SNAPSHOT.jar
incubator/streams/trunk/streams-web/src/main/webapp/WEB-INF/spring/
incubator/streams/trunk/streams-web/src/main/webapp/WEB-INF/spring-web-servlet.xml
incubator/streams/trunk/streams-web/src/main/webapp/WEB-INF/spring/camelContext.xml
Modified:
incubator/streams/trunk/streams-web/pom.xml
incubator/streams/trunk/streams-web/src/main/resources/META-INF/DEPENDENCIES
incubator/streams/trunk/streams-web/src/main/webapp/WEB-INF/applicationContext.xml
incubator/streams/trunk/streams-web/src/main/webapp/WEB-INF/web.xml
Modified: incubator/streams/trunk/streams-web/pom.xml
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-web/pom.xml?rev=1431724&r1=1431723&r2=1431724&view=diff
==============================================================================
--- incubator/streams/trunk/streams-web/pom.xml (original)
+++ incubator/streams/trunk/streams-web/pom.xml Thu Jan 10 23:17:01 2013
@@ -13,6 +13,11 @@
<packaging>war</packaging>
<name>streams-web Maven Webapp</name>
<url>http://maven.apache.org</url>
+ <properties>
+ <spring.version>3.0.5.RELEASE</spring.version>
+ <junit.version>4.11</junit.version>
+ <jdk.version>1.6</jdk.version>
+ </properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
@@ -35,25 +40,110 @@
</dependency>
<dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-web</artifactId>
+ <version>2.9.0</version>
+ <type>war</type>
+ <scope>runtime</scope>
+ </dependency>
+
+ <!-- Dependencies for using ActiveMQ -->
+ <dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>activemq-camel</artifactId>
+ <version>5.5.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jms_1.1_spec</artifactId>
+ <version>1.1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xbean</groupId>
+ <artifactId>xbean-spring</artifactId>
+ <version>3.5</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-jms</artifactId>
+ <version>2.9.0</version>
+ </dependency>
+
+ <!-- Dependencies for stream processing in Camel
+ http://camel.apache.org/stream.html -->
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-stream</artifactId>
+ <version>2.9.0</version>
+ </dependency>
+
+ <!-- logging -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.6.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.6.1</version>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.16</version>
+ </dependency>
+
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+
+ <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
- <version>3.0.5.RELEASE</version>
+ <version>${spring.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-webmvc</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+
+
</dependencies>
<build>
<finalName>streams-web</finalName>
<plugins>
- <plugin>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>maven-jetty-plugin</artifactId>
- <configuration>
- <webAppConfig>
- <contextPath>/</contextPath>
- </webAppConfig>
- <scanIntervalSeconds>10</scanIntervalSeconds>
- </configuration>
- </plugin>
+ <plugin>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-maven-plugin</artifactId>
+ <version>2.9.0</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-maven-plugin</artifactId>
+ <version>7.5.3.v20111011</version>
+
+ <configuration>
+ <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>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Modified: incubator/streams/trunk/streams-web/src/main/resources/META-INF/DEPENDENCIES
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-web/src/main/resources/META-INF/DEPENDENCIES?rev=1431724&r1=1431723&r2=1431724&view=diff
==============================================================================
--- incubator/streams/trunk/streams-web/src/main/resources/META-INF/DEPENDENCIES (original)
+++ incubator/streams/trunk/streams-web/src/main/resources/META-INF/DEPENDENCIES Thu Jan 10 23:17:01 2013
@@ -9,28 +9,88 @@ streams-web Maven Webapp
From: 'an unknown organization'
- AOP alliance (http://aopalliance.sourceforge.net) aopalliance:aopalliance:jar:1.0
License: Public Domain
+ - Logging (http://jakarta.apache.org/commons/logging/) commons-logging:commons-logging:jar:1.0.3
+
- streams-eip-routes [org.apache.streams] org.apache.streams:streams-eip-routes:bundle:0.1-SNAPSHOT
- - spring-aop org.springframework:spring-aop:jar:3.0.5.RELEASE
+ - org.osgi.core org.osgi:org.osgi.core:jar:4.1.0
+
+ - spring-aop org.springframework:spring-aop:jar:3.0.6.RELEASE
- spring-asm org.springframework:spring-asm:jar:3.0.5.RELEASE
- - spring-beans org.springframework:spring-beans:jar:3.0.5.RELEASE
+ - spring-beans org.springframework:spring-beans:jar:3.0.6.RELEASE
- - spring-context org.springframework:spring-context:jar:3.0.5.RELEASE
+ - spring-context org.springframework:spring-context:jar:3.0.6.RELEASE
+
+ - spring-context-support org.springframework:spring-context-support:jar:3.0.5.RELEASE
- spring-core org.springframework:spring-core:jar:3.0.5.RELEASE
- spring-expression org.springframework:spring-expression:jar:3.0.5.RELEASE
+ - spring-jms org.springframework:spring-jms:jar:3.0.6.RELEASE
+
+ - spring-tx org.springframework:spring-tx:jar:3.0.6.RELEASE
+
- spring-web org.springframework:spring-web:jar:3.0.5.RELEASE
+ - spring-webmvc org.springframework:spring-webmvc:jar:3.0.5.RELEASE
+
+
+From: 'Apache Software Foundation' (http://www.apache.org)
+ - Apache Log4j (http://logging.apache.org/log4j/1.2/) log4j:log4j:bundle:1.2.16
+ License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
+ - J2EE Management 1.1 (http://geronimo.apache.org/specs/geronimo-j2ee-management_1.1_spec) org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec:jar:1.0.1
+ License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
+ - JMS 1.1 (http://geronimo.apache.org/specs/geronimo-jms_1.1_spec) org.apache.geronimo.specs:geronimo-jms_1.1_spec:jar:1.1.1
+ License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
+
+From: 'Apache Software Foundation' (http://www.apache.org/)
+ - JTA (http://geronimo.apache.org/geronimo-jta_1.0.1B_spec) org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec:jar:1.0.1
+ License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
+
+From: 'QOS.ch' (http://www.qos.ch)
+ - SLF4J API Module (http://www.slf4j.org) org.slf4j:slf4j-api:jar:1.6.1
+ License: MIT License (http://www.opensource.org/licenses/mit-license.php)
+ - SLF4J LOG4J-12 Binding (http://www.slf4j.org) org.slf4j:slf4j-log4j12:jar:1.6.1
+ License: MIT License (http://www.opensource.org/licenses/mit-license.php)
From: 'The Apache Software Foundation' (http://www.apache.org/)
- - Commons Logging (http://commons.apache.org/logging) commons-logging:commons-logging:jar:1.1.1
+ - Commons Net (http://commons.apache.org/net/) commons-net:commons-net:jar:2.0
+ License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
+ - Commons Pool (http://commons.apache.org/pool/) commons-pool:commons-pool:jar:1.5.4
+ License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
+ - ActiveIO :: Core (http://activemq.apache.org/activeio-core/) org.apache.activemq:activeio-core:bundle:3.1.2
+ License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
+ - ActiveMQ :: Camel (http://activemq.apache.org/activemq-camel) org.apache.activemq:activemq-camel:bundle:5.5.1
+ License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
+ - ActiveMQ :: Core (http://activemq.apache.org/activemq-core) org.apache.activemq:activemq-core:bundle:5.5.1
+ License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
+ - ActiveMQ :: Pool (http://activemq.apache.org/activemq-pool) org.apache.activemq:activemq-pool:bundle:5.5.1
+ License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
+ - ActiveMQ :: KahaDB (http://activemq.apache.org/kahadb) org.apache.activemq:kahadb:bundle:5.5.1
+ License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
+ - ActiveMQ Protocol Buffers Implementation and Compiler (http://activemq.apache.org/activemq-protobuf) org.apache.activemq.protobuf:activemq-protobuf:maven-plugin:1.1
+ License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
+ - Camel :: Core (http://camel.apache.org/camel-parent/camel-core) org.apache.camel:camel-core:bundle:2.9.0
+ License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
+ - Camel :: JMS (http://camel.apache.org/camel-parent/camel-jms) org.apache.camel:camel-jms:bundle:2.9.0
+ License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
+ - Camel :: Spring (http://camel.apache.org/camel-parent/camel-spring) org.apache.camel:camel-spring:bundle:2.9.0
+ License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
+ - Camel :: Stream (http://camel.apache.org/camel-parent/camel-stream) org.apache.camel:camel-stream:bundle:2.9.0
+ License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
+ - Camel :: Web (http://camel.apache.org/camel-parent/components/camel-web) org.apache.camel:camel-web:war:2.9.0
License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
- Apache Streams Components (http://incubator.apache.org/streams/streams-project/streams-osgi-components/streams-components-all) org.apache.streams:streams-components-all:jar:0.1-SNAPSHOT
License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
+ - Apache XBean :: Spring (http://geronimo.apache.org/xbean/xbean-spring) org.apache.xbean:xbean-spring:bundle:3.5
+ License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
+
+From: 'The JASYPT team' (http://www.jasypt.org)
+ - JASYPT: Java Simplified Encryption (http://www.jasypt.org) org.jasypt:jasypt:jar:1.7
+ License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
Modified: incubator/streams/trunk/streams-web/src/main/webapp/WEB-INF/applicationContext.xml
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-web/src/main/webapp/WEB-INF/applicationContext.xml?rev=1431724&r1=1431723&r2=1431724&view=diff
==============================================================================
--- incubator/streams/trunk/streams-web/src/main/webapp/WEB-INF/applicationContext.xml (original)
+++ incubator/streams/trunk/streams-web/src/main/webapp/WEB-INF/applicationContext.xml Thu Jan 10 23:17:01 2013
@@ -10,6 +10,20 @@
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd">
+ <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&waitForStart=10000"/>
+ <!--
+ <property name="userName" value="${activemq.username}"/>
+ <property name="password" value="${activemq.password}"/>
+
+ -->
+ </bean>
+ </property>
+ </bean>
+
+ <bean id="myTransform" class="org.apache.streams.osgi.components.impl.TransformServiceImpl"/>
</beans>
\ No newline at end of file
Added: incubator/streams/trunk/streams-web/src/main/webapp/WEB-INF/lib/streams-components-all-0.1-SNAPSHOT.jar
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-web/src/main/webapp/WEB-INF/lib/streams-components-all-0.1-SNAPSHOT.jar?rev=1431724&view=auto
==============================================================================
Files incubator/streams/trunk/streams-web/src/main/webapp/WEB-INF/lib/streams-components-all-0.1-SNAPSHOT.jar (added) and incubator/streams/trunk/streams-web/src/main/webapp/WEB-INF/lib/streams-components-all-0.1-SNAPSHOT.jar Thu Jan 10 23:17:01 2013 differ
Added: incubator/streams/trunk/streams-web/src/main/webapp/WEB-INF/spring-web-servlet.xml
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-web/src/main/webapp/WEB-INF/spring-web-servlet.xml?rev=1431724&view=auto
==============================================================================
--- incubator/streams/trunk/streams-web/src/main/webapp/WEB-INF/spring-web-servlet.xml (added)
+++ incubator/streams/trunk/streams-web/src/main/webapp/WEB-INF/spring-web-servlet.xml Thu Jan 10 23:17:01 2013
@@ -0,0 +1,22 @@
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+ http://www.springframework.org/schema/context
+ http://www.springframework.org/schema/context/spring-context-3.0.xsd">
+
+ <context:component-scan base-package="org.apache.streams" />
+ <context:component-scan base-package="org.apache.camel.web" />
+
+ <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
+ <property name="prefix">
+ <value>/WEB-INF/</value>
+ </property>
+ <property name="suffix">
+ <value>.jsp</value>
+ </property>
+ </bean>
+
+</beans>
\ No newline at end of file
Added: incubator/streams/trunk/streams-web/src/main/webapp/WEB-INF/spring/camelContext.xml
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-web/src/main/webapp/WEB-INF/spring/camelContext.xml?rev=1431724&view=auto
==============================================================================
--- incubator/streams/trunk/streams-web/src/main/webapp/WEB-INF/spring/camelContext.xml (added)
+++ incubator/streams/trunk/streams-web/src/main/webapp/WEB-INF/spring/camelContext.xml Thu Jan 10 23:17:01 2013
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:osgi="http://www.springframework.org/schema/osgi"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+ http://camel.apache.org/schema/spring
+ http://camel.apache.org/schema/spring/camel-spring-2.0.0.xsd
+ http://www.springframework.org/schema/osgi
+ http://www.springframework.org/schema/osgi/spring-osgi.xsd">
+
+
+
+ <camelContext xmlns="http://camel.apache.org/schema/spring">
+
+ <route>
+ <from uri="timer://myTimer?fixedRate=true&period=10000"/>
+ <bean ref="myTransform" method="transform"/>
+ <to uri="log:ExampleRouter"/>
+ </route>
+ </camelContext>
+
+</beans>
\ No newline at end of file
Modified: incubator/streams/trunk/streams-web/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/incubator/streams/trunk/streams-web/src/main/webapp/WEB-INF/web.xml?rev=1431724&r1=1431723&r2=1431724&view=diff
==============================================================================
--- incubator/streams/trunk/streams-web/src/main/webapp/WEB-INF/web.xml (original)
+++ incubator/streams/trunk/streams-web/src/main/webapp/WEB-INF/web.xml Thu Jan 10 23:17:01 2013
@@ -1,11 +1,106 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ id="Shindig"
version="2.5">
+ <display-name>Streams</display-name>
+
+ <servlet>
+ <servlet-name>spring-web</servlet-name>
+ <servlet-class>
+ org.springframework.web.servlet.DispatcherServlet
+ </servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>spring-web</servlet-name>
+ <url-pattern>/</url-pattern>
+ </servlet-mapping>
+
+ <context-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>
+ /WEB-INF/spring-web-servlet.xml
+ /WEB-INF/spring/camelContext.xml
+ </param-value>
+ </context-param>
<listener>
- <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+ <listener-class>
+ org.springframework.web.context.ContextLoaderListener
+ </listener-class>
</listener>
-</web-app>
\ No newline at end of file
+ <filter>
+ <filter-name>Jersey Filter</filter-name>
+
+ <filter-class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</filter-class>
+ <init-param>
+
+ <param-name>com.sun.jersey.config.property.resourceConfigClass</param-name>
+ <param-value>org.apache.camel.web.util.CamelResourceConfig</param-value>
+ </init-param>
+ <init-param>
+ <param-name>com.sun.jersey.config.feature.FilterForwardOn404</param-name>
+ <param-value>true</param-value>
+ </init-param>
+
+ <init-param>
+
+ <param-name>com.sun.jersey.config.property.WebPageContentRegex</param-name>
+ <param-value>/(images|css|js)/.*</param-value>
+ </init-param>
+ <init-param>
+ <param-name>com.sun.jersey.config.feature.ImplicitViewables</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ <init-param>
+ <param-name>com.sun.jersey.config.feature.Trace</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ <init-param>
+ <param-name>com.sun.jersey.config.feature.Redirect</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ <init-param>
+ <param-name>com.sun.jersey.config.property.packages</param-name>
+ <param-value>org.apache.camel.web:</param-value>
+ </init-param>
+ <init-param>
+ <param-name>com.sun.jersey.config.property.WadlResourceUri</param-name>
+ <param-value>/api</param-value>
+ </init-param>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>Jersey Filter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <servlet>
+ <servlet-name>TemplateEngineServlet</servlet-name>
+
+ <servlet-class>org.fusesource.scalate.servlet.TemplateEngineServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TemplateEngineServlet</servlet-name>
+ <url-pattern>*.mustache</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>TemplateEngineServlet</servlet-name>
+ <url-pattern>*.scaml</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>TemplateEngineServlet</servlet-name>
+ <url-pattern>*.ssp</url-pattern>
+ </servlet-mapping>
+
+ <error-page>
+ <error-code>500</error-code>
+ <location>/WEB-INF/scalate/errors/500.scaml</location>
+ </error-page>
+ </web-app>
\ No newline at end of file