p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/)
-   BOOK: Professional Java EE Design Patterns (http://p2p.wrox.com/book-professional-java-ee-design-patterns-776/)
-   -   Entity Manager Dao Factory Thread Safety (http://p2p.wrox.com/book-professional-java-ee-design-patterns/94889-entity-manager-dao-factory-thread-safety.html)

atrif August 27th, 2015 07:41 AM

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


All times are GMT -4. The time now is 07:24 PM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
2013 John Wiley & Sons, Inc.