Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XML Parsing - File Locked !

 
Raja Pal
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to provide Xerces the input stream using java.nio.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic