@Override protected void configure() { bind(new PersistenceUnitInjectionResolver(servletConfig)) .to(new GenericType<InjectionResolver<PersistenceUnit>>() {}); } }
@Override protected void configure() { bind(new PersistenceUnitInjectionResolver(servletConfig)) .to(new GenericType<InjectionResolver<PersistenceUnit>>() {}); } }
@Override @SuppressWarnings("unchecked") protected void configure() { ContextInjectionResolverImpl resolver = new ContextInjectionResolverImpl(beanManager); /* * Binding for CDI, without this binding JerseyInjectionTarget wouldn't know about the ContextInjectionTarget and * injection into fields would be disabled. */ bind(resolver) .to(new GenericType<InjectionResolver<Context>>() {}) .to(ContextInjectionResolver.class); /* * Binding for Jersey, without this binding Jersey wouldn't put together ContextInjectionResolver and * DelegatedInjectionValueParamProvider and therefore injection into resource method would be disabled. */ bind(Bindings.service(resolver)) .to(new GenericType<InjectionResolver<Context>>() {}) .to(ContextInjectionResolver.class); } }
@Override protected void configure() { bind(new PersistenceUnitInjectionResolver(servletConfig)) .to(new GenericType<InjectionResolver<PersistenceUnit>>() {}); } }