Win a copy of Kubernetes in Action this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JavaBeans are NOT thread-safe, need clarification  RSS feed

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In SCWCD Exam Study Kit Book by Hanumant Deshmukh et al,
Chapter 16.7 What's more: mentioned that "Tags are safe; beans are not. Beans like other separate utility classes, have to be made thread safe by the developer".
I'm kind of confused after reading this statement, how and where we need make this thread safe.
M Bala
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
He certainly meant that if a resource is accessed by a javabean, you may have to synchronize the access to methods that do.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!