users@jersey.java.net

Usage of JSR-308

From: Jose Antonio Illescas del Olmo <jantonio.illescas_at_rbcdexia-is.es>
Date: Fri, 11 Jan 2008 18:38:29 +0100

JSR-311 can use "Extended Annotations" to annotate throws clause
exceptions as:

 @Path("/some/<id>")
 @GET
  public Some getSome(@UriParameter("id" String id) throws @Status(404)
NotFoundException, OtherException {
    ...
  }

   note: any not annotated exception must be response a status=500
(Server Error)

This new feature (of annotations) avoids the use of
WebApplicationException, but JSR308 must be available on Java SE 7...