File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes URLyBird: about synchronized business methods. 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 "URLyBird: about synchronized business methods." Watch "URLyBird: about synchronized business methods." New topic
Author

URLyBird: about synchronized business methods.

Ronggen Liu
Ranch Hand

Joined: Jul 29, 2007
Posts: 40
Hi Guys,

do you make the all business methods(in business layer) to synchronized? i think it's not needed, because the locking mechanism will make the operations in one thread behave atomically. right?

Thank you!
Ronggen


SCJP 1.4,<br />SCJD Java 2,<br />...
Taariq San
Ranch Hand

Joined: Nov 20, 2007
Posts: 192
Originally posted by Liu Ronggen:
right?


Right.
Jeffry Kristianto Yanuar
Ranch Hand

Joined: Oct 01, 2007
Posts: 759
I don't synchronize all the method. I just use J2SE 5.0 locking mechanism and using synchronized keyword on a particular object.

cheers

Jeffry Kristianto Yanuar
SCJP 5.0
SCJA
SCJD (Working on UrlyBird 1.3.2)
 
 
subject: URLyBird: about synchronized business methods.
 
Similar Threads
synchronized(obj)
Monitor and Instance Data ?
thread-safe java beans
Any Solution of Deadlock?
Business Delegate Methods