users@jersey.java.net

Re: [Jersey] Re: automatic resource registration and guice

From: Christopher Piggott <cpiggott_at_gmail.com>
Date: Fri, 4 Jun 2010 14:22:11 -0400

Seems like, with every request, GrizzlyAdapter.service()
   calls GrizzlyAdapterChain.service()
   calls GrizzlyAdapter.service()
   calls ServletAdapter.service()
   calls ServietAdapter.doService()
   calls FilterChainImpl.invokeFilterChain()
   calls FilterChainImpl.doFilter()
which ultimately re-creates my GuiceServletContextListener.

So ... why would this:

> ServletAdapter sa = new ServletAdapter();
> sa.addServletListener(ProtobufServletConfig.class);
> sa.addFilter(new GuiceFilter(), "guiceFilter", null);

cause it to recreate an instance of a brand new servlet every time?



On Fri, Jun 4, 2010 at 1:51 PM, Christopher Piggott <cpiggott_at_gmail.com> wrote:
> It doesn't seem like I should be getting this for every request, does it?
>
> INFO com.sun.jersey.server.impl.application.WebApplicationImpl (602)
> Initiating Jersey application, version 'Jersey: 1.2 05/07/2010 02:04
> PM'
>