Hi All, I have a query related to application implementation. We have an application where we load 3 schemas into memory. Now we want to validate 3 different kinds of xmls at run time with appropriate XML Schema. In short our application is multithreaded application.
Currently for each request we create NEW instances of DocumentBuilderFactory and DocumentBuilder: DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document document = builder.parse(xml String); With All Schema's cached as a File objects in Singleton class. 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" ? 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]