Re: your classloader paper (FYI)

Date view Thread view Subject view Author view

From: Godmar Back (gback@cs.utah.edu)
Date: Mon Dec 14 1998 - 15:04:56 EST


Forwarded message:
>From gilad.bracha@Eng.Sun.COM Mon Dec 14 12:47:43 1998
Message-Id: <199812141947.LAA27444@taller.eng.sun.com>
X-Sender: gbracha@taller.eng.sun.com (Unverified)
X-Mailer: QUALCOMM Windows Eudora Pro Version 4.0.2
Date: Mon, 14 Dec 1998 11:46:49 -0800
To: Godmar Back <gback@cs.utah.edu>
From: Gilad Bracha <gilad.bracha@Eng.Sun.COM>
Subject: Re: your classloader paper
In-Reply-To: <199812140612.XAA20512@lal.cs.utah.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"

At 10:12 PM 12/13/98 , you wrote:
>
> Hi Gilad,
>
>I would like to ask you a question about your OOPSLA paper.
>In Section 4.1, it says that findLoadedClass performs a lookup in the
>loaded class cache that maps initiating loaders and names to class objects.
>
>However, from my testing of 1.2, it rather appears that findLoadedClass
>only finds a class if the classloader was the defining classloader for
>that class.
>
>Which is correct?
>
Hi Godmar,

The paper is correct, and I believe the implementation is too. The
findLoadedClass() method does perform a lookup in the loaded class cache
(LCC).

I suspect I may have an explanation for the discrepancy you report.

Every defining class loader is of course an initiating class loader, and is
recorded in the LCC. Not all initiating loaders are recorded in the LCC,
however.

A loader is recorded in the LCC as an initiating class loader only when the
VM initiates the call to loadClass(), or when the loader is a defining
loader (and so the VM processes the defineClass() call). If you think about
it, this is the only plausible thing to do, since the VM has no control
over the intermediate delegation steps a loader might perform.

So, if one were to call someLoader.loadClass("edu.utah.cs.Foo") directly in
one's program, this would not be recorded in LCC unless someLoader actually
defined
edu.utah.cs.Foo.

If this does not account for your findings, please let me know. There might
be a bug somewhere.

Cheers, Gilad


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 19:57:15 EDT