posted 11 years ago
Hey Folks,
I have a singleton class which is responsible for reading and writing to the database file named DatabaseAccess.
When a class connects to my Server via RMI, it is given an instance of a class named ControllerImpl. ControllerImpl has my business logic (book, return, search etc).
ControllerImpl creates an instance of ContractorManagerImpl. ContractorManagerImpl has an instance of a class named Data.
Data is the class which implements the sun provided interface. Data's methods call those of DatabaseAccess.
In the main class of my application, when I start my server, and then start a remote client. The GUI successfully reads/writes to the database.
However, if I then try to start another client, no data is returned from the database. For the second client, all of the static variables of my singleton(DatabaseAccess) are null. These variables are the database index file, the lock for the index file.
In the scenario which I have just described, does anything scream at you as being completely irrational?
Thanks,
G