aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Lock Manager Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Lock Manager" Watch "Lock Manager" New topic

Lock Manager

Nagu Rathina
Ranch Hand

Joined: Jun 17, 2002
Posts: 31
I am using LockManager for implementing lock/unlock methods. My remote object has an instance of LockManager so that remotedataaccess can call these methods.
Is this design right? or LockManager should not be with Connection obj?
pl help me.
Sam Stackly
Ranch Hand

Joined: May 04, 2002
Posts: 109
In my design , I create a ConnectionFactory(extends UnicastRemote) object which has an instance of Data and LockManager,return an instance of Connection object(which is remote object also), and ctor for Connection object accept two parameter 1- Data and 2- LockManager
Nagu Rathina
Ranch Hand

Joined: Jun 17, 2002
Posts: 31
Sam, dont u have a wrapper class for Data in client side, which implements all public methods of Data?
Jack Yang
Ranch Hand

Joined: Jan 31, 2002
Posts: 59
Hi Sam,
Can you explain what's about your Connection Object?And what's about your ConnectionFactory?Is it your RMI Server?

Nagu Rathina
Ranch Hand

Joined: Jun 17, 2002
Posts: 31
Sam, will u store LockManager.class in remote clients also?
I agree. Here's the link:
subject: Lock Manager
Similar Threads
Clarification on Synchronization.. say that three times fast
Handling Lock/unlock
Can I remove the IOException thrown by lock() in Data class?
design question: should the lock manager be synchronized whenever it's used in Data?
Once again about locking