Package org.apache.webbeans.spi

Examples of org.apache.webbeans.spi.ResourceInjectionService


     *
     * @return a new instance of this resource bean.
     */
    public X getActualInstance()
    {
        ResourceInjectionService resourceService = getWebBeansContext().getService(ResourceInjectionService.class);
        X instance = resourceService.getResourceReference(this.resourceReference);
        return instance;
    }
View Full Code Here


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

    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

            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

            //Delete AnnotateTypeCache
            webBeansContext.getAnnotatedElementFactory().clear();

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

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

     *
     * @return a new instance of this resource bean.
     */
    public X getActualInstance()
    {
        ResourceInjectionService resourceService = getWebBeansContext().getService(ResourceInjectionService.class);
        X instance = resourceService.getResourceReference(resourceReference);
        return instance;
    }
View Full Code Here

   
    private void injectResources(T instance)
    {
        try
        {
            ResourceInjectionService service = null;
            try
            {
                service = webBeansContext.getService(ResourceInjectionService.class);
           
            }
            catch (Exception e)
            {
                // When running in tests
            }
       
            if (service != null)
            {
                service.injectJavaEEResources(instance);  
            }
        }
        catch (Exception e)
        {
            throw new WebBeansException(MessageFormat.format(
View Full Code Here

            webBeansContext = WebBeansContext.currentInstance();
        }

        try
        {
            ResourceInjectionService resourceService = webBeansContext.getService(ResourceInjectionService.class);
            return resourceService.getResourceReference(resourceReference);
        }
        catch (Exception e)
        {
            throw new WebBeansException(e);
        }
View Full Code Here

     *
     * @return a new instance of this resource bean.
     */
    public X getActualInstance()
    {
        ResourceInjectionService resourceService = getWebBeansContext().getService(ResourceInjectionService.class);
        X instance = resourceService.getResourceReference(resourceReference);
        return instance;
    }
View Full Code Here

    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

TOP

Related Classes of org.apache.webbeans.spi.ResourceInjectionService

Copyright © 2018 www.massapicom. 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.