You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2010/09/17 09:57:38 UTC

svn commit: r998014 - in /camel/trunk: camel-core/src/main/java/org/apache/camel/spi/ tests/camel-itest/src/test/java/org/apache/camel/itest/idempotent/ tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/ tests/camel-itest/src/test/reso...

Author: davsclaus
Date: Fri Sep 17 07:57:37 2010
New Revision: 998014

URL: http://svn.apache.org/viewvc?rev=998014&view=rev
Log:
Added test for jdbc based idempotent consumer repo. Added missing license to some xml files.

Added:
    camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/idempotent/
    camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/idempotent/IdempotentConsumerTest.java
    camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/idempotent/JdbcIdempotentRepository.java
    camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/idempotent/JdbcTableService.java
    camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/idempotent/
    camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/idempotent/IdempotentConsumerTest.xml
Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/spi/IdempotentRepository.java
    camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/AsyncEndpointTransacted2Test.xml
    camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/AsyncEndpointTransactedTest.xml
    camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/LoggingPipelineTest.xml
    camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/PartiallyTransactedPipelineTest.xml
    camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedExceptionClauseAfterTransactedTag.xml
    camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedFullExampleTest.xml
    camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedOnCompletionTest.xml
    camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedOnExceptionTest.xml
    camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedPipelineTest.xml
    camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedTryCatchTest.xml
    camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/hsqldb-context.xml
    camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/jetty/InvalidRequest.xml
    camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/jetty/ValidRequest.xml

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/spi/IdempotentRepository.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/spi/IdempotentRepository.java?rev=998014&r1=998013&r2=998014&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/spi/IdempotentRepository.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/spi/IdempotentRepository.java Fri Sep 17 07:57:37 2010
@@ -36,6 +36,8 @@ public interface IdempotentRepository<E>
 
     /**
      * Returns <tt>true</tt> if this repository contains the specified element.
+     * <p/>
+     * This operation is used if the option <tt>eager</tt> has been enabled.
      *
      * @param key the key of the message
      * @return <tt>true</tt> if this repository contains the specified element
@@ -54,6 +56,8 @@ public interface IdempotentRepository<E>
 
     /**
      * Confirms the key, after the exchange has been processed successfully.
+     * <p/>
+     * This operation is used if the option <tt>eager</tt> has been enabled.
      *
      * @param key the key of the message for duplicate test
      * @return <tt>true</tt> if the key was confirmed

Added: camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/idempotent/IdempotentConsumerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/idempotent/IdempotentConsumerTest.java?rev=998014&view=auto
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/idempotent/IdempotentConsumerTest.java (added)
+++ camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/idempotent/IdempotentConsumerTest.java Fri Sep 17 07:57:37 2010
@@ -0,0 +1,47 @@
+/**
+ * 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.
+ */
+package org.apache.camel.itest.idempotent;
+
+import org.apache.camel.test.junit4.CamelSpringTestSupport;
+import org.junit.Test;
+import org.springframework.context.support.AbstractXmlApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * @version $Revision$
+ */
+public class IdempotentConsumerTest extends CamelSpringTestSupport {
+
+    @Override
+    protected AbstractXmlApplicationContext createApplicationContext() {
+        return new ClassPathXmlApplicationContext("org/apache/camel/itest/idempotent/IdempotentConsumerTest.xml");
+    }
+
+    @Test
+    public void testDuplicateMessagesAreFilteredOut() throws Exception {
+        getMockEndpoint("mock:result").expectedBodiesReceived("one", "two", "three");
+
+        template.sendBodyAndHeader("direct:start", "one", "messageId", 1);
+        template.sendBodyAndHeader("direct:start", "two", "messageId", 2);
+        template.sendBodyAndHeader("direct:start", "one", "messageId", 1);
+        template.sendBodyAndHeader("direct:start", "two", "messageId", 2);
+        template.sendBodyAndHeader("direct:start", "three", "messageId", 3);
+
+        assertMockEndpointsSatisfied();
+    }
+
+}

Added: camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/idempotent/JdbcIdempotentRepository.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/idempotent/JdbcIdempotentRepository.java?rev=998014&view=auto
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/idempotent/JdbcIdempotentRepository.java (added)
+++ camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/idempotent/JdbcIdempotentRepository.java Fri Sep 17 07:57:37 2010
@@ -0,0 +1,60 @@
+/**
+ * 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.
+ */
+package org.apache.camel.itest.idempotent;
+
+import javax.sql.DataSource;
+
+import org.apache.camel.spi.IdempotentRepository;
+import org.springframework.jdbc.core.JdbcTemplate;
+
+/**
+ * @version $Revision$
+ */
+public class JdbcIdempotentRepository implements IdempotentRepository<String> {
+
+    private JdbcTemplate jdbc;
+
+    public void setDataSource(DataSource ds) {
+        this.jdbc = new JdbcTemplate(ds);
+    }
+
+    public boolean add(String key) {
+        // check we already have it because eager option can have been turned on
+        if (contains(key)) {
+            return false;
+        }
+
+        jdbc.update("INSERT INTO ProcessedPayments (paymentIdentifier) VALUES (?)", key);
+        return true;
+    }
+
+    public boolean contains(String key) {
+        int numMatches = jdbc.queryForInt("SELECT count(0) FROM ProcessedPayments where paymentIdentifier = ?", key);
+        return numMatches > 0;
+    }
+
+    public boolean remove(String key) {
+        jdbc.update("DELETE FROM ProcessedPayments WHERE paymentIdentifier = ?", key);
+        return true;
+    }
+
+    public boolean confirm(String key) {
+        // noop
+        return true;
+    }
+}
+

Added: camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/idempotent/JdbcTableService.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/idempotent/JdbcTableService.java?rev=998014&view=auto
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/idempotent/JdbcTableService.java (added)
+++ camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/idempotent/JdbcTableService.java Fri Sep 17 07:57:37 2010
@@ -0,0 +1,56 @@
+/**
+ * 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.
+ */
+package org.apache.camel.itest.idempotent;
+
+import javax.sql.DataSource;
+
+import org.springframework.beans.factory.DisposableBean;
+import org.springframework.beans.factory.InitializingBean;
+import org.springframework.jdbc.core.JdbcTemplate;
+
+/**
+ * @version $Revision$
+ */
+public class JdbcTableService implements InitializingBean, DisposableBean {
+
+    private JdbcTemplate jdbc;
+
+    public void setDataSource(DataSource ds) {
+        this.jdbc = new JdbcTemplate(ds);
+    }
+
+    public void createTable() {
+        try {
+            jdbc.execute("drop table ProcessedPayments");
+        } catch (Exception e) {
+            // ignore
+        }
+        jdbc.execute("create table ProcessedPayments (paymentIdentifier varchar)");
+    }
+
+    public void dropTable() {
+        jdbc.execute("drop table ProcessedPayments");
+    }
+
+    public void destroy() throws Exception {
+        dropTable();
+    }
+
+    public void afterPropertiesSet() throws Exception {
+        createTable();
+    }
+}

Modified: camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/AsyncEndpointTransacted2Test.xml
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/AsyncEndpointTransacted2Test.xml?rev=998014&r1=998013&r2=998014&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/AsyncEndpointTransacted2Test.xml (original)
+++ camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/AsyncEndpointTransacted2Test.xml Fri Sep 17 07:57:37 2010
@@ -1,4 +1,20 @@
 <?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"
        xsi:schemaLocation="

Modified: camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/AsyncEndpointTransactedTest.xml
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/AsyncEndpointTransactedTest.xml?rev=998014&r1=998013&r2=998014&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/AsyncEndpointTransactedTest.xml (original)
+++ camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/AsyncEndpointTransactedTest.xml Fri Sep 17 07:57:37 2010
@@ -1,4 +1,20 @@
 <?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"
        xsi:schemaLocation="

Modified: camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/LoggingPipelineTest.xml
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/LoggingPipelineTest.xml?rev=998014&r1=998013&r2=998014&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/LoggingPipelineTest.xml (original)
+++ camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/LoggingPipelineTest.xml Fri Sep 17 07:57:37 2010
@@ -1,4 +1,20 @@
 <?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"
        xsi:schemaLocation="

Modified: camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/PartiallyTransactedPipelineTest.xml
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/PartiallyTransactedPipelineTest.xml?rev=998014&r1=998013&r2=998014&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/PartiallyTransactedPipelineTest.xml (original)
+++ camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/PartiallyTransactedPipelineTest.xml Fri Sep 17 07:57:37 2010
@@ -1,4 +1,20 @@
 <?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"
        xsi:schemaLocation="

Modified: camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedExceptionClauseAfterTransactedTag.xml
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedExceptionClauseAfterTransactedTag.xml?rev=998014&r1=998013&r2=998014&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedExceptionClauseAfterTransactedTag.xml (original)
+++ camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedExceptionClauseAfterTransactedTag.xml Fri Sep 17 07:57:37 2010
@@ -1,4 +1,20 @@
 <?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"
        xsi:schemaLocation="

Modified: camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedFullExampleTest.xml
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedFullExampleTest.xml?rev=998014&r1=998013&r2=998014&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedFullExampleTest.xml (original)
+++ camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedFullExampleTest.xml Fri Sep 17 07:57:37 2010
@@ -1,4 +1,20 @@
 <?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"
        xsi:schemaLocation="

Modified: camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedOnCompletionTest.xml
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedOnCompletionTest.xml?rev=998014&r1=998013&r2=998014&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedOnCompletionTest.xml (original)
+++ camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedOnCompletionTest.xml Fri Sep 17 07:57:37 2010
@@ -1,4 +1,20 @@
 <?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"
 	xsi:schemaLocation="

Modified: camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedOnExceptionTest.xml
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedOnExceptionTest.xml?rev=998014&r1=998013&r2=998014&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedOnExceptionTest.xml (original)
+++ camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedOnExceptionTest.xml Fri Sep 17 07:57:37 2010
@@ -1,4 +1,20 @@
 <?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"
 	xsi:schemaLocation="

Modified: camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedPipelineTest.xml
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedPipelineTest.xml?rev=998014&r1=998013&r2=998014&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedPipelineTest.xml (original)
+++ camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedPipelineTest.xml Fri Sep 17 07:57:37 2010
@@ -1,4 +1,20 @@
 <?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"
        xsi:schemaLocation="

Modified: camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedTryCatchTest.xml
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedTryCatchTest.xml?rev=998014&r1=998013&r2=998014&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedTryCatchTest.xml (original)
+++ camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedTryCatchTest.xml Fri Sep 17 07:57:37 2010
@@ -1,4 +1,20 @@
 <?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"
        xsi:schemaLocation="

Modified: camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/hsqldb-context.xml
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/hsqldb-context.xml?rev=998014&r1=998013&r2=998014&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/hsqldb-context.xml (original)
+++ camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/hsqldb-context.xml Fri Sep 17 07:57:37 2010
@@ -1,4 +1,20 @@
 <?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"
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

Added: camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/idempotent/IdempotentConsumerTest.xml
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/idempotent/IdempotentConsumerTest.xml?rev=998014&view=auto
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/idempotent/IdempotentConsumerTest.xml (added)
+++ camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/idempotent/IdempotentConsumerTest.xml Fri Sep 17 07:57:37 2010
@@ -0,0 +1,51 @@
+<?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"
+       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
+    ">
+
+    <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
+        <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
+        <property name="url" value="jdbc:hsqldb:mem:."/>
+        <property name="username" value="sa"/>
+        <property name="password" value=""/>
+    </bean>
+
+    <bean id="tableService" class="org.apache.camel.itest.idempotent.JdbcTableService">
+        <property name="dataSource" ref="dataSource"/>
+    </bean>
+
+    <bean id="myRepo" class="org.apache.camel.itest.idempotent.JdbcIdempotentRepository"
+          depends-on="tableService">
+        <property name="dataSource" ref="dataSource"/>
+    </bean>
+
+    <camelContext xmlns="http://camel.apache.org/schema/spring">
+        <route>
+            <from uri="direct:start"/>
+            <idempotentConsumer messageIdRepositoryRef="myRepo">
+                <header>messageId</header>
+                <to uri="mock:result"/>
+            </idempotentConsumer>
+        </route>
+    </camelContext>
+
+</beans>

Modified: camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/jetty/InvalidRequest.xml
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/jetty/InvalidRequest.xml?rev=998014&r1=998013&r2=998014&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/jetty/InvalidRequest.xml (original)
+++ camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/jetty/InvalidRequest.xml Fri Sep 17 07:57:37 2010
@@ -1,4 +1,20 @@
 <?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.
+-->
 <typens:OptimizationRequestGroups xmlns:typens="http://test">
   <typens:OptimizationRequest>XXX
   </typens:OptimizationRequest>

Modified: camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/jetty/ValidRequest.xml
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/jetty/ValidRequest.xml?rev=998014&r1=998013&r2=998014&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/jetty/ValidRequest.xml (original)
+++ camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/jetty/ValidRequest.xml Fri Sep 17 07:57:37 2010
@@ -1,4 +1,20 @@
 <?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.
+-->
 <typens:OptimizationRequestGroup xmlns:typens="http://test">
   <typens:OptimizationRequest>XXX
   </typens:OptimizationRequest>