Paul,
sure, but the JAX-RS specification doesn't mandate this exact behaviour
AFAIK. So the question is, whether it should get added to the spec so
*all* JAX-RS implementations *must* forward it to the Servlet layer and
*must not* catch it silently but still go on starting the application?
Regards
Markus
From: Paul Sandoz [mailto:Paul.Sandoz_at_oracle.com]
Sent: Montag, 17. Januar 2011 12:03
To: Markus Karg
Cc: users_at_jersey.java.net
Subject: Re: [Jersey] How to stop initialization of JAX-RS application?
On Jan 14, 2011, at 3:57 PM, Markus Karg wrote:
Dear Jersey Community,
I wonder what is the correct way to make Jersey stop initializing an
application?
My Application might run into an exception inside of getSingletons(), e.
g. when trying to set up a JAXBContext. How to forward this to Jersey?
It makes no sense to boot up without that context, but getSingletons()
has no throws clause in its signature.
???
If you throw a runtime exception it will get passed to the servlet
layer, which will then result in a deployment failure.
Paul.