users@jersey.java.net

Right way to create embedded grizzly with already instantiated Application?

From: American Jeff <jeff_at_americanjeff.com>
Date: Fri, 07 Nov 2008 09:52:34 -0800

After a lot of poking around I've come up with this function to create
an embedded Grizzly instance from an already instantiated Application
object:

    protected SelectorThread createGrizzly(URI u, Application app) throws IllegalArgumentException, IOException {

        return GrizzlyServerFactory.create(u, RuntimeDelegate.getInstance().createEndpoint(app, Adapter.class));

    }


I'm wondering if this is really the right way. My main concern is that
I'm going to have to figure this all out again in the next rev of
Jersey. The part that gives me pause is the call to createEnpoint with
Adapter.class. But it seems to be the only way for me to achieve this
end without doing a copy-paste-modify of GrizzlyWebContainerFactory.create