Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

File locking in Unix?  RSS feed

 
Florin Zoe
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have just subscribed to this forum and I have a question.

Basically I have a Swing client on Windows and a JBoss server on Unix. From the client I can access RTF files located on Unix via a Samba share. This RTF files can be opened using Word on Windows. When some RTF file is opened in this way, and then from the application the user will ask to generate the same file without trying to close the Word application, I've noticed that the new file (generated on unix from a enterprise session bean) will not detect the file locking and as a consequence the new generated file will be empty. How can I see in Java on Unix that the file was already opened by Word application? Apparently Unix doesn't put a lock on the file. I lost a lot of time and I didn't find a decent solution.

Thanks in advance for all the answers.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!