roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gma...@apache.org
Subject svn commit: r1498037 - in /roller/trunk/app: ./ src/main/java/org/apache/roller/planet/pojos/ src/main/java/org/apache/roller/weblogger/ src/main/java/org/apache/roller/weblogger/business/jpa/ src/test/java/org/apache/roller/planet/business/ src/test/r...
Date Sat, 29 Jun 2013 23:42:31 GMT
Author: gmazza
Date: Sat Jun 29 23:42:31 2013
New Revision: 1498037

URL: http://svn.apache.org/r1498037
Log:
Additions to make the code more EclipseLink JPA friendly.

Modified:
    roller/trunk/app/pom.xml
    roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/PlanetGroup.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/TestUtils.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPersistenceStrategy.java
    roller/trunk/app/src/test/java/org/apache/roller/planet/business/GroupBasicTests.java
    roller/trunk/app/src/test/resources/roller-custom.properties

Modified: roller/trunk/app/pom.xml
URL: http://svn.apache.org/viewvc/roller/trunk/app/pom.xml?rev=1498037&r1=1498036&r2=1498037&view=diff
==============================================================================
--- roller/trunk/app/pom.xml (original)
+++ roller/trunk/app/pom.xml Sat Jun 29 23:42:31 2013
@@ -110,18 +110,6 @@
                     <version>2.5.0</version>
                     <scope>test</scope>
                 </dependency>
-                <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-jta_1.1_spec</artifactId>
-                    <version>1.1.1</version>
-                    <scope>provided</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-jpa_2.0_spec</artifactId>
-                    <version>1.1</version>
-                    <scope>provided</scope>
-                </dependency
         -->
 
         <!-- Hibernate deps (for sometimes testing purposes)
@@ -337,6 +325,20 @@
 
         <dependency>
             <groupId>net.java.dev.rome</groupId>
+            <artifactId>rome</artifactId>
+            <version>1.0.0</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>net.java.dev.rome</groupId>
+            <artifactId>rome-fetcher</artifactId>
+            <version>1.0.0</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>net.java.dev.rome</groupId>
             <artifactId>rome-propono</artifactId>
             <version>1.0.0</version>
             <scope>compile</scope>
@@ -595,20 +597,6 @@
             </exclusions>
         </dependency>
 
-        <dependency>
-            <groupId>net.java.dev.rome</groupId>
-            <artifactId>rome</artifactId>
-            <version>1.0.0</version>
-            <scope>compile</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>net.java.dev.rome</groupId>
-            <artifactId>rome-fetcher</artifactId>
-            <version>1.0.0</version>
-            <scope>compile</scope>
-        </dependency>
-
         <!-- test deps -->
 
         <dependency>

Modified: roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/PlanetGroup.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/PlanetGroup.java?rev=1498037&r1=1498036&r2=1498037&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/PlanetGroup.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/PlanetGroup.java Sat Jun
29 23:42:31 2013
@@ -159,7 +159,7 @@ public class PlanetGroup implements Seri
     /**
      * @hibernate.many-to-one column="planet_id" cascade="none" non-null="false"
      */
-    public Planet getWeblogger() {
+    public Planet getPlanet() {
         return planet;
     }
     

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/TestUtils.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/TestUtils.java?rev=1498037&r1=1498036&r2=1498037&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/TestUtils.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/TestUtils.java Sat Jun 29 23:42:31
2013
@@ -650,7 +650,7 @@ public final class TestUtils {
         
         // remove
         mgr.deleteGroup(group);
-        group.getWeblogger().getGroups().remove(group);
+        group.getPlanet().getGroups().remove(group);
         
         // flush
         WebloggerFactory.getWeblogger().flush();

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPersistenceStrategy.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPersistenceStrategy.java?rev=1498037&r1=1498036&r2=1498037&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPersistenceStrategy.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPersistenceStrategy.java
Sat Jun 29 23:42:31 2013
@@ -86,7 +86,8 @@ public class JPAPersistenceStrategy {
             while (keys.hasMoreElements()) {
                 String key = (String) keys.nextElement();
                 if (       key.startsWith("javax.persistence.") 
-                        || key.startsWith("openjpa.") 
+                        || key.startsWith("openjpa.")
+                        || key.startsWith("eclipselink.")
                         || key.startsWith("hibernate.")) {
                     String value = WebloggerConfig.getProperty(key);
                     logger.info(key + ": " + value);
@@ -106,7 +107,7 @@ public class JPAPersistenceStrategy {
 
             try {
                 this.emf = Persistence.createEntityManagerFactory("RollerPU", emfProps);
-                
+
             } catch (Throwable pe) {
                 logger.error("ERROR: creating entity manager", pe);
                 throw new WebloggerException(pe);

Modified: roller/trunk/app/src/test/java/org/apache/roller/planet/business/GroupBasicTests.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/test/java/org/apache/roller/planet/business/GroupBasicTests.java?rev=1498037&r1=1498036&r2=1498037&view=diff
==============================================================================
--- roller/trunk/app/src/test/java/org/apache/roller/planet/business/GroupBasicTests.java
(original)
+++ roller/trunk/app/src/test/java/org/apache/roller/planet/business/GroupBasicTests.java
Sat Jun 29 23:42:31 2013
@@ -65,7 +65,7 @@ public class GroupBasicTests extends Tes
         group = mgr.getGroupById(testGroup.getId());
         assertNotNull(group);
         assertEquals("test_handle", group.getHandle());
-        assertEquals(testPlanet.getId(), group.getWeblogger().getId());
+        assertEquals(testPlanet.getId(), group.getPlanet().getId());
         
         // modify
         group.setTitle("foo");

Modified: roller/trunk/app/src/test/resources/roller-custom.properties
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/test/resources/roller-custom.properties?rev=1498037&r1=1498036&r2=1498037&view=diff
==============================================================================
--- roller/trunk/app/src/test/resources/roller-custom.properties (original)
+++ roller/trunk/app/src/test/resources/roller-custom.properties Sat Jun 29 23:42:31 2013
@@ -10,6 +10,10 @@ openjpa.FlushBeforeQueries=true
 openjpa.ConnectionRetainMode=always
 openjpa.Log=commons
 
+#see http://wiki.eclipse.org/EclipseLink/Examples/JPA/Logging
+#eclipselink.logging.file=output.log
+#eclipselink.logging.level=ALL
+
 hibernate.dialect=org.hibernate.dialect.DerbyDialect
 hibernate.transaction.factory_class=org.hibernate.transaction.JDBCTransactionFactory
 



Mime
View raw message