camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmuel...@apache.org
Subject svn commit: r1345743 - in /camel/trunk/examples/camel-example-etl: ./ src/profiles/eclipselink/META-INF/ src/profiles/eclipselink/META-INF/spring/ src/profiles/hibernate/META-INF/ src/profiles/hibernate/META-INF/spring/ src/profiles/openjpa/META-INF/ s...
Date Sun, 03 Jun 2012 19:00:48 GMT
Author: cmueller
Date: Sun Jun  3 19:00:47 2012
New Revision: 1345743

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

Modified:
    camel/trunk/examples/camel-example-etl/pom.xml
    camel/trunk/examples/camel-example-etl/src/profiles/eclipselink/META-INF/persistence.xml
    camel/trunk/examples/camel-example-etl/src/profiles/eclipselink/META-INF/spring/camel-context.xml
    camel/trunk/examples/camel-example-etl/src/profiles/hibernate/META-INF/persistence.xml
    camel/trunk/examples/camel-example-etl/src/profiles/hibernate/META-INF/spring/camel-context.xml
    camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/persistence.xml
    camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/spring/camel-context.xml

Modified: camel/trunk/examples/camel-example-etl/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-etl/pom.xml?rev=1345743&r1=1345742&r2=1345743&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-etl/pom.xml (original)
+++ camel/trunk/examples/camel-example-etl/pom.xml Sun Jun  3 19:00:47 2012
@@ -58,6 +58,10 @@
       <groupId>org.springframework</groupId>
       <artifactId>spring-aop</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.apache.geronimo.specs</groupId>
+      <artifactId>geronimo-jpa_2.0_spec</artifactId>
+    </dependency>
 
     <!-- lets use log4j -->
     <dependency>
@@ -70,8 +74,8 @@
     </dependency>
 
     <dependency>
-      <groupId>org.hsqldb</groupId>
-      <artifactId>hsqldb</artifactId>
+      <groupId>org.apache.derby</groupId>
+      <artifactId>derby</artifactId>
     </dependency>
     <dependency>
       <groupId>org.apache.geronimo.specs</groupId>
@@ -151,9 +155,7 @@
       <id>hibernate</id>
       <properties>
         <camel.osgi.import.additional>
-          org.hsqldb,
-          org.hsqldb.util,
-          org.hsqldb.jdbc,
+          org.apache.derby.*,
           org.hibernate.ejb
         </camel.osgi.import.additional>
       </properties>
@@ -229,9 +231,7 @@
       </build>
       <properties>
         <camel.osgi.import.additional>
-          org.hsqldb,
-          org.hsqldb.util,
-          org.hsqldb.jdbc
+          org.apache.derby.*
         </camel.osgi.import.additional>
       </properties>
       <dependencies>
@@ -258,46 +258,20 @@
       </build>
       <properties>
         <camel.osgi.import.additional>
-          org.hsqldb,
-          org.hsqldb.util,
-          org.hsqldb.jdbc
+          org.apache.derby.*
         </camel.osgi.import.additional>
       </properties>
       <dependencies>
         <dependency>
           <groupId>org.eclipse.persistence</groupId>
-          <artifactId>javax.persistence</artifactId>
-          <version>1.2.0</version>
-        </dependency>
-        <dependency>
-          <groupId>org.eclipse.persistence</groupId>
-          <artifactId>org.eclipse.persistence.antlr</artifactId>
-          <version>1.2.0</version>
-        </dependency>
-        <dependency>
-          <groupId>org.eclipse.persistence</groupId>
-          <artifactId>org.eclipse.persistence.asm</artifactId>
-          <version>1.2.0</version>
-        </dependency>
-        <dependency>
-          <groupId>org.eclipse.persistence</groupId>
-          <artifactId>org.eclipse.persistence.core</artifactId>
-          <version>1.2.0</version>
-        </dependency>
-        <dependency>
-          <groupId>org.eclipse.persistence</groupId>
-          <artifactId>org.eclipse.persistence.jpa</artifactId>
-          <version>1.2.0</version>
-        </dependency>
-        <dependency>
-          <groupId>org.hsqldb</groupId>
-          <artifactId>hsqldb</artifactId>
+          <artifactId>eclipselink</artifactId>
+          <version>2.3.2</version>
         </dependency>
       </dependencies>
       <repositories>
         <repository>
           <id>Eclipse</id>
-          <url>http://eclipse.ialto.org/rt/eclipselink/maven.repo</url>
+          <url>http://www.eclipse.org/downloads/download.php?r=1&amp;nf=1&amp;file=/rt/eclipselink/maven.repo</url>
         </repository>
       </repositories>
     </profile>

Modified: camel/trunk/examples/camel-example-etl/src/profiles/eclipselink/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-etl/src/profiles/eclipselink/META-INF/persistence.xml?rev=1345743&r1=1345742&r2=1345743&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-etl/src/profiles/eclipselink/META-INF/persistence.xml
(original)
+++ camel/trunk/examples/camel-example-etl/src/profiles/eclipselink/META-INF/persistence.xml
Sun Jun  3 19:00:47 2012
@@ -17,10 +17,10 @@
 		<class>org.apache.camel.example.etl.CustomerEntity</class>
 
 		<properties>
-			<property name="javax.persistence.jdbc.driver" value="org.hsqldb.jdbcDriver" />
+			<property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver"
/>
+			<property name="javax.persistence.jdbc.url" value="jdbc:derby:target/derby;create=true"
/>
 			<property name="javax.persistence.jdbc.user" value="sa" />
 			<property name="javax.persistence.jdbc.password" value="" />
-			<property name="javax.persistence.jdbc.url" value="jdbc:hsqldb:mem:camel_etl" />
             <!-- property name="eclipselink.logging.file" value="target/camel-example-etl.log"
/>
 			<property name="eclipselink.logging.level" value="FINE" /-->
 			<property name="eclipselink.ddl-generation" value="drop-and-create-tables" />

Modified: camel/trunk/examples/camel-example-etl/src/profiles/eclipselink/META-INF/spring/camel-context.xml
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-etl/src/profiles/eclipselink/META-INF/spring/camel-context.xml?rev=1345743&r1=1345742&r2=1345743&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-etl/src/profiles/eclipselink/META-INF/spring/camel-context.xml
(original)
+++ camel/trunk/examples/camel-example-etl/src/profiles/eclipselink/META-INF/spring/camel-context.xml
Sun Jun  3 19:00:47 2012
@@ -15,12 +15,11 @@
 		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"
+	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">
+       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">
 
 	<camel:camelContext id="camel" trace="true" xmlns="http://camel.apache.org/schema/spring">
 		<camel:package>org.apache.camel.example.etl</camel:package>
@@ -31,8 +30,7 @@
 		<property name="entityManagerFactory" ref="entityManagerFactory" />
 	</bean>
 
-	<bean id="transactionTemplate"
-		class="org.springframework.transaction.support.TransactionTemplate">
+	<bean id="transactionTemplate" class="org.springframework.transaction.support.TransactionTemplate">
 		<property name="transactionManager">
 			<bean class="org.springframework.orm.jpa.JpaTransactionManager">
 				<property name="entityManagerFactory" ref="entityManagerFactory" />
@@ -44,32 +42,13 @@
 		<property name="entityManagerFactory" ref="entityManagerFactory" />
 	</bean>
 
-	<bean id="entityManagerFactory"
-		class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
+	<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
 		<property name="persistenceUnitName" value="camel" />
 		<property name="jpaVendorAdapter" ref="jpaAdapter" />
 	</bean>
 
-	<!-- EclipseLink addapter -->
 	<bean id="jpaAdapter" class="org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter">
-		<property name="databasePlatform" value="org.eclipse.persistence.platform.database.HSQLPlatform"
/>
-		<property name="database" value="HSQL" />
+		<property name="databasePlatform" value="org.eclipse.persistence.platform.database.DerbyPlatform"
/>
+		<property name="database" value="DERBY" />
 	</bean>
-
-
-    <!-- This bean will cause OSGi server exit, so we disable it here -->
-	<!-- lets 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_etl</value>
-			</list>
-		</property>
-		<property name="delay" value="3000" />
-	</bean>
-    -->
-
 </beans>
\ No newline at end of file

Modified: camel/trunk/examples/camel-example-etl/src/profiles/hibernate/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-etl/src/profiles/hibernate/META-INF/persistence.xml?rev=1345743&r1=1345742&r2=1345743&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-etl/src/profiles/hibernate/META-INF/persistence.xml
(original)
+++ camel/trunk/examples/camel-example-etl/src/profiles/hibernate/META-INF/persistence.xml
Sun Jun  3 19:00:47 2012
@@ -16,11 +16,11 @@
 	<persistence-unit name="camel" transaction-type="RESOURCE_LOCAL">
 		<class>org.apache.camel.example.etl.CustomerEntity</class>
 		
-		<!-- Hibernate -->
 		<properties>
-			<property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
+			<property name="hibernate.dialect" value="org.hibernate.dialect.DerbyDialect"/>
+			<property name="hibernate.connection.driver_class" value="org.apache.derby.jdbc.EmbeddedDriver"/>
+			<property name="hibernate.connection.url" value="jdbc:derby:target/derby;create=true"/>
 			<property name="hibernate.hbm2ddl.auto" value="create"/>
 		</properties>
-
 	</persistence-unit>
 </persistence>

Modified: camel/trunk/examples/camel-example-etl/src/profiles/hibernate/META-INF/spring/camel-context.xml
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-etl/src/profiles/hibernate/META-INF/spring/camel-context.xml?rev=1345743&r1=1345742&r2=1345743&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-etl/src/profiles/hibernate/META-INF/spring/camel-context.xml
(original)
+++ camel/trunk/examples/camel-example-etl/src/profiles/hibernate/META-INF/spring/camel-context.xml
Sun Jun  3 19:00:47 2012
@@ -24,14 +24,15 @@
  -->
 
 <beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:camel="http://camel.apache.org/schema/spring"
        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">
-    <package>org.apache.camel.example.etl</package>
-  </camelContext>
+  <camel:camelContext id="camel" trace="true">
+    <camel:package>org.apache.camel.example.etl</camel:package>
+  </camel:camelContext>
 
    <!--  Added for OSGI platform to allow -->
   <bean id="jpa" class="org.apache.camel.component.jpa.JpaComponent">
@@ -53,34 +54,9 @@
    <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
     <property name="persistenceUnitName" value="camel"/>
     <property name="jpaVendorAdapter" ref="jpaAdapter"/>
-    <property name="dataSource" ref="dataSource" />
   </bean>
   
-  <bean id="jpaAdapter"
-        class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
-        <property name="databasePlatform" value="org.hibernate.dialect.HSQLDialect" />
+  <bean id="jpaAdapter" class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
+        <property name="databasePlatform" value="org.hibernate.dialect.DerbyDialect" />
   </bean>
-  
-  <!--  DataSource Definition -->
-  <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
-        <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
-        <property name="url" value="jdbc:hsqldb:mem:camel_etl" />
-        <property name="username" value="sa" />
-        <property name="password" value="" />
-  </bean>
-
-  <!-- lets show a simple UI to browse the database, url should be - -url without the
space -->
-  <!-- This bean will cause OSGi server exit, so we disable it here -->
-  <!--
-  <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_etl</value>
-      </list>
-    </property>
-    <property name="delay" value="1000"/>
-  </bean>
-  -->
-</beans>
+</beans>
\ No newline at end of file

Modified: camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/persistence.xml?rev=1345743&r1=1345742&r2=1345743&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/persistence.xml (original)
+++ camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/persistence.xml Sun
Jun  3 19:00:47 2012
@@ -16,36 +16,12 @@
 	<persistence-unit name="camel" transaction-type="RESOURCE_LOCAL">
 		<class>org.apache.camel.example.etl.CustomerEntity</class>
 
-		<!-- Hibernate properties 
-		<properties>
-			<property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect" />
-			<property name="hibernate.hbm2ddl.auto" value="create" />
-		</properties>
-        -->
-
-		<!--  OpenJPA & HSQL -->
-		<properties>
-			<property name="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" />
-			<property name="openjpa.ConnectionURL" value="jdbc:hsqldb:mem:camel_etl" />
-			<property name="openjpa.ConnectionUserName" value="sa" />
-			<property name="openjpa.ConnectionPassword" value="" />
-			<property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema" />
-			<property name="openjpa.Log" value="commons" />
-				<!--  value="DefaultLevel=INFO, Runtime=TRACE, Tool=INFO, SQL=TRACE" /> -->
-			<property name="openjpa.ConnectionFactoryProperties" value="PrettyPrint=true, PrettyPrintLineLength=72"
/>
-		</properties>
-
-		<!-- OpenJPA & Derby 
 		<properties>
 			<property name="openjpa.ConnectionURL" value="jdbc:derby:target/derby;create=true"
/>
 			<property name="openjpa.ConnectionDriverName" value="org.apache.derby.jdbc.EmbeddedDriver"
/>
 			<property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema" />
-			<property name="openjpa.Log"
-				value="DefaultLevel=INFO, Runtime=TRACE, Tool=INFO, SQL=TRACE" />
+			<property name="openjpa.Log" value="DefaultLevel=INFO, Runtime=TRACE, Tool=INFO, SQL=TRACE"
/>
 			<property name="openjpa.ConnectionFactoryProperties" value="PrettyPrint=true, PrettyPrintLineLength=72"
/>
 		</properties>
-        -->
-
-
 	</persistence-unit>
 </persistence>

Modified: camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/spring/camel-context.xml
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/spring/camel-context.xml?rev=1345743&r1=1345742&r2=1345743&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/spring/camel-context.xml
(original)
+++ camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/spring/camel-context.xml
Sun Jun  3 19:00:47 2012
@@ -22,8 +22,7 @@
        http://camel.apache.org/schema/spring
        http://camel.apache.org/schema/spring/camel-spring.xsd">
 
-	<camel:camelContext id="camel" trace="true"
-		xmlns="http://camel.apache.org/schema/spring">
+	<camel:camelContext id="camel" trace="true" xmlns="http://camel.apache.org/schema/spring">
 		<camel:package>org.apache.camel.example.etl</camel:package>
 	</camel:camelContext>
 
@@ -32,8 +31,7 @@
 		<property name="entityManagerFactory" ref="entityManagerFactory" />
 	</bean>
 
-	<bean id="transactionTemplate"
-		class="org.springframework.transaction.support.TransactionTemplate">
+	<bean id="transactionTemplate" class="org.springframework.transaction.support.TransactionTemplate">
 		<property name="transactionManager">
 			<bean class="org.springframework.orm.jpa.JpaTransactionManager">
 				<property name="entityManagerFactory" ref="entityManagerFactory" />
@@ -45,39 +43,13 @@
 		<property name="entityManagerFactory" ref="entityManagerFactory" />
 	</bean>
 
-	<bean id="entityManagerFactory"
-		class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
+	<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
 		<property name="persistenceUnitName" value="camel" />
 		<property name="jpaVendorAdapter" ref="jpaAdapter" />
 	</bean>
 
-	<!--
-		Hibernate addapter <bean id="jpaAdapter"
-		class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
-		<property name="databasePlatform"
-		value="org.hibernate.dialect.HSQLDialect" /> </bean>
-	-->
-
-	<!-- OpenJPA addapter -->
 	<bean id="jpaAdapter" class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter">
-		<property name="databasePlatform" value="org.apache.openjpa.jdbc.sql.HSQLDictionary"
/>
-		<property name="database" value="HSQL" />
-	</bean>
-
-
-    <!-- This bean will cause OSGi server exit, so we disable it here -->
-	<!-- lets 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_etl</value>
-			</list>
-		</property>
-		<property name="delay" value="3000" />
+		<property name="databasePlatform" value="org.apache.openjpa.jdbc.sql.DerbyDictionary"
/>
+		<property name="database" value="DERBY" />
 	</bean>
-    -->
 </beans>
\ No newline at end of file



Mime
View raw message