• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynamic generation of XML

 
Satyajeet Kadam
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) I have Program A that creates an XML file dynamaically as per data in database using DOM parser.
2)Program B reads the generated file that use for processing.

Q1) If i phiscally delete the file from location program B is still able to read it.Deletion of file is not reflected until i restart the JBOSS server again?

Q2) Do we have any way where restart of the server can de prevented?





 
Varun Chopra
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
amolpalekar kadolkar wrote:1)
Q1) If i phiscally delete the file from location program B is still able to read it.Deletion of file is not reflected until i restart the JBOSS server again?


I think that will happen only if

a) Either file contents are read and stored in cache (like in session) and second time program is reading from cache
OR
b) You deleted the file but it was not deleted as file is in use by server process (but this should not be the case as you have not mentioned any problem while physically deleting file)

Make sure you close the file streams at the end of process so that there is no pointer to the file.
 
Paul Clapham
Sheriff
Posts: 20998
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps you didn't close the file?

By the way I don't think that "When I delete a file in (some unspecified operating system), other programs can still access it" is really an XML question. Should I move this to the JBoss forum or should I move it to the forum about whatever operating system you were asking about?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic