| Author |
client ID for lock/unlock
|
no more user
Ranch Hand
Joined: Aug 07, 2002
Posts: 39
|
|
i see this in instructions..
... If an attempt is made to unlock a record that has not been locked by this connection, then no action is be taken
to do this i have see many coments, such pass to the server a client object.. but, hm i can do like this? the server return a int by lock method wich identify this record locking order, and a subsequent unlock could pass this int with the recNum to unlock else the unlock no make effect, or have to be a same identifier for all time of connection of client.. i like java and thanks in advance !
|
 |
Ying Ren
Ranch Hand
Joined: May 24, 2002
Posts: 35
|
|
Hi, I follow the popular solution, that you should create a lockmagager class in your server side. Since, the lock and unlock are only used in remote mode. And in your remote data class which should provide all the services that data class provides, you instance a new lockmanager class using this remote data class, thus, you can track the lock owner all the time. YING REN
|
 |
Michael Morris
Ranch Hand
Joined: Jan 30, 2002
Posts: 3451
|
|
Hi Alex, I agree with Ying that you should use a lock manager and OO methodology to map clients to locked records, but many have taken your approach and passed the certification. I would encourage you though to design it in such a way that you are not forced to change the signatures of lock and unlock in your public Data interface. Hope this helps, Michael Morris [ August 07, 2002: Message edited by: Michael Morris ]
|
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
|
 |
Max Habibi
town drunk ( and author)
Sheriff
Joined: Jun 27, 2002
Posts: 4118
|
|
Hi Alex, You'll be able to find a detailed discussion of all issues regarding locking here HTH, M, author The Sun Certified Java Developer Exam with J2SE 1.4
|
Java Regular Expressions
|
 |
 |
|
|
subject: client ID for lock/unlock
|
|
|