posted 14 years ago
When using an entity lifecycle listener with the lifecycle method @PrePersist and/or @PreUpdate I get a RollbackExpection in which I can get the original Exception by calling the method getCause on the RollbackException. I understand this. The thrown exception is catched by the persistence provider and then thrown as a RollbackException, because the transaction is rolled back by the persistence provider.
Only when I use a entity life cycle listener with the annotation @PreRemove I get the original exception and have to rollback the transaction by hand.
Why is this different?
Remko (My website)
SCJP 1.5, SCWCD 1.4, SCDJWS 1.4, SCBCD 1.5, ITIL(Manager), Prince2(Practitioner), Reading/ gaining experience for SCEA,