On Monday 18 February 2002 11:37, Jeremy Quinn wrote: >. . . > While I am working out how to do this the right way, I'll fix the > Transformer so that it writes to a temporary file as above, and if > another person attempts to simultaneously overwrite, I can just throw > an Excpetion and have them try again later. I would like to work out > how to do this properly though ;) >. . .
If you can force the temporary filename to be a unique mapping of the filename that you're writing, then just detecting its existence will tell you that another user is already writing to the same file. This gives you a nice "optimistic locking" that will be sufficient in most cases I think. Maybe the File.createTempFile method will help you here. -Bertrand --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]