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

recreating a datasource using javax.naming.Reference from a ClientDataSource40 fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.3.1.4, 10.4.1.3
    • 10.3.3.0, 10.4.1.3
    • Network Client
    • None

    Description

      Consider the following code snippet from test DataSourceReferenceTest:
      --------------------
      Referenceable refDS = (Referenceable) ds;
      Reference dsAsReference = refDS.getReference();
      String factoryClassName = dsAsReference.getFactoryClassName();
      ObjectFactory factory =
      (ObjectFactory) Class.forName(factoryClassName).newInstance();
      Object recreatedDS =
      factory.getObjectInstance(dsAsReference, null, null, null);
      ---------------------

      When ds is a ClientDataSource40 (i.e. when running with jdk16), recreatedDS is null.

      Note, that this showed up only after converting the test to junit, because the original test hardcoded the ds to be a ClientDataSource. I confirmed this not to be related to my changes for DERBY-2296 (which prompted me to convert the test), by backing out my changes to ClientBaseDataSource and client/am/Connection and rerunning the test (needed some minor adjustments of expected values table/array).

      Attachments

        1. derby-2559-1a.diff
          3 kB
          Kristian Waagan
        2. derby-2559-2a-defenses.diff
          2 kB
          Kristian Waagan
        3. derby-2559-3a-documentation.diff
          6 kB
          Kristian Waagan
        4. derby-2559-3b-documentation.diff
          6 kB
          Kristian Waagan

        Activity

          People

            kristwaa Kristian Waagan
            myrna Myrna van Lunteren
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: