Package org.apache.webbeans.spi.plugins

Examples of org.apache.webbeans.spi.plugins.OpenWebBeansEjbPlugin


        }
        this.owner = owner;
        this.webBeansContext = webBeansContext;
        this.disposalIPs = disposalIPs;

        final OpenWebBeansEjbPlugin ejbPlugin = webBeansContext.getPluginLoader().getEjbPlugin();
        if (ejbPlugin != null)
        {
            this.producerMethod = ejbPlugin.resolveViewMethod(owner, producerMethod.getJavaMember());
            if (disposerMethod != null)
            {
                disposalMethod = ejbPlugin.resolveViewMethod(owner, disposerMethod.getJavaMember());
            }
        }
        else
        {
            this.producerMethod = producerMethod.getJavaMember();
View Full Code Here


    public <T> Bean<T> createNewComponent(Class<T> type)
    {
        Asserts.nullCheckForClass(type);

        final OpenWebBeansEjbPlugin ejbPlugin = webBeansContext.getPluginLoader().getEjbPlugin();
        if (ejbPlugin != null && ejbPlugin.isNewSessionBean(type))
        {
            return ejbPlugin.defineNewSessionBean(type);
        }

        AnnotatedType<T> annotatedType = webBeansContext.getAnnotatedElementFactory().newAnnotatedType(type);
        BeanAttributesImpl<T> defaultBeanAttributes = BeanAttributesBuilder.forContext(webBeansContext).newBeanAttibutes(annotatedType).build();
        BeanAttributesImpl<T> newBeanAttributes = new BeanAttributesImpl<T>(defaultBeanAttributes.getTypes(), Collections.<Annotation>singleton(new NewLiteral(type)));
View Full Code Here

            {
                observedQualifiers.add(annotation);
            }
        }
       
        final OpenWebBeansEjbPlugin ejbPlugin = getWebBeansContext().getPluginLoader().getEjbPlugin();
        if (ejbPlugin != null && ejbPlugin.isNewSessionBean(bean.getBeanClass()))
        {
            view = ejbPlugin.resolveViewMethod(bean , annotatedObserverMethod.getJavaMember());
        }
        else
        {
            view = annotatedObserverMethod.getJavaMember();
        }
View Full Code Here

            if (owner == null)
            {
                throw new IllegalArgumentException("owner may not be null for non-static producer method " + producerMethod);
            }
        }
        final OpenWebBeansEjbPlugin ejbPlugin = webBeansContext.getPluginLoader().getEjbPlugin();
        if (ejbPlugin != null)
        {
            this.producerMethod = ejbPlugin.resolveViewMethod(owner, producerMethod.getJavaMember());
        }
        else
        {
            this.producerMethod = producerMethod.getJavaMember();
        }
View Full Code Here

                {
                    return cacheProxies.get(bean);
                }
            }

            OpenWebBeansEjbPlugin ejbPlugin = webBeansContext.getPluginLoader().getEjbPlugin();
            if(ejbPlugin == null)
            {
                throw new IllegalStateException("There is no EJB plugin provider. Injection is failed for bean : " + bean);
            }

            return ejbPlugin.getSessionBeanProxy(bean,ClassUtil.getClazz(beanType), creationalContext);
        }

        //Create JMS Proxy
        else if(bean instanceof JmsBeanMarker)
        {
View Full Code Here

            {
                observedQualifiers.add(annotation);
            }
        }
       
        final OpenWebBeansEjbPlugin ejbPlugin = getWebBeansContext().getPluginLoader().getEjbPlugin();
        if (ejbPlugin != null && ejbPlugin.isNewSessionBean(bean.getBeanClass()))
        {
            view = ejbPlugin.resolveViewMethod(bean , annotatedObserverMethod.getJavaMember());
        }
        else
        {
            view = annotatedObserverMethod.getJavaMember();
        }
View Full Code Here

        Asserts.assertNotNull(webBeansContext, "WebBeansContext may not be null");
        this.owner = owner;
        this.webBeansContext = webBeansContext;
        this.disposalIPs = disposalIPs;

        final OpenWebBeansEjbPlugin ejbPlugin = webBeansContext.getPluginLoader().getEjbPlugin();
        if (ejbPlugin != null)
        {
            if (disposerMethod != null)
            {
                disposalMethod = ejbPlugin.resolveViewMethod(owner, disposerMethod.getJavaMember());
            }
        }
        else
        {
            if (disposerMethod != null)
View Full Code Here

    public <T> Bean<T> createNewComponent(Class<T> type)
    {
        Asserts.nullCheckForClass(type);

        final OpenWebBeansEjbPlugin ejbPlugin = webBeansContext.getPluginLoader().getEjbPlugin();
        if (ejbPlugin != null && ejbPlugin.isNewSessionBean(type))
        {
            return ejbPlugin.defineNewSessionBean(type);
        }

        AnnotatedType<T> annotatedType = webBeansContext.getAnnotatedElementFactory().newAnnotatedType(type);
        BeanAttributesImpl<T> defaultBeanAttributes = BeanAttributesBuilder.forContext(webBeansContext).newBeanAttibutes(annotatedType).build();
        BeanAttributesImpl<T> newBeanAttributes = new BeanAttributesImpl<T>(defaultBeanAttributes.getTypes(), Collections.<Annotation>singleton(new NewLiteral(type)));
View Full Code Here

     * @throws WebBeansConfigurationException if any exception occurs
     */
    public static boolean isSessionBean(Class<?> clazz, WebBeansContext webBeansContext) throws WebBeansConfigurationException
    {
        PluginLoader loader = webBeansContext.getPluginLoader();
        OpenWebBeansEjbPlugin ejbPlugin = loader.getEjbPlugin();
       
        //There is no ejb container
        if(ejbPlugin == null)
        {
            return false;
        }
       
        return ejbPlugin.isSessionBean(clazz);
    }
View Full Code Here

     */
    public static <T> Bean<T> defineEjbBean(Class<T> clazz, AnnotatedType<T> annotatedType,
                                            WebBeansContext webBeansContext)
    {
        PluginLoader loader = webBeansContext.getPluginLoader();
        OpenWebBeansEjbPlugin ejbPlugin = loader.getEjbPlugin();
       
        if(ejbPlugin == null)
        {
            throw new IllegalStateException("There is no provided EJB plugin. Unable to define session bean for class : " + clazz.getName());
        }
       
        return ejbPlugin.defineSessionBean(clazz, annotatedType);
    }
View Full Code Here

TOP

Related Classes of org.apache.webbeans.spi.plugins.OpenWebBeansEjbPlugin

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.