Page 1 of 1

About Question enthuware.oce-jpad.v6.2.404 :

Posted: Sat Sep 24, 2016 8:02 am
by tioola
As per section 13.6.2.5 of EJB 3.1

If the client calls without a transaction context the container throws the javax.ejb.EJBTransactionRequiredException only if business interface is a remote business interface TransactionRequiredException is throw.

The option 3 is TransactionRequiredException, but in my understanding it should be EJBTRansactionRequiredException once there is no place specifying that it is a remote call, is my understand incorrect?

Thanks

Re: About Question enthuware.oce-jpad.v6.2.404 :

Posted: Mon Sep 26, 2016 8:31 pm
by admin
As per section 3.1.1 of Persistence 2.0 specification, EntityManager's remove method throws TransactionRequiredException if invoked on a container-managed entity manager of type PersistenceContextType.TRANSACTION and there is no transaction.

The persistence specification is more relevant here because we are talking about em.remove.

HTH,
Paul.