Commons Logging
  1. Commons Logging
  2. LOGGING-73

[logging] TCCL problem in J2EE Container

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.4
    • Fix Version/s: 1.1.0
    • Labels:
      None
    • Environment:

      Operating System: other
      Platform: Other

      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.

        Activity

        Dennis Lundberg made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 1.1.0 [ 12311848 ]
        Resolution Fixed [ 1 ]
        Henri Yandell made changes -
        Affects Version/s 1.0.4 [ 12311713 ]
        Henri Yandell made changes -
        Project Commons [ 12310458 ] Commons Logging [ 12310484 ]
        Assignee Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ]
        Component/s Logging [ 12311124 ]
        Key COM-2228 LOGGING-73
        Affects Version/s 1.0.4 [ 12311678 ]
        Henri Yandell made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 35774 12342380
        Michael Kopp created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Michael Kopp
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development