Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] ClassLoader issues

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: John Cowan <jcowan AT reutershealth.com>
  • To: elharo AT metalab.unc.edu (Elliotte Rusty Harold)
  • Cc: XOM-interest AT lists.ibiblio.org (XOM-interest)
  • Subject: Re: [XOM-interest] ClassLoader issues
  • Date: Thu, 19 Sep 2002 15:15:16 -0400 (EDT)

Elliotte Rusty Harold scripsit:

> Also, is there good reason for saying that two objects loaded by
> different class loaders are not equal when they might otherwise be?
> For instance, can Element objects loaded from two different class
> loaders access each others private parts or not?

No, they can't (they could in 1.0, IIRC, but that was a bug). Classes
loaded by different class loaders have different Class objects and are
in every sense different: the primary key of a class is the pair
(class loader, class name). It only really matters when you are trying to
do the Singleton pattern, and class loaders wind up giving you Multipletons.

> I hate class loaders!

"They too have their place."

--
John Cowan jcowan AT reutershealth.com www.ccil.org/~cowan
www.reutershealth.com
"If he has seen farther than others,
it is because he is standing on a stack of dwarves."
--Mike Champion, describing Tim Berners-Lee (adapted)




Archive powered by MHonArc 2.6.24.

Top of Page