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

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

    XMLWordPrintableJSON

Details

    • 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. ClientXAConnection.diff
          0.2 kB
          Sabari S Kumar
        2. Simple.java
          1 kB
          Sabari S Kumar
        3. derby-2532-1a-getxares_on_closed_conn.diff
          2 kB
          Kristian Waagan

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: