title: 2 java processes - one reading and one writing to the same file
body: <p>I have two java processes which I want completely decoupled from each other.</p>
  
  <p>I figure that the best way to do this is for one to write out its data to file and the other to read it from that file (the second might also have to write to the file to say its processed the line).</p>
  
  <p>Problems I envisage are do with similtaneous access to the file.  Is there a good simple pattern I can use to get around this problem?  Is there a library that handles this sort of functionality?</p>
  
  <p>Best way to describe it is as a simple direct message passing mechanism I could implement using files. (Simpler than JMS).</p>
  
  <p>Thanks Dan</p>