I have forgotten something: You forgot to mark the boundries of the transaction
scope correctly. The transaction scope is importend, because the entitymanager
persists the entities if he leaves the transaction scope. The boundries are
marked by the begin() and commit() method. You forgot the begin method.
The corrected code:
| (...)
| ut.begin(); //start of the transaction scope
| a.setName("F002");
| em.merge(a) // better: a = em.merge(a)
| ut.commit(); //end of the transaction scope: a is persisted at this point
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986674#3986674
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3986674
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user