geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jb...@apache.org
Subject svn commit: r918533 - /geronimo/sandbox/jbohn/daytrader-bp-AppEM/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJPADirect.java
Date Wed, 03 Mar 2010 15:51:32 GMT
Author: jbohn
Date: Wed Mar  3 15:51:32 2010
New Revision: 918533

URL: http://svn.apache.org/viewvc?rev=918533&view=rev
Log:
need to commit transaction before close

Modified:
    geronimo/sandbox/jbohn/daytrader-bp-AppEM/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJPADirect.java

Modified: geronimo/sandbox/jbohn/daytrader-bp-AppEM/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJPADirect.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-AppEM/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJPADirect.java?rev=918533&r1=918532&r2=918533&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-AppEM/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJPADirect.java
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp-AppEM/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJPADirect.java
Wed Mar  3 15:51:32 2010
@@ -261,12 +261,13 @@
 
                 entityManager.persist(orderData);
 
+                entityManager.getTransaction().commit();
+
                 if (entityManager != null) {
                     entityManager.close();
                     entityManager = null;
 
                 }
-                entityManager.getTransaction().commit();
                 return orderData;
             }
 



Mime
View raw message