Examples of OpenWebBeansEjbPlugin


Examples of org.apache.webbeans.plugins.OpenWebBeansEjbPlugin

        }

        boolean ok = false;

        /* Enterprise WebBean */
        OpenWebBeansEjbPlugin plugin = PluginLoader.getInstance().getEjbPlugin();
        if (plugin != null && plugin.isSessionBean(clazz))
        {
            // Configure for EJB
            configureEJBWebBean(clazz);
            ok = true;
        }
View Full Code Here

Examples of org.apache.webbeans.plugins.OpenWebBeansEjbPlugin

    private Object getEjbOrJmsProxyReference(Bean<?> bean,Type beanType, CreationalContext<?> creationalContext)
    {
        //Create session bean proxy
        if(bean instanceof EnterpriseBeanMarker)
        {
            OpenWebBeansEjbPlugin ejbPlugin = PluginLoader.getInstance().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

Examples of org.apache.webbeans.plugins.OpenWebBeansEjbPlugin

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

Examples of org.apache.webbeans.plugins.OpenWebBeansEjbPlugin

     * @return ejb bean
     */
    public static <T> Bean<T> defineEjbBean(Class<T> clazz)
    {
        PluginLoader loader = PluginLoader.getInstance();
        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);
    }
View Full Code Here

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

            ProducerMethodBean<?> newComponent = createProducerComponent(declaredMethod.getReturnType(), declaredMethod, component, isSpecializes);

            if (component instanceof EnterpriseBeanMarker)
            {
                final OpenWebBeansEjbPlugin ejbPlugin = webBeansContext.getPluginLoader().getEjbPlugin();

                Method method = ejbPlugin.resolveViewMethod(component, declaredMethod);
                newComponent.setCreatorMethod(method);
            }

            if (newComponent != null)
            {
View Full Code Here

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

            addMethodInjectionPointMetaData(component, declaredMethod);

            if (component instanceof EnterpriseBeanMarker)
            {
                final OpenWebBeansEjbPlugin ejbPlugin = webBeansContext.getPluginLoader().getEjbPlugin();
                declaredMethod = ejbPlugin.resolveViewMethod(component, declaredMethod);
            }

            pr.setDisposalMethod(declaredMethod);

            Method producerMethod = pr.getCreatorMethod();
View Full Code Here

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

            //Check for injected fields in EJB @Interceptors
            List<InterceptorData> stack = new ArrayList<InterceptorData>();
            annotatedType = webBeansContext.getAnnotatedElementFactory().getAnnotatedType(bean.getBeanClass());
            bean.getWebBeansContext().getEJBInterceptorConfig().configure(annotatedType, stack);

            final OpenWebBeansEjbPlugin ejbPlugin = bean.getWebBeansContext().getPluginLoader().getEjbPlugin();
            final boolean isStateful = ejbPlugin.isStatefulBean(bean.getBeanClass());

            if (isStateful)
            {
                for (InterceptorData data : stack)
                {
View Full Code Here

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

                {
                    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

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

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

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

     * @return ejb bean
     */
    public static <T> Bean<T> defineEjbBean(Class<T> clazz, ProcessAnnotatedType<T> processAnnotatedTypeEvent)
    {
        PluginLoader loader = PluginLoader.getInstance();
        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, processAnnotatedTypeEvent);
    }
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.