Package org.apache.webbeans.exception.inject

Examples of org.apache.webbeans.exception.inject.DefinitionException


        if(hasName)
        {
            if(AnnotationUtil.hasMethodAnnotation(method, Named.class))
            {
                throw new DefinitionException("Specialized method : " + method.getName() + " in class : "
                        + component.getReturnType().getName() + " may not define @Named annotation");
            }

            component.setName(name);
        }
View Full Code Here


    {
        InjectionTargetBean<T> bean = webBeansContext.getWebBeansUtil().defineManagedBean(type);

        if (bean == null)
        {
            throw new DefinitionException("Could not create InjectionTargetBean for type " + type.getJavaClass());
        }

        return new InjectionTargetProducer<T>(bean);
    }
View Full Code Here

                HttpSessionBindingListener.class.isAssignableFrom(clazz) ||
                HttpSessionListener.class.isAssignableFrom(clazz) ||
                ServletRequestListener.class.isAssignableFrom(clazz) ||
                ServletRequestAttributeListener.class.isAssignableFrom(clazz) )
        {
            throw new DefinitionException("Given class  : " + clazz.getName() + " is not managed bean");
        }
    }
View Full Code Here

                }

                //Check types of the beans
                if(comp.getClass() != superBean.getClass())
                {
                    throw new DefinitionException("@Specialized Class : " + specializedClass.getName()
                            + " and its super class may be the same type of bean,i.e, ManagedBean, SessionBean etc.");
                }

                if(superBean.getName() != null)
                {
                    if(comp.getName() != null)
                    {
                        throw new DefinitionException("@Specialized Class : " + specializedClass.getName()
                                + " may not explicitly declare a bean name");
                    }

                    comp.setName(superBean.getName());
                    comp.setSpecializedBean(true);
View Full Code Here

                }

                //Check types of the beans
                if(comp.getClass() != superBean.getClass())
                {
                    throw new DefinitionException("@Specialized Class : " + specializedClass.getName()
                            + " and its super class may be the same type of bean,i.e, ManagedBean, SessionBean etc.");
                }

                if(superBean.getName() != null)
                {
                    if(comp.getName() != null)
                    {
                        throw new DefinitionException("@Specialized Class : " + specializedClass.getName()
                                + " may not explicitly declare a bean name");
                    }

                    comp.setName(superBean.getName());
                    comp.setSpecializedBean(true);
View Full Code Here

        if(hasName)
        {
            if(AnnotationUtil.hasMethodAnnotation(method, Named.class))
            {
                throw new DefinitionException("Specialized method : " + method.getName() + " in class : "
                        + component.getReturnType().getName() + " may not define @Named annotation");
            }

            component.setName(name);
        }
View Full Code Here

                if (clazz != null)
                {
                    if (found)
                    {
                        throw new DefinitionException(log.getTokenString(OWBLogConst.EXCEPT_0014) + clazz.getName());
                    }
                    else
                    {
                        foundClazz = clazz;
                        found = true;
View Full Code Here

        if(id != null)
        {
            Bean<?> oldBean = passivationBeans.putIfAbsent(id, bean);
            if (oldBean != null)
            {
                throw new DefinitionException("PassivationCapable bean id is not unique: " + id + " bean:" + bean);
            }
           
        }       
    }
View Full Code Here

                }

                //Check types of the beans
                if(comp.getClass() != superBean.getClass())
                {
                    throw new DefinitionException("@Specialized Class : " + specializedClass.getName()
                            + " and its super class may be the same type of bean,i.e, ManagedBean, SessionBean etc.");
                }

                if(superBean.getName() != null)
                {
                    if(comp.getName() != null)
                    {
                        throw new DefinitionException("@Specialized Class : " + specializedClass.getName()
                                + " may not explicitly declare a bean name");
                    }

                    comp.setName(superBean.getName());
                    comp.setSpecializedBean(true);
View Full Code Here

        if(hasName)
        {
            if(AnnotationUtil.hasMethodAnnotation(method, Named.class))
            {
                throw new DefinitionException("Specialized method : " + method.getName() + " in class : "
                        + component.getReturnType().getName() + " may not define @Named annotation");
            }

            component.setName(name);
        }
View Full Code Here

TOP

Related Classes of org.apache.webbeans.exception.inject.DefinitionException

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.