Injection of PersistenceContext

Added by Homauoon Mahboobi 9 months ago

How we can use Hades with EJB 3 supported applicaion server, such as Glassfish
and How we can setup entity manager to GenericJpaDao?
I want to use @PersistenceContext in this case.


Replies

RE: Injection of PersistenceContext - Added by Oliver Gierke 7 months ago

You can pretty much simply use GenericDaoFactory.create(..), hand it the EntityManager you got injected and create DAO instances as you like from the factory.

Regards,
Ollie