Can someone please tell me how to do this or where to find information on how to do it? I have a general idea but don't want to waste time going down the wrong path. Here's my problem: I have three separate JVMs running on the same or different machines and they all read/write the same file, which resides on one of the machines. (Right now, they are all on one machine.) My problem is they are not all writing to the file properly. Some information from each process gets in, but a lot is not. My idea - please comment or suggest other ways: Use a separate class to control that file on the machine it resides on and include an RMI "server" in it to control read/write to the file. The other JVMs should go through this class to access the file. I don't know how to go about writing the class though. Just a few pointers is all I need. Thanks.
Hi Jeff, You're right on the idea of using RMI and encapsulating the file into a single class which should be a Singleton. As for using RMI, it is fairly simple once you get the basics down. There is another forum on this site named Distributed Java and I believe there is a very good tutorial on RMI there by one of Sun's gurus. Also, there are various books which cover RMI. One of the bartenders here, Michael Ernest is co-author of The Complete Java 2 Certification Study Guide which has some excellent material on RMI in the Developer's section of the book. Hope this helps Michael Morris SCJP
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher