geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiam...@apache.org
Subject svn commit: r1038921 - in /geronimo/daytrader/branches/2.2/modules: core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJDBCDirect.java entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountDataBean.java
Date Thu, 25 Nov 2010 05:19:16 GMT
Author: xiaming
Date: Thu Nov 25 05:19:16 2010
New Revision: 1038921

URL: http://svn.apache.org/viewvc?rev=1038921&view=rev
Log:
DAYTRADER-83 fix ping primitives failures

Modified:
    geronimo/daytrader/branches/2.2/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJDBCDirect.java
    geronimo/daytrader/branches/2.2/modules/entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountDataBean.java

Modified: geronimo/daytrader/branches/2.2/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJDBCDirect.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/2.2/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJDBCDirect.java?rev=1038921&r1=1038920&r2=1038921&view=diff
==============================================================================
--- geronimo/daytrader/branches/2.2/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJDBCDirect.java
(original)
+++ geronimo/daytrader/branches/2.2/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJDBCDirect.java
Thu Nov 25 05:19:16 2010
@@ -1706,7 +1706,9 @@ public class TradeJDBCDirect implements 
         if (datasource == null)
             getDataSource();
         conn = datasource.getConnection();
-        conn.setAutoCommit(false);
+        if (!this.inSession) {
+			conn.setAutoCommit(false);
+		}
         if (Log.doTrace()) {
             synchronized (lock) {
                 connCount++;

Modified: geronimo/daytrader/branches/2.2/modules/entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountDataBean.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/2.2/modules/entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountDataBean.java?rev=1038921&r1=1038920&r2=1038921&view=diff
==============================================================================
--- geronimo/daytrader/branches/2.2/modules/entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountDataBean.java
(original)
+++ geronimo/daytrader/branches/2.2/modules/entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountDataBean.java
Thu Nov 25 05:19:16 2010
@@ -91,7 +91,8 @@ public class AccountDataBean implements 
     @Column(name = "OPENBALANCE")
     private BigDecimal openBalance;         /* open balance */
     
-    @OneToMany(mappedBy = "account", fetch=FetchType.LAZY)
+    // change to eager so that pingservlet2session2cmrone2many works
+    @OneToMany(mappedBy = "account", fetch=FetchType.EAGER)
     private Collection<OrderDataBean> orders;
     
     @OneToMany(mappedBy = "account", fetch=FetchType.LAZY)



Mime
View raw message