[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

SAX-core proposal #1: class loading

  • From: David Brownell <david-b@p...>
  • To: sax-devel@l..., xml-dev@l...
  • Date: Tue, 07 Aug 2001 10:04:57 -0700

loading sax
This seems to me most like a bugfix, but I'm sending it for
possible discussion in case anyone has issues.

Class Loading

- JDK 1.2 added a notion of chained class loaders, where loaders
  can try to load from a "parent" that may not be shared with
  every other class in the sytem.

- Implementations of factory helper classes (XMLReaderFactory,
  ParserFactory) don't pass a class loader to Class.forName(),
  so they always use the system class loader.  They could use
  a more intelligent default, at least on JDK 1.2 systems:

    Thread.currentThread ().getContextClassLoader ()

  That way, for example, application code wouldn't need to
  have the parser always live in the system class path.

  Interfaces to those helper classes don't pass the loader (and
  normally shouldn't), so applications using the factory classes
  can't work around that issue themselves.

PROPOSAL:

    - Clarify the javadoc to say that while the system class
      loader is consulted, other appropriate ones may also
      be used.  That will allow JDK 1.2 (and later) based
      factories to use the context's class loader.  

    - Use the (package private) NewInstance.java loader support 
      from the Crimson tree, portably fixing this implementation
      issue for everyone.  (Except for needing a JDK 1.2 compatible
      build environment ...)  This is seemingly public domain since
      there's no copyright...

[ Mentioned by Miles Sabin; happened across the fix in Crimson ]



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.