Examples of ComponentDescription


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

        final EEModuleConfiguration moduleConfiguration = new EEModuleConfiguration(moduleDescription);
        deploymentUnit.putAttachment(Attachments.EE_MODULE_CONFIGURATION, moduleConfiguration);

        final Iterator<ComponentDescription> iterator = moduleDescription.getComponentDescriptions().iterator();
            while (iterator.hasNext()) {
                final ComponentDescription componentDescription = iterator.next();
                ROOT_LOGGER.debugf("Configuring component class: %s named %s", componentDescription.getComponentClassName(),
                        componentDescription.getComponentName());
                final ComponentConfiguration componentConfiguration;
                try {
                    componentConfiguration = componentDescription.createConfiguration(classIndex.classIndex(componentDescription.getComponentClassName()), module.getClassLoader(), module.getModuleLoader());
                    for (final ComponentConfigurator componentConfigurator : componentDescription.getConfigurators()) {
                        componentConfigurator.configure(phaseContext, componentDescription, componentConfiguration);
                    }
                    moduleConfiguration.addComponentConfiguration(componentConfiguration);
                } catch (Exception e) {
                    if (componentDescription.isOptional()) {
                        ROOT_LOGGER.componentInstallationFailure(e, componentDescription.getComponentName());
                        failed.add(componentDescription.getStartServiceName());
                        failed.add(componentDescription.getCreateServiceName());
                        failed.add(componentDescription.getServiceName());
                        iterator.remove();
                    } else {
                        throw MESSAGES.cannotConfigureComponent(e, componentDescription.getComponentName());
                    }
                }
            }

        deploymentUnit.putAttachment(Attachments.FAILED_COMPONENTS, Collections.synchronizedSet(failed));
View Full Code Here

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

        }

        // Iterate through each component, installing it into the container
        for (final ComponentConfiguration configuration : moduleDescription.getComponentConfigurations()) {
            try {
                final ComponentDescription componentDescription = configuration.getComponentDescription();
                if (componentDescription instanceof EJBComponentDescription) {
                    installManagementResource(configuration, deploymentUnit);
                }
            } catch (RuntimeException e) {
                throw MESSAGES.failedToInstallManagementResource(e, configuration.getComponentName());
View Full Code Here

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

    private EJBContainerInterceptorsViewConfigurator() {
    }

    @Override
    public void configure(DeploymentPhaseContext deploymentPhaseContext, ComponentConfiguration componentConfiguration, ViewDescription viewDescription, ViewConfiguration viewConfiguration) throws DeploymentUnitProcessingException {
        final ComponentDescription componentDescription = componentConfiguration.getComponentDescription();
        // ideally it should always be a EJBComponentDescription when this view configurator is invoked, but let's just make sure
        if (!(componentDescription instanceof EJBComponentDescription)) {
            return;
        }
        final EJBComponentDescription ejbComponentDescription = (EJBComponentDescription) componentDescription;
View Full Code Here

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

            }
        }
    }

    private void installManagedBeanComponent(String className, final EEModuleDescription moduleDescription, final DeploymentUnit deploymentUnit, final EEApplicationClasses applicationClassesDescription) {
        final ComponentDescription componentDescription = new WebComponentDescription(MANAGED_BEAN.toString() + "." + className, className, moduleDescription, deploymentUnit.getServiceName(), applicationClassesDescription);
        moduleDescription.addComponent(componentDescription);
        deploymentUnit.getAttachment(WebAttachments.WEB_COMPONENT_INSTANTIATORS).put(componentDescription.getComponentClassName(), new WebComponentInstantiator(deploymentUnit, componentDescription));
    }
View Full Code Here

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

        // get the module description
        final EEModuleDescription moduleDescription = deploymentUnit.getAttachment(org.jboss.as.ee.component.Attachments.EE_MODULE_DESCRIPTION);

        final String beanName = sessionBean.getName();

        ComponentDescription bean = moduleDescription.getComponentByName(beanName);
        if (appclient) {
            if (bean == null) {
                for (final ComponentDescription component : deploymentUnit.getAttachmentList(Attachments.ADDITIONAL_RESOLVABLE_COMPONENTS)) {
                    if (component.getComponentName().equals(beanName)) {
                        bean = component;
View Full Code Here

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

            if (components.isEmpty()) {
                throw MESSAGES.failToFindEjbRefByDependsOn(annotationValue, description.getComponentClassName());
            } else if (components.size() != 1) {
                throw MESSAGES.failToCallEjbRefByDependsOn(annotationValue, description.getComponentClassName(), components);
            }
            final ComponentDescription component = components.iterator().next();

            description.addDependency(component.getStartServiceName(), DependencyType.REQUIRED);
            if (description instanceof SingletonComponentDescription) {
                ((SingletonComponentDescription)description).getDependsOn().add(component.getStartServiceName());
                if (ROOT_LOGGER.isDebugEnabled()) {
                    ROOT_LOGGER.debugf(description.getEJBName() + " bean is dependent on " + component.getComponentName());
                }
            }
        }
    }
View Full Code Here

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

    if(eeModuleDescription == null) {
      return;
    }

    // discover user-provided component
    ComponentDescription paComponent = detectExistingComponent(deploymentUnit);

    if(paComponent != null) {     
      log.log(Level.INFO, "Detected user-provided @"+ProcessApplication.class.getSimpleName()+" component with name '"+paComponent.getComponentName()+"'.");
     
      // mark this to be a process application
      ProcessApplicationAttachments.attachProcessApplicationComponent(deploymentUnit, paComponent);
      ProcessApplicationAttachments.mark(deploymentUnit);
      ProcessApplicationAttachments.markPartOfProcessApplication(deploymentUnit);
View Full Code Here

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

     
      AnnotationInstance annotationInstance = processApplicationAnnotations.get(0);     
      ClassInfo paClassInfo = (ClassInfo) annotationInstance.target();
      String paClassName = paClassInfo.name().toString();
     
      ComponentDescription paComponent = null;
     
      // it can either be a Servlet Process Application or a Singleton Session Bean Component or
      if(servletProcessApplications.contains(paClassInfo)) {
       
        // Servlet Process Applications can only be deployed inside Web Applications
View Full Code Here

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

    return deploymentDescriptorURLs;
  }

  protected String[] getDeploymentDescriptors(DeploymentUnit deploymentUnit) throws DeploymentUnitProcessingException {

    final ComponentDescription processApplicationComponent = ProcessApplicationAttachments.getProcessApplicationComponent(deploymentUnit);
    final String paClassName = processApplicationComponent.getComponentClassName();

    String[] deploymentDescriptorResourceNames = null;

    Module module = deploymentUnit.getAttachment(MODULE);
View Full Code Here

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

    if(eeModuleDescription == null) {
      return;
    }

    // discover user-provided component
    ComponentDescription paComponent = detectExistingComponent(deploymentUnit);

    if(paComponent != null) {     
      log.log(Level.INFO, "Detected user-provided @"+ProcessApplication.class.getSimpleName()+" component with name '"+paComponent.getComponentName()+"'.");
     
      // mark this to be a process application
      ProcessApplicationAttachments.attachProcessApplicationComponent(deploymentUnit, paComponent);
      ProcessApplicationAttachments.mark(deploymentUnit);
      ProcessApplicationAttachments.markPartOfProcessApplication(deploymentUnit);
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.