xerces-j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neeraj Bajaj <Neeraj.Ba...@Sun.COM>
Subject Re: Correct use of DocumentBuilderFactory & DocumentBuilder : Multithreaded application
Date Mon, 20 Sep 2004 06:46:19 GMT


Vikrant sutar wrote:

>My question to all of you is:
>
>Is it absolutely required to create an instances of
>"DocumentBuilderFactory and DocumentBuilder" for each
>request? [as it is performance hit]
>
>Is there any way we can create application-wide, 3
>instances of DocumentBuilder ,initially and re-use
>them for all further validation requests for "xml
>String" ?
>

JAXP 1.3 solves this problem by providing a way to reset [1] the 
instance created.
These APIs are also part of JAVA platform J2SE 5.0

Neeraj

[1] 
http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/parsers/DocumentBuilder.html#reset()

>I guess even synchronization can be performance hit.
>
>Please advise me.
>
>Thanks a lot for your help /Vikrant
>
>
>		
>__________________________________
>Do you Yahoo!?
>New and Improved Yahoo! Mail - Send 10MB messages!
>http://promotions.yahoo.com/new_mail 
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
>For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Mime
View raw message