Search in sources :

Example 1 with GenericCdiBeanSupplier

use of org.glassfish.jersey.ext.cdi1x.internal.GenericCdiBeanSupplier in project jersey by jersey.

the class TransactionalExceptionInterceptorProvider method bindWaeRestoringExceptionMapper.

private void bindWaeRestoringExceptionMapper() {
    GenericCdiBeanSupplier beanSupplier = new GenericCdiBeanSupplier(TransactionalExceptionMapper.class, injectionManager, beanManager, true);
    Binding binding = Bindings.supplier(beanSupplier).to(ExceptionMapper.class);
    injectionManager.register(binding);
}
Also used : Binding(org.glassfish.jersey.internal.inject.Binding) GenericCdiBeanSupplier(org.glassfish.jersey.ext.cdi1x.internal.GenericCdiBeanSupplier)

Example 2 with GenericCdiBeanSupplier

use of org.glassfish.jersey.ext.cdi1x.internal.GenericCdiBeanSupplier in project jersey by jersey.

the class CdiValidationResultBinder method done.

@Override
@SuppressWarnings("unchecked")
public void done() {
    if (beanManager != null) {
        // in CDI environment
        Binding binding = Bindings.supplier(new GenericCdiBeanSupplier(CdiValidationResult.class, injectionManager, beanManager, true)).to(CdiValidationResult.class).to(ValidationResult.class);
        injectionManager.register(binding);
    }
}
Also used : Binding(org.glassfish.jersey.internal.inject.Binding) GenericCdiBeanSupplier(org.glassfish.jersey.ext.cdi1x.internal.GenericCdiBeanSupplier)

Aggregations

GenericCdiBeanSupplier (org.glassfish.jersey.ext.cdi1x.internal.GenericCdiBeanSupplier)2 Binding (org.glassfish.jersey.internal.inject.Binding)2