Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-4602

getL7dLogger improvements

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.7
    • 2.5.7, 2.6.4, 2.7.1
    • Core
    • None
    • Unknown

    Description

      After talking to Jeff Genender, I looked into the java.util.Logger code in the JDK a little to see if there was a way to improve the CXF Logger creation code a bit, particularly in OSGi. Things I found:

      1) Logger.getLogger is a synchronized method so minimizing the time spent in there is good.

      2) Setting the Thread contextClassLoader to the ClassLoader that loaded the class prior to the call makes it faster to determine the classloader to use for ResourceBundle lookup.

      3) Loading the ResourceBundles can be expensive as it searches classloaders and such. Thus, moving that OUT of the synch block can help. Create the ResourceBundle, hold onto it strongly, and call getLogger and it can find it using a very fast map lookup.

      Attachments

        Activity

          People

            dkulp Daniel Kulp
            dkulp Daniel Kulp
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: