Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Other Java > Java GUI
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Java GUI Discussions specific to programming Java GUI.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java GUI section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Closed Thread
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 15th, 2004, 02:23 AM
Authorized User
Join Date: Sep 2003
Location: Cambridge, , United Kingdom.
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default FileLock()


I am currently writing a program which requires me to create a locked file, which a user can edit, and then the file be distributed to a/some server/s. We have managed to get this working under windows using the FileLock lock() method. However in Linux, due to the way Linux locks files, if the same .class file is used, multiple locks can be obtained, potentially from different users, on the same file (This could potentially lead to a lost update problem, etc) I have tried creating unnamed new objects from each required class (IE the Server, and the Client) using just new LockingServerTry() and new Client3GUI(); which istself calls new Client2(). This didn't work. Inefficent I know, but thats the way my lecturer wants it. (IE He can run it with and without a GUI)

Does anyone have any ideas how I could solve this problem? Websites are good, as are (small) snippets of code or a java class file name (EG FileChannel, or FileLock) The package it comes from would be useful as well (EG FileChannel and FileLock are java.nio.channels)

If anyone wants my code, then I will post it up here, however it is long (At last count 400 - 500 lines per .java file) and as such if I can avoid it, I will!

I thank you in advance for any help you are able to offer me.

David Thorne, Student
David Thorne, Student
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

All times are GMT -4. The time now is 11:15 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.