How can I do Open Session in View pattern with EJB???
I've found for Servlets, but not for EJB
Thanks a lot!
How can I do Open Session in View pattern with EJB???
I've found for Servlets, but not for EJB
Thanks a lot!
OpenSessionInView is a(n) (Anti)Pattern which's applied to web based MVC applications in order to keep session open in "V"iews for lazy loading mechanism of persistence frameworks. If you don't implement a web application, you won't actually need to implement this pattern. Application server do session management like EJBs for you. You just need to configure your persistence context and inject EntityManager in your JavaBeans.