Hi there!
I have a problem on a project, where i want to implement conversation, but there is one thing i don't understand.
I have a EAR project. One of the projects concern to the EJB's, the other 2 concerns to the webapplication. This last 2 depends on the EJB project. On the EJB project i have several beans where i inject the Persistence Context like this:
Code:
@PersistenceContext
private EntityManager entityManager;
and it works fine.
My problem is that the session is local to that class and i want longer units of work with the same session to avoid the LazyInitializationException. On the classes of the projects that depends on the EJB's i can't inject the persistence context, the entityManager remains null. How can i inject the persistence context of a project wich is not he EJB project?
Thanks a lot!!
--Marco Santos, Portugal