237238239240241242243244245246247
boolean notTxOwner = txm.begin(); em.persist(mainObject); txm.rollback(notTxOwner); em.persist(subObject); txm.rollback(txOwner); } catch( Exception e ) { fail("There should not be an exception thrown here: " + e.getMessage()); }
234235236237238239240241242243244
try { boolean txOwner = txm.begin(); boolean notTxOwner = txm.begin(); em.persist(mainObject); txm.rollback(notTxOwner); em.persist(subObject); txm.rollback(txOwner); } catch( Exception e ) {
240241242243244245246247248249250