This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Can isolation level 'serial' produce the same protection as the 'synchronized' keyword? 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 » Databases » JDBC
Bookmark "Can isolation level Watch "Can isolation level New topic
Author

Can isolation level 'serial' produce the same protection as the 'synchronized' keyword?

Jef Smith
Greenhorn

Joined: Jul 28, 2011
Posts: 14
I'm working on a Java course registration app that contains the following code:


course.getNumberOfOpenings() runs a query to get the number of openings so this situation seems to call for a synchronize block to prevent a swap out of the thread after the number of openings check but before the actual registration but there is no synchronization code of any kind.

However, immediately before this block is executed the isolation level of the JDBC connection is set to 'serial'. Does this isolation level provide the equivalent protection of a synchronized block in this case?

Thanks for any insight into this,
JefS
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can isolation level 'serial' produce the same protection as the 'synchronized' keyword?
 
Similar Threads
Dirty read (?) problem
monitor and object lock
Monitor and lock?
Doubt in synchronized....
Java fresher