Uploaded image for project: 'Geronimo'
  1. Geronimo
  2. GERONIMO-765

DriverManager is totally unsuited to enterprise software, and use in tranql-connector causes classloader problems

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-M3
    • None
    • connector
    • None

    Description

      DriverManager will not connect to drivers that aren't in the classloader of the code that calls DriverManager. This makes use of tranql connector tricky in scenarios such as the following:

      config 1 uses tranql connector, connects to some db.

      config 2, child of config 1, uses tranql connector, tries to use a different driver. DriverManager reports it cannot find a suitable driver for the URL. The tranql connector class that is calling DriverManager is in a parent classloader of the driver.

      possible solutions:

      1) rearrange configurations so you never have tranql connector in your parent classloader.
      2) write more tranql connector classes that use datasource and pooled datasource implementations
      3) dynamically generate a class at runtime in the driver's classloader or a child classloader that calls DriverManager.

      In order of desirability, I'd say 2, 1, 3, but I think we have to investigate (3) since this problem is just about impossible to diagnose.

      Thanks to Dan Debrunner for pointing out this "feature" of DriverManager.

      Attachments

        Activity

          People

            jboynes Jeremy Boynes
            djencks David Jencks
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: