[jax-rs-spec users] [jsr339-experts] Re: Uri annotation and absolute uri template

From: Bill Burke <>
Date: Tue, 12 Feb 2013 13:39:48 -0500

On 2/12/2013 11:58 AM, Sergey Beryozkin wrote:
> On 12/02/13 16:52, Sergey Beryozkin wrote:
>> Hi
>> Uri documentation lists this example:
>> @Uri("http://{audit-host}:{audit-port}/auditlogs/")
>> What are the actual expectations here as far as the runtime is concerned
>> ? Specifically, "{audit-host}" and "{audit-port}", where would these
>> values come from ?
> If the idea is that the above values will be replaced during the build
> process then things are clear - if yes - please update the docs to make
> it more obvious - I can open a JIRA for that

I thinnk @Uri should be removed...But...

I also will want to argue about the behavior of @Uri. The javadoc
states that @Uri must be an absolute URL unless it is injected into a
resource class. @Uri template parameters are resolved by copying
parameters from the current request matching expression. I can't see
myself ever using this feature as how often is one URI scheme related
1-to-1 to another URI scheme?

Actually, in practice, raw URI Templates are much more common and useful
than the current behavior of templates + @Uri.

Bill Burke
JBoss, a division of Red Hat