> I would prefer, that isClosed() does not cause a reconnect.

Attached is a patch, so that isClosed() doesn't cause a reconnect anymore.


Greetings
  Sven
diff -ur src_orig/com/sap/dbtech/jdbc/CallableStatementSapDB.java 
src/com/sap/dbtech/jdbc/CallableStatementSapDB.java
--- src_orig/com/sap/dbtech/jdbc/CallableStatementSapDB.java    2006-01-22 
02:09:31.593750000 +0100
+++ src/com/sap/dbtech/jdbc/CallableStatementSapDB.java 2006-01-22 
02:12:03.578125000 +0100
@@ -1761,7 +1761,7 @@
         requestPacket.initParseCommand (sqlCmd, true, parseAgain);
         if(setWithInfo)
             requestPacket.setWithInfo();
-        replyPacket = this.connection.execute (requestPacket, false, true, 
this,
+        replyPacket = this.connection.execute (requestPacket, false, true, 
true, this,
                                                gcFlags);
         return replyPacket;
     }
diff -ur src_orig/com/sap/dbtech/jdbc/ConnectionSapDB.java 
src/com/sap/dbtech/jdbc/ConnectionSapDB.java
--- src_orig/com/sap/dbtech/jdbc/ConnectionSapDB.java   2006-01-22 
02:09:31.593750000 +0100
+++ src/com/sap/dbtech/jdbc/ConnectionSapDB.java        2006-01-22 
02:14:53.953125000 +0100
@@ -431,7 +431,7 @@
             int gcFlags)
         throws SQLException
     {
-        return this.execute (requestPacket, false, false, executingObject, 
gcFlags);
+        return this.execute (requestPacket, false, false, true, 
executingObject, gcFlags);
     }
 
     public ReplyPacket sendStreamErrorPacket(SQLException sqlEx)
@@ -470,6 +470,7 @@
             RequestPacket requestPacket,
             boolean ignoreErrors,
             boolean isParse,
+            boolean allowReconnect,
             Object executingObject,
             int    gcFlags)
         throws SQLException
@@ -550,7 +551,7 @@
             // if a reconnect is forbidden or we are in the process of a
             // reconnect or we are in a (now rolled back) transaction
             if (! 
DriverSapDB.getBooleanProperty(this.connectProperties,DriverSapDB.reconnect_C, 
true)
-                || this.inReconnect || this.inTransaction) {
+                || this.inReconnect || this.inTransaction || !allowReconnect) {
                 throw new ConnectionException (rteExc);
             }
             else {
@@ -704,7 +705,7 @@
         try {
           RequestPacket requestPacket = this.getRequestPacket ();
           requestPacket.initHello ();
-          this.execute (requestPacket, this, ConnectionSapDB.GC_ALLOWED);
+          this.execute (requestPacket, false, false, false, this, 
ConnectionSapDB.GC_ALLOWED);
         }
         catch (TimeoutException ignore){
              TimeoutException.println(this.toString()+" Inner Timeout 
"+ignore.toString());
diff -ur src_orig/com/sap/dbtech/jdbc/StatementSapDB.java 
src/com/sap/dbtech/jdbc/StatementSapDB.java
--- src_orig/com/sap/dbtech/jdbc/StatementSapDB.java    2006-01-22 
02:09:31.718750000 +0100
+++ src/com/sap/dbtech/jdbc/StatementSapDB.java 2006-01-22 02:12:15.203125000 
+0100
@@ -341,7 +341,7 @@
                        && requestPacket.initDbsCommand( (String) 
items.elementAt(inputCursor), false, this.connection.autocommit, 
ResultSet.TYPE_FORWARD_ONLY)) {
                     ++inputCursor;
                 }
-                replyPacket = this.connection.execute(requestPacket, true, 
false, this,
+                replyPacket = this.connection.execute(requestPacket, true, 
false, true, this,
                                                       
ConnectionSapDB.GC_DELAYED);
                 for (; receiveCursor < inputCursor; ++receiveCursor) {
                     if (replyPacket.weakReturnCode () != 0) {

-- 
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to