openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mprud...@apache.org
Subject svn commit: r496880 - in /incubator/openjpa/trunk: ./ openjpa-persistence-jdbc/ openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/meta/ openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/kernel/ openjpa-persistence-jdbc/src/test/jav...
Date Tue, 16 Jan 2007 22:26:05 GMT
Author: mprudhom
Date: Tue Jan 16 14:26:04 2007
New Revision: 496880

URL: http://svn.apache.org/viewvc?view=rev&rev=496880
Log:
Added 'openjpa.loglevel' property to build which allows one to control the verbosity of logging
via the system property. Also added various profiles for testing different databases (test-derby,
test-hsqldb, test-mysql, test-postgresql, test-sqlserver, test-sybase, and test-custom)

Modified:
    incubator/openjpa/trunk/openjpa-persistence-jdbc/pom.xml
    incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/meta/TestMappingToolAutoDelete.java
    incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/kernel/TestQueryCompilationCache.java
    incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestDataCacheOptimisticLockRecovery.java
    incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestAttachWithNoChanges.java
    incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachmentOneMany.java
    incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestGenerationType.java
    incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestMultipleMappedSuperclassHierarchy.java
    incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestAbstractSchemaName.java
    incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestInMemoryQueryMatchEscapes.java
    incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestQueryExcludingSubclasses.java
    incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestQueryIdOfRelationDoesNotJoin.java
    incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/relations/TestCascadingOneManyWithForeignKey.java
    incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/relations/TestManyOneAsId.java
    incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/relations/TestMultipleSameTypedEmbeddedWithEagerRelations.java
    incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/relations/TestTargetedIFaceRelations.java
    incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/simple/TestPersistence.java
    incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/persistence.xml
    incubator/openjpa/trunk/pom.xml

Modified: incubator/openjpa/trunk/openjpa-persistence-jdbc/pom.xml
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/pom.xml?view=diff&rev=496880&r1=496879&r2=496880
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/pom.xml (original)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/pom.xml Tue Jan 16 14:26:04 2007
@@ -29,6 +29,291 @@
         <artifactId>openjpa</artifactId>
         <version>0.9.7-incubating-SNAPSHOT</version>
     </parent>
+
+    <properties>
+        <openjpa.loglevel>INFO</openjpa.loglevel>
+    </properties>
+
+    <profiles>
+        <!-- Profile for testing with Apache Derby -->
+        <profile>
+            <id>test-derby</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+                <property><name>test-derby</name></property>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>org.apache.derby</groupId>
+                    <artifactId>derby</artifactId>
+                    <version>10.2.1.6</version>
+                    <scope>test</scope>
+                </dependency>
+            </dependencies>
+
+            <build>
+                <pluginManagement>
+                    <plugins>
+                        <plugin>
+                            <groupId>org.apache.maven.plugins</groupId>
+                            <artifactId>maven-surefire-plugin</artifactId>
+                            <configuration>
+                                <systemProperties>
+                                    <property>
+                                        <name>openjpa.Log</name>
+                                        <value>DefaultLevel=${openjpa.loglevel}</value>
+                                    </property>
+                                    <property>
+                                        <name>openjpa.ConnectionDriverName</name>
+                                        <value>org.apache.commons.dbcp.BasicDataSource</value>
+                                    </property>
+                                    <property>
+                                        <name>openjpa.ConnectionProperties</name>
+                                        <value>DriverClassName=org.apache.derby.jdbc.EmbeddedDriver,Url=jdbc:derby:target/database/openjpa-derby-database;create=true,MaxActive=100,MaxWait=10000,TestOnBorrow=true</value>
+                                    </property>
+                                </systemProperties>
+                            </configuration>
+                        </plugin>
+                    </plugins>
+                </pluginManagement>
+            </build>
+        </profile>
+
+
+        <!-- Profile for testing with HSQL DB -->
+        <profile>
+            <id>test-hsqldb</id>
+            <activation><property><name>test-hsqldb</name></property></activation>
+            <dependencies>
+                <dependency>
+                    <groupId>hsqldb</groupId>
+                    <artifactId>hsqldb</artifactId>
+                    <version>1.8.0.7</version>
+                    <scope>test</scope>
+                </dependency>
+            </dependencies>
+            <build>
+                <pluginManagement>
+                    <plugins>
+                        <plugin>
+                            <groupId>org.apache.maven.plugins</groupId>
+                            <artifactId>maven-surefire-plugin</artifactId>
+                            <configuration>
+                                <systemProperties>
+                                    <property>
+                                        <name>openjpa.ConnectionDriverName</name>
+                                        <value>org.apache.commons.dbcp.BasicDataSource</value>
+                                    </property>
+                                    <property>
+                                        <name>openjpa.ConnectionProperties</name>
+                                        <value>DriverClassName=org.hsqldb.jdbcDriver,Url=jdbc:hsqldb:target/database/openjpa-hsqldb-database;create=true,MaxActive=100,MaxWait=10000,TestOnBorrow=true</value>
+                                    </property>
+                                </systemProperties>
+                            </configuration>
+                        </plugin>
+                    </plugins>
+                </pluginManagement>
+            </build>
+        </profile>
+
+
+        <!-- Profile for testing with MySQL DB -->
+        <profile>
+            <id>test-mysql</id>
+            <activation><property><name>test-mysql</name></property></activation>
+            <dependencies>
+                <dependency>
+                    <groupId>mysql</groupId>
+                    <artifactId>mysql-connector-java</artifactId>
+                    <version>5.0.4</version>
+                    <scope>test</scope>
+                </dependency>
+            </dependencies>
+            <build>
+                <pluginManagement>
+                    <plugins>
+                        <plugin>
+                            <groupId>org.apache.maven.plugins</groupId>
+                            <artifactId>maven-surefire-plugin</artifactId>
+                            <configuration>
+                                <systemProperties>
+                                    <property>
+                                        <name>openjpa.ConnectionDriverName</name>
+                                        <value>org.apache.commons.dbcp.BasicDataSource</value>
+                                    </property>
+                                    <property>
+                                        <name>openjpa.ConnectionProperties</name>
+                                        <value>DriverClassName=com.mysql.jdbc.Driver,Url=${openjpa.mysql.url},MaxActive=100,MaxWait=10000,TestOnBorrow=true,Username=${openjpa.mysql.username},Password=${openjpa.mysql.password}</value>
+                                    </property>
+                                </systemProperties>
+                            </configuration>
+                        </plugin>
+                    </plugins>
+                </pluginManagement>
+            </build>
+        </profile>
+
+
+        <!-- Profile for testing with PostgreSQL DB -->
+        <profile>
+            <id>test-postgresql</id>
+            <activation><property><name>test-postgresql</name></property></activation>
+            <dependencies>
+                <dependency>
+                    <groupId>postgresql</groupId>
+                    <artifactId>postgresql</artifactId>
+                    <version>8.1-407.jdbc3</version>
+                    <scope>test</scope>
+                </dependency>
+            </dependencies>
+            <build>
+                <pluginManagement>
+                    <plugins>
+                        <plugin>
+                            <groupId>org.apache.maven.plugins</groupId>
+                            <artifactId>maven-surefire-plugin</artifactId>
+                            <configuration>
+                                <systemProperties>
+                                    <property>
+                                        <name>openjpa.ConnectionDriverName</name>
+                                        <value>org.apache.commons.dbcp.BasicDataSource</value>
+                                    </property>
+                                    <property>
+                                        <name>openjpa.ConnectionProperties</name>
+                                        <value>DriverClassName=org.postgresql.Driver,Url=${openjpa.postgresql.url},MaxActive=100,MaxWait=10000,TestOnBorrow=true,Username=${openjpa.postgresql.username},Password=${openjpa.postgresql.password}</value>
+                                    </property>
+                                </systemProperties>
+                            </configuration>
+                        </plugin>
+                    </plugins>
+                </pluginManagement>
+            </build>
+        </profile>
+
+
+        <!-- Profile for testing with SQLServer DB using the jTDS driver -->
+        <profile>
+            <id>test-sqlserver</id>
+            <activation><property><name>test-sqlserver</name></property></activation>
+            <dependencies>
+                <dependency>
+                    <groupId>net.sourceforge.jtds</groupId>
+                    <artifactId>jtds</artifactId>
+                    <version>1.2</version>
+                    <scope>test</scope>
+                </dependency>
+            </dependencies>
+            <build>
+                <pluginManagement>
+                    <plugins>
+                        <plugin>
+                            <groupId>org.apache.maven.plugins</groupId>
+                            <artifactId>maven-surefire-plugin</artifactId>
+                            <configuration>
+                                <systemProperties>
+                                    <property>
+                                        <name>openjpa.ConnectionDriverName</name>
+                                        <value>org.apache.commons.dbcp.BasicDataSource</value>
+                                    </property>
+                                    <property>
+                                        <name>openjpa.ConnectionProperties</name>
+                                        <value>DriverClassName=net.sourceforge.jtds.jdbc.Driver,Url=${openjpa.sqlserver.url},MaxActive=100,MaxWait=10000,TestOnBorrow=true,Username=${openjpa.sqlserver.username},Password=${openjpa.sqlserver.password}</value>
+                                    </property>
+                                </systemProperties>
+                            </configuration>
+                        </plugin>
+                    </plugins>
+                </pluginManagement>
+            </build>
+        </profile>
+
+
+        <!-- Profile for testing with Sybase DB using the jTDS driver -->
+        <profile>
+            <id>test-sybase</id>
+            <activation><property><name>test-sybase</name></property></activation>
+            <dependencies>
+                <dependency>
+                    <groupId>net.sourceforge.jtds</groupId>
+                    <artifactId>jtds</artifactId>
+                    <version>1.2</version>
+                    <scope>test</scope>
+                </dependency>
+            </dependencies>
+            <build>
+                <pluginManagement>
+                    <plugins>
+                        <plugin>
+                            <groupId>org.apache.maven.plugins</groupId>
+                            <artifactId>maven-surefire-plugin</artifactId>
+                            <configuration>
+                                <systemProperties>
+                                    <property>
+                                        <name>openjpa.ConnectionDriverName</name>
+                                        <value>org.apache.commons.dbcp.BasicDataSource</value>
+                                    </property>
+                                    <property>
+                                        <name>openjpa.ConnectionProperties</name>
+                                        <value>DriverClassName=net.sourceforge.jtds.jdbc.Driver,Url=${openjpa.sybase.url},MaxActive=100,MaxWait=10000,TestOnBorrow=true,Username=${openjpa.sybase.username},Password=${openjpa.sybase.password}</value>
+                                    </property>
+                                </systemProperties>
+                            </configuration>
+                        </plugin>
+                    </plugins>
+                </pluginManagement>
+            </build>
+        </profile>
+
+        <!-- Profile for testing with a custom DB using a system jar -->
+        <!--
+            For example, to test with Oracle, you might run:
+        mvn test -Dtest=TestPersistence -Ptest-custom \
+          -Dopenjpa.custom.driverjar=$(pwd)/drivers/jdbc-oracle-10_2_0_1_0.jar \
+          -Dopenjpa.custom.driverclass=oracle.jdbc.driver.OracleDriver \
+          -Dopenjpa.custom.url=jdbc:oracle:thin:@HOST:PORT:DBNAME \
+          -Dopenjpa.custom.username=USERNAME \
+          -Dopenjpa.custom.password=PASSWORD
+        -->
+        <profile>
+            <id>test-custom</id>
+            <activation><property><name>test-custom</name></property></activation>
+            <dependencies>
+                <dependency>
+                    <groupId>openjpa.customdriver</groupId>
+                    <artifactId>openjpa.customdriver</artifactId>
+                    <version>1.0</version>
+                    <scope>system</scope>
+                    <systemPath>${openjpa.custom.driverjar}</systemPath>
+                </dependency>
+            </dependencies>
+            <build>
+                <pluginManagement>
+                    <plugins>
+                        <plugin>
+                            <groupId>org.apache.maven.plugins</groupId>
+                            <artifactId>maven-surefire-plugin</artifactId>
+                            <configuration>
+                                <systemProperties>
+                                    <property>
+                                        <name>openjpa.ConnectionDriverName</name>
+                                        <value>org.apache.commons.dbcp.BasicDataSource</value>
+                                    </property>
+                                    <property>
+                                        <name>openjpa.ConnectionProperties</name>
+                                        <value>DriverClassName=${openjpa.custom.driverclass},Url=${openjpa.custom.url},MaxActive=100,MaxWait=10000,TestOnBorrow=true,Username=${openjpa.custom.username},Password=${openjpa.custom.password}</value>
+                                    </property>
+                                </systemProperties>
+                            </configuration>
+                        </plugin>
+                    </plugins>
+                </pluginManagement>
+            </build>
+        </profile>
+
+    </profiles>
+
+
+
     <dependencies>
         <dependency>
             <groupId>org.apache.openjpa</groupId>
@@ -41,12 +326,6 @@
             <artifactId>openjpa-persistence</artifactId>
             <version>${pom.version}</version>
             <scope>compile</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.derby</groupId>
-            <artifactId>derby</artifactId>
-            <version>10.2.1.6</version>
-            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>commons-dbcp</groupId>

Modified: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/meta/TestMappingToolAutoDelete.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/meta/TestMappingToolAutoDelete.java?view=diff&rev=496880&r1=496879&r2=496880
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/meta/TestMappingToolAutoDelete.java
(original)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/meta/TestMappingToolAutoDelete.java
Tue Jan 16 14:26:04 2007
@@ -24,7 +24,7 @@
     private OpenJPAEntityManagerFactory emf;
 
     public void setUp() {
-        Map props = new HashMap();
+        Map props = new HashMap(System.getProperties());
         props.put("openjpa.MetaDataFactory",
             "jpa(Types=" + AllFieldTypes.class.getName() + ")");
         emf = OpenJPAPersistence.cast( 

Modified: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/kernel/TestQueryCompilationCache.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/kernel/TestQueryCompilationCache.java?view=diff&rev=496880&r1=496879&r2=496880
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/kernel/TestQueryCompilationCache.java
(original)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/kernel/TestQueryCompilationCache.java
Tue Jan 16 14:26:04 2007
@@ -35,7 +35,7 @@
     extends TestCase {
     
     public void testDynamicJPQLWithNamedEntity() {
-        Map props = new HashMap();
+        Map props = new HashMap(System.getProperties());
         props.put("openjpa.MetaDataFactory", "jpa(Types=" 
             + NamedEntity.class.getName() + ")");
         OpenJPAEntityManagerFactory emf = OpenJPAPersistence.cast(

Modified: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestDataCacheOptimisticLockRecovery.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestDataCacheOptimisticLockRecovery.java?view=diff&rev=496880&r1=496879&r2=496880
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestDataCacheOptimisticLockRecovery.java
(original)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestDataCacheOptimisticLockRecovery.java
Tue Jan 16 14:26:04 2007
@@ -38,7 +38,7 @@
     private int pk;
 
     public void setUp() {
-        Map options = new HashMap();
+        Map options = new HashMap(System.getProperties());
 
         // turn on caching
         options.put("openjpa.DataCache", "true");

Modified: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestAttachWithNoChanges.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestAttachWithNoChanges.java?view=diff&rev=496880&r1=496879&r2=496880
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestAttachWithNoChanges.java
(original)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestAttachWithNoChanges.java
Tue Jan 16 14:26:04 2007
@@ -39,7 +39,7 @@
     public void setUp() {
         String types = DetachmentOneManyParent.class.getName() + ";"
             + DetachmentOneManyChild.class.getName(); 
-        Map props = new HashMap();
+        Map props = new HashMap(System.getProperties());
         props.put("openjpa.MetaDataFactory", "jpa(Types=" + types + ")");
         emf = Persistence.createEntityManagerFactory("test", props);
     }

Modified: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachmentOneMany.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachmentOneMany.java?view=diff&rev=496880&r1=496879&r2=496880
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachmentOneMany.java
(original)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachmentOneMany.java
Tue Jan 16 14:26:04 2007
@@ -40,7 +40,7 @@
     public void setUp() {
         String types = DetachmentOneManyParent.class.getName() + ";"
             + DetachmentOneManyChild.class.getName(); 
-        Map props = new HashMap();
+        Map props = new HashMap(System.getProperties());
         props.put("openjpa.MetaDataFactory", "jpa(Types=" + types + ")");
         emf = (OpenJPAEntityManagerFactory) Persistence.
             createEntityManagerFactory("test", props);

Modified: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestGenerationType.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestGenerationType.java?view=diff&rev=496880&r1=496879&r2=496880
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestGenerationType.java
(original)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestGenerationType.java
Tue Jan 16 14:26:04 2007
@@ -41,7 +41,7 @@
     private OpenJPAEntityManagerFactory emf;
 
     public void setUp() {
-        Map props = new HashMap();
+        Map props = new HashMap(System.getProperties());
         props.put("openjpa.MetaDataFactory",
             "jpa(Types=" + IdentityGenerationType.class.getName() + ")");
         emf = (OpenJPAEntityManagerFactory) Persistence.

Modified: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestMultipleMappedSuperclassHierarchy.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestMultipleMappedSuperclassHierarchy.java?view=diff&rev=496880&r1=496879&r2=496880
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestMultipleMappedSuperclassHierarchy.java
(original)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestMultipleMappedSuperclassHierarchy.java
Tue Jan 16 14:26:04 2007
@@ -39,7 +39,7 @@
         String types = MappedSuperclassBase.class.getName() + ";"
             + MappedSuperclassL2.class.getName() + ";"
             + EntityL3.class.getName();
-        Map props = new HashMap();
+        Map props = new HashMap(System.getProperties());
         props.put("openjpa.MetaDataFactory", "jpa(Types=" + types + ")");
         emf = Persistence.createEntityManagerFactory("test", props);
     }

Modified: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestAbstractSchemaName.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestAbstractSchemaName.java?view=diff&rev=496880&r1=496879&r2=496880
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestAbstractSchemaName.java
(original)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestAbstractSchemaName.java
Tue Jan 16 14:26:04 2007
@@ -36,7 +36,7 @@
     private EntityManagerFactory emf;
 
     public void setUp() {
-        Map props = new HashMap();
+        Map props = new HashMap(System.getProperties());
         props.put("openjpa.MetaDataFactory", "jpa(Types=" 
             + NamedEntity.class.getName() + ")");
         emf = Persistence.createEntityManagerFactory("test", props);

Modified: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestInMemoryQueryMatchEscapes.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestInMemoryQueryMatchEscapes.java?view=diff&rev=496880&r1=496879&r2=496880
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestInMemoryQueryMatchEscapes.java
(original)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestInMemoryQueryMatchEscapes.java
Tue Jan 16 14:26:04 2007
@@ -34,7 +34,7 @@
     private EntityManagerFactory emf;
 
     public void setUp() {
-        Map options = new HashMap();
+        Map options = new HashMap(System.getProperties());
 
         // ensure that OpenJPA knows about our type, so that 
         // auto-schema-creation works

Modified: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestQueryExcludingSubclasses.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestQueryExcludingSubclasses.java?view=diff&rev=496880&r1=496879&r2=496880
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestQueryExcludingSubclasses.java
(original)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestQueryExcludingSubclasses.java
Tue Jan 16 14:26:04 2007
@@ -38,7 +38,7 @@
     private EntityManagerFactory emf;
 
     public void setUp() {
-        Map props = new HashMap();
+        Map props = new HashMap(System.getProperties());
         props.put("openjpa.MetaDataFactory", "jpa(Types=" 
             + ManyOneEntity.class.getName() + ";"
             + ManyOneEntitySub.class.getName() + ")");

Modified: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestQueryIdOfRelationDoesNotJoin.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestQueryIdOfRelationDoesNotJoin.java?view=diff&rev=496880&r1=496879&r2=496880
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestQueryIdOfRelationDoesNotJoin.java
(original)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestQueryIdOfRelationDoesNotJoin.java
Tue Jan 16 14:26:04 2007
@@ -39,7 +39,7 @@
     private long e3Id;
 
     public void setUp() {
-        Map props = new HashMap();
+        Map props = new HashMap(System.getProperties());
         props.put("openjpa.MetaDataFactory", "jpa(Types="
                 + ManyOneEntity.class.getName() + ";"
                 + ManyOneEntitySub.class.getName() + ")");

Modified: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/relations/TestCascadingOneManyWithForeignKey.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/relations/TestCascadingOneManyWithForeignKey.java?view=diff&rev=496880&r1=496879&r2=496880
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/relations/TestCascadingOneManyWithForeignKey.java
(original)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/relations/TestCascadingOneManyWithForeignKey.java
Tue Jan 16 14:26:04 2007
@@ -40,7 +40,7 @@
     public void setUp() {
         String types = CascadingOneManyParent.class.getName() + ";"
             + CascadingOneManyChild.class.getName(); 
-        Map props = new HashMap();
+        Map props = new HashMap(System.getProperties());
         props.put("openjpa.MetaDataFactory", "jpa(Types=" + types + ")");
         emf = (OpenJPAEntityManagerFactory) Persistence.
             createEntityManagerFactory("test", props);

Modified: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/relations/TestManyOneAsId.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/relations/TestManyOneAsId.java?view=diff&rev=496880&r1=496879&r2=496880
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/relations/TestManyOneAsId.java
(original)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/relations/TestManyOneAsId.java
Tue Jan 16 14:26:04 2007
@@ -41,7 +41,7 @@
     private long cid;
 
     public void setUp() {
-        Map props = new HashMap();
+        Map props = new HashMap(System.getProperties());
         props.put("openjpa.MetaDataFactory", "jpa(Types=" 
             + BasicEntity.class.getName() + ";"
             + DataStoreBasicEntity.class.getName() + ";"

Modified: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/relations/TestMultipleSameTypedEmbeddedWithEagerRelations.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/relations/TestMultipleSameTypedEmbeddedWithEagerRelations.java?view=diff&rev=496880&r1=496879&r2=496880
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/relations/TestMultipleSameTypedEmbeddedWithEagerRelations.java
(original)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/relations/TestMultipleSameTypedEmbeddedWithEagerRelations.java
Tue Jan 16 14:26:04 2007
@@ -38,7 +38,7 @@
     private EntityManagerFactory emf;
 
     public void setUp() {
-        Map props = new HashMap();
+        Map props = new HashMap(System.getProperties());
         props.put("openjpa.MetaDataFactory", "jpa(Types=" 
             + EmbeddableWithRelation.class.getName() + ";"
             + MultipleSameTypedEmbedded.class.getName() + ")");

Modified: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/relations/TestTargetedIFaceRelations.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/relations/TestTargetedIFaceRelations.java?view=diff&rev=496880&r1=496879&r2=496880
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/relations/TestTargetedIFaceRelations.java
(original)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/relations/TestTargetedIFaceRelations.java
Tue Jan 16 14:26:04 2007
@@ -36,7 +36,7 @@
     private EntityManagerFactory emf;
 
     public void setUp() {
-        Map props = new HashMap();
+        Map props = new HashMap(System.getProperties());
         props.put("openjpa.MetaDataFactory", "jpa(Types=" 
             + TargetedIFaceRelationParent.class.getName() + ")");
         emf = Persistence.createEntityManagerFactory("test", props);

Modified: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/simple/TestPersistence.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/simple/TestPersistence.java?view=diff&rev=496880&r1=496879&r2=496880
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/simple/TestPersistence.java
(original)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/simple/TestPersistence.java
Tue Jan 16 14:26:04 2007
@@ -37,7 +37,7 @@
     private EntityManagerFactory emf;
 
     public void setUp() {
-        Map props = new HashMap();
+        Map props = new HashMap(System.getProperties());
         props.put("openjpa.MetaDataFactory",
             "jpa(Types=" + AllFieldTypes.class.getName() + ")");
         emf = Persistence.createEntityManagerFactory("test", props);

Modified: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/persistence.xml?view=diff&rev=496880&r1=496879&r2=496880
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/persistence.xml
(original)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/persistence.xml
Tue Jan 16 14:26:04 2007
@@ -25,10 +25,14 @@
         </provider>
         -->
         <properties>
+            <!--
+            These properties are instead passed via System properties
+
             <property name="openjpa.ConnectionDriverName"
                 value="org.apache.commons.dbcp.BasicDataSource"/>
             <property name="openjpa.ConnectionProperties"
                 value="DriverClassName=org.apache.derby.jdbc.EmbeddedDriver,Url=jdbc:derby:target/database/openjpa-test-database;create=true,MaxActive=100,MaxWait=10000,TestOnBorrow=true"/>
+            -->
             <property name="openjpa.jdbc.SynchronizeMappings"
                 value="buildSchema(ForeignKeys=true)"/>
         </properties>

Modified: incubator/openjpa/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/pom.xml?view=diff&rev=496880&r1=496879&r2=496880
==============================================================================
--- incubator/openjpa/trunk/pom.xml (original)
+++ incubator/openjpa/trunk/pom.xml Tue Jan 16 14:26:04 2007
@@ -237,6 +237,7 @@
                     <artifactId>maven-surefire-plugin</artifactId>
                     <configuration>
                         <useFile>false</useFile>
+                        <trimStackTrace>false</trimStackTrace>
                     </configuration>
                 </plugin>
             </plugins>



Mime
View raw message