p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional Java EE Design Patterns (http://p2p.wrox.com/forumdisplay.php?f=776)
-   -   Entity Manager Dao Factory Thread Safety (http://p2p.wrox.com/showthread.php?t=94889)

atrif August 27th, 2015 06: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:22 AM.

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