[jboss-user] [JBossCache] - Duplicate Key kills transaction

toni do-not-reply at jboss.com
Tue Sep 18 17:30:56 EDT 2007


In my application it's very likely that two or more entity beans with the same primary key (a string) get persisted at the same time. If that happens a "duplicate key" exception is raised and the the current transaction is being rolled back.

The problem is that it does not seem to be possible to recover from this error. Trying to catch the exception still leaves the transaction invalid. How can I make sure that I catch this kind of duplicate key exception without the current transaction being rolled back, when I call entityManager.persit(myEntityBean) ???


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085757#4085757

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4085757

More information about the jboss-user mailing list