users@jersey.java.net

Re: Is there any way to programmatically set the _at_Path ?

From: Gary Moore <gary.moore_at_gmail.com>
Date: Wed, 10 Nov 2010 13:41:30 -0500

>Basically would allow deploying same web app, but with slightly different configurations.

^^This is close to our idea. We were researching genericizing one
RESTful resource class that can handle many objects.

Say we have a RecordResource that does the usual CRUD operations on a
model named "Books" using GET, PUT, POST, and DELETE. Management
comes along and says "Now we need to CRUD "Authors""!!! It would be
pretty awesome if we could just repurpose that RecordResource to CRUD
Authors and save us the time of re-writing a lot of what we've already
written. Was thinking that we could parse a props file, then in
PackagesResourceConfig just instantiate a RecordsResource with an
injected path value for each entry in the props file.

Hopefully that's clear. If you have questions please fire back.

Thanks all.

Gary

On Wed, Nov 10, 2010 at 1:31 PM, Tatu Saloranta <tsaloranta_at_gmail.com> wrote:
> I suspect it's more of deployment-time thing; maybe some configuration
> settings (properties file, system properties) might be used to change
> some paths?
> I could see why externalizing some path settings makes sense.
> Basically would allow deploying same web app, but with slightly
> different configurations.
>
> -+ Tatu +-
>
> On Wed, Nov 10, 2010 at 10:11 AM, Clint Combs <clint_at_ccombs.net> wrote:
>> What's your use case?  Why do you need to modify the @Path value at
>> run-time?
>> -Clint
>> On Wed, Nov 10, 2010 at 10:32 AM, Gary Moore <gary.moore_at_gmail.com> wrote:
>>>
>>> Hi All,
>>>
>>> I want the @Path value injected at compile or run time.  Is there a
>>> way to do this?
>>>
>>> Thanks,
>>> Gary
>>>
>>> --
>>> Gary Moore
>>> http://www.gmoore.net
>>
>>
>>
>>
>>
>



-- 
Gary Moore
http://www.gmoore.net