GeeCON Prague 2014*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes FBNS: with lock and unlock no need to synchronize Data.java? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "FBNS: with lock and unlock no need to synchronize Data.java?" Watch "FBNS: with lock and unlock no need to synchronize Data.java?" New topic
Author

FBNS: with lock and unlock no need to synchronize Data.java?

Ian Wark
Ranch Hand

Joined: Jun 28, 2004
Posts: 37
Hi.

I am looking at Mr. Habibe's coauthored book and the locking mechanism...

A lot has been said about this. So I'll be brief. If I follow the "one database instance per client" and use a locking mechanism that synchronizes on a static collection variable that keeps track of which records are locked, am I safe without ANY synchronized methods in Data.java?

I am only locking the write operations, and I am using RMI.
 
 
subject: FBNS: with lock and unlock no need to synchronize Data.java?