roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r912192 - in /roller/trunk: planet-business/src/main/java/org/apache/roller/planet/business/jpa/ planet-business/src/test/resources/ weblogger-business/src/main/java/org/apache/roller/weblogger/business/jpa/ weblogger-business/src/main/java...
Date Sat, 20 Feb 2010 19:00:12 GMT
Author: snoopdave
Date: Sat Feb 20 19:00:11 2010
New Revision: 912192

URL: http://svn.apache.org/viewvc?rev=912192&view=rev
Log:
Setting openjpa.ConnectionRetainMode to 'always' (test time only) seems to fix the bind exception
that I wrote about in my last commit. 

There are still two test problems on Windows XP to clear up and I'll get to those next.

Added:
    roller/trunk/weblogger-business/src/test/resources/commons-logging.properties
      - copied unchanged from r910003, roller/trunk/weblogger-business/src/test/resources/WEB-INF/classes/commons-logging.properties
Removed:
    roller/trunk/planet-business/src/test/resources/JPAEMF.properties
    roller/trunk/weblogger-business/src/test/resources/JPAEMF.properties
    roller/trunk/weblogger-business/src/test/resources/WEB-INF/classes/
    roller/trunk/weblogger-web/src/main/resources/JPAEMF.properties
Modified:
    roller/trunk/planet-business/src/main/java/org/apache/roller/planet/business/jpa/JPAPersistenceStrategy.java
    roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPersistenceStrategy.java
    roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/planet/business/jpa/JPARollerPlanetPersistenceStrategy.java
    roller/trunk/weblogger-business/src/test/resources/roller-custom.properties

Modified: roller/trunk/planet-business/src/main/java/org/apache/roller/planet/business/jpa/JPAPersistenceStrategy.java
URL: http://svn.apache.org/viewvc/roller/trunk/planet-business/src/main/java/org/apache/roller/planet/business/jpa/JPAPersistenceStrategy.java?rev=912192&r1=912191&r2=912192&view=diff
==============================================================================
--- roller/trunk/planet-business/src/main/java/org/apache/roller/planet/business/jpa/JPAPersistenceStrategy.java
(original)
+++ roller/trunk/planet-business/src/main/java/org/apache/roller/planet/business/jpa/JPAPersistenceStrategy.java
Sat Feb 20 19:00:11 2010
@@ -82,11 +82,8 @@
         } else {
             DatabaseProvider dbProvider = PlanetStartup.getDatabaseProvider();
 
-            // Pull in any properties defined in JMAEMF.properties config file
-            Properties emfProps = loadPropertiesFromResourceName(
-                    "JPAEMF.properties", getContextClassLoader());
-
             // Add all OpenJPA and Toplinks properties found in RollerConfig
+            Properties emfProps = new Properties();
             Enumeration keys = PlanetConfig.keys();
             while (keys.hasMoreElements()) {
                 String key = (String) keys.nextElement();

Modified: roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPersistenceStrategy.java
URL: http://svn.apache.org/viewvc/roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPersistenceStrategy.java?rev=912192&r1=912191&r2=912192&view=diff
==============================================================================
--- roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPersistenceStrategy.java
(original)
+++ roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPersistenceStrategy.java
Sat Feb 20 19:00:11 2010
@@ -79,15 +79,12 @@
             }
         } else {
 
-            // Pull in any properties defined in JMAEMF.properties config file
-            Properties emfProps = loadPropertiesFromResourceName(
-                    "JPAEMF.properties", getContextClassLoader());
-
             // Add all OpenJPA and Toplinks properties found in WebloggerConfig
+            Properties emfProps = new Properties();
             Enumeration keys = WebloggerConfig.keys();
             while (keys.hasMoreElements()) {
                 String key = (String) keys.nextElement();
-                if (key.startsWith("openjpa.") || key.startsWith("toplink.")) {
+                if (key.startsWith("openjpa.")) {
                     String value = WebloggerConfig.getProperty(key);
                     logger.info(key + ": " + value);
                     emfProps.setProperty(key, value);

Modified: roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/planet/business/jpa/JPARollerPlanetPersistenceStrategy.java
URL: http://svn.apache.org/viewvc/roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/planet/business/jpa/JPARollerPlanetPersistenceStrategy.java?rev=912192&r1=912191&r2=912192&view=diff
==============================================================================
--- roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/planet/business/jpa/JPARollerPlanetPersistenceStrategy.java
(original)
+++ roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/planet/business/jpa/JPARollerPlanetPersistenceStrategy.java
Sat Feb 20 19:00:11 2010
@@ -49,12 +49,9 @@
     protected JPARollerPlanetPersistenceStrategy() throws PlanetException { 
 
         DatabaseProvider dbProvider = WebloggerStartup.getDatabaseProvider();
-        
-        // Pull in any properties defined in JMAEMF.properties config file
-        Properties emfProps = loadPropertiesFromResourceName(
-           "JPAEMF.properties", getContextClassLoader());
-                
+                        
         // Add all OpenJPA and Toplinks properties found in WebloggerConfig
+        Properties emfProps = new Properties();
         Enumeration keys = WebloggerConfig.keys();
         while (keys.hasMoreElements()) {
             String key = (String)keys.nextElement();

Modified: roller/trunk/weblogger-business/src/test/resources/roller-custom.properties
URL: http://svn.apache.org/viewvc/roller/trunk/weblogger-business/src/test/resources/roller-custom.properties?rev=912192&r1=912191&r2=912192&view=diff
==============================================================================
--- roller/trunk/weblogger-business/src/test/resources/roller-custom.properties (original)
+++ roller/trunk/weblogger-business/src/test/resources/roller-custom.properties Sat Feb 20
19:00:11 2010
@@ -4,7 +4,11 @@
 database.jdbc.connectionURL=jdbc:derby://localhost:3219/rollerdb
 database.jdbc.username=APP
 database.jdbc.password=APP
-#openjpa.Log=DefaultLevel=WARN, Runtime=INFO, Tool=INFO, SQL=INFO
+
+openjpa.IgnoreChanges=true
+openjpa.FlushBeforeQueries=true
+openjpa.ConnectionRetainMode=always
+openjpa.Log=commons
 
 # use CMA authentication to work around Spring init issues in UI tests
 authentication.cma.enabled=true



Mime
View raw message