Hi, Andrew!
Thanks for your comments!
I am not certain why you are doing this though. I would have thought the Data class would get it's corresponding instance of the LockManager within the Data class's constructor. In which case you should not need to keep the name of the file around.
Yes, you are right! I have no need to add that "String dbName" field in
Data class. But still I have to add another "LockManager lockMgr" field
instead. Anyway, your suggestion is good and clear.
Originally, I thought every database or table should have a "Name" to be a
token. It's true in real world. So, any access to a database or table should
know its name. And thus the dbName should be an attribute of the accessing
class. But for FBN, it seems no need to store the name in Data class.
Here I've got another question which puzzled me for a few days.
Would you please be kind to clear me again?
As in my post above, the design is based on this: (I choosed RMI)
Each remote database client has its own Data instance.
(That is somewhat alike Max's design, which also keeps a Data instance for
each remote client.)
Here comes my question,
If each client has its own Data instance, many "synchronized" modifiers
of other methods seems to be no use according to Data class difinition.
But my design is restricted to having that Data instance for "clientId"
purpose. Now I am in a delimma.
Andrew and Max, and anyone else,
Would you please help me out?
Thx in advance!