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

DerbySystemGBean doesn't call System.gc() in doStop() and soFail() as recommended in the Derby doco

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0-M4
    • Fix Version/s: 1.0
    • Component/s: None
    • Labels:
      None

      Description

      The Derby doco in the section "Shutting Down the System" at http://incubator.apache.org/derby/manuals/develop/develop12.html says the following:

      Typically, an application using an embedded Derby engine shuts down Derby just before shutting itself down.
      However, an application can shut down Derby and later restart it in the same JVM session.
      To restart Derby successfully, the JVM needs to unload org.apache.derby.jdbc.EmbeddedDriver,
      so that it can reload it when it restarts Derby. (Loading the local driver starts Derby.)

      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() to force it to garbage collect classes that are no longer needed.
      Running with -nogc or -noclassgc definitely prevents the class from being unloaded and makes you unable
      to restart Derby in the same JVM.

      Anyone have any objections to the recommendation of calling System.gc()?

        Attachments

          Activity

            People

            • Assignee:
              hogstrom Matt Richard Hogstrom
              Reporter:
              johnrsisson John Sisson
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: