Package javax.annotation

Examples of javax.annotation.ManagedBean


                Object reference;
                if (URL.class.equals(type)) {
                    reference = new URLReference(referenceInfo.resourceID);
                } else if (type.isAnnotationPresent(ManagedBean.class)) {
                    ManagedBean managed = type.getAnnotation(ManagedBean.class);
                    String name = managed.value().length() == 0 ? type.getSimpleName() : managed.value();
                    reference = new LinkRef("module/" + name);
                } else if (referenceInfo.resourceID != null) {
                    String jndiName = "openejb/Resource/" + referenceInfo.resourceID;
                    reference = new IntraVmJndiReference(jndiName);
                } else {
View Full Code Here


            return getDefaultProcessedResult();
        }

        ManagedBeanDescriptor managedBeanDesc = new ManagedBeanDescriptor();

        ManagedBean resourceAn = (ManagedBean) element.getAnnotation();

        // name() is optional
        String logicalName = resourceAn.value();
        if( !logicalName.equals("")) {
            managedBeanDesc.setName(logicalName);
        }

        Class managedBeanClass = (Class) element.getAnnotatedElement();
View Full Code Here

            return getDefaultProcessedResult();
        }

        ManagedBeanDescriptor managedBeanDesc = new ManagedBeanDescriptor();

        ManagedBean resourceAn = (ManagedBean) element.getAnnotation();

        // name() is optional
        String logicalName = resourceAn.value();
        if( !logicalName.equals("")) {
            managedBeanDesc.setName(logicalName);
        }

        Class managedBeanClass = (Class) element.getAnnotatedElement();
View Full Code Here

                }
                LegacyProcessor.process(beanClass.get(), enterpriseBean);
            }

            for (final Annotated<Class<?>> beanClass : finder.findMetaAnnotatedClasses(ManagedBean.class)) {
                final ManagedBean managed = beanClass.getAnnotation(ManagedBean.class);
                final String ejbName = getEjbName(managed, beanClass.get());

                // TODO: this is actually against the spec, but the requirement is rather silly
                // (allowing @Stateful and @ManagedBean on the same class)
                // If the TCK doesn't complain we should discourage it
View Full Code Here

                final Object reference;
                if (URL.class.equals(type)) {
                    reference = new URLReference(referenceInfo.resourceID);
                } else if (type.isAnnotationPresent(ManagedBean.class)) {
                    final ManagedBean managed = type.getAnnotation(ManagedBean.class);
                    final String name = managed.value().length() == 0 ? type.getSimpleName() : managed.value();
                    reference = new LinkRef("module/" + name);
                } else if (referenceInfo.resourceID != null) {
                    final String jndiName = "openejb/Resource/" + referenceInfo.resourceID;
                    reference = new IntraVmJndiReference(jndiName);
                } else {
View Full Code Here

            return getDefaultProcessedResult();
        }

        ManagedBeanDescriptor managedBeanDesc = new ManagedBeanDescriptor();

        ManagedBean resourceAn = (ManagedBean) element.getAnnotation();

        // name() is optional
        String logicalName = resourceAn.value();
        if( !logicalName.equals("")) {
            managedBeanDesc.setName(logicalName);
        }

        Class managedBeanClass = (Class) element.getAnnotatedElement();
View Full Code Here

            return getDefaultProcessedResult();
        }

        ManagedBeanDescriptor managedBeanDesc = new ManagedBeanDescriptor();

        ManagedBean resourceAn = (ManagedBean) element.getAnnotation();

        // name() is optional
        String logicalName = resourceAn.value();
        if( !logicalName.equals("")) {
            managedBeanDesc.setName(logicalName);
        }

        Class managedBeanClass = (Class) element.getAnnotatedElement();
View Full Code Here

                    managedClasses.remove(beanClass.get().getName());
                    specializingClasses.add(beanClass.get());
                    continue;
                }

                ManagedBean managed = beanClass.getAnnotation(ManagedBean.class);
                String ejbName = getEjbName(managed, beanClass.get());

                // TODO: this is actually against the spec, but the requirement is rather silly
                // (allowing @Stateful and @ManagedBean on the same class)
                // If the TCK doesn't complain we should discourage it
View Full Code Here

                Object reference;
                if (URL.class.equals(type)) {
                    reference = new URLReference(referenceInfo.resourceID);
                } else if (type.isAnnotationPresent(ManagedBean.class)) {
                    ManagedBean managed = type.getAnnotation(ManagedBean.class);
                    String name = managed.value().length() == 0 ? type.getSimpleName() : managed.value();
                    reference = new LinkRef("module/" + name);
                } else if (referenceInfo.resourceID != null) {
                    String jndiName = "openejb/Resource/" + referenceInfo.resourceID;
                    reference = new IntraVmJndiReference(jndiName);
                } else {
View Full Code Here

            } catch (ClassNotFoundException e) {
                throw new DeploymentUnitProcessingException("Failed to load managed bean class: " + beanClassName);
            }

            // Get the managed bean name from the annotation
            final ManagedBean managedBeanAnnotation = beanClass.getAnnotation(ManagedBean.class);
            final String beanName = managedBeanAnnotation.value().isEmpty() ? beanClassName : managedBeanAnnotation.value();
            final ManagedBeanConfiguration managedBeanConfiguration = new ManagedBeanConfiguration(beanName, beanClass);

            processLifecycleMethods(managedBeanConfiguration, beanClass, index);

            final Map<DotName, List<AnnotationTarget>> classAnnotations = classInfo.annotations();
View Full Code Here

TOP

Related Classes of javax.annotation.ManagedBean

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.