users@jersey.java.net

Re: [Jersey] Jersey EJB exception

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Fri, 24 Jul 2009 08:59:26 +0200

Hi Herak,

Well observed!

We also found this out as well but i am not sure how to solve it.

Ken, in such cases would it be sufficient for Jersey to process an
EJBException like an InvocatonTargetException such that the underlying
target exception can be processed ?

Paul.

On Jul 23, 2009, at 5:31 PM, Herak Sen wrote:

> Hi,
>
> when I throw WebApplicationException from resource class, it’s
> always caught as EJBException, thus the client get wrong http error
> code (500).
>
> @Stateless
> @Path("/testrs")
> public class TestResource{
>
> @GET
> public void throwExc(){
>
> throw new WebApplicationException();
>
> }
> }
>
> I guess this should not be the expected behavior.
>
> Thanks
> Herak
>
>
>