modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/JavaEEExtensionImpl.java [218:243]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private Component findComponent(Composite composite, EjbInfo ejbInfo, EjbModuleInfo ejbmoduleInfo){
        String componentName = ejbInfo.beanName;
        Component component = null;
        
        for (Component tmpComponent : composite.getComponents()){
            if (tmpComponent.getName().equals(componentName)){
               component = tmpComponent;
               break;
            }
        }
         
        if (component == null){
            component = assemblyFactory.createComponent();
            component.setName(componentName);
            component.setUnresolved(true);
            composite.getComponents().add(component);
            
            EJBImplementationGenerated implementation = new EJBImplementationGeneratedImpl();
            implementation.setUnresolved(true);
            implementation.setEJBInfo(ejbInfo);
            implementation.setEjbModuleInfo(ejbmoduleInfo);
            component.setImplementation(implementation);
        }
        
        return component;
    } 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



modules/contribution-jee/src/main/java/org/apache/tuscany/sca/contribution/jee/impl/JavaEEOptionalExtensionImpl.java [292:317]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private Component findComponent(Composite composite, EjbInfo ejbInfo, EjbModuleInfo ejbmoduleInfo){
        String componentName = ejbInfo.beanName;
        Component component = null;
        
        for (Component tmpComponent : composite.getComponents()){
            if (tmpComponent.getName().equals(componentName)){
               component = tmpComponent;
               break;
            }
        }
         
        if (component == null){
            component = assemblyFactory.createComponent();
            component.setName(componentName);
            component.setUnresolved(true);
            composite.getComponents().add(component);
            
            EJBImplementationGenerated implementation = new EJBImplementationGeneratedImpl();
            implementation.setUnresolved(true);
            implementation.setEJBInfo(ejbInfo);
            implementation.setEjbModuleInfo(ejbmoduleInfo);
            component.setImplementation(implementation);
        }
        
        return component;
    } 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



