Shouldn't be somewhere before persist a 'tx.begin()' ?
LifecycleCallbackTestEntity lcte = new LifecycleCallbackTestEntity();
lcte.setName("Some value");
em.persist(lcte); // 1
tx.commit();
About Question enthuware.oce-jpad.v6.2.351 :
Moderators: Site Manager, fjwalraven
-
- Site Admin
- Posts: 10066
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.351 :
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!
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!
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: No registered users and 123 guests