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

  • ConstraintViolationException doesn't rollback the transaction


    I have the exactly same problem as seen in this thread:

    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.