Hi Brian,

This code in LogFactory:
    public static LogFactory getFactory() 
      throws    LogConfigurationException {

        // Identify the class loader we will be using
        ClassLoader contextClassLoader =
            (ClassLoader)AccessController.doPrivileged(
                new PrivilegedAction() {
                    public Object run() {
                        return getContextClassLoader();
                    }
                });


actually calls a method named "getContextClassLoader" defined in the
LogFactory class, *not* Thread.getContextClassLoader. The local
"getContextClassLoader" method uses reflection to handle 1.1 jvms. On
1.1 JVMs, the classloader which loaded the current class is always
returned (see "catch(NoSuchMethodException e)" on line 551 of
LogFactory.java).

So I *think* everything currently works ok on 1.1 jvms. I haven't tested
it myself, though, so would be very interested in results of your
testing.

Can you even *download* 1.1 JVMs these days??

Cheers,

Simon

PS: I'm back from my holidays now, and ready to get stuck into JCL
(well, once recovered from my jetlag!).

On Wed, 2005-04-13 at 08:50 -0700, Brian Stansberry wrote:
> LogFactory relies on Thread.getContextClassLoader(),
> which didn't exist in the 1.1 JVM.  So, I wouldn't
> expect JCL to run.  I played around with testing this
> a while back (downloaded Sun's 1.1 JVM), but hit some
> minor roadblock and stopped.  You're right -- this
> should be clarified, particularly since it also
> impacts design issues.  Tonight I'll get the test
> working.  
> 
> Brian
> 
> --- Simon Kitching <[EMAIL PROTECTED]> wrote:
> 
> > Hi, 
> > 
> > A user recently asked on the commons-user list
> > whether JCL runs on java
> > 1.1. I'm sure it is meant to, but I can't find
> > anywhere in the docs
> > myself that say what JVMs are supported.
> > 
> > So attached is a proposed patch to clarify this in
> > the docs.
> > Is everyone happy with this?
> > 
> > Cheers,
> > 
> > Simon
> > > Index: xdocs/index.xml
> >
> ===================================================================
> > --- xdocs/index.xml (revision 161185)
> > +++ xdocs/index.xml (working copy)
> > @@ -39,6 +39,9 @@
> >  and contributors may write Log implementations for
> > the library of
> >  their choice.</p>
> >  
> > +<p>Jakarta Commons Logging supports all versions of
> > java equal to or later
> > +than java 1.1.</p>
> > +
> >  </section>
> >  
> >  
> > Index: xdocs/guide.xml
> >
> ===================================================================
> > --- xdocs/guide.xml (revision 161185)
> > +++ xdocs/guide.xml (working copy)
> > @@ -92,6 +92,10 @@
> >  logging abstraction, that allows the user
> > (application developer) to plug in
> >  a specific logging implementation.
> >      </p>
> > +
> > +<p>JCL supports all versions of java equal to or
> > later
> > +than java 1.1.</p>
> > +
> >  <p>JCL provides thin-wrapper <code>Log</code>
> > implementations for
> >  other logging tools, including
> >  <a
> >
> href="http://jakarta.apache.org/log4j/docs/index.html";>Log4J</a>,
> > > Index:
> > src/java/org/apache/commons/logging/package.html
> >
> ===================================================================
> > --- src/java/org/apache/commons/logging/package.html
> > (revision 161185)
> > +++ src/java/org/apache/commons/logging/package.html
> > (working copy)
> > @@ -43,6 +43,8 @@
> >      System.err.</li>
> >  </ul>
> >  
> > +<p>This library is intended to run on any JVM equal
> > to or later than 
> > +version 1.1.</p>
> >  
> >  <h3>Quick Start Guide</h3>
> >  
> > 
> > >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to