dev@jersey.java.net

Re: [Jersey] jersey test framework filters?

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 14 Apr 2010 15:50:51 +0200

On Apr 14, 2010, at 3:34 PM, James Russo wrote:

>>
>> That was our focus on the limited design of just building web app
>> descriptor state just for the Jersey servlet container and
>> extensions of as a filter or servlet, that has init params, rather
>> than being a general programatic way of building state of a web app.
>>
>> AppDescriptor is extensible so we could do something more general,
>> that has the concept of zero or more filters each of which may have
>> zero or more init params, without breaking the existing API.
>
> So, maybe I am trying to do more with it then I really should be
> introducing spring, spring-security and then finally SSL to do some
> end-to-end testing? Perhaps I should just deploy it to a real
> container and use the external testing methods of the framework? It
> is nice to have everything in one self-contained test though.. and
> it really would be nice to be able test the resources complete.
>

I do think you have a point about a bit more flexible web app
descriptor builder. That combined with useful extensions to the
grizzly web server test container might actually get you most of the
way there.

Pavel what do you think?

You can of course define your own app builder and test container
factory and test container if you find the general testing pattern
approach useful.

You can use the external test container factory for external
deployments. That can work well if combined with maven for deployment
starting/stoping of the app server.

Once we move to SE 6 it will be a little easier to use embedded GF for
the features that Grizzly lacks.

Paul.