aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject svn commit: r1690237 - in /aries/trunk/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/parser/impl: JPAAnnotationScanner.java PersistenceUnitParser.java
Date Fri, 10 Jul 2015 10:30:55 GMT
Author: cschneider
Date: Fri Jul 10 10:30:55 2015
New Revision: 1690237

URL: http://svn.apache.org/r1690237
Log:
[ARIES-1349] Small fixes

Modified:
    aries/trunk/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/parser/impl/JPAAnnotationScanner.java
    aries/trunk/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/parser/impl/PersistenceUnitParser.java

Modified: aries/trunk/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/parser/impl/JPAAnnotationScanner.java
URL: http://svn.apache.org/viewvc/aries/trunk/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/parser/impl/JPAAnnotationScanner.java?rev=1690237&r1=1690236&r2=1690237&view=diff
==============================================================================
--- aries/trunk/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/parser/impl/JPAAnnotationScanner.java
(original)
+++ aries/trunk/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/parser/impl/JPAAnnotationScanner.java
Fri Jul 10 10:30:55 2015
@@ -28,7 +28,6 @@ import javax.persistence.MappedSuperclas
 import org.osgi.framework.Bundle;
 import org.osgi.framework.wiring.BundleWiring;
 
-@SuppressWarnings("deprecation")
 class JPAAnnotationScanner {
     public static Collection<String> findJPAAnnotatedClasses(Bundle b) {
         BundleWiring bw = b.adapt(BundleWiring.class);

Modified: aries/trunk/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/parser/impl/PersistenceUnitParser.java
URL: http://svn.apache.org/viewvc/aries/trunk/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/parser/impl/PersistenceUnitParser.java?rev=1690237&r1=1690236&r2=1690237&view=diff
==============================================================================
--- aries/trunk/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/parser/impl/PersistenceUnitParser.java
(original)
+++ aries/trunk/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/parser/impl/PersistenceUnitParser.java
Fri Jul 10 10:30:55 2015
@@ -101,9 +101,9 @@ public class PersistenceUnitParser {
             JPAHandler handler = new JPAHandler(bundle);
             parser.parse(is, handler);
             punits.addAll(handler.getPersistenceUnits());
-//            for (PersistenceUnit punit : punits) {
-                //validate(punit);
-//            }
+            for (PersistenceUnit punit : punits) {
+                validate(punit);
+            }
         } catch (Exception e) {
             throw new RuntimeException("persistence.description.parse.error", e);
         } finally {
@@ -115,16 +115,6 @@ public class PersistenceUnitParser {
         if (punit.getTransactionType() == null) {
             throw new IllegalArgumentException("No transaction type specified for persistence
unit " + punit.getName());
         }
-        if (punit.getTransactionType() == PersistenceUnitTransactionType.JTA) {
-            if (punit.getJtaDataSourceName() == null) {
-                throw new IllegalArgumentException("Must specify jta-data-source for persistence
unit " + punit.getName());
-            }
-        }
-        if (punit.getTransactionType() == PersistenceUnitTransactionType.RESOURCE_LOCAL)
{
-            if (punit.getNonJtaDataSourceName() == null) {
-                throw new IllegalArgumentException("Must specify non-jta-data-source for
persistence unit " + punit.getName());
-            }
-        }
     }
 
     private static void safeClose(InputStream is) {



Mime
View raw message