Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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.
 
Don't get me started about those stupid light bulbs.
 
subject: FBNS: with lock and unlock no need to synchronize Data.java?
 
Similar Threads
Implementing Lock/Unlock
Data.java
For Max: Controller in MVC
Share parts of my choice.txt with javaranchers
NX: Extending or expanding the DB interface.