R�> Hi!
R�> 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?
R�> IMHO the BMP-PM should unwrap the target exception. This is done by
R�> other anyway.
What should the BMP-PM do with the unwrapped exception? I would
suggest to write the exception to standard out and wrap it into
an RemoteException. Is that ok? Otherwise we would have to modify the
method signature which is not an option.
>> 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.
R�> I don't think it makes any difference who threw the exception.
Stephan.