users@grizzly.java.net

ContextListeners and guice

From: Christopher Piggott <cpiggott_at_gmail.com>
Date: Wed, 10 Nov 2010 10:28:08 -0500

I'm using jersey-guice and grizzly, and set up a context listener:

        ServletAdapter sa = new ServletAdapter();
        sa.addServletListener(HomeSrvContextListener.class.getName());

I need to start a background thread, and I'm accustomed to kicking
this thread off in the context listener. Now I have a situation where
I would sort of like the context listener to use injection (via guice)
to create the class that wraps my background thread.

Is this possible?

--Chris