On Jan 27, 2009, at 2:37 PM, amsmota_at_gmail.com wrote:
> The specification says specifically that the implementations SHOULD
> warn about more than 1 matching method? Or can it treat at as a
> exception or error?
>
IIRC the spec and JavaDoc are rather vague about such things:
https://jsr311.dev.java.net/nonav/releases/1.0/spec/
spec3.html#x3-120002.2
Paul.
>
> On Jan 27, 2009 12:52pm, Paul Sandoz <Paul.Sandoz_at_sun.com> wrote:
> >
> >
> > On Jan 27, 2009, at 1:40 PM, amsmota_at_gmail.com wrote:
> >
> >
> >
> >
> > I have a doubt here I don't know if JSR-311 or Jersey specific.
> >
> >
> >
> > Should we allow two methods defined with the same annotations, and
> differentiate then by the *name* (or/and number) of the params?
> >
> >
> >
> > @POST
> >
> > @Path="/service/test"
> >
> > void testThis(@FormaParam("test1")String test)
> >
> >
> >
> > @POST
> >
> > @Path="/service/test"
> >
> > void testThat(@FormaParam("test2")String test)
> >
> >
> >
> > So that
> >
> >
> >
> > POST /service/test
> >
> > test1=testing
> >
> >
> >
> > get's the testThis method and
> >
> >
> >
> > POST /service/test
> >
> > test2=testing
> >
> >
> >
> > get's the testThat method?
> >
> >
> >
> > Or it should throw a error?
> >
> >
> >
> >
> >
> >
> > Dispatching is only performed on the path and what is media
> produced and consumed. JAX-RS does not specify a dispatching
> mechanism for parameters whether they be form or say query parameters.
> >
> >
> >
> > Jersey should warn you that there are two ambiguous resource
> methods. It seems it does not. Jakub, can you look into this?
> >
> >
> >
> > Paul.
> >
> >
> >
> >
> ---------------------------------------------------------------------
> >
> > To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> >
> > For additional commands, e-mail: users-help_at_jersey.dev.java.net
> >
> >
> >