aspose file tools*
The moose likes XML and Related Technologies and the fly likes Dynamic generation of XML 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 "Dynamic generation of XML" Watch "Dynamic generation of XML" New topic
Author

Dynamic generation of XML

Satyajeet Kadam
Ranch Hand

Joined: Oct 19, 2006
Posts: 215
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

Joined: Jul 10, 2008
Posts: 211
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.


-Varun -
(My Blog) - Online Certifications - Webner Solutions
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18643
    
    8

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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dynamic generation of XML