EJB 1.1 Exception Handling section its specifies that that an
application exception thrown from a container initiated transaction (one
that starts with the bean invocation) may or may not indicate a
transaction rollback. This seems flawed to me. The bean should be
required to throw a system exception (possibly wrapping a application
exception) if a transaction roll back is forced
(EJBContext.rollbackOnly()). Also the container should throw a
RemoteExcepton if the bean explicitly rolls back the transaction or if
the container fails to commit the transaction after receiving an App
Exception.
As it stands now, an application exception thrown by a bean that started
its own transaction (Required, Required New) may or may not indicate
that the transaction was rolled back. Since there is no way to check on
the success of the transaction from the bean's client, their is no way
to recover or even to know if a recovery is necessary. IMO this is a
serious flaw in the exception handling model introduced in EJB 1.1
(otherwise the new model is excellent).
I'm looking for a Sun Authority to comment.
Thanks,
Richard
--
Richard Monson-Haefel
EJB Expert for jGuru.com
( http://www.jguru.com )
Author of Enterprise JavaBeans
Published by O'Reilly & Associates
( http://www.ejbnow.com )
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".