Can you try this? @PersistenceContext(unitName = APP_NAME) private EntityManager entityManager;
@Produces @RequestScoped protected EntityManager createEntityManager() { return this.entityManager; } On 3 October 2014 08:02, hwaastad <he...@waastad.org> wrote: > Hi, > maybe a little late on this but I've been testing differet scenarios using > tomee and deltaspike and using JTA these are the ones I found out working: > > @Produces > @ApplicationScoped > public EntityManagerFactory createEntityManagerFactory() { > System.out.println("Producing EMF......"); > return Persistence.createEntityManagerFactory("ValidationPU"); > } > > @Produces > public EntityManager createEntityManager(EntityManagerFactory > entityManagerFactory) { > System.out.println("Producing entitymanager....."); > return entityManagerFactory.createEntityManager(); > } > > with a little help from @romain i realized that my em's were resource_local > using the producer shown in the DS docs. > > br hw > > > > -- > View this message in context: > http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/JPA-doc-related-to-EM-Producer-tp4658999p4659077.html > Sent from the Apache DeltaSpike Incubator Discussions mailing list archive > at Nabble.com. >