cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <>
Subject [jira] [Created] (CXF-4602) getL7dLogger improvements
Date Thu, 25 Oct 2012 14:17:12 GMT
Daniel Kulp created CXF-4602:

             Summary: getL7dLogger improvements
                 Key: CXF-4602
             Project: CXF
          Issue Type: Improvement
          Components: Core
    Affects Versions: 2.7.0
            Reporter: Daniel Kulp
            Assignee: Daniel Kulp
             Fix For: 2.5.7, 2.6.4, 2.7.1

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.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message