users@jax-rs-spec.java.net

[jax-rs-spec users] Re: JAX-RS Routing

From: Bill O'Neil <oneil5045_at_gmail.com>
Date: Tue, 5 Nov 2013 10:19:51 -0500

I apologize if my question was unclear. Yes I was referring to matching a
URL with a Java resource method. If the algorithm is defined in the spec,
I find it a little counterintuitive to have each JAX-RS implementation
reimplement it if they are all supposed to behave the same way.

For the "web server" I wanted to write a thin wrapper around Twitter's
Finagle and use JAX-RS to match a URL to a Java resource method. I
realized I would have to implement this myself (Which would be quite a bit
of work for a weekend project). I would try to pull in an existing
implementation (possibly Jersey) but it kind of seems like overkill to
include an entire framework just to reuse this single implementation.

I was just curious if there is any reason not to include a default
implementation?

Thanks,
Bill


On Tue, Nov 5, 2013 at 9:47 AM, Santiago Pericas-Geertsen <
Santiago.PericasGeertsen_at_oracle.com> wrote:

> Bill,
>
> I'm not sure what you're referring to as routing in this case. Are you
> talking about "matching" a URL with a Java resource method? I'm also a bit
> confused about the "web server" part.
>
> In any case, there's an algorithm in the spec that describes the matching
> process, but each implementation has a different implementation of it.
>
> -- Santiago
>
> On Oct 31, 2013, at 1:24 PM, oneil5045_at_gmail.com wrote:
>
> > Is there any reason that the JAX-RS spec does not provide a default
> > routing implementation as well as UriBuilder? I am interested in
> > trying to write a web server that conforms to JAX-RS but I wouldn't
> > trust myself to implement routing to spec. I could pull in Jersey or
> > RESTEasy but that seems a bit much just for routing.
> >
> > Personally I would think routing is something you would want only one
> > implementation of. This way you know requests will behave the same
> > across different frameworks.
> >
> > Thanks,
> > Bill
>
>