cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: Easy and quick access to existing JAX-RS interface endpoints
Date Mon, 02 Apr 2012 15:11:35 GMT
Hi Marko, I see, got confused a bit by the reference to UriBuilder :-), 
indeed UriInfo can only help with capturing the information relevant to 
the current root resource handler, and even then it can be tricky to get 
to the path ending at the root resource...

Cheers, Sergey
On 02/04/12 18:00, Voß, Marko wrote:
> Hello Sergey,
>
>   >  So UriInfo won't help in your case ?
>
> I am not quite sure about this. Let me give you a more detailed example:
>
> Service Foo:
> ------------
>
> @Path("/foo")
> public interface Foo {
>
>     @Path("/{id}")
>     Foo retrieve(@PathParam("id") final String id);
> }
>
> Service Bar:
> ------------
>
> @Path("/bar")
> public interface Bar {
>
>     @Path("/{id}")
>     Bar retrieve(@PathParam("id") final String id);
> }
>
> Simple installation:
> --------------------
>
> The jaxrs:server will look like this:
>
> <jaxrs:server id="RestServices" address="">
>     <jaxrs:serviceBeans>
>       <!-- Configured services available on runtime -->
>       <ref bean="service.foo"/>
>       <ref bean="service.bar"/>
>     </jaxrs:serviceBeans>
> </jaxrs:server>
>
> Distributed services installation:
> ----------------------------------
>
> The jaxrs:server configurations will look like this:
>
> Machine A (Service Foo):
> ------------------------
>
> <jaxrs:server id="RestServices" address="">
>     <jaxrs:serviceBeans>
>       <!-- Configured services available on runtime -->
>       <ref bean="service.foo"/>
>     </jaxrs:serviceBeans>
> </jaxrs:server>
>
> Machine B (Service Bar):
> ------------------------
>
> <jaxrs:server id="RestServices" address="">
>     <jaxrs:serviceBeans>
>       <!-- Configured services available on runtime -->
>       <ref bean="service.bar"/>
>     </jaxrs:serviceBeans>
> </jaxrs:server>
>
> So I guess the injected UriInfo on service Foo is unable to get any information about
service Bar and vice versa.
>
>
> Best regards,
>
> Marko
>
>
> -------------------------------------------------------
>
> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information
mbH.
> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
> Geschäftsführerin: Sabine Brünger-Weilandt.
> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>
>


Mime
View raw message