This content has been marked as final.
Show 2 replies
-
1. Re: Getting EntityManager in FacesValidator
lightguard Mar 30, 2012 3:43 PM (in response to paul_)If you're using Seam Faces you can @Inject an EntityManager. People are typically doing a Seam Managed Persistence Context for this. Another way would be to @Inject another component which has the @PersistenceContext in it.
-
2. Re: Getting EntityManager in FacesValidator
paul_ Apr 10, 2012 2:33 AM (in response to lightguard)Yea, I ended up injecting another component that uses @PersistenceContext.
As far as I get it, one can't use @PersistenceContext in a validator because it isn't a bean managed by the container.
Anyhow, Thanks Jason for your reply.
Greetings from Germany
p.salg