On 4/11/07, Jerome Louvel <jerome.louvel_at_noelios.com> wrote:
>
>
> Marc,
>
> > > Agreed. @Resource("someUriTemplate") would be even simpler, with
> > > the option
> > > to specify @Resource(id="someUriTemplate", otherParam="xxx") if
> > > necessary.
> > >
> > Except, syntactically, if you have "otherParam" you *always* have to
> > write @Resource(id="someuri"), you can't use the shortcut @Resource
> > ("someUriTemplate") even if otherParam has a default value.
> > Its not a big deal but worth bearing in mind.
This is incorrect. So long as the first parameter is called "value" you can
use the shortcut:
@Resource("blah")
or the long form:
@Resource(value="blah", other="blah2")
from the same @interface declaration.
Unfortunately though it *must* be named value.
Thanks for pointing that out, I missed this annotation subtilety.
Dhanji.