View Single Post
  #1 (permalink)  
Old August 27th, 2015, 07:41 AM
atrif atrif is offline
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2015
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Entity Manager Dao Factory Thread Safety

In the example you have a MovieDaoFactory which is Application Scoped.

In it you inject an Entity Manager which is not a thread safe object.

Then you produce a MovieDaoImpl without specifying a scope which means it is produce as application scoped.

Which in turn means that the DAO uses a non thread safe instance of Entity Manager.

Am I wrong in the above thinking? Please explain!

Thank you in advance
Reply With Quote