I believe that dependent pseudo-scope could be the best choice for an entity manager bean in a CDI container.
However, I believe that a request scoped entity manager bean sometimes is required. When a transaction begin in a service layer it is useful to interact with multiple data access methods using same persistent context instead.
I made a java standalone - junit test application with only cdi - hibernate and narayana (cdi - jpa - jta). I did some test cases but a test (with multiple transactions) fails.
So my question is: Does anyone know about some sample project using cdi - hibernate - jta - junit using a @RequestScoped entity manager bean?
I want to check cdi and hibernate configuration and check if the test is successful.