GeeCON Prague 2014*
The moose likes XML and Related Technologies and the fly likes XML Parsing - File Locked ! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML Parsing - File Locked !" Watch "XML Parsing - File Locked !" New topic
Author

XML Parsing - File Locked !

Raja Pal
Ranch Hand

Joined: Jul 12, 2004
Posts: 92
Can someone throw some light on how to dynamically(at runtime) cause an XML file to be parsed (I'm using xerces.jar) and used though another instance of a parser may already be parsing it. I am facing this problem because when I parse my application XML file, there can be multpiple other users whose server side process trigger actions that could be parsing the file. My problem lies in that my request blocks on such a race condition. To avoid I am statically parsing just once and keep allentries in a HashMap and use it. But it will be nice if without sacrificing performance I could avoid the problems of parsing synchronously.


Java Pal - Your friend in technology and innovation...India.
Alexandru Popescu
Ranch Hand

Joined: Jul 12, 2004
Posts: 995
Try to provide Xerces the input stream using java.nio.


blog - InfoQ.com
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Hello "Java Pal",

I'd like to ask you to read our naming policy and proceed to editing your display name into something compliant with the said policy.

Thanks, and welcome to the JavaRanch!


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
 
GeeCON Prague 2014
 
subject: XML Parsing - File Locked !