Modified: camel/trunk/examples/camel-example-spring-ws/src/main/webapp/WEB-INF/spring-ws-servlet.xml URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-spring-ws/src/main/webapp/WEB-INF/spring-ws-servlet.xml?rev=1149088&r1=1149087&r2=1149088&view=diff ============================================================================== --- camel/trunk/examples/camel-example-spring-ws/src/main/webapp/WEB-INF/spring-ws-servlet.xml (original) +++ camel/trunk/examples/camel-example-spring-ws/src/main/webapp/WEB-INF/spring-ws-servlet.xml Thu Jul 21 09:23:46 2011 @@ -16,45 +16,48 @@ limitations under the License. --> <beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:camel="http://camel.apache.org/schema/spring" - xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd - http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> - - <!-- === Route(s) ==== --> - <camel:camelContext id="camelContext"> - <camel:routeBuilder ref="incrementRoute"/> - </camel:camelContext> - - <bean id="incrementRoute" class="org.apache.camel.example.server.IncrementRoute" /> - - <!-- === Endpoint mapping ==== --> - <bean id="endpointMapping" class="org.apache.camel.component.spring.ws.bean.CamelEndpointMapping"> - <property name="interceptors"> - <list> - <ref local="validatingInterceptor" /> - <ref local="loggingInterceptor" /> - </list> - </property> - </bean> - - <!-- === Interceptors ==== --> - <bean id="loggingInterceptor" class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor" /> - - <bean id="validatingInterceptor" class="org.springframework.ws.soap.server.endpoint.interceptor.PayloadValidatingInterceptor"> - <property name="schema" value="/WEB-INF/increment.xsd" /> - <property name="validateRequest" value="true" /> - <property name="validateResponse" value="true" /> - </bean> - - <!-- === WSDL exposure ==== --> - <bean id="increment" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition"> - <property name="schema"> - <bean id="xsd" class="org.springframework.xml.xsd.SimpleXsdSchema"> - <property name="xsd" value="/WEB-INF/increment.xsd" /> - </bean> - </property> - <property name="portTypeName" value="increment" /> - <property name="locationUri" value="http://localhost:8080/increment" /> - </bean> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:camel="http://camel.apache.org/schema/spring" + xsi:schemaLocation=" + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd + http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> + + <!-- === Route(s) ==== --> + <camel:camelContext id="camelContext"> + <camel:routeBuilder ref="incrementRoute"/> + </camel:camelContext> + + <bean id="incrementRoute" class="org.apache.camel.example.server.IncrementRoute"/> + + <!-- === Endpoint mapping ==== --> + <bean id="endpointMapping" class="org.apache.camel.component.spring.ws.bean.CamelEndpointMapping"> + <property name="interceptors"> + <list> + <ref local="validatingInterceptor"/> + <ref local="loggingInterceptor"/> + </list> + </property> + </bean> + + <!-- === Interceptors ==== --> + <bean id="loggingInterceptor" class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor"/> + + <bean id="validatingInterceptor" + class="org.springframework.ws.soap.server.endpoint.interceptor.PayloadValidatingInterceptor"> + <property name="schema" value="/WEB-INF/increment.xsd"/> + <property name="validateRequest" value="true"/> + <property name="validateResponse" value="true"/> + </bean> + + <!-- === WSDL exposure ==== --> + <bean id="increment" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition"> + <property name="schema"> + <bean id="xsd" class="org.springframework.xml.xsd.SimpleXsdSchema"> + <property name="xsd" value="/WEB-INF/increment.xsd"/> + </bean> + </property> + <property name="portTypeName" value="increment"/> + <property name="locationUri" value="http://localhost:8080/increment"/> + </bean> + </beans> \ No newline at end of file
Modified: camel/trunk/examples/camel-example-spring-ws/src/main/webapp/WEB-INF/web.xml URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-spring-ws/src/main/webapp/WEB-INF/web.xml?rev=1149088&r1=1149087&r2=1149088&view=diff ============================================================================== --- camel/trunk/examples/camel-example-spring-ws/src/main/webapp/WEB-INF/web.xml (original) +++ camel/trunk/examples/camel-example-spring-ws/src/main/webapp/WEB-INF/web.xml Thu Jul 21 09:23:46 2011 @@ -16,26 +16,25 @@ limitations under the License. --> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> - <display-name>My Web Application</display-name> + <display-name>My Web Application</display-name> - <servlet> - <servlet-name>spring-ws</servlet-name> - <servlet-class>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class> - <init-param> - <!-- Transform the location attributes in WSDLs --> - <param-name>transformWsdlLocations</param-name> - <param-value>true</param-value> - </init-param> - <load-on-startup>1</load-on-startup> - </servlet> - - <servlet-mapping> - <servlet-name>spring-ws</servlet-name> - <url-pattern>/*</url-pattern> - </servlet-mapping> + <servlet> + <servlet-name>spring-ws</servlet-name> + <servlet-class>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class> + <init-param> + <!-- Transform the location attributes in WSDLs --> + <param-name>transformWsdlLocations</param-name> + <param-value>true</param-value> + </init-param> + <load-on-startup>1</load-on-startup> + </servlet> + <servlet-mapping> + <servlet-name>spring-ws</servlet-name> + <url-pattern>/*</url-pattern> + </servlet-mapping> </web-app> Modified: camel/trunk/examples/camel-example-spring-xquery/src/main/resources/META-INF/spring/camelContext.xml URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-spring-xquery/src/main/resources/META-INF/spring/camelContext.xml?rev=1149088&r1=1149087&r2=1149088&view=diff ============================================================================== --- camel/trunk/examples/camel-example-spring-xquery/src/main/resources/META-INF/spring/camelContext.xml (original) +++ camel/trunk/examples/camel-example-spring-xquery/src/main/resources/META-INF/spring/camelContext.xml Thu Jul 21 09:23:46 2011 @@ -19,8 +19,8 @@ <beans xmlns="http://www.springframework.org/schema/beans" 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.xsd - http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd + http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> <!-- START SNIPPET: example --> <camelContext xmlns="http://camel.apache.org/schema/spring"> Modified: camel/trunk/examples/camel-example-spring/src/main/java/org/apache/camel/example/spring/MyRouteBuilder.java URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-spring/src/main/java/org/apache/camel/example/spring/MyRouteBuilder.java?rev=1149088&r1=1149087&r2=1149088&view=diff ============================================================================== --- camel/trunk/examples/camel-example-spring/src/main/java/org/apache/camel/example/spring/MyRouteBuilder.java (original) +++ camel/trunk/examples/camel-example-spring/src/main/java/org/apache/camel/example/spring/MyRouteBuilder.java Thu Jul 21 09:23:46 2011 @@ -25,11 +25,9 @@ import org.apache.camel.spring.Main; * @version */ public class MyRouteBuilder extends RouteBuilder { + /** * Allow this route to be run as an application - * - * @param args - * @throws Exception */ public static void main(String[] args) throws Exception { new Main().run(args); @@ -54,4 +52,5 @@ public class MyRouteBuilder extends Rout System.out.println("Received: " + body); } } + } Modified: camel/trunk/examples/camel-example-spring/src/main/resources/META-INF/spring/camel-context.xml URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-spring/src/main/resources/META-INF/spring/camel-context.xml?rev=1149088&r1=1149087&r2=1149088&view=diff ============================================================================== --- camel/trunk/examples/camel-example-spring/src/main/resources/META-INF/spring/camel-context.xml (original) +++ camel/trunk/examples/camel-example-spring/src/main/resources/META-INF/spring/camel-context.xml Thu Jul 21 09:23:46 2011 @@ -19,15 +19,14 @@ <beans xmlns="http://www.springframework.org/schema/beans" 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.xsd - http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd + http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> - <camelContext id="camel" - xmlns="http://camel.apache.org/schema/spring"> + <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"> <package>org.apache.camel.example.spring</package> - + <!-- Default JMX connector url: "service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi/camel" --> - <jmxAgent id="agent" createConnector="true"/> + <jmxAgent id="agent" createConnector="true"/> </camelContext> <!-- lets configure the default ActiveMQ broker URL --> Modified: camel/trunk/examples/camel-example-tracer/src/main/resources/META-INF/persistence.xml URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-tracer/src/main/resources/META-INF/persistence.xml?rev=1149088&r1=1149087&r2=1149088&view=diff ============================================================================== --- camel/trunk/examples/camel-example-tracer/src/main/resources/META-INF/persistence.xml (original) +++ camel/trunk/examples/camel-example-tracer/src/main/resources/META-INF/persistence.xml Thu Jul 21 09:23:46 2011 @@ -1,42 +1,43 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - Copyright 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. + 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. --> <!-- START SNIPPET: e1 --> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0"> - <persistence-unit name="tracer" transaction-type="RESOURCE_LOCAL"> - <class>org.apache.camel.processor.interceptor.jpa.JpaTraceEventMessage</class> + <persistence-unit name="tracer" transaction-type="RESOURCE_LOCAL"> + <class>org.apache.camel.processor.interceptor.jpa.JpaTraceEventMessage</class> - <properties> - <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/> - <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"/> - <property name="hibernate.connection.username" value="sa"/> - <property name="hibernate.connection.password" value=""/> - <property name="hibernate.connection.url" value="jdbc:hsqldb:mem:camel_tracer"/> - <property name="hibernate.hbm2ddl.auto" value="create"/> - - <!-- debugging flags --> - <!-- - <property name="hibernate.show_sql" value="true"/> - <property name="hibernate.format_sql" value="true"/> - --> - </properties> + <properties> + <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/> + <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"/> + <property name="hibernate.connection.username" value="sa"/> + <property name="hibernate.connection.password" value=""/> + <property name="hibernate.connection.url" value="jdbc:hsqldb:mem:camel_tracer"/> + <property name="hibernate.hbm2ddl.auto" value="create"/> + + <!-- debugging flags --> + <!-- + <property name="hibernate.show_sql" value="true"/> + <property name="hibernate.format_sql" value="true"/> + --> + </properties> - </persistence-unit> + </persistence-unit> </persistence> -<!-- END SNIPPET: e1 --> + <!-- END SNIPPET: e1 --> Modified: camel/trunk/examples/camel-example-tracer/src/main/resources/META-INF/spring/camel-context.xml URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-tracer/src/main/resources/META-INF/spring/camel-context.xml?rev=1149088&r1=1149087&r2=1149088&view=diff ============================================================================== --- camel/trunk/examples/camel-example-tracer/src/main/resources/META-INF/spring/camel-context.xml (original) +++ camel/trunk/examples/camel-example-tracer/src/main/resources/META-INF/spring/camel-context.xml Thu Jul 21 09:23:46 2011 @@ -16,123 +16,122 @@ limitations under the License. --> -<!-- Configures the Camel Context--> - <beans xmlns="http://www.springframework.org/schema/beans" 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.xsd - http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> - - <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"> - <!-- START SNIPPET: e3 --> - <endpoint id="traced" uri="jpa://org.apache.camel.processor.interceptor.JpaTraceEventMessage?persistenceUnit=tracer"/> - <!-- END SNIPPET: e3 --> - - <!-- START SNIPPET: e4 --> - <route> - <!-- in stream to allow you to enter some text in the console --> - <from uri="stream:in?initialPromptDelay=4000&promptDelay=2000&promptMessage=Enter some words:"/> - - <!-- split the text using parallel execution --> - <split parallelProcessing="true"> - <!-- use methodCall expression to split the words, using a java bean to do it --> - <method bean="quoteService" method="splitWords"/> - - <!-- for each split message invoke the quote server to get a quote of the word --> - <to uri="bean:quoteService?method=quote"/> - - <!-- now we need to find the best quote, so we aggregate all the splitted words - we use our own strategy how to aggregate --> - <aggregate strategyRef="myAggregateStrategy"> - <!-- correlate everything using constant true, as they are all from the same source --> - <correlationExpression> - <constant>true</constant> - </correlationExpression> - <!-- complete after 1 sec on inactivity --> - <completionTimeout> - <constant>1000</constant> - </completionTimeout> - <!-- send the result to stream out so we can see the response in the console --> - <to uri="stream:out"/> - </aggregate> - </split> - </route> - <!-- END SNIPPET: e4 --> - - </camelContext> - - <!-- this is our aggregation strategy where we find the best quote --> - <bean id="myAggregateStrategy" class="org.apache.camel.example.tracer.QuoteAggregator"> - <property name="coolWords"> - <list value-type="java.lang.String"> - <value>whiskey</value> - <value>beer</value> - <value>Camel</value> - <value>cool</value> - <value>great</value> - </list> - </property> - </bean> - - <!-- our quote server with some quotes to start with --> - <bean id="quoteService" class="org.apache.camel.example.tracer.QuoteService"> - <property name="quotes"> - <list value-type="java.lang.String"> - <value>Camel is cool</value> - <value>We like beer</value> - <value>Have a great day</value> - <value>Whiskey in the jar</value> - <value>The day that newer comes</value> - <value>What a cold day</value> - </list> - </property> - </bean> - - <!-- START SNIPPET: e1 --> - <!-- use camel jpa trace so we can see all the traced exchanges in a database --> - <bean id="camelTracer" class="org.apache.camel.processor.interceptor.Tracer"> - <!-- turn on jpa tracing, otherwise the TraceEventMessage is a non JPA Entity class --> - <property name="useJpa" value="true"/> - <!-- the destination to send the traced messages --> - <property name="destination" ref="traced"/> - <!-- we turn ordinary trace logging off so we only see the traced messages in the database, - but you can have both if you like --> - <property name="logLevel" value="OFF"/> - </bean> - <!-- END SNIPPET: e1 --> - - <!-- START SNIPPET: e2 --> - <!-- this is ordinary JPA spring configuration --> - <bean id="transactionTemplate" class="org.springframework.transaction.support.TransactionTemplate"> - <property name="transactionManager"> - <bean class="org.springframework.orm.jpa.JpaTransactionManager"> - <property name="entityManagerFactory" ref="entityManagerFactory"/> - </bean> - </property> - </bean> + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd + http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> - <!-- this is ordinary JPA spring configuration --> - <bean id="jpaTemplate" class="org.springframework.orm.jpa.JpaTemplate"> + <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"> + <!-- START SNIPPET: e3 --> + <endpoint id="traced" uri="jpa://org.apache.camel.processor.interceptor.JpaTraceEventMessage?persistenceUnit=tracer"/> + <!-- END SNIPPET: e3 --> + + <!-- START SNIPPET: e4 --> + <route> + <!-- in stream to allow you to enter some text in the console --> + <from uri="stream:in?initialPromptDelay=4000&promptDelay=2000&promptMessage=Enter some words:"/> + + <!-- split the text using parallel execution --> + <split parallelProcessing="true"> + <!-- use methodCall expression to split the words, using a java bean to do it --> + <method bean="quoteService" method="splitWords"/> + + <!-- for each split message invoke the quote server to get a quote of the word --> + <to uri="bean:quoteService?method=quote"/> + + <!-- now we need to find the best quote, so we aggregate all the splitted words + we use our own strategy how to aggregate --> + <aggregate strategyRef="myAggregateStrategy"> + <!-- correlate everything using constant true, as they are all from the same source --> + <correlationExpression> + <constant>true</constant> + </correlationExpression> + <!-- complete after 1 sec on inactivity --> + <completionTimeout> + <constant>1000</constant> + </completionTimeout> + <!-- send the result to stream out so we can see the response in the console --> + <to uri="stream:out"/> + </aggregate> + </split> + </route> + <!-- END SNIPPET: e4 --> + + </camelContext> + + <!-- this is our aggregation strategy where we find the best quote --> + <bean id="myAggregateStrategy" class="org.apache.camel.example.tracer.QuoteAggregator"> + <property name="coolWords"> + <list value-type="java.lang.String"> + <value>whiskey</value> + <value>beer</value> + <value>Camel</value> + <value>cool</value> + <value>great</value> + </list> + </property> + </bean> + + <!-- our quote server with some quotes to start with --> + <bean id="quoteService" class="org.apache.camel.example.tracer.QuoteService"> + <property name="quotes"> + <list value-type="java.lang.String"> + <value>Camel is cool</value> + <value>We like beer</value> + <value>Have a great day</value> + <value>Whiskey in the jar</value> + <value>The day that newer comes</value> + <value>What a cold day</value> + </list> + </property> + </bean> + + <!-- START SNIPPET: e1 --> + <!-- use camel jpa trace so we can see all the traced exchanges in a database --> + <bean id="camelTracer" class="org.apache.camel.processor.interceptor.Tracer"> + <!-- turn on jpa tracing, otherwise the TraceEventMessage is a non JPA Entity class --> + <property name="useJpa" value="true"/> + <!-- the destination to send the traced messages --> + <property name="destination" ref="traced"/> + <!-- we turn ordinary trace logging off so we only see the traced messages in the database, + but you can have both if you like --> + <property name="logLevel" value="OFF"/> + </bean> + <!-- END SNIPPET: e1 --> + + <!-- START SNIPPET: e2 --> + <!-- this is ordinary JPA spring configuration --> + <bean id="transactionTemplate" class="org.springframework.transaction.support.TransactionTemplate"> + <property name="transactionManager"> + <bean class="org.springframework.orm.jpa.JpaTransactionManager"> <property name="entityManagerFactory" ref="entityManagerFactory"/> - </bean> + </bean> + </property> + </bean> + + <!-- this is ordinary JPA spring configuration --> + <bean id="jpaTemplate" class="org.springframework.orm.jpa.JpaTemplate"> + <property name="entityManagerFactory" ref="entityManagerFactory"/> + </bean> + + <!-- this is ordinary JPA spring configuration --> + <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean"> + <!-- we have named our presistence unit tracer in the META-INF/persistence.xml file --> + <property name="persistenceUnitName" value="tracer"/> + </bean> + <!-- END SNIPPET: e2 --> + + <!-- let's show a simple UI to browse the database --> + <bean id="databaseExplorer" class="org.apache.camel.spring.util.MainRunner" lazy-init="false"> + <property name="main" value="org.hsqldb.util.DatabaseManagerSwing"/> + <property name="args"> + <list> + <value>--url</value> + <value>jdbc:hsqldb:mem:camel_tracer</value> + </list> + </property> + <property name="delay" value="2000"/> + </bean> - <!-- this is ordinary JPA spring configuration --> - <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean"> - <!-- we have named our presistence unit tracer in the META-INF/persistence.xml file --> - <property name="persistenceUnitName" value="tracer"/> - </bean> - <!-- END SNIPPET: e2 --> - - <!-- let's show a simple UI to browse the database --> - <bean id="databaseExplorer" class="org.apache.camel.spring.util.MainRunner" lazy-init="false"> - <property name="main" value="org.hsqldb.util.DatabaseManagerSwing"/> - <property name="args"> - <list> - <value>--url</value> - <value>jdbc:hsqldb:mem:camel_tracer</value> - </list> - </property> - <property name="delay" value="2000"/> - </bean> </beans>