Here's our scenario:

We're running JDK 1.4.2_05 with the latest Xerces/Xalan in the JRE's
lib/endorsed directory.  We run servlets (on New Atlanta's ServletExec
engine) and are experiencing some serious performance issues when
instantiating a parser instance from within a servlet using:

DocumentBuilderFactory dFactory = DocumentBuilderFactory.newInstance();
dFactory.setNamespaceAware(true);
DocumentBuilder dBuilder = dFactory.newDocumentBuilder();

We've been working with the New Atlanta folks trying to sleuth it out, and
the issue seems to be that somewhere in the factory code are
getResourceAsStream() calls, probably to load property or configuration
files.  These calls seem to be performed every request, rather than loaded
once, and when there are lots of JARS in the classpath, this operation can
be VERY VERY expensive searching the JARS.

Question is:

Is there any way to bypass this frequent loading using either:

        a) JVM command line parameters
        b) Setting a property through code
        c) Some type of singleton object

Many thanks!

Rick Bullotta
CTO
Lighthammer Software (http://www.lighthammer.com)


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

Reply via email to