> > 3.5.6: > > > > "Lifecycle callback methods may throw runtime exceptions. A runtime > > exception thrown by a callback method that executes within a > > transaction > > causes that transaction to be rolled back. No further lifecycle > > callback > > methods will be invoked after a runtime exception is thrown." > > One other thing to check is if the tx is marked rollback > only, should > we not call anymore lifecycle events or is that "NoFurther lifecycle > callback" clause supposed to apply to the single entity that failed.
You mean: if someone calls setRollbackOnly() and then calls flush(), what should we do about the @PreUpdate callback? I don't have a strong opinion either way. My read of the spec is that we should execute the callback; callbacks should only be aborted if the exception is thrown during a time when the callbacks would have otherwise been invoked. > > Further, I think that 3.7 trumps 3.5.6, so if an exception is thrown > > from a callback during a find(), we should be marking the > transaction > > for rollback, rather than actually rolling it back. > > That is standard EJB behavior and what I would expect from the EJB > spec committee. Agreed. -Patrick _______________________________________________________________________ Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.