I tried wrapping the 'addchild()' method with a 'RequiresNew' transaction
attribute -- no avail.
Here's what I did to resolve this issue:
1) I created a 'UNIQUE INDEX (entityId, parentKey)' in the (child) entity bean.
This will
prohibit bad data being slammed into the table underneath the
loubyansky,
Thanks for the message. I tried adding the following code to my 'ejb-jar.xml'
file:
|
|
| Product
| Local
| addChild
|
|
com.tm.wineStore.ejb.catalog.ItemValue
|
|
| RequiresNew
You can addChild in RequiresNew, catch TransactionRollbackException and
assuming it's unique key violation handle it appropriately.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3854734#3854734
Reply to the post :
http://www.jboss.org/index.html?module=bb&op