Announcement Announcement Module
Collapse
No announcement yet.
ConstraintViolationException doesn't rollback the transaction Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • ConstraintViolationException doesn't rollback the transaction

    Hello,

    I have the exactly same problem as seen in this thread: http://forum.springsource.org/showthread.php?t=66984

    Except it occurs with Spring Framework & hibernate3 not Spring Batch.

    When I intentionally break a null constraint in a transaction any previous insert is not rolled back, updates are rolled back. The not-null="true" property is not specified in my hibernate mapping. If I specify it the transaction is properly rolled back as the null check is performed by hibernate, not the database.

    I am relatively new to hibernate, spring and jta. Should this behavior be considered normal. Do I have to specify the not-null property for every not-nullable fields ? Any explanation is welcome .

    Thank you.
Working...
X