Hi, On 3/20/06, David Kerber <[EMAIL PROTECTED]> wrote: > Caldarale, Charles R wrote: > > >>From: David Kerber [mailto:[EMAIL PROTECTED] > >>Subject: Re: [OT] How does Synchronized code interact with > >>other applications > >> > >>Ok. So if I were to port the Delphi app to java and run it > >>as another thread in my app, I would be ok there... > >> > >> > > > >Not necessarily. You will still have the same file open twice, once for > >the writer, once for the reader. When the writes become visible is > >still under control of NTFS. > > > > > Ok. > > >If you're going to run the two apps inside the same JVM, do you even > >need to write a file? You should be able to just pass String objects > >from one to the other. > > > > > The output side is a database write, and part of our design criteria was > to be able to stop and start the database without interfering with data > flow from the remote sites into the central office. So we write the > data to disk and acknowledge the successful receipt of the data to the > sites at that time. Then we can read the data out of the disk file and > write it to the database indpendently.
and what about to use JMS (ActiveMQ for example)? > > > > > > >>Does fileWriter.flush() do almost the same thing? > >> > >> > > > >No guarantee - there are two levels of buffering going on. The flush() > >API pushes the stream information out to the file system, but does not > >require that it actually be written to disk. Only the sync() does that. > >I don't know if the results of the flush() are visible to other > >processes in NTFS. > > > > > They are, as far as I understand it. > > Dave > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >