Hi!

According to the spec all read operations on an EntityManager should work and 
only write operations must be queued up until em.joinTransaction() gets called.
Is this correct?

Maybe I have an error in my sample, but I get a nasty Exception in my sample.

https://github.com/struberg/jta_test
just mvn clean install

java.lang.IllegalStateException: InternalError: an entity manager should 
already be registered for this extended persistence unit
    at 
org.apache.openejb.persistence.JtaEntityManagerRegistry.getEntityManager(JtaEntityManagerRegistry.java:99)
    at 
org.apache.openejb.persistence.JtaEntityManager.getEntityManager(JtaEntityManager.java:91)
    at 
org.apache.openejb.persistence.JtaEntityManager.find(JtaEntityManager.java:164)
    at 
org.apache.webbeans.custom.persistence.EntityManager$$OwbNormalScopeProxy0.find(javax/persistence/EntityManager.java)
    at at.struct.jpatest.CustomerService.loadCustomer(CustomerService.java:56)
    at 
at.struct.jpatest.CustomerService$$OwbNormalScopeProxy0.loadCustomer(at/struct/jpatest/CustomerService.java)
    at at.struct.jpatest.StoreTest.assertSurName(StoreTest.java:67)
    at at.struct.jpatest.StoreTest.testCustomerLifecycle(StoreTest.java:41)

LieGrue,
strub

Reply via email to