Examples of ResourceInjectionService


Examples of org.apache.webbeans.spi.ResourceInjectionService

    public void writeExternal(ObjectOutput out) throws IOException
    {       
        // write bean id first
        out.writeObject(bean.getId());
        WebBeansContext webBeansContext = WebBeansContext.getInstance();
        ResourceInjectionService resourceInjectionService = webBeansContext.getService(ResourceInjectionService.class);
        resourceInjectionService.writeExternal(bean, actualResource, out);
    }
View Full Code Here

Examples of org.apache.webbeans.spi.ResourceInjectionService

            ClassNotFoundException
    {
        String id = (String)in.readObject();
        WebBeansContext webBeansContext = WebBeansContext.currentInstance();
        bean = (ResourceBean) webBeansContext.getBeanManagerImpl().getPassivationCapableBean(id);
        ResourceInjectionService resourceInjectionService = webBeansContext.getService(ResourceInjectionService.class);
        actualResource = resourceInjectionService.readExternal(bean, in);
    }
View Full Code Here

Examples of org.apache.webbeans.spi.ResourceInjectionService

        {
            servletContext = getServletContext(stopObject);
        }

        //Clear the resource injection service
        ResourceInjectionService injectionServices = getWebBeansContext().getService(ResourceInjectionService.class);
        if(injectionServices != null)
        {
            injectionServices.clear();
        }

        //Comment out for commit OWB-502
        //ContextFactory.cleanUpContextFactory();
View Full Code Here

Examples of org.apache.webbeans.spi.ResourceInjectionService

    protected void afterStopApplication(Object stopObject) throws Exception
    {

        //Clear the resource injection service
        ResourceInjectionService injectionServices = webBeansContext.getService(ResourceInjectionService.class);
        if(injectionServices != null)
        {
            injectionServices.clear();
        }

        //Comment out for commit OWB-502
        //ContextFactory.cleanUpContextFactory();
View Full Code Here

Examples of org.apache.webbeans.spi.ResourceInjectionService

        try
        {
            //X TODO cache proxy class!
            ProxyFactory proxyFactory = JavassistProxyFactory.getInstance().createProxyFactory(this);
           
            ResourceInjectionService resourceService = ServiceLoader.getService(ResourceInjectionService.class);
            this.actualResourceReference = resourceService.getResourceReference(this.resourceReference);

            instance = (X)(JavassistProxyFactory.getInstance().getProxyClass(proxyFactory).newInstance());
            ((ProxyObject)instance).setHandler(new ResourceProxyHandler(this.actualResourceReference));
        }
        catch (Exception e)
View Full Code Here

Examples of org.apache.webbeans.spi.ResourceInjectionService

    {
        if(getWebBeansType().equals(WebBeansType.MANAGED))
        {
            try
            {
                ResourceInjectionService service = null;
                try
                {
                    service = ServiceLoader.getService(ResourceInjectionService.class);
                   
                }
                catch(Exception e)
                {
                    // When running in tests
                }
               
                if(service != null)
                {
                    service.injectJavaEEResources(instance);  
                }
            }
            catch (Exception e)
            {
                logger.error(OWBLogConst.ERROR_0023, instance);
View Full Code Here

Examples of org.apache.webbeans.spi.ResourceInjectionService

        {
            servletContext = getServletContext(stopObject);
        }

        //Clear the resource injection service
        ResourceInjectionService injectionServices = ServiceLoader.getService(ResourceInjectionService.class);
        if(injectionServices != null)
        {
            injectionServices.clear();
        }

        ContextFactory.cleanUpContextFactory();

        this.cleanupShutdownThreadLocals();
View Full Code Here

Examples of org.apache.webbeans.spi.ResourceInjectionService

    {
        if(getWebBeansType().equals(WebBeansType.MANAGED))
        {
            try
            {
                ResourceInjectionService service = null;
                try
                {
                    service = ServiceLoader.getService(ResourceInjectionService.class);
                   
                }
                catch(Exception e)
                {
                    // When running in tests
                }
               
                if(service != null)
                {
                    service.injectJavaEEResources(instance);  
                }
            }
            catch (Exception e)
            {
                log.error(OWBLogConst.ERROR_0023, instance);
View Full Code Here

Examples of org.apache.webbeans.spi.ResourceInjectionService

        try
        {
            //X TODO cache proxy class!
            ProxyFactory proxyFactory = JavassistProxyFactory.createProxyFactory(this);
           
            ResourceInjectionService resourceService = ServiceLoader.getService(ResourceInjectionService.class);
            this.actualResourceReference = resourceService.getResourceReference(this.resourceReference);
            proxyFactory.setHandler(new ResourceProxyHandler(this.actualResourceReference));
           
            instance = (X)(JavassistProxyFactory.getProxyClass(proxyFactory).newInstance());
        }
        catch (Exception e)
View Full Code Here

Examples of org.apache.webbeans.spi.ResourceInjectionService

        {
            servletContext = getServletContext(stopObject);
        }

        //Clear the resource injection service
        ResourceInjectionService injectionServices = ServiceLoader.getService(ResourceInjectionService.class);
        if(injectionServices != null)
        {
            injectionServices.clear();
        }

        ContextFactory.cleanUpContextFactory();
       
        if (logger.wblWillLogInfo())
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.