You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by cm...@apache.org on 2012/01/06 21:53:51 UTC

svn commit: r1228396 - in /camel/branches/camel-2.9.x: components/camel-sql/src/test/resources/sql/ tests/camel-itest/ tests/camel-itest/src/test/java/org/apache/camel/itest/idempotent/ tests/camel-itest/src/test/java/org/apache/camel/itest/sql/ tests/...

Author: cmueller
Date: Fri Jan  6 20:53:50 2012
New Revision: 1228396

URL: http://svn.apache.org/viewvc?rev=1228396&view=rev
Log:
CAMEL-4734: Consolidate the database vendors in our unit tests

Added:
    camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/database-context.xml
      - copied, changed from r1228229, camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/hsqldb-context.xml
    camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/sql/
    camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/sql/init.sql
    camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/sql/init2.sql
Removed:
    camel/branches/camel-2.9.x/tests/camel-itest/src/test/java/org/apache/camel/itest/idempotent/JdbcTableService.java
    camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/hsqldb-context.xml
Modified:
    camel/branches/camel-2.9.x/components/camel-sql/src/test/resources/sql/createAndPopulateDatabase.sql
    camel/branches/camel-2.9.x/components/camel-sql/src/test/resources/sql/init.sql
    camel/branches/camel-2.9.x/components/camel-sql/src/test/resources/sql/init2.sql
    camel/branches/camel-2.9.x/tests/camel-itest/pom.xml
    camel/branches/camel-2.9.x/tests/camel-itest/src/test/java/org/apache/camel/itest/sql/FromJmsToJdbcIdempotentConsumerToJmsTest.java
    camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/AsyncEndpointTransacted2Test.xml
    camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/AsyncEndpointTransactedTest.xml
    camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/LoggingPipelineTest.xml
    camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/PartiallyTransactedPipelineTest.xml
    camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedExceptionClauseAfterTransactedTag.xml
    camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedFullExampleTest.xml
    camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedOnCompletionTest.xml
    camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedOnExceptionTest.xml
    camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedPipelineTest.xml
    camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedTryCatchTest.xml
    camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/idempotent/IdempotentConsumerTest.xml
    camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/sql/FromJmsToJdbcIdempotentConsumerToJmsTest.xml
    camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/sql/FromJmsToJdbcIdempotentConsumerToJmsXaTest.xml

Modified: camel/branches/camel-2.9.x/components/camel-sql/src/test/resources/sql/createAndPopulateDatabase.sql
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-sql/src/test/resources/sql/createAndPopulateDatabase.sql?rev=1228396&r1=1228395&r2=1228396&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-sql/src/test/resources/sql/createAndPopulateDatabase.sql (original)
+++ camel/branches/camel-2.9.x/components/camel-sql/src/test/resources/sql/createAndPopulateDatabase.sql Fri Jan  6 20:53:50 2012
@@ -1,3 +1,20 @@
+-- ------------------------------------------------------------------------
+-- 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
 create table projects (id integer primary key, project varchar(10), license varchar(5));
 insert into projects values (1, 'Camel', 'ASF');

Modified: camel/branches/camel-2.9.x/components/camel-sql/src/test/resources/sql/init.sql
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-sql/src/test/resources/sql/init.sql?rev=1228396&r1=1228395&r2=1228396&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-sql/src/test/resources/sql/init.sql (original)
+++ camel/branches/camel-2.9.x/components/camel-sql/src/test/resources/sql/init.sql Fri Jan  6 20:53:50 2012
@@ -1,3 +1,20 @@
+-- ------------------------------------------------------------------------
+-- 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.
+-- ------------------------------------------------------------------------
+
 CREATE TABLE aggregationRepo1 (
     id varchar(255) NOT NULL,
     exchange blob NOT NULL,

Modified: camel/branches/camel-2.9.x/components/camel-sql/src/test/resources/sql/init2.sql
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-sql/src/test/resources/sql/init2.sql?rev=1228396&r1=1228395&r2=1228396&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-sql/src/test/resources/sql/init2.sql (original)
+++ camel/branches/camel-2.9.x/components/camel-sql/src/test/resources/sql/init2.sql Fri Jan  6 20:53:50 2012
@@ -1,3 +1,20 @@
+-- ------------------------------------------------------------------------
+-- 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.
+-- ------------------------------------------------------------------------
+
 CREATE TABLE aggregationRepo2 (
     id varchar(255) NOT NULL,
     exchange blob NOT NULL,

Modified: camel/branches/camel-2.9.x/tests/camel-itest/pom.xml
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/tests/camel-itest/pom.xml?rev=1228396&r1=1228395&r2=1228396&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/tests/camel-itest/pom.xml (original)
+++ camel/branches/camel-2.9.x/tests/camel-itest/pom.xml Fri Jan  6 20:53:50 2012
@@ -186,8 +186,8 @@
 
         <!-- some TX tests using iBatis -->
         <dependency>
-            <groupId>org.hsqldb</groupId>
-            <artifactId>hsqldb</artifactId>
+            <groupId>org.apache.derby</groupId>
+            <artifactId>derby</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>

Modified: camel/branches/camel-2.9.x/tests/camel-itest/src/test/java/org/apache/camel/itest/sql/FromJmsToJdbcIdempotentConsumerToJmsTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/tests/camel-itest/src/test/java/org/apache/camel/itest/sql/FromJmsToJdbcIdempotentConsumerToJmsTest.java?rev=1228396&r1=1228395&r2=1228396&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/tests/camel-itest/src/test/java/org/apache/camel/itest/sql/FromJmsToJdbcIdempotentConsumerToJmsTest.java (original)
+++ camel/branches/camel-2.9.x/tests/camel-itest/src/test/java/org/apache/camel/itest/sql/FromJmsToJdbcIdempotentConsumerToJmsTest.java Fri Jan  6 20:53:50 2012
@@ -54,17 +54,6 @@ public class FromJmsToJdbcIdempotentCons
         dataSource = context.getRegistry().lookup("myNonXADataSource", DataSource.class);
         jdbcTemplate = new JdbcTemplate(dataSource);
         jdbcTemplate.afterPropertiesSet();
-
-        setupRepository();
-    }
-    
-    protected void setupRepository() {
-        try {
-            jdbcTemplate.execute("DROP TABLE CAMEL_MESSAGEPROCESSED");
-        } catch (Exception e) {
-            // ignore
-        }
-        jdbcTemplate.execute("CREATE TABLE CAMEL_MESSAGEPROCESSED (processorName VARCHAR(20), messageId VARCHAR(10))");
     }
 
     @Test

Modified: camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/AsyncEndpointTransacted2Test.xml
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/AsyncEndpointTransacted2Test.xml?rev=1228396&r1=1228395&r2=1228396&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/AsyncEndpointTransacted2Test.xml (original)
+++ camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/AsyncEndpointTransacted2Test.xml Fri Jan  6 20:53:50 2012
@@ -22,7 +22,7 @@
 		http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
 	">
 
-    <import resource="hsqldb-context.xml"/>
+    <import resource="database-context.xml"/>
 
     <bean id="async" class="org.apache.camel.itest.async.MyAsyncComponent"/>
 

Modified: camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/AsyncEndpointTransactedTest.xml
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/AsyncEndpointTransactedTest.xml?rev=1228396&r1=1228395&r2=1228396&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/AsyncEndpointTransactedTest.xml (original)
+++ camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/AsyncEndpointTransactedTest.xml Fri Jan  6 20:53:50 2012
@@ -22,7 +22,7 @@
 		http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
 	">
 
-    <import resource="hsqldb-context.xml"/>
+    <import resource="database-context.xml"/>
 
     <bean id="async" class="org.apache.camel.itest.async.MyAsyncComponent"/>
 

Modified: camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/LoggingPipelineTest.xml
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/LoggingPipelineTest.xml?rev=1228396&r1=1228395&r2=1228396&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/LoggingPipelineTest.xml (original)
+++ camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/LoggingPipelineTest.xml Fri Jan  6 20:53:50 2012
@@ -22,7 +22,7 @@
 		http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
 	">
 
-    <import resource="hsqldb-context.xml"/>
+    <import resource="database-context.xml"/>
 
     <camelContext xmlns="http://camel.apache.org/schema/spring">
         <route>

Modified: camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/PartiallyTransactedPipelineTest.xml
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/PartiallyTransactedPipelineTest.xml?rev=1228396&r1=1228395&r2=1228396&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/PartiallyTransactedPipelineTest.xml (original)
+++ camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/PartiallyTransactedPipelineTest.xml Fri Jan  6 20:53:50 2012
@@ -22,7 +22,7 @@
 		http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
 	">
 
-    <import resource="hsqldb-context.xml"/>
+    <import resource="database-context.xml"/>
 
     <camelContext xmlns="http://camel.apache.org/schema/spring">
         <route>

Modified: camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedExceptionClauseAfterTransactedTag.xml
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedExceptionClauseAfterTransactedTag.xml?rev=1228396&r1=1228395&r2=1228396&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedExceptionClauseAfterTransactedTag.xml (original)
+++ camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedExceptionClauseAfterTransactedTag.xml Fri Jan  6 20:53:50 2012
@@ -22,7 +22,7 @@
 		http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
 	">
 
-    <import resource="hsqldb-context.xml"/>
+    <import resource="database-context.xml"/>
 
     <camelContext xmlns="http://camel.apache.org/schema/spring">
         <route>

Modified: camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedFullExampleTest.xml
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedFullExampleTest.xml?rev=1228396&r1=1228395&r2=1228396&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedFullExampleTest.xml (original)
+++ camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedFullExampleTest.xml Fri Jan  6 20:53:50 2012
@@ -22,7 +22,7 @@
 		http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
 	">
 
-    <import resource="hsqldb-context.xml"/>
+    <import resource="database-context.xml"/>
 
     <bean id="rethrowCaughtException" class="org.apache.camel.itest.ibatis.ExceptionRethrower"/>
 

Modified: camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedOnCompletionTest.xml
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedOnCompletionTest.xml?rev=1228396&r1=1228395&r2=1228396&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedOnCompletionTest.xml (original)
+++ camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedOnCompletionTest.xml Fri Jan  6 20:53:50 2012
@@ -22,7 +22,7 @@
 		http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
 	">
 
-	<import resource="hsqldb-context.xml" />
+	<import resource="database-context.xml" />
 
 	<camelContext xmlns="http://camel.apache.org/schema/spring">
 		<route>

Modified: camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedOnExceptionTest.xml
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedOnExceptionTest.xml?rev=1228396&r1=1228395&r2=1228396&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedOnExceptionTest.xml (original)
+++ camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedOnExceptionTest.xml Fri Jan  6 20:53:50 2012
@@ -22,7 +22,7 @@
 		http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
 	">
 
-	<import resource="hsqldb-context.xml" />
+	<import resource="database-context.xml" />
 
 	<camelContext trace="true" xmlns="http://camel.apache.org/schema/spring">
 		<route>

Modified: camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedPipelineTest.xml
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedPipelineTest.xml?rev=1228396&r1=1228395&r2=1228396&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedPipelineTest.xml (original)
+++ camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedPipelineTest.xml Fri Jan  6 20:53:50 2012
@@ -22,7 +22,7 @@
 		http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
 	">
 
-    <import resource="hsqldb-context.xml"/>
+    <import resource="database-context.xml"/>
 
     <camelContext xmlns="http://camel.apache.org/schema/spring">
         <route>

Modified: camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedTryCatchTest.xml
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedTryCatchTest.xml?rev=1228396&r1=1228395&r2=1228396&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedTryCatchTest.xml (original)
+++ camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/TransactedTryCatchTest.xml Fri Jan  6 20:53:50 2012
@@ -22,7 +22,7 @@
 		http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
 	">
 
-    <import resource="hsqldb-context.xml"/>
+    <import resource="database-context.xml"/>
 
     <bean id="rethrowCaughtException" class="org.apache.camel.itest.ibatis.ExceptionRethrower"/>
 

Copied: camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/database-context.xml (from r1228229, camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/hsqldb-context.xml)
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/database-context.xml?p2=camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/database-context.xml&p1=camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/hsqldb-context.xml&r1=1228229&r2=1228396&rev=1228396&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/hsqldb-context.xml (original)
+++ camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/ibatis/database-context.xml Fri Jan  6 20:53:50 2012
@@ -17,14 +17,12 @@
 -->
 <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">
+       xmlns:jdbc="http://www.springframework.org/schema/jdbc"
+       xsi:schemaLocation="
+         http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd
+         http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.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>
+    <jdbc:embedded-database id="dataSource" type="DERBY" />
 
     <bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
         <property name="configLocation" value="ibatis-config.xml"/>

Modified: camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/idempotent/IdempotentConsumerTest.xml
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/idempotent/IdempotentConsumerTest.xml?rev=1228396&r1=1228395&r2=1228396&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/idempotent/IdempotentConsumerTest.xml (original)
+++ camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/idempotent/IdempotentConsumerTest.xml Fri Jan  6 20:53:50 2012
@@ -17,24 +17,18 @@
 -->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:jdbc="http://www.springframework.org/schema/jdbc"
        xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+       http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.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>
+    <jdbc:embedded-database id="dataSource" type="DERBY">
+    	<jdbc:script location="classpath:sql/init.sql" />
+    </jdbc:embedded-database>
 
-    <bean id="myRepo" class="org.apache.camel.itest.idempotent.JdbcIdempotentRepository"
-          depends-on="tableService">
+    <bean id="myRepo" class="org.apache.camel.itest.idempotent.JdbcIdempotentRepository">
         <property name="dataSource" ref="dataSource"/>
     </bean>
 

Modified: camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/sql/FromJmsToJdbcIdempotentConsumerToJmsTest.xml
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/sql/FromJmsToJdbcIdempotentConsumerToJmsTest.xml?rev=1228396&r1=1228395&r2=1228396&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/sql/FromJmsToJdbcIdempotentConsumerToJmsTest.xml (original)
+++ camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/sql/FromJmsToJdbcIdempotentConsumerToJmsTest.xml Fri Jan  6 20:53:50 2012
@@ -17,11 +17,13 @@
 -->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:camel="http://camel.apache.org/schema/spring"
+       xmlns:jdbc="http://www.springframework.org/schema/jdbc"
        xmlns:broker="http://activemq.apache.org/schema/core"
        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/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd
            http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core-5.5.0.xsd">
 
     <!-- jdbc idempotent repository -->
@@ -65,10 +67,7 @@
     </broker:broker>
 
     <!-- datasource used to create the database tables -->
-    <bean id="myNonXADataSource" class="org.springframework.jdbc.datasource.SingleConnectionDataSource" destroy-method="destroy">
-        <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
-        <property name="url" value="jdbc:hsqldb:mem:mydatabase"/>
-        <property name="username" value="sa"/>
-        <property name="password" value=""/>
-    </bean>
+    <jdbc:embedded-database id="myNonXADataSource" type="DERBY">
+    	<jdbc:script location="classpath:sql/init2.sql" />
+    </jdbc:embedded-database>
 </beans>
\ No newline at end of file

Modified: camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/sql/FromJmsToJdbcIdempotentConsumerToJmsXaTest.xml
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/sql/FromJmsToJdbcIdempotentConsumerToJmsXaTest.xml?rev=1228396&r1=1228395&r2=1228396&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/sql/FromJmsToJdbcIdempotentConsumerToJmsXaTest.xml (original)
+++ camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/sql/FromJmsToJdbcIdempotentConsumerToJmsXaTest.xml Fri Jan  6 20:53:50 2012
@@ -18,10 +18,12 @@
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:camel="http://camel.apache.org/schema/spring"
        xmlns:broker="http://activemq.apache.org/schema/core"
+       xmlns:jdbc="http://www.springframework.org/schema/jdbc"
        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/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd
            http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core-5.5.0.xsd">
 
     <!-- jdbc idempotent repository -->
@@ -87,23 +89,18 @@
             <broker:transportConnector uri="tcp://localhost:61616"/>
         </broker:transportConnectors>
     </broker:broker>
-
-    <!-- define the datasource to the database - in this example we use an in memory database using HSQLDB -->
-    <!-- HSQLDB is not XA compatible so we wrap that using a special Atomikos NonXA to XA DataSource -->
-    <bean id="myDataSource" class="com.atomikos.jdbc.nonxa.AtomikosNonXADataSourceBean" destroy-method="close">
-        <property name="uniqueResourceName" value="hsqldb"/>
-        <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
-        <property name="url" value="jdbc:hsqldb:mem:mydatabase"/>
-        <property name="user" value="sa"/>
-        <property name="password" value=""/>
-        <property name="poolSize" value="3"/>
-    </bean>
-
+    
     <!-- datasource used to create the database tables -->
-    <bean id="myNonXADataSource" class="org.springframework.jdbc.datasource.SingleConnectionDataSource" destroy-method="destroy">
-        <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
-        <property name="url" value="jdbc:hsqldb:mem:mydatabase"/>
-        <property name="username" value="sa"/>
+    <jdbc:embedded-database id="myNonXADataSource" type="DERBY">
+    	<jdbc:script location="classpath:sql/init.sql" />
+    </jdbc:embedded-database>
+
+    <!-- define the datasource to the database - in this example we use an in memory database using Derby -->
+    <bean id="myDataSource" class="org.apache.derby.jdbc.EmbeddedXADataSource" depends-on="myNonXADataSource">
+        <property name="databaseName" value="testdb"/>
+        <property name="createDatabase" value="true"/>
+        <property name="shutdownDatabase" value="true"/>
+        <property name="user" value="sa"/>
         <property name="password" value=""/>
     </bean>
 </beans>
\ No newline at end of file

Added: camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/sql/init.sql
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/sql/init.sql?rev=1228396&view=auto
==============================================================================
--- camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/sql/init.sql (added)
+++ camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/sql/init.sql Fri Jan  6 20:53:50 2012
@@ -0,0 +1,18 @@
+-- ------------------------------------------------------------------------
+-- 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.
+-- ------------------------------------------------------------------------
+
+create table ProcessedPayments (paymentIdentifier varchar(24));
\ No newline at end of file

Added: camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/sql/init2.sql
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/sql/init2.sql?rev=1228396&view=auto
==============================================================================
--- camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/sql/init2.sql (added)
+++ camel/branches/camel-2.9.x/tests/camel-itest/src/test/resources/sql/init2.sql Fri Jan  6 20:53:50 2012
@@ -0,0 +1,18 @@
+-- ------------------------------------------------------------------------
+-- 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.
+-- ------------------------------------------------------------------------
+
+CREATE TABLE CAMEL_MESSAGEPROCESSED (processorName VARCHAR(20), messageId VARCHAR(10));
\ No newline at end of file