users@jsr311.java.net

more comments to JSR 311

From: Stephan Koops <Stephan.Koops_at_web.de>
Date: Thu, 03 Apr 2008 20:45:20 +0200

Hi,

*WebAppExc in MessageBodyWriter*
Marc, in
https://jsr311.dev.java.net/servlets/ReadMsg?list=dev&msgNo=1077 you
wrote, that MessageBodyWriters and StreamingOutputs are allowed to throw
WebApplicationExceptions. The specification only defines, that a runtime
environment must catch it in resource methods. The javadoc of
WebApplicationExceptions says "This acception may be thrown by a Web
application if a specific HTTP error response needs to be produced." IMO
this is a little bit vague, that this is also allowed in
MessageBodyWriter. If it must be allowed, define clearer in javadoc or
also in the specification. What about MessageBodyReaders? Also allowed?

*_at_DefaultValue -> @Default ?*
Because the annotation list on a parameter or field may be long with
@*Param("....."), perhaps @Encoded, perhaps @DefaultValue("....."), than
the type and variable name could get long: What about rename
@DefaultValue to @Default?

Marc, the chapter Context starts with a little introduction. The second
line ends with "Such information is available to both resource classes
(see". I think it is useful to write "both ROOT resource class", because
the non-root resource classes are not instantiated by the runtime and
the variables are not injected.

best regards
   Stephan