• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can I implement lock/unlock in DataAccessRemote?

 
Rommel Carvalho
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,
I am wondering if I can implement the lock/unlock methods in a class that is not Data and does not extends Data. I implemented in DataAccessRemote that implements DataAccessRemoteInterface. Is that ok? I am in doubt because my assingment says: "modify or subclass the Data class".
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd suggest doing a search on LockManager. In this case the lock and unlock are coded into the LockManager class. No code is placed in the Data class. It is ok not to put any code into lock or unlock in the Data class.
Mark
 
Rommel Carvalho
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mark,
Tkx for replying so fast.
Still, I do not see why I should implement lock/unlock in a LockManager class if I can do that in the RemoteDataImpl (because in local mode there is no need for lock/unlock - so I leave Data without code in lock/unlock) and it works just fine for what I need.
Is there a reason why implementing in LockManager is better than implementing in RemoteDataImpl?
Tkx again,
Rommel Carvalho
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic