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

client returns different connection on s.getConnection() on a statement obtained from a ConnectionPoolDataSource or XADataSource than the original connection.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 10.3.1.4
    • Fix Version/s: None
    • Component/s: Network Client
    • Labels:
      None

      Description

      In the following scenario:

      ClientXADataSource dsx = new ClientXADataSource();
      dsx.setDatabaseName(dbName);
      XAConnection xac = dsx.getXAConnection();
      XAResource xar = xac.getXAResource();

      Connection cs1 = xac.getConnection();
      Statement sru1 = cs1.createStatement();
      sru1.setCursorName("SN1");
      sru1.executeUpdate("insert into intTable values 1,2,3");
      Connection conn2 = s.getConnection();

      When using an EmbeddedXADataSource, cs1 and conn2 are the same connection. However with Client they're not.

      Found during conversion of test checkDataSource to DataSourceTest.java.
      If this difference is correct, or acceptable, it should get documented...

      With DerbyNetClient, they're not the same.

        Attachments

        1. ConnPoolErr.java
          2 kB
          Saurabh Vyas

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                myrna Myrna van Lunteren
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: