This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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".
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
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