Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6231328

Logging API doesn't use context-classloader

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Future Project
    • Icon: P4 P4
    • None
    • 5.0
    • core-libs

      A DESCRIPTION OF THE REQUEST :
            if you invoke the method LogManager.readConfiguration(InputStream), classloading is only done using the system-classloader. The context-classloader is ignored, and there's no other way to override the classloader used.

      Especially see the method LogManager.getFormatterProperty(...) which is called by the ConsoleHandler to load it's formatter.


      JUSTIFICATION :
      Well, if you think of an application, that uses a URLClassLoader to load further parts including formatters, filters, than one will need to set the classloader the Loggin API uses. This is currently not possible, either by explicitly giving a ClassLoader as a parameter, or by setting the context-classloader of the current Thread.


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Use the context-classloader of the current Thread, or use the system classloader, if there no context-classloader was set.
      ACTUAL -
      the system-classloader is used and there's no way to change that.

      CUSTOMER SUBMITTED WORKAROUND :
      none :-(
      ###@###.### 2005-2-21 10:39:48 GMT

            Unassigned Unassigned
            jssunw Jitender S (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: