This content has been marked as final.
Show 3 replies
-
1. Re: JEE unusable?
alesj Oct 31, 2011 6:21 AM (in response to ben_utzer)Why would you wanna serialize EntityManager?
Simply mark it as transient, and get it re-injected when you need it.
-
2. Re: JEE unusable?
ben_utzer Oct 31, 2011 7:15 AM (in response to ben_utzer)All information that existed in the PersistenceContext would be lost. I think I can live with that as long as no extended PersistenceContext is used. I wonder why I seldom see examples where the injected EntityManager is marked transient...
Thanks for your suggestion!
-
3. Re: JEE unusable?
alesj Oct 31, 2011 11:41 AM (in response to ben_utzer)Imo, extended PC should work, even if you mark it transient, as it should be handled by the container.
(but I'm no JPA / EJB3 expert ...)