Uploaded image for project: 'Commons Logging'
  1. Commons Logging
  2. LOGGING-73

[logging] TCCL problem in J2EE Container

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.4
    • 1.1.0
    • None
    • Operating System: other
      Platform: Other

    • 35774

    Description

      Everybody that uses commons-logging in an J2EE Container (especially jboss) has
      problems when the TCCL is not the same as the current ClassLoader. The solution
      cannot be to drop the commons-logging.jar out of the ear/war file, as it would
      prevent to have an application specific logging instance.

      Commons-logging preferes the TCCL which is OK. But if it finds a Logger in the
      TCCL that does not fit to the current Log interface it throws an error instead
      of trying the current CL.

      I propose to change this. I will attach a changed LogFactoryImpl.java. The
      changed factory still prefers TCCL, but will try the current class loader if the
      LOG_INTERFACE is not assignable for the class found via TCCL.

      It allows us to run more painlessly in an J2EE Container and to keep
      commons-logging class loader preferences.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mkopp Michael Kopp
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: