It's not a secret anymore!*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Can I implement lock/unlock in DataAccessRemote? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Can I implement lock/unlock in DataAccessRemote?" Watch "Can I implement lock/unlock in DataAccessRemote?" New topic
Author

Can I implement lock/unlock in DataAccessRemote?

Rommel Carvalho
Greenhorn

Joined: Mar 27, 2002
Posts: 9
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

Joined: Feb 05, 2001
Posts: 17249
    
    6

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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Rommel Carvalho
Greenhorn

Joined: Mar 27, 2002
Posts: 9
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can I implement lock/unlock in DataAccessRemote?
 
Similar Threads
How to create unique Client ID
Implementing Lock/Unlock
data class adn adat client..
Design Choice...(Post your opinions)
Design Question?