deltaspike-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deven Phillips <deven.phill...@gmail.com>
Subject Re: Jetty/Jersey/Injection
Date Mon, 17 Nov 2014 14:09:18 GMT
This is embedded Jetty 9.2.x and Weld version 1.1.9.Final booted using
DeltaSpike 1.0.2... I have seen that linked document, but I don't see how
to translate that to embedded Jetty's startup... Normally, I would do
something like:

    ServletContextHandler ctx = new ServletContextHandler("/");
    ctx.addFilter(AuthFilter.class, "/*",
EnumSet.allOf(DispatcherType.class)
    ctx.addServlet(new ServletContainer(new
PackagesResourceConfig(restPackage));
    ctx.addEventListener(new CdiRequestListener())

Where in there would I put in the BeanManager and the ManagerObjectFactory?
Or should I follow the lines below that where they talk about using a
listener to automatically bind the BeanManager?

Thanks in advance!!

Deven

On Sun, Nov 16, 2014 at 10:39 PM, Jason Porter <lightguard.jp@gmail.com>
wrote:

> Which version of weld?
>
> https://docs.jboss.org/weld/reference/latest/en-US/html/environments.html#_jetty
> should be all you need for weld in jetty.
> On Sun, Nov 16, 2014 at 20:28 Deven Phillips <deven.phillips@gmail.com>
> wrote:
>
> > Hi all,
> >
> >
> >     I'm trying really hard to figure out how to make DeltaSpike/Weld work
> > with Jetty and Jersey... I can get the Jersey servlet to load, but I
> cannot
> > get any of the dependencies to be injected... My goal is to replace
> > Google's Guice DI framework so that I can achieve better test coverage
> and
> > decoupling... I'm having a very hard time finding any documentation for
> > wiring this up..
> >
> > Any help would be appreciated!
> >
> > Deven
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message