dev@jsr311.java.net

Re: JSR311: Re: Inherited Path

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Wed, 06 Feb 2008 13:36:42 -0500

On Feb 5, 2008, at 11:58 AM, Bill Burke wrote:
>>>
>> FWIW, here's where we are wrt the spec and Jersey:
>> - @ConsumeMime and @ProduceMime are both @Inherited so they can be
>> used on superclasses.
>> - Resource classes are introspected using Class.getMethods. This
>> will include methods inherited from superclasses but note that a
>> method overriding one in a superclass requires its own annotations
>> - we don't do any annotation merging.
>
> IIRC, that's basically how EJB3 handled things. Try to conform to
> the rules of the language. This is why I think KISS might be better
> and an either/or policy used with interfaces/bean classes.
>
KISS is good, I'm just not sure how best to achieve it. E.g. we could
say that any JAX-RS annotation on a subclass method overrides all
annotations on the corresponding superclass/interface method, i.e. no
merging and if you want to override anything you have to repeat all
the annotations.

Is that too simplistic ?

Marc.

---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.