I have a ClientTableModel which get data from db though a RemoteData, the RemoteData is got from a RemoteDataFactory.
at the same time I have some ModifyButton , FindButton(which is command pattern, I think).. to execute command through RemoteData.
Are these RemoteData the same one? How can?
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
So to get the data you call the find and getRecord methods? So to do an update you would call the update method.
Does this make sense?
Are you asking if it should be a Singleton? - no, each client should get their own copy.
Are you asking if one client can get an RMI connection and another get a direct connection? - no this would violate the instructions (in hotels) that tell us that only one application will access the database at any given time. If your instructions dont say this, dont worry - it is a safe bet. Catering for other eventualities is out of scope.
On the other hand, I want to konw if the RemoteData is a "multiton"
, I mean each client could get a RemoteData to read, another to find, another to write, each operation have a different RemoteData.
Because the ClientConnection get the RemoteData from RemoteDataFactory, I suppose when I press update button,in the class UpdateButton I will get a RemoteData from ClientConnection at runtime, I don't think it is the same RemoteData which I get at runtime in my FindButton when the find button is pressed. am I right?
Andrew said:Are you asking if one client can get an RMI connection and another get a direct connection? - no this would violate the instructions (in hotels) that tell us that only one application will access the database at any given time. If your instructions dont say this, dont worry - it is a safe bet. Catering for other eventualities is out of scope.
Damu repliedYou mean when one client is writing the db.db, the others that want to read the db.db have to wait?
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
when a client is writing record, can others read from the db.db?
Don't get me started about those stupid light bulbs. |