You should be able to run this operation within the scope of a transaction and
have both operations work as a single unit
You can do this programmatically kind of like this for a hint:
| UserTransaction tx =
NamingContext.lookup("javax.transaction.UserTransaction");
| tx.begin();
|
| //your code here
| addMyUser
| userModule.addUser
|
| tx.commit();
|
Even more elegant is using container-managed transaction using EJB 3.0 or
something like that.
I have personally used it with EJB 3.0 container managed transactions and it
works just fine.
Thanks
Sohil
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980061#3980061
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980061
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user