If you put it this way then yes... your solution seams good.
But I would like to have the check only once. Say as a DB constraint. Otherwise I'll
be doing twice the same verification.
Sometimes it's easier and faster to implement a db constraint and if you try to mirror
that check in the code it would require a query or two and some logical checks. This looks
a bit inefficient in my opinion.
FYI The discussion on the transaction management continued here:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=117437
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4086144#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...