dev@jersey.java.net

Re: ResourceClass scanner <was> Re: I am here again ......

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Thu, 01 Nov 2007 17:25:08 +0100

Frank Martínez wrote:
> Hi Paul,
>
>> I can sort out this bit. I don't want to remove it completely until the
>> abstract resource model API and impl is ready so that we still have
>> WADL generation support for the interim period. But I can remove the
>> resource config APT and generation code and do some clean up.
>>
>
> Have you considered the possibility of wadl generation on startup time too?
>

Yes, or just when the WADL is requested (and potentially keep WADL more
focused at the resource class level and not at the application level for
all know resource classes).


> Ok. Now you can override these paths by an init-param of the ServletContainer.
>
> <init-param>
> <param-name>com.sun.ws.rest.config.property.ResourcePaths</param-name>
> <param-value>/WEB-INF/classes</param-value>
> </init-param>
>
> param-value is a ';' separated list of paths.
>

Great.


>> See the class:
>>
>> com.sun.ws.rest.api.container.ContainerFactory
>>
>> I justed checked the available properties returned from
>> System.getProperties() (ironically using the EntityProvider example in
>> Jersey to print them out :-) )
>>
>> So we can get the value of the property "java.class.path" to get the
>> list of paths.
>>
>> Which means we could add the following additional methods to
>> ContainerFactory:
>>
>> // Creates a ASMResourceConfig obtaining the
>> // paths from the System property "java.class.path"
>> public static <A> A createContainer(Class<A> type)
>>
>> // Creates a ASMResourceConfig obtaining the
>> // paths passed in as a parameter
>> public static <A> A createContainer(Class<A> type, String... paths)
>>
>> Paul.
>>
>
> Done. But i am not familiarized with other containers rather than
> Servlet.

OK, i will sort this out (as well as clearing up the APT code). I will
most likely not get around to doing this until Monday next week.

Paul.

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109