xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
- To: Laurent Bihanic <laurent.bihanic AT atosorigin.com>, XOM-interest <XOM-interest AT lists.ibiblio.org>
- Subject: [XOM-interest] ClassLoader issues
- Date: Thu, 19 Sep 2002 10:12:04 -0400
At 10:33 AM +0200 9/19/02, Laurent Bihanic wrote:
- ClassLoader issues: Type-safe enumerations, such as Attribute.Type, do not fit well with class loaders, even when implementing equals() (see http://www.javaworld.com/javatips/jw-javatip122_p.html).
This is an issue. I'm not sure what to do about it. Last night I reread the Bloch section on type-safe enums and he does not address this point at all. Certainly class loaders can be a problem in servlet containers, IDEs, and more. I've encountered this personally.
Here's one possibility: I add an equals() method to the Atrribute.Type class that can be used if client code is likely to be in a multi-loader environment. That would make the implementation more complex. I don't want to go to a straight int enum because type-safety is important to me. Thoughts?
--
+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo AT metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
| XML in a Nutshell, 2nd Edition (O'Reilly, 2002) |
| http://www.cafeconleche.org/books/xian2/ |
| http://www.amazon.com/exec/obidos/ISBN%3D0596002920/cafeaulaitA/ |
+----------------------------------+---------------------------------+
| Read Cafe au Lait for Java News: http://www.cafeaulait.org/ |
| Read Cafe con Leche for XML News: http://www.cafeconleche.org/ |
+----------------------------------+---------------------------------+
-
[XOM-interest] Firts impressions,
Laurent Bihanic, 09/19/2002
- Re: [XOM-interest] Firts impressions, Elliotte Rusty Harold, 09/19/2002
- [XOM-interest] ClassLoader issues, Elliotte Rusty Harold, 09/19/2002
- [XOM-interest] Code compactness vs instanceof, Elliotte Rusty Harold, 09/19/2002
-
[XOM-interest] CDATA handling,
Elliotte Rusty Harold, 09/19/2002
-
Re: [XOM-interest] CDATA handling,
John Cowan, 09/19/2002
- Re: [XOM-interest] CDATA handling, Elliotte Rusty Harold, 09/19/2002
-
Re: [XOM-interest] CDATA handling,
John Cowan, 09/19/2002
-
[XOM-interest] Document portions,
Elliotte Rusty Harold, 09/19/2002
- Re: [XOM-interest] Document portions, Laurent Bihanic, 09/20/2002
- [XOM-interest] Automatic detach, Elliotte Rusty Harold, 09/19/2002
-
[XOM-interest] Tree walking,
Elliotte Rusty Harold, 09/19/2002
-
Re: [XOM-interest] Tree walking,
Johannes Döbler, 09/19/2002
- Re: [XOM-interest] Tree walking, Elliotte Rusty Harold, 09/19/2002
-
Re: [XOM-interest] Tree walking,
Johannes Döbler, 09/19/2002
Archive powered by MHonArc 2.6.24.