3 Replies Latest reply on Aug 10, 2007 5:35 AM by pmuir

    Using EntityManager in Hibernate Validator

    csl

      I try to use the EntityManager in a Hibernate Validator, for I'd like to ensure the uniqueness of a username. This should get reported to the user using ajax4jsf. I implemented it using a JSF Validator and it worked, but the Hibernate Validator approach would be preferable, I guess.

      How can I inject the EntityManager into my Validator? I also tried Component#getInstance but it returns a proxy to an already closed Entity Manager...