But what's wrong with having an EJB3 doing the DAO layer?
hey, I have the similar question, how to get the another session bean by the session bean already got the client, which is a generic POJO ?
As §5.3.2 of the EJB 3.0 PFD
In any SE environment you can do :
EntityManagerFactory emf =
EntityManager em = emf.createEntityManager();
Did you already tried that ?
As a POJO unmanaged is a SE, as long as the persistence.xml is configured it should work ...
Anyway, I do not see also what's wrong with EJB3 the DAO ;-)
I have a similar problem because I need an EntityManager in a custom hibernate validator class. It sure would be nice if I could just dependency inject it, but for now I'll just look it up in JNDI (the old fashioned way).