Page 1 of 1
About Question enthuware.oce-jpad.v6.2.351 :
Posted: Fri May 25, 2012 2:53 pm
by ETS User
Shouldn't be somewhere before persist a 'tx.begin()' ?
LifecycleCallbackTestEntity lcte = new LifecycleCallbackTestEntity();
lcte.setName("Some value");
em.persist(lcte); // 1
tx.commit();
Re: About Question enthuware.oce-jpad.v6.2.351 :
Posted: Sat May 26, 2012 9:23 am
by admin
Not necessarily right before the first line. Since the question doesn't show complete code and none of the options indicate any possibility of a transaction not being started (there would be an exception if the transaction was not started), it is not relevant for the question.
But you are right, it should be there for more clarity and to avoid confusion. This has now been added.
thank you for your feedback!
Re: About Question enthuware.oce-jpad.v6.2.351 :
Posted: Sat May 26, 2012 9:31 am
by cosminvacaroiu
Oki, Thanks.