Package org.jboss.as.ee.component

Examples of org.jboss.as.ee.component.AbstractComponentDescription


           final EEModuleDescription moduleDescription = unit.getAttachment(EE_MODULE_DESCRIPTION);
           for (AnnotationInstance webServiceAnnotation : webServiceAnnotations) {
               final AnnotationTarget target = webServiceAnnotation.target();
               final ClassInfo webServiceClassInfo = (ClassInfo) target;
               final String beanClassName = webServiceClassInfo.name().toString();
               AbstractComponentDescription absCD = moduleDescription.getComponentByClassName(beanClassName);

               final String componentName = beanClassName.substring(beanClassName.lastIndexOf(".") + 1);
               final ServiceName baseName = unit.getServiceName().append("component").append(componentName).append("START"); // TODO: hacky, hacky, hacky :(
               if (absCD instanceof StatelessComponentDescription || absCD instanceof SingletonComponentDescription) {
                   endpoints.add(new WebServiceDeclarationAdapter((SessionBeanComponentDescription)absCD, webServiceClassInfo, baseName.getCanonicalName()));
View Full Code Here


        }

        final WarMetaData warMetaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY);
        final Set<String> classes  = getAllComponentClasses(warMetaData);
        for(String clazz : classes) {
            AbstractComponentDescription description = componentByClass.get(clazz);
            if(description != null) {
                //for now just make sure it has a single view
                //this will generally be a managed bean, but it could also be an EJB
                //TODO: make sure the component is a managed bean
                if(!(description.getViewClassNames().size() == 1)){
                    throw new RuntimeException(clazz + " has the wrong component type, is cannot be used as a web component");
                }
                ManagedBeanComponentInstantiator instantiator  = new ManagedBeanComponentInstantiator(deploymentUnit,description);
                webComponents.put(clazz,instantiator);
            } else {
View Full Code Here

        final WarMetaData warMetaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY);
        final TldsMetaData tldsMetaData = deploymentUnit.getAttachment(TldsMetaData.ATTACHMENT_KEY);
        final Set<String> classes  = getAllComponentClasses(warMetaData, tldsMetaData);
        for(String clazz : classes) {
            AbstractComponentDescription description = componentByClass.get(clazz);
            if(description != null) {
                //for now just make sure it has a single view
                //this will generally be a managed bean, but it could also be an EJB
                //TODO: make sure the component is a managed bean
                if(!(description.getViewClassNames().size() == 1)){
                    throw new RuntimeException(clazz + " has the wrong component type, is cannot be used as a web component");
                }
                ManagedBeanComponentInstantiator instantiator  = new ManagedBeanComponentInstantiator(deploymentUnit,description);
                webComponents.put(clazz,instantiator);
            } else {
View Full Code Here

        final List<AnnotationInstance> instances = compositeIndex.getAnnotations(annotationName);
        if (instances != null) {
            for (AnnotationInstance instance : instances) {
                final BindingDescription binding = getResourceConfiguration(deploymentUnit, instance, phaseContext);
                final String componentName = getComponentName(instance);
                final AbstractComponentDescription componentDescription = moduleDescription.getComponentByClassName(componentName);

                // give hopefully enough information if component isn't found
                if (null == componentDescription) {
                    //if the component is not found it is probably a CDI component
                    //so just return
                    continue;
                }

                componentDescription.getBindings().add(binding);
            }
        }

    }
View Full Code Here

TOP

Related Classes of org.jboss.as.ee.component.AbstractComponentDescription

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.