balld 01/02/19 21:09:54
Modified: src/org/apache/cocoon/processor/xsp/library/sql esql.xsl
Log:
maybe this'll fix those setAutoCommit failures
Revision Changes Path
1.67 +7 -3
xml-cocoon/src/org/apache/cocoon/processor/xsp/library/sql/esql.xsl
Index: esql.xsl
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/processor/xsp/library/sql/esql.xsl,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -r1.66 -r1.67
--- esql.xsl 2001/02/19 19:17:50 1.66
+++ esql.xsl 2001/02/20 05:09:53 1.67
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<!-- $Id: esql.xsl,v 1.66 2001/02/19 19:17:50 balld Exp $-->
+<!-- $Id: esql.xsl,v 1.67 2001/02/20 05:09:53 balld Exp $-->
<!--
============================================================================
@@ -321,9 +321,13 @@
</xsl:choose>
try {
if ("false".equals(String.valueOf(<xsl:copy-of
select="$autocommit"/>))) {
- _esql_connection.connection.setAutoCommit(false);
+ if (_esql_connection.connection.getAutoCommit()) {
+ _esql_connection.connection.setAutoCommit(false);
+ }
} else {
- _esql_connection.connection.setAutoCommit(true);
+ if (!_esql_connection.connection.getAutoCommit()) {
+ _esql_connection.connection.setAutoCommit(true);
+ }
}
} catch (Exception _esql_exception_<xsl:value-of
select="generate-id(.)"/>) {
throw new RuntimeException("Error setting connection autocommit");