Search in sources :

Example 1 with RequestScoped

use of javax.enterprise.context.RequestScoped in project oxCore by GluuFederation.

the class ContextProducer method createELContext.

@Produces
@RequestScoped
public ELContext createELContext(BeanManager beanManager) {
    // Create default resovler
    CompositeELResolver resolver = createELResolver(beanManager);
    // Add constant resolver
    ConstantResolver constantResolver = new ConstantResolver();
    resolver.add(constantResolver);
    return createELContext(resolver, new FunctionMapperImpl(), new VariableMapperImpl(), constantResolver);
}
Also used : FunctionMapperImpl(com.sun.el.lang.FunctionMapperImpl) CompositeELResolver(javax.el.CompositeELResolver) VariableMapperImpl(com.sun.el.lang.VariableMapperImpl) Produces(javax.enterprise.inject.Produces) RequestScoped(javax.enterprise.context.RequestScoped)

Example 2 with RequestScoped

use of javax.enterprise.context.RequestScoped in project deltaspike by apache.

the class AnnotationInstanceProviderTest method assertDifferentAnnotationsNotEqual.

@Test
public void assertDifferentAnnotationsNotEqual() {
    RequestScoped annotation1 = AnnotationInstanceProvider.of(RequestScoped.class);
    Named annotation2 = AnnotationInstanceProvider.of(Named.class);
    assertFalse(annotation1.equals(annotation2));
    assertFalse(annotation2.equals(annotation1));
}
Also used : Named(javax.inject.Named) RequestScoped(javax.enterprise.context.RequestScoped) Test(org.junit.Test)

Aggregations

RequestScoped (javax.enterprise.context.RequestScoped)2 FunctionMapperImpl (com.sun.el.lang.FunctionMapperImpl)1 VariableMapperImpl (com.sun.el.lang.VariableMapperImpl)1 CompositeELResolver (javax.el.CompositeELResolver)1 Produces (javax.enterprise.inject.Produces)1 Named (javax.inject.Named)1 Test (org.junit.Test)1