Author: doogie
Date: Fri Apr 2 17:22:24 2010
New Revision: 930332
URL:
http://svn.apache.org/viewvc?rev=930332&view=revLog:
Fix bad transaction pattern introduced with 927256.
Modified:
ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java
Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java?rev=930332&r1=930331&r2=930332&view=diff==============================================================================
--- ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java (original)
+++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java Fri Apr 2 17:22:24 2010
@@ -509,7 +509,7 @@ public class WebToolsServices {
continue;
}
- TransactionUtil.begin();
+ boolean beganTx = TransactionUtil.begin();
// some databases don't support cursors, or other problems may happen, so if there is an error here log it and move on to get as much as possible
try {
values = delegator.find(curEntityName, null, null, null, me.getPkFieldNames(), null);
@@ -530,8 +530,8 @@ public class WebToolsServices {
value.writeXmlText(writer, "");
numberWritten++;
if (numberWritten % 500 == 0) {
- TransactionUtil.commit();
- TransactionUtil.begin();
+ TransactionUtil.commit(beganTx);
+ beganTx = TransactionUtil.begin();
}
} while ((value = (GenericValue) values.next()) != null);
writer.println("</entity-engine-xml>");
@@ -541,7 +541,7 @@ public class WebToolsServices {
results.add("["+fileNumber +"] [---] " + curEntityName + " has no records, not writing file");
}
values.close();
- TransactionUtil.commit();
+ TransactionUtil.commit(beganTx);
} catch (Exception ex) {
if (values != null) {
try {