Package org.apache.tuscany.sca.contribution.jee

Examples of org.apache.tuscany.sca.contribution.jee.EjbModuleInfo


    }

    private org.apache.tuscany.sca.contribution.jee.JavaEEApplicationInfo createJavaEEApplicationInfo(AppModule appModule) {
        JavaEEApplicationInfo appInfo = new JavaEEApplicationInfoImpl();
        for(EjbModule em : appModule.getEjbModules()){
            EjbModuleInfo ejbModuleInfo = createEjbModuleInfo(em);
            ejbModuleInfo.setModuleName(em.getModuleId());
            appInfo.getEjbModuleInfos().put(em.getModuleId(), ejbModuleInfo);
        }

        for(WebModule wm : appModule.getWebModules()) {
            WebModuleInfo webModuleInfo = createWebModuleInfo(wm);
View Full Code Here


        String uri = implementation.getURI();
        String ejbLink = implementation.getEJBLink();
        if (ejbLink != null) {
            String module = ejbLink.indexOf('#') != -1 ? ejbLink.substring(0, ejbLink.indexOf('#')) : "";
            String beanName =  ejbLink.indexOf('#') != -1 ? ejbLink.substring(ejbLink.indexOf('#')+1) : ejbLink;
            EjbModuleInfo ejbModuleInfo = new EjbModuleInfoImpl();
            ejbModuleInfo.setUri(URI.create(module));
            ejbModuleInfo = resolver.resolveModel(EjbModuleInfo.class, ejbModuleInfo);

            if(jeeExtension != null) {
                ComponentType ct = jeeExtension.createImplementationEjbComponentType(ejbModuleInfo, beanName);
                // TODO - SL - TUSCANY-2944 - these new JEE processors are causing problems with existing contributions
                //        ct is null if there is no EJBInfo
                if (ct != null){
                    implementation.getServices().addAll(ct.getServices());
                }
            }

            if(jeeOptionalExtension != null) {
                ComponentType ct = jeeOptionalExtension.createImplementationEjbComponentType(ejbModuleInfo, beanName);
                // TODO - SL - TUSCANY-2944 - these new JEE processors are causing problems with existing contributions
                //              ct is null if there is no EJBInfo
                if (ct != null){
                    implementation.getReferences().addAll(ct.getReferences());
                    implementation.getProperties().addAll(ct.getProperties());
                }
            }

            EjbInfo ejbInfo = ejbModuleInfo.getEjbInfo(uri);
            if (ejbInfo == null) {
                // FIXME:
                logger.severe("EJB " + uri + " is not found in the module");
                // throw new ContributionResolveException("EJB " + uri + " is not found in the module");
            } else {
View Full Code Here

   
    public void createImplementationJeeComposite(JavaEEApplicationInfo appInfo, Composite composite) {
       
        for(Map.Entry<String, EjbModuleInfo> entry0 : appInfo.getEjbModuleInfos().entrySet()) {
            EjbModuleInfo ejbModule = entry0.getValue();
           
            for(Map.Entry<String, EjbInfo> entry : ejbModule.getEjbInfos().entrySet()) {
                EjbInfo ejbInfo = entry.getValue();
               
                Component component = findComponent(composite, ejbInfo, ejbModule);
               
                // Process Remote EJB References
View Full Code Here

        String uri = implementation.getURI();
        String ejbLink = implementation.getEJBLink();
        if (ejbLink != null) {
            String module = ejbLink.indexOf('#') != -1 ? ejbLink.substring(0, ejbLink.indexOf('#')) : "";
            String beanName =  ejbLink.indexOf('#') != -1 ? ejbLink.substring(ejbLink.indexOf('#')+1) : ejbLink;
            EjbModuleInfo ejbModuleInfo = new EjbModuleInfoImpl();
            ejbModuleInfo.setUri(URI.create(module));
            ejbModuleInfo = resolver.resolveModel(EjbModuleInfo.class, ejbModuleInfo);

            if(jeeExtension != null) {
                ComponentType ct = jeeExtension.createImplementationEjbComponentType(ejbModuleInfo, beanName);
                // TODO - SL - TUSCANY-2944 - these new JEE processors are causing problems with existing contributions
                //        ct is null if there is no EJBInfo
                if (ct != null){
                    implementation.getServices().addAll(ct.getServices());
                }
            }

            if(jeeOptionalExtension != null) {
                ComponentType ct = jeeOptionalExtension.createImplementationEjbComponentType(ejbModuleInfo, beanName);
                // TODO - SL - TUSCANY-2944 - these new JEE processors are causing problems with existing contributions
                //              ct is null if there is no EJBInfo
                if (ct != null){
                    implementation.getReferences().addAll(ct.getReferences());
                    implementation.getProperties().addAll(ct.getProperties());
                }
            }

            EjbInfo ejbInfo = ejbModuleInfo.getEjbInfo(uri);
            if (ejbInfo == null) {
                // FIXME:
                logger.severe("EJB " + uri + " is not found in the module");
                // throw new ContributionResolveException("EJB " + uri + " is not found in the module");
            } else {
View Full Code Here

                    if(unresolved != resolved) {
                        moduleInfo = resolved;
                    }
                }
                if(moduleInfo == null) {
                    EjbModuleInfo unresolved = new EjbModuleInfoImpl();
                    unresolved.setUri(URI.create(archive));
                    EjbModuleInfo resolved = resolver.resolveModel(EjbModuleInfo.class, unresolved);
                    if(unresolved != resolved) {
                        moduleInfo = resolved;
                    }
                }
                if(moduleInfo == null) {
                    JavaEEApplicationInfo unresolved = new JavaEEApplicationInfoImpl();
                    unresolved.setUri(URI.create(archive));
                    JavaEEApplicationInfo resolved = resolver.resolveModel(JavaEEApplicationInfo.class, unresolved);
                    if(unresolved != resolved) {
                        moduleInfo = resolved;
                    }
                }
            } else if(uri.endsWith(".war")) {
                WebModuleInfo webModuleInfo = new WebModuleInfoImpl();
                webModuleInfo.setUri(URI.create(archive));
                webModuleInfo = resolver.resolveModel(WebModuleInfo.class, webModuleInfo);
                moduleInfo = webModuleInfo;
            } else if(uri.endsWith(".jar")) {
                EjbModuleInfo ejbModuleInfo = new EjbModuleInfoImpl();
                ejbModuleInfo.setUri(URI.create(archive));
                ejbModuleInfo = resolver.resolveModel(EjbModuleInfo.class, ejbModuleInfo);
                moduleInfo = ejbModuleInfo;
            } else if(uri.endsWith(".ear")) {
                final JavaEEApplicationInfo appInfo = new JavaEEApplicationInfoImpl();
                appInfo.setUri(URI.create(archive));
View Full Code Here

                    if(unresolved != resolved) {
                        moduleInfo = resolved;
                    }
                }
                if(moduleInfo == null) {
                    EjbModuleInfo unresolved = new EjbModuleInfoImpl();
                    unresolved.setUri(URI.create(archive));
                    EjbModuleInfo resolved = resolver.resolveModel(EjbModuleInfo.class, unresolved);
                    if(unresolved != resolved) {
                        moduleInfo = resolved;
                    }
                }
                if(moduleInfo == null) {
                    JavaEEApplicationInfo unresolved = new JavaEEApplicationInfoImpl();
                    unresolved.setUri(URI.create(archive));
                    JavaEEApplicationInfo resolved = resolver.resolveModel(JavaEEApplicationInfo.class, unresolved);
                    if(unresolved != resolved) {
                        moduleInfo = resolved;
                    }
                }
            } else if(uri.endsWith(".war")) {
                WebModuleInfo webModuleInfo = new WebModuleInfoImpl();
                webModuleInfo.setUri(URI.create(archive));
                webModuleInfo = resolver.resolveModel(WebModuleInfo.class, webModuleInfo);
                moduleInfo = webModuleInfo;
            } else if(uri.endsWith(".jar")) {
                EjbModuleInfo ejbModuleInfo = new EjbModuleInfoImpl();
                ejbModuleInfo.setUri(URI.create(archive));
                ejbModuleInfo = resolver.resolveModel(EjbModuleInfo.class, ejbModuleInfo);
                moduleInfo = ejbModuleInfo;
            } else if(uri.endsWith(".ear")) {
                final JavaEEApplicationInfo appInfo = new JavaEEApplicationInfoImpl();
                appInfo.setUri(URI.create(archive));
View Full Code Here

   
    public void createImplementationJeeComposite(JavaEEApplicationInfo appInfo, Composite composite) {
       
        for(Map.Entry<String, EjbModuleInfo> entry0 : appInfo.getEjbModuleInfos().entrySet()) {
            EjbModuleInfo ejbModule = entry0.getValue();
           
            for(Map.Entry<String, EjbInfo> entry : ejbModule.getEjbInfos().entrySet()) {
                EjbInfo ejbInfo = entry.getValue();
               
                Component component = findComponent(composite, ejbInfo, ejbModule);
               
                // Process Remote EJB References
View Full Code Here

    }
   
    public void createImplementationJeeComposite(JavaEEApplicationInfo appInfo, Composite composite) {
       
        for(Map.Entry<String, EjbModuleInfo> entry0 : appInfo.getEjbModuleInfos().entrySet()) {
            EjbModuleInfo ejbModule = entry0.getValue();
           
            for(Map.Entry<String, EjbInfo> entry : ejbModule.getEjbInfos().entrySet()) {
                EjbInfo ejbInfo = entry.getValue();
               
                Component component = findComponent(composite, ejbInfo, ejbModule);
               
                if(ejbInfo.ejbType.compareTo(EjbType.MESSAGE_DRIVEN) != 0) {
View Full Code Here

        String uri = implementation.getURI();
        String ejbLink = implementation.getEJBLink();
        if (ejbLink != null) {
            String module = ejbLink.indexOf('#') != -1 ? ejbLink.substring(0, ejbLink.indexOf('#')) : "";
            String beanName =  ejbLink.indexOf('#') != -1 ? ejbLink.substring(ejbLink.indexOf('#')+1) : ejbLink;
            EjbModuleInfo ejbModuleInfo = new EjbModuleInfoImpl();
            ejbModuleInfo.setUri(URI.create(module));
            ejbModuleInfo = resolver.resolveModel(EjbModuleInfo.class, ejbModuleInfo);

            if(jeeExtension != null) {
                ComponentType ct = jeeExtension.createImplementationEjbComponentType(ejbModuleInfo, beanName);
                // TODO - SL - TUSCANY-2944 - these new JEE processors are causing problems with existing contributions
                //        ct is null if there is no EJBInfo
                if (ct != null){
                    implementation.getServices().addAll(ct.getServices());
                }
            }

            if(jeeOptionalExtension != null) {
                ComponentType ct = jeeOptionalExtension.createImplementationEjbComponentType(ejbModuleInfo, beanName);
                // TODO - SL - TUSCANY-2944 - these new JEE processors are causing problems with existing contributions
                //              ct is null if there is no EJBInfo
                if (ct != null){
                    implementation.getReferences().addAll(ct.getReferences());
                    implementation.getProperties().addAll(ct.getProperties());
                   
                    // Injection points
                    List<String> propertyNames = new ArrayList<String>();
                    for(Property prop : ct.getProperties()) {
                        propertyNames.add(prop.getName());
                    }
                    EjbInfo ejbInfo = ejbModuleInfo.getEjbInfo(uri);
                    for(Map.Entry<String, EjbReferenceInfo> entry : ejbInfo.ejbReferences.entrySet()) {
                        EjbReferenceInfo ejbRef = entry.getValue();
                        implementation.getOptExtensionReferenceInjectionPoints().put(ejbRef.injectionTarget, ejbRef.businessInterface);
                    }
                    for(Map.Entry<String, EnvEntryInfo> entry : ejbInfo.envEntries.entrySet()) {
                        EnvEntryInfo envEntry = entry.getValue();
                        if(propertyNames.contains(envEntry.name.replace("/", "_"))) {
                            implementation.getOptExtensionPropertyInjectionPoints().put(envEntry.name, envEntry.type);
                        }
                    }
                }
            }

            EjbInfo ejbInfo = ejbModuleInfo.getEjbInfo(uri);
            if (ejbInfo == null) {
                // FIXME:
                logger.severe("EJB " + uri + " is not found in the module");
                // throw new ContributionResolveException("EJB " + uri + " is not found in the module");
            } else {
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.contribution.jee.EjbModuleInfo

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.