geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jb...@apache.org
Subject svn commit: r918535 - /geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-persist-jpa-am/src/main/java/org/apache/geronimo/samples/daytrader/persist/jpa/TradeJpaAm.java
Date Wed, 03 Mar 2010 15:54:09 GMT
Author: jbohn
Date: Wed Mar  3 15:54:09 2010
New Revision: 918535

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

Modified:
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-persist-jpa-am/src/main/java/org/apache/geronimo/samples/daytrader/persist/jpa/TradeJpaAm.java

Modified: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-persist-jpa-am/src/main/java/org/apache/geronimo/samples/daytrader/persist/jpa/TradeJpaAm.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-persist-jpa-am/src/main/java/org/apache/geronimo/samples/daytrader/persist/jpa/TradeJpaAm.java?rev=918535&r1=918534&r2=918535&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-persist-jpa-am/src/main/java/org/apache/geronimo/samples/daytrader/persist/jpa/TradeJpaAm.java
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-persist-jpa-am/src/main/java/org/apache/geronimo/samples/daytrader/persist/jpa/TradeJpaAm.java
Wed Mar  3 15:54:09 2010
@@ -254,12 +254,14 @@
 
                 entityManager.persist(orderData);
 
+                entityManager.getTransaction().commit();
+
                 if (entityManager != null) {
                     entityManager.close();
                     entityManager = null;
 
                 }
-                entityManager.getTransaction().commit();
+
                 return orderData;
             }
 



Mime
View raw message