geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r521982 - /geronimo/server/trunk/modules/geronimo-persistence-jpa10-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitBuilder.java
Date Sat, 24 Mar 2007 05:46:06 GMT
Author: djencks
Date: Fri Mar 23 22:46:05 2007
New Revision: 521982

URL: http://svn.apache.org/viewvc?view=rev&rev=521982
Log:
GERONIMO-3018 avoid NPE when transactiontype is not specified.  I defaulted to JTA but didn't
check if that is correct

Modified:
    geronimo/server/trunk/modules/geronimo-persistence-jpa10-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitBuilder.java

Modified: geronimo/server/trunk/modules/geronimo-persistence-jpa10-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-persistence-jpa10-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitBuilder.java?view=diff&rev=521982&r1=521981&r2=521982
==============================================================================
--- geronimo/server/trunk/modules/geronimo-persistence-jpa10-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-persistence-jpa10-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitBuilder.java
Fri Mar 23 22:46:05 2007
@@ -139,7 +139,12 @@
         } else {
             gbeanData.setAttribute("persistenceProviderClassName", defaultPersistenceProviderClassName);
         }
-        gbeanData.setAttribute("persistenceUnitTransactionType", persistenceUnit.getTransactionType().toString());
+        if (persistenceUnit.isSetTransactionType()) {
+            gbeanData.setAttribute("persistenceUnitTransactionType", persistenceUnit.getTransactionType().toString());
+        } else {
+            //TODO verify that the default is supposed to be JTA
+            gbeanData.setAttribute("persistenceUnitTransactionType", "JTA");
+        }
         if (persistenceUnit.isSetJtaDataSource()) {
             String jtaDataSourceString = persistenceUnit.getJtaDataSource().trim();
             if (jtaDataSourceString.indexOf('=') == -1) {



Mime
View raw message