This content has been marked as final. Show 3 replies
Just guessing here but can you get the EntityManagerFactory from JNDI?
Yes, this works.
Context ctx = new InitialContext(); EntityManagerFactory entityManagerFactory = (EntityManagerFactory) ctxlookup("java:/myprojectEntityManagerFactory"); entityManager = entityManagerFactory.createEntityManager();
But isn't there a better way to do this? It would be great if I could obtain Seam components (e.g. Log).
Hibernate Validators are not Seam components and don't fall within the Seam lifecycle hence you can't do injection in there.