Hi!
Stephan Gruschke wrote:
> Well the ejb spec states that the original exception should be thrown.
> That's clear. But the problem is *who* should throw the original exception?
> BMPPersistenceManager or some module higher responsible for the
> invocation of the client?
>
> The idea was sending back the Create- or the InvocationTargetException
> and letting some higher module (for example EntityContainer?) the
> responsibility to send the real exception. This would decrease the
> amount of different exception types thrown inside of an entity bean call
> and would result in some easier handling of different exceptions,
> wouldn't it?
IMHO the BMP-PM should unwrap the target exception. This is done by
other anyway.
> Another point would be distinguishing between exception thrown by the
> bean and by the container. An bean could throw an InvocationTargetException
> and it would be impossible for high-level modules to determine if the
> exception was thrown by the container or the bean. If the bean
> exception would be wrapped by some well defined exceptions inside
> the container the interface to other modules would be more precise.
I don't think it makes any difference who threw the exception.
/Rickard
--
Rickard �berg
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com