private void bindWaeRestoringExceptionMapper() { final DynamicConfiguration dc = Injections.getConfiguration(locator); final ServiceBindingBuilder bindingBuilder = Injections.newFactoryBinder(new CdiFactory(TransactionalExceptionMapper.class, locator, beanManager, true)); bindingBuilder.to(ExceptionMapper.class); Injections.addBinding(bindingBuilder, dc); dc.commit(); }
.newFactoryBinder(new ExecutorServiceFactory(executorProvider)) .to(ExecutorService.class) .in(Singleton.class); Injections.newFactoryBinder(new ScheduledExecutorServiceFactory(executorProvider)) .in(Singleton.class) .to(ScheduledExecutorService.class);
.newFactoryBinder(new ExecutorServiceFactory(executorProvider)) .to(ExecutorService.class) .in(Singleton.class); Injections.newFactoryBinder(new ScheduledExecutorServiceFactory(executorProvider)) .in(Singleton.class) .to(ScheduledExecutorService.class);
.newFactoryBinder(new ExecutorServiceFactory(executorProvider)) .to(ExecutorService.class) .in(Singleton.class); Injections.newFactoryBinder(new ScheduledExecutorServiceFactory(executorProvider)) .in(Singleton.class) .to(ScheduledExecutorService.class);
@Override public void bind(DynamicConfiguration config) { Injections.addBinding( Injections.newFactoryBinder(this).to(type).in(Singleton.class), config); Injections.addBinding( Injections.newBinder(this).to(ValueFactoryProvider.class), config); } }
Injections.newFactoryBinder(new CdiFactory(clazz, locator, beanManager, isCdiManaged));