Re: File Read in 2 JVM
- From: kingpin+nntp@xxxxxxxxxxxxxxx
- Date: 12 Jan 2007 12:23:20 -0800
Chris Uppal wrote:
kingpin+nntp@xxxxxxxxxxxxxxx wrote:
Three possible solutions:
0. Have the reader lock the file so that no other process can write to
it. If you can't get the lock, then it means another process is
writing to it.
1. Have the writer create a secondary status file, which is deleted
once the process has been completed. The java.io.File.deleteOnExit()
method can make this easier.
2. Have the writer create the file with a different name/extension, and
then rename it after closing it.
...also...
3. Have the writer write a unique end-marker to the output file.
That's a very good suggestion, as long as there's absolutely no
potential for data being written to the file to be identical to the
end-marker character sequence.
.
- References:
- File Read in 2 JVM
- From: moleskyca1
- Re: File Read in 2 JVM
- From: kingpin+nntp
- Re: File Read in 2 JVM
- From: Chris Uppal
- File Read in 2 JVM
- Prev by Date: Re: Struts checkbox with ActionForm in request scope
- Next by Date: Re: void type not allowed in println(). Was Re: Inheritance and lousy Frame
- Previous by thread: Re: File Read in 2 JVM
- Next by thread: Could not find datasource: jdbc/msmydb, NamingException.....
- Index(es):
Relevant Pages
|