Examples of ELContextStore


Examples of org.apache.webbeans.el.ELContextStore

        {
            context.destroy();
        }
       
        // clean up the EL caches after each request
        ELContextStore elStore = ELContextStore.getInstance(false);
        if (elStore != null)
        {
            elStore.destroyELContextStore();
        }
       
        //Clear thread locals
        requestContext.set(null);
        requestContext.remove();
View Full Code Here

Examples of org.apache.webbeans.el.ELContextStore

{

    @Override
    public void contextCreated(ELContextEvent event)
    {
        ELContextStore store = new ELContextStore();       
        ELContextStore.localContext.set(store);
    }
View Full Code Here

Examples of org.apache.webbeans.el.ELContextStore

           
        }
        finally
        {
            //Destroy dependent store
            ELContextStore store = ELContextStore.localContext.get();
            if(store != null)
            {
                store.destroy();
            }
        }
       
        return value;
    }
View Full Code Here

Examples of org.apache.webbeans.el.ELContextStore

       
        //Creational context for creating instance
        CreationalContext<Object> creationalContext = null;
       
        //Local store, set by the OwbELContextListener
        ELContextStore store = ELContextStore.localContext.get();
        if (obj == null)
        {                     
            //Name of the bean
            String name = (String) property;
            //Get beans
            Set<Bean<?>> beans = manager.getBeans(name);
           
            //Found?
            if(beans != null && !beans.isEmpty())
            {
                bean = (Bean<Object>)beans.iterator().next();
                creationalContext = manager.createCreationalContext(bean);                   
                //Already registered in store
                if(bean.getScope().equals(Dependent.class))
                {
                    object = store.getDependent(bean);
                }                   
            }
           
            //If no object found on the store
            if(object == null)
            {
                //Getting object
                object = manager.getInstanceByName(name,creationalContext);               
                if (object != null)
                {                   
                    context.setPropertyResolved(true);  
                    //Adding into store
                    store.addDependent(bean, object, creationalContext);
                }                   
            }
            //Object found on the store
            else
            {
View Full Code Here

Examples of org.apache.webbeans.el.ELContextStore

                    }
                }
            }

            // clean up the EL caches after each request
            ELContextStore elStore = ELContextStore.getInstance(false);
            if (elStore != null) {
                elStore.destroyELContextStore();
            }

            if (this.lifeCycle != null) {
                this.lifeCycle.getContextService().endContext(RequestScoped.class, event);
            }
View Full Code Here

Examples of org.apache.webbeans.el.ELContextStore

                    }
                }
            }

            // clean up the EL caches after each request
            final ELContextStore elStore = ELContextStore.getInstance(false);
            if (elStore != null) {
                elStore.destroyELContextStore();
            }

            webBeansContext.getContextsService().endContext(RequestScoped.class, event);
            if (webBeansContext instanceof WebappWebBeansContext) { // end after child
                ((WebappWebBeansContext) webBeansContext).getParent().getContextsService().endContext(RequestScoped.class, event);
View Full Code Here

Examples of org.apache.webbeans.el.ELContextStore

        if (context != null) {
            context.destroy();
        }

        // clean up the EL caches after each request
        final ELContextStore elStore = ELContextStore.getInstance(false);
        if (elStore != null) {
            elStore.destroyELContextStore();
        }

        //Clear thread locals - only for request to let user do with deltaspike start(session, request)restart(request)...stop()
        requestContext.remove();
View Full Code Here

Examples of org.apache.webbeans.el.ELContextStore

    @SuppressWarnings({"unchecked"})
    public Object getValue(ELContext context, Object obj, Object property) throws NullPointerException, PropertyNotFoundException, ELException
    {
        //Bean instance
        Object contextualInstance = null;
        ELContextStore elContextStore = null;
        if (obj == null)
        {
            //Name of the bean
            String name = (String) property;
            //Local store, create if not exist
            elContextStore = ELContextStore.getInstance(true);

            contextualInstance = elContextStore.findBeanByName(name);

            if(contextualInstance != null)
            {
                context.setPropertyResolved(true);
               
                return contextualInstance;
            }

            //Manager instance
            BeanManagerImpl manager = elContextStore.getBeanManager();

            //Get beans
            Set<Bean<?>> beans = manager.getBeans(name);

            //Found?
View Full Code Here

Examples of org.apache.webbeans.el.ELContextStore

        {
            logger.log(Level.FINE, "Destroying a request : [{0}]", event.getServletRequest().getRemoteAddr());
        }
       
        // clean up the EL caches after each request
        ELContextStore elStore = ELContextStore.getInstance(false);
        if (elStore != null)
        {
            elStore.destroyELContextStore();
        }

        this.lifeCycle.getContextService().endContext(RequestScoped.class, event);

        this.cleanupRequestThreadLocals();
View Full Code Here

Examples of org.apache.webbeans.el.ELContextStore

            return null;
        }

        //Bean instance
        Object contextualInstance = null;
        ELContextStore elContextStore = null;
        if (obj == null)
        {
            //Name of the bean
            String name = (String) property;
            //Local store, create if not exist
            elContextStore = ELContextStore.getInstance(true);

            contextualInstance = elContextStore.findBeanByName(name);

            if(contextualInstance != null)
            {
                context.setPropertyResolved(true);
               
                return contextualInstance;
            }

            //Manager instance
            BeanManagerImpl manager = elContextStore.getBeanManager();

            //Get beans
            Set<Bean<?>> beans = manager.getBeans(name);

            //Found?
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.