users@jersey.java.net

Re: [Jersey] Setting properties for ResourceConfig

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 28 Jul 2008 10:49:56 +0200

Harald Kirsch wrote:
> Paul,
>
> in such cases, I wouldn't mind to extend the Javadocs myself. But I am
> not sure I want write access to the subversion repository. Would you
> accept patches?

Absolutely!


> That way, you could look over it, *before* it goes into
> subversion.
>
> Whereto should I send them? Or should I create issues in the bug
> tracking system with a patch then?
>

Issues logged under the docs category would be best.

Thanks,
Paul.

> Harald.
>
> Am 27.07.2008 17:39 schrieb Paul Sandoz:
>> Hi Harald,
>>
>> Glad you worked it out. I can definitely improve the JavaDoc here. Plus
>> i think we should investigate how we can publish the latest JavaDoc to
>> the project page.
>>
>> Paul.
>>
>>
>> Harald Kirsch wrote:
>>> Hi,
>>>
>>> some source code inspection helped to find this:-)
>>>
>>> Am 27.07.2008 11:19 schrieb Harald Kirsch:
>>>> Hi,
>>>>
>>>> my application is started with
>>>>
>>>> HttpServer server =
>>>> HttpServerFactory.create("http://localhost:"+port+'/');
>>>> server.start();
>>>>
>>>> and works just fine. But it scans each and every entry of the classpath
>>>> for resources. It does not really hurt, but it also is not nice, in
>>>> particular since there are configuration options to tell explicitly
>>>> where to search.
>>> Now I use this:
>>>
>>> Map<String, Object> props = new HashMap<String, Object>();
>>> props.put(ClasspathResourceConfig.PROPERTY_CLASSPATH,
>>> getFirst(cmdArgs, "resources", "lib/cycleroute.jar"));
>>> ResourceConfig rcf = new ClasspathResourceConfig(props);
>>>
>>> HttpHandler handler =
>>> ContainerFactory.createContainer(HttpHandler.class,
>>> rcf);
>>> HttpServer server =
>>> HttpServerFactory.create("http://localhost:"+port+'/', handler);
>>>
>>> And startup is muuuuuuch faster now:-)
>>>
>>> Thanks anyway,
>>> Harald.
>>>
>

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