| Author |
NX: lock and unlock
|
jq zhu
Greenhorn
Joined: Aug 20, 2003
Posts: 12
|
|
my assignment is : "public void lock(int record) public void unlock(int record) The unlock method simply removes the lock from the specified record. If an attempt is made to unlock a record that has not been locked by this connection, then no action is be taken." so my question: how can iimplement the unlock without modified its definition? i have two choice : one is : call lock(i)-modify(Data)-unlock(i) from client site, but client will call server three time in this way. i think how can modified a record does need known by client too. second : call lock(i)-modify(Data)-unlock(i) from server site,and server implements rmi interface, but i can't make sure it correspond with sun's requeriment. which one should i chose , and is there any other good idea to implment it? what your advice? thanks!
|
scjp1.2,scjd1.2,scwcd1.4,scea1.2 part1
|
 |
jq zhu
Greenhorn
Joined: Aug 20, 2003
Posts: 12
|
|
lock requirement description: The lock method should block until the requested lock can be applied. The integer argument indicates the record to be locked. If the method is called with an argument of -1, the entire database should be locked
|
 |
jq zhu
Greenhorn
Joined: Aug 20, 2003
Posts: 12
|
|
|
why no person replay, it is very urgent!
|
 |
jq zhu
Greenhorn
Joined: Aug 20, 2003
Posts: 12
|
|
closed, i have resolved it. thanks.
|
 |
Andrew Monkhouse
author and jackaroo
Marshal Commander
Joined: Mar 28, 2003
Posts: 10816
|
|
Hi JQ, Welcome to JavaRanch. Sorry I didnt get to your post until now. I hope you will still stick around and give us more chances to help. I am glad you solved your problem. Davidd was tackling the same problem in this thread - you may be interested in the solution we were discussing there. Regards, Andrew
|
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
|
 |
jq zhu
Greenhorn
Joined: Aug 20, 2003
Posts: 12
|
|
thank you very much! i have gone to the Topic: NX: About data consistent. it is very good. i will not level here.
|
 |
 |
|
|
subject: NX: lock and unlock
|
|
|