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

unload EmbeddedDriver by using System.gc()?

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.5.1.1
    • Component/s: Documentation
    • Labels:
    • Urgency:
      Low

      Description

      derby development doc suggests one can 'unload driver class':
      > You cannot explicitly request that the JVM unload a class, but you can ensure that the EmbeddedDriver class is unloaded by using a System.gc() ....

      this advice is unfortunate, because:
      1. it is wrong - one can not unload single class.
      only whole classloader with all it's classes might be unloaded (this needs be organized ahead)
      2. one may get false impression unloading driver is good practice/desirable/necessary.
      i believe it is not.

      i suggest to remove the advice unless there is provided a scenario when unloading driver is needed + explanation how to do it properly (derby driver needs be loaded into extra classloader).

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              martin stanik martin stanik
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: