Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-638

Network driver setTransactionIsolation() causes a commit, but does not complete it locally

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.1.3.1, 10.2.1.6, 10.3.1.4
    • Fix Version/s: 10.1.3.2, 10.2.2.0, 10.3.1.4
    • Component/s: Network Client
    • Labels:
      None

      Description

      When autocommit is set to false, a call to setTransactionIsolation using client driver does not end the transaction when the method exits. When a close() is called on the conection, it throws an exception.

      Running the code below:

      conn.setAutoCommit(false);
      conn.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
      try

      { conn.close(); }

      catch(SQLException se)

      { System.out.println("Got exception when closing the connection"); se.printStackTrace(); }

      with client driver gives:
      Got exception when closing the connection
      org.apache.derby.client.am.SqlException: java.sql.Connection.close() requested while a transaction is in progress on the connection.The transaction remains active, and the connection cannot be closed.

      with embedded driver, it works okay and does not throw any exception.

        Attachments

        1. d638_repro2.java
          1 kB
          Deepa
        2. d638_repro3.java
          2 kB
          Bernt Johnsen
        3. d638.java
          1.0 kB
          Deepa
        4. DERBY-638.diff
          0.7 kB
          Bernt Johnsen
        5. DERBY-638-v2.diff
          0.8 kB
          Bernt Johnsen
        6. DERBY-638-v3.diff
          6 kB
          Bernt Johnsen
        7. DERBY-638-v3.stat
          0.5 kB
          Bernt Johnsen
        8. DERBY-638-v3-for-10.1.diff
          6 kB
          Bernt Johnsen

          Issue Links

            Activity

              People

              • Assignee:
                bernt Bernt Johnsen
                Reporter:
                deepa Deepa
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: