dev@jersey.java.net

Re: [Jersey] Programmatic API for configuring Jersey's ServletContainer

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 30 Sep 2009 16:47:39 +0200

Hi,

Victor's patch and the programmatic update of filters is now
implemented in the trunk.

So one could do:

     @Provider
     public static class AtmosphereResourceConfigurator implements
ResourceConfigurator {
         public void configure(ResourceConfig config) {
             config.getResourceFilterFactories().add(....);
         }
     }

You need to register that class in the jersey-server-components.

In fact you could just register that one class in the jersey-server-
components and explicitly register the other classes in the configure
method.

Jean-Francois, assuming you can find the time and the time when
java.net is up it would be good to give things a little test drive
with atmosphere (i have tests in place, but it would be good to
confirm before we release 1.1.3-ea).

Paul.

On Sep 29, 2009, at 4:45 PM, Viktor Klang wrote:

>
>
> On Tue, Sep 29, 2009 at 4:41 PM, Paul Sandoz <Paul.Sandoz_at_sun.com>
> wrote:
>
> On Sep 29, 2009, at 12:55 PM, Viktor Klang wrote:
>
>>
>>
>> On Tue, Sep 29, 2009 at 12:50 PM, Paul Sandoz <Paul.Sandoz_at_sun.com>
>> wrote:
>>
>> On Sep 28, 2009, at 11:12 PM, Viktor Klang wrote:
>>
>>>
>>>
>>> On Mon, Sep 28, 2009 at 9:18 PM, Viktor Klang <viktor.klang_at_gmail.com
>>> > wrote:
>>> Hehe, I guess Paul was right, (unsurprisingly so)
>>>
>>> it should be enough with the following patches applied to jersey-
>>> server
>>>
>>> What do you think, guys?
>>>
>>>
>>> I guess I sent that a bit premature,
>>> should it use "rc" or "this.resourceConfig"?
>>>
>>> I'm attaching a patch that uses "this.resourceConfig"
>>>
>>
>> It should use "this.resourceConfig" as the ResourceConfig instance
>> that is passed in as parameter may not be the same instance
>> "this.resourceConfig".
>>
>> Patch looks good.
>>
>>
>> Great, thanks for the feedback.
>> Is there a time-frame for it to be available in the 1.1.3-SNAPSHOT?
>>
>
> I will apply the patch tomorrow, then i need to implement the
> programatic filters. Plus add tests for both.
>
> I am currently battling with JSR 299 integration with Jersey, which
> is a high-priority.
>
>
> Understandable. Thanks for your time and help
>
> Paul.
>
>
>
> --
> Viktor Klang
>
> Blog: klangism.blogspot.com
> Twttr: viktorklang
>
> Lift Committer - liftweb.com
> AKKA Committer - akkasource.org
> Cassidy - github.com/viktorklang/Cassidy.git
> SoftPub founder: http://groups.google.com/group/softpub