Hi, can you compare what you are doing with the @Test method of the following test please:
http://svn.apache.org/repos/asf/openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/core/stateful/StatefulJPATest.java this test passes. do you inject the stateful in your bean? - Romain 2012/2/21 amber <[email protected]> > > I have another minor issue : > > > The EJB is marked > "@TransactionAttribute(TransactionAttributeType.REQUIRED)" > so a create/update action is done inside a transaction > > I can trace it : DEBUG [Transaction] TX Required: Started transaction > org.apache.geronimo.transaction.manager.TransactionImpl@26a150e > > ... and all work fine.. > > but... i have one test fail : the remove operation ! > > javax.persistence.TransactionRequiredException > at > > org.apache.openejb.persistence.JtaEntityManager.assertTransactionActive(JtaEntityManager.java:91) > at > > org.apache.openejb.persistence.JtaEntityManager.remove(JtaEntityManager.java:140) > at > org.foo.services.foo.impl.FooServiceBean.deleteFoo(FooServiceBean.java:84) > at > > org.foo.services.foo.FooServiceBeanTest.deleteFoo(FooServiceBeanTest.java:126) > > I have to use the trick : > > getTransactionalCaller().call(new Callable() { > public Object call() throws Exception { > ... the code ... > return null; > } > }); > > and the remove() works... Why I have to do that only on the remove > operation > and not others ? > > > thanks! and pardon me if my questions are trivials :) > > -- > View this message in context: > http://openejb.979440.n4.nabble.com/openEJB-fail-on-second-test-tp4401889p4406177.html > Sent from the OpenEJB User mailing list archive at Nabble.com. >
