On Oct 3, 2008, at 3:04 AM, Jean-Louis MONTEIRO wrote:
Hi,
I had a look on the post
http://www.nabble.com/exceptions-handling-with-Webservices-td19668275.html
http://www.nabble.com/exceptions-handling-with-Webservices-td19668275.html
.
I have a question related to the EjbInterceptor class (openejb-cxf
module).
In the invoke method, we can either directly call the target EJB
bean (when
no handler has been defined) or delegate to the CXF chain when
handlers have
been defined.
Regarding the first case, when an ApplicationException is thrown. This
exception is caught by the preEjbInvoke method (from the
EjbMethodInvoker).
The preEjbInvoke method registers all exceptions as UNCHECKED so the
client
always receives a SOAPFaultException instead of the user defined
application
exception.
We can work around this problem by adding a dummy handler or change
the test
to be sure it's always false.
To conclude, the optimization made to directly invoke the target EJB
bean
does not handle exceptions correctly.
Didn't work on that code -- I'm not sure I understand the motivation
behind the optimization.
Jarek, you have any insight?
-David