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

Client does not return SQLException on XAConnection.getXAResource() on a closed connection, Embedded does

    Details

    • Bug behavior facts:
      Embedded/Client difference

      Description

      In the following scenario from converted test DataSourceTest:
      (non-tested code based on the test code)
      ----------------
      ClientXADataSource dsx = new ClientXADataSource();
      dsx.setDatabaseName("tstdb");
      XAConnection xac = dsx.getXAConnection();
      XAConnection xac2 = dsx.getXAConnection();
      XAResource xar2 = xac2.getXAResource();
      xac2.close();

      // allow close on already closed XAConnection
      xac2.close();
      try

      { xac2.getXAResource(); // Network Server does not think this is worth an exception. }

      catch (SQLException sqle)

      { System.out.println("expect a 08003 as with Embedded"); }

      ------------------
      With DerbyNetClient, the xac2.getXAResource() does not return an SQLException.

      This ought to be documented if expected, or fixed.

        Attachments

        1. Simple.java
          1 kB
          Sabari S Kumar
        2. derby-2532-1a-getxares_on_closed_conn.diff
          2 kB
          Kristian Waagan
        3. ClientXAConnection.diff
          0.2 kB
          Sabari S Kumar

          Issue Links

            Activity

              People

              • Assignee:
                swordfish333 Sabari S Kumar
                Reporter:
                myrna Myrna van Lunteren
              • Votes:
                1 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: