[jtentative~main:33] Java EE 6 migration.

  • From: VivienBarousse@kenai.com
  • To: commits@jtentative.kenai.com
  • Subject: [jtentative~main:33] Java EE 6 migration.
  • Date: Fri, 8 Jan 2010 13:24:48 +0000

Project:    jtentative
Repository: main
Revision:   33
Author:     VivienBarousse
Date:       2010-01-08 13:24:40 UTC
Link:       

Log Message:
------------
Java EE 6 migration.
Corrected some bugs due to JPA provider migration (Toplink to EclipseLink).
Application client not part of EAR anymore.


Revisions:
----------
33


Modified Paths:
---------------
trunk/jtentative/jtentative-ejb/src/main/java/com/aperigeek/jtentative/entity/Entry.java
trunk/jtentative/jtentative-ear/pom.xml
trunk/jtentative/jtentative-app-client/pom.xml
trunk/jtentative/jtentative-ejb/pom.xml
trunk/jtentative/jtentative-ejb/src/test/resources/META-INF/persistence.xml
trunk/jtentative/jtentative-web/pom.xml
trunk/jtentative/jtentative-ejb/src/main/resources/META-INF/persistence.xml
trunk/jtentative/jtentative-ejb/src/main/java/com/aperigeek/jtentative/dao/impl/EntryFacade.java


Added Paths:
------------
trunk/jtentative/jtentative-ejb/src/main/setup


Diffs:
------
Index: trunk/jtentative/jtentative-ear/pom.xml
===================================================================
--- trunk/jtentative/jtentative-ear/pom.xml     (revision 32)
+++ trunk/jtentative/jtentative-ear/pom.xml     (revision 33)
@@ -1,33 +1,34 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0" ;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ;
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 ;
http://maven.apache.org/maven-v4_0_0.xsd";>
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
         <artifactId>jtentative</artifactId>
         <groupId>com.aperigeek</groupId>
         <version>1.0-alpha</version>
     </parent>
-  <groupId>com.aperigeek</groupId>
-  <artifactId>jtentative-ear</artifactId>
-  <packaging>ear</packaging>
-  <version>1.0-alpha</version>
-  <name>JTentative EAR</name>
-  <url>http://maven.apache.org</url>
+    <groupId>com.aperigeek</groupId>
+    <artifactId>jtentative-ear</artifactId>
+    <packaging>ear</packaging>
+    <version>1.0-alpha</version>
+    <name>JTentative EAR</name>
+    <url>http://maven.apache.org</url>
 
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.5</source>
-          <target>1.5</target>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-ear-plugin</artifactId>
-        <configuration>
-            <version>5</version>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.6</source>
+                    <target>1.6</target>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-ear-plugin</artifactId>
+                <version>2.4</version>
+                <configuration>
+            <version>6</version>
             <modules>
                 <ejbModule>
                     <groupId>com.aperigeek</groupId>
@@ -37,18 +38,12 @@
                     <groupId>com.aperigeek</groupId>
                     <artifactId>jtentative-web</artifactId>
                 </webModule>
-                <jarModule>
-                    <groupId>com.aperigeek</groupId>
-                    <artifactId>jtentative-app-client</artifactId>
-                    
<bundleFileName>jtentative-app-client.jar</bundleFileName>
-                    <includeInApplicationXml>true</includeInApplicationXml>
-                </jarModule>
             </modules>
-        </configuration>
-      </plugin>
-    </plugins>
-    <finalName>jtentative-ear</finalName>
-  </build>
+                </configuration>
+            </plugin>
+        </plugins>
+        <finalName>jtentative-ear</finalName>
+    </build>
     <dependencies>
         <dependency>
             <groupId>com.aperigeek</groupId>
@@ -62,11 +57,6 @@
             <version>1.0-alpha</version>
             <type>war</type>
         </dependency>
-        <dependency>
-            <groupId>com.aperigeek</groupId>
-            <artifactId>jtentative-app-client</artifactId>
-            <version>1.0-alpha</version>
-        </dependency>
     </dependencies>
     <properties></properties>
 </project>
Index: trunk/jtentative/jtentative-app-client/pom.xml
===================================================================
--- trunk/jtentative/jtentative-app-client/pom.xml      (revision 32)
+++ trunk/jtentative/jtentative-app-client/pom.xml      (revision 33)
@@ -38,9 +38,9 @@
         </dependency>
 
         <dependency>
-            <groupId>javaee</groupId>
+            <groupId>javax</groupId>
             <artifactId>javaee-api</artifactId>
-            <version>5</version>
+            <version>6.0-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
 
@@ -48,7 +48,6 @@
             <groupId>com.aperigeek</groupId>
             <artifactId>jtentative-ejb</artifactId>
             <version>1.0-alpha</version>
-            <scope>provided</scope>
         </dependency>
 
         <dependency>
@@ -78,8 +77,8 @@
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <configuration>
-                    <source>1.5</source>
-                    <target>1.5</target>
+                    <source>1.6</source>
+                    <target>1.6</target>
                 </configuration>
             </plugin>
             <plugin>
Index: trunk/jtentative/jtentative-web/pom.xml
===================================================================
--- trunk/jtentative/jtentative-web/pom.xml     (revision 32)
+++ trunk/jtentative/jtentative-web/pom.xml     (revision 33)
@@ -18,6 +18,7 @@
             <groupId>com.aperigeek</groupId>
             <artifactId>jtentative-ejb</artifactId>
             <version>1.0-alpha</version>
+            <scope>provided</scope>
         </dependency>
 
         <dependency>
@@ -27,9 +28,9 @@
         </dependency>
 
         <dependency>
-            <groupId>javaee</groupId>
+            <groupId>javax</groupId>
             <artifactId>javaee-api</artifactId>
-            <version>5</version>
+            <version>6.0-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
 
@@ -45,8 +46,7 @@
         <repository>
             <id>java.net1</id>
             <name>Java.Net Maven1 Repository, hosts the javaee-api 
dependency</name>
-            <url>http://download.java.net/maven/1</url>
-            <layout>legacy</layout>
+            <url>http://download.java.net/maven/2</url>
         </repository>
     </repositories>
     <build>
@@ -55,8 +55,8 @@
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <configuration>
-                    <source>1.5</source>
-                    <target>1.5</target>
+                    <source>1.6</source>
+                    <target>1.6</target>
                 </configuration>
             </plugin>
         </plugins>
Index: 
trunk/jtentative/jtentative-ejb/src/test/resources/META-INF/persistence.xml
===================================================================
--- 
trunk/jtentative/jtentative-ejb/src/test/resources/META-INF/persistence.xml 
(revision 32)
+++ 
trunk/jtentative/jtentative-ejb/src/test/resources/META-INF/persistence.xml 
(revision 33)
@@ -1,26 +1,26 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" ;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ;
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence ;
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd";>
-  <persistence-unit name="JTentative-ejb-test" 
transaction-type="RESOURCE_LOCAL">
-    
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
-    <class>com.aperigeek.jtentative.entity.Entry</class>
-    <class>com.aperigeek.jtentative.entity.Favorite</class>
-    <class>com.aperigeek.jtentative.entity.Feed</class>
-    <class>com.aperigeek.jtentative.entity.Folder</class>
-    <class>com.aperigeek.jtentative.entity.InputSource</class>
-    <class>com.aperigeek.jtentative.entity.InputSourceUpdateReport</class>
-    <class>com.aperigeek.jtentative.entity.ReadStatus</class>
-    <class>com.aperigeek.jtentative.entity.Resource</class>
-    <class>com.aperigeek.jtentative.entity.Subscription</class>
-    <class>com.aperigeek.jtentative.entity.Tag</class>
-    <class>com.aperigeek.jtentative.entity.TwitterSearch</class>
-    <class>com.aperigeek.jtentative.entity.User</class>
-    <exclude-unlisted-classes>false</exclude-unlisted-classes>
-    <properties>
-      <property name="openjpa.ConnectionUserName" value="APP"/>
-      <property name="openjpa.ConnectionPassword" value="APP"/>
-      <property name="openjpa.ConnectionURL" 
value="jdbc:derby:memory:testDB;create=true"/>
-      <property name="openjpa.ConnectionDriverName" 
value="org.apache.derby.jdbc.EmbeddedDriver"/>
-      <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema"/>
-    </properties>
-  </persistence-unit>
+    <persistence-unit name="JTentative-ejb-test" 
transaction-type="RESOURCE_LOCAL">
+        <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
+        <class>com.aperigeek.jtentative.entity.Entry</class>
+        <class>com.aperigeek.jtentative.entity.Favorite</class>
+        <class>com.aperigeek.jtentative.entity.Feed</class>
+        <class>com.aperigeek.jtentative.entity.Folder</class>
+        <class>com.aperigeek.jtentative.entity.InputSource</class>
+        
<class>com.aperigeek.jtentative.entity.InputSourceUpdateReport</class>
+        <class>com.aperigeek.jtentative.entity.ReadStatus</class>
+        <class>com.aperigeek.jtentative.entity.Resource</class>
+        <class>com.aperigeek.jtentative.entity.Subscription</class>
+        <class>com.aperigeek.jtentative.entity.Tag</class>
+        <class>com.aperigeek.jtentative.entity.TwitterSearch</class>
+        <class>com.aperigeek.jtentative.entity.User</class>
+        <exclude-unlisted-classes>false</exclude-unlisted-classes>
+        <properties>
+            <property name="eclipselink.jdbc.user" value="APP"/>
+            <property name="eclipselink.jdbc.password" value="APP"/>
+            <property name="eclipselink.jdbc.url" 
value="jdbc:derby:memory:testDB;create=true"/>
+            <property name="eclipselink.jdbc.driver" 
value="org.apache.derby.jdbc.EmbeddedDriver"/>
+            <property name="eclipselink.ddl-generation" 
value="create-tables"/>
+        </properties>
+    </persistence-unit>
 </persistence>
Index: 
trunk/jtentative/jtentative-ejb/src/main/java/com/aperigeek/jtentative/dao/impl/EntryFacade.java
===================================================================
--- 
trunk/jtentative/jtentative-ejb/src/main/java/com/aperigeek/jtentative/dao/impl/EntryFacade.java
    (revision 32)
+++ 
trunk/jtentative/jtentative-ejb/src/main/java/com/aperigeek/jtentative/dao/impl/EntryFacade.java
    (revision 33)
@@ -15,7 +15,6 @@
 
 import com.aperigeek.jtentative.dao.*;
 import com.aperigeek.jtentative.entity.Entry;
-import com.aperigeek.jtentative.entity.Feed;
 import com.aperigeek.jtentative.entity.InputSource;
 import com.aperigeek.jtentative.entity.User;
 import java.util.List;
Index: 
trunk/jtentative/jtentative-ejb/src/main/java/com/aperigeek/jtentative/entity/Entry.java
===================================================================
--- 
trunk/jtentative/jtentative-ejb/src/main/java/com/aperigeek/jtentative/entity/Entry.java
    (revision 32)
+++ 
trunk/jtentative/jtentative-ejb/src/main/java/com/aperigeek/jtentative/entity/Entry.java
    (revision 33)
@@ -42,10 +42,10 @@
     @NamedQuery(name="Entry.findBySourceAndLink", query="SELECT e FROM Entry 
AS e WHERE e.source = :source AND e.link = :link"),
     @NamedQuery(name="Entry.findBySourceAndUri", query="SELECT e FROM Entry 
AS e WHERE e.source = :source AND e.uri = :uri"),
     @NamedQuery(name="Entry.findAll", query="SELECT e FROM Entry AS e"),
-    @NamedQuery(name="Entry.findAllParentEntries", query="SELECT parent FROM 
Entry AS entry, IN (entry.parentEntries) AS parent WHERE entry = :entry"),
-    @NamedQuery(name="Entry.findAllFollowupEntries", query="SELECT entry 
FROM Entry AS entry, IN (entry.parentEntries) AS parent WHERE parent = 
:entry"),
-    @NamedQuery(name="Entry.findAllUnreadsByUserAndSource", query="SELECT 
new com.aperigeek.jtentative.entity.Entry(e.id, e.source, e.title, e.author, 
e.link, e.uri, e.publicationDate) FROM Entry AS e WHERE e.source = :source 
AND e.id NOT IN (SELECT s.entry.id FROM ReadStatus AS s WHERE s.user = :user 
AND s.value = true)"),
-    @NamedQuery(name="Entry.findAllUnreadsByUserAndSourceOrderedByDateAsc", 
query="SELECT new com.aperigeek.jtentative.entity.Entry(e.id, e.source, 
e.title, e.author, e.link, e.uri, e.publicationDate) FROM Entry AS e WHERE 
e.source = :source AND e.id NOT IN (SELECT s.entry.id FROM ReadStatus AS s 
WHERE s.user = :user AND s.value = true) ORDER BY e.publicationDate ASC"),
+    @NamedQuery(name="Entry.findAllParentEntries", query="SELECT p FROM 
Entry AS e, IN (e.parentEntries) AS p WHERE e = :entry"),
+    @NamedQuery(name="Entry.findAllFollowupEntries", query="SELECT e FROM 
Entry AS e, IN (e.parentEntries) AS p WHERE p = :entry"),
+    @NamedQuery(name="Entry.findAllUnreadsByUserAndSource", query="SELECT e 
FROM Entry AS e WHERE e.source = :source AND e.id NOT IN (SELECT s.entry.id 
FROM ReadStatus AS s WHERE s.user = :user AND s.value = true)"),
+    @NamedQuery(name="Entry.findAllUnreadsByUserAndSourceOrderedByDateAsc", 
query="SELECT e FROM Entry AS e WHERE e.source = :source AND e.id NOT IN 
(SELECT s.entry.id FROM ReadStatus AS s WHERE s.user = :user AND s.value = 
true) ORDER BY e.publicationDate ASC"),
     @NamedQuery(name="Entry.countAllUnreadsByUserAndSource", query="SELECT 
COUNT(e.id) FROM Entry AS e WHERE e.source = :source AND e.id NOT IN (SELECT 
s.entry.id FROM ReadStatus AS s WHERE s.user = :user AND s.value = true)")
 })
 @Table(name="entries")
Index: 
trunk/jtentative/jtentative-ejb/src/main/resources/META-INF/persistence.xml
===================================================================
--- 
trunk/jtentative/jtentative-ejb/src/main/resources/META-INF/persistence.xml 
(revision 32)
+++ 
trunk/jtentative/jtentative-ejb/src/main/resources/META-INF/persistence.xml 
(revision 33)
@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" ;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ;
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence ;
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd";>
     <persistence-unit name="JTentative-ejb-PU" transaction-type="JTA">
-        <provider>oracle.toplink.essentials.PersistenceProvider</provider>
+        <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
         <jta-data-source>jdbc/jtentative</jta-data-source>
         <properties>
-            <property name="toplink.ddl-generation" value="create-tables" />
+            <property name="eclipselink.ddl-generation" 
value="create-tables"/>
         </properties>
     </persistence-unit>
 </persistence>
Index: trunk/jtentative/jtentative-ejb/pom.xml
===================================================================
--- trunk/jtentative/jtentative-ejb/pom.xml     (revision 32)
+++ trunk/jtentative/jtentative-ejb/pom.xml     (revision 33)
@@ -46,13 +46,20 @@
         </dependency>
 
         <dependency>
-            <groupId>org.apache.openjpa</groupId>
-            <artifactId>openjpa</artifactId>
-            <version>1.2.1</version>
+            <groupId>org.eclipse.persistence</groupId>
+            <artifactId>javax.persistence</artifactId>
+            <version>1.1.0</version>
             <scope>test</scope>
         </dependency>
 
         <dependency>
+            <groupId>org.eclipse.persistence</groupId>
+            <artifactId>eclipselink</artifactId>
+            <version>1.1.0</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
             <groupId>org.apache.derby</groupId>
             <artifactId>derby</artifactId>
             <version>10.5.1.1</version>
@@ -60,12 +67,12 @@
         </dependency>
 
         <dependency>
-            <groupId>javaee</groupId>
+            <groupId>javax</groupId>
             <artifactId>javaee-api</artifactId>
-            <version>5</version>
+            <version>6.0-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
-    
+
     </dependencies>
 
     <repositories>
@@ -80,13 +87,6 @@
             <name>Aperigeek.com Maven Repository</name>
             <url>http://maven.aperigeek.com/repository/internal/</url>
         </repository>
-        
-        <repository>
-            <id>java.net1</id>
-            <name>Java.Net Maven1 Repository, hosts the javaee-api 
dependency</name>
-            <url>http://download.java.net/maven/1</url>
-            <layout>legacy</layout>
-        </repository>
 
         <repository>
             <id>Apache Repo</id>
@@ -94,6 +94,11 @@
             
<url>http://people.apache.org/repo/m1-ibiblio-rsync-repository</url>
             <layout>legacy</layout>
         </repository>
+
+        <repository>
+            <id>EclipseLink Repo</id>
+            
<url>http://www.eclipse.org/downloads/download.php?r=1&amp;nf=1&amp;file=/rt/eclipselink/maven.repo</url>
+        </repository>
     </repositories>
 
     <build>
@@ -102,15 +107,16 @@
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <configuration>
-                    <source>1.5</source>
-                    <target>1.5</target>
+                    <source>1.6</source>
+                    <target>1.6</target>
                 </configuration>
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-ejb-plugin</artifactId>
+                <version>2.2</version>
                 <configuration>
-                    <ejbVersion>3.0</ejbVersion>
+                    <ejbVersion>3.1</ejbVersion>
                 </configuration>
             </plugin>
         </plugins>





[jtentative~main:33] Java EE 6 migration.

VivienBarousse 01/08/2010
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120518.3c65429)
 
 
Close
loading
Please Confirm
Close