Package org.apache.openejb.assembler.classic

Examples of org.apache.openejb.assembler.classic.EjbResolver$Reference


        if (moduleId == null) {
            moduleUri = null;
        } else {
            moduleUri = URLs.uri(moduleId);
        }
        final EjbResolver ejbResolver = getEjbResolver(moduleId);

        if (sessionBean.getDependsOn() != null) {
            for (String ejbName : sessionBean.getDependsOn()) {
                final String deploymentId = ejbResolver.resolve(new SimpleRef(ejbName), moduleUri);
                if (deploymentId != null) {
                    beanInfo.dependsOn.add(deploymentId);
                }
            }
        }
View Full Code Here


    public JndiEncInfoBuilder(AppInfo appInfo) {
        this.appInfo = appInfo;

        // Global-scoped EJB Resolver
        final EjbResolver globalResolver = SystemInstance.get().getComponent(EjbResolver.class);

        // EAR-scoped EJB Resolver
        this.earResolver = new EjbResolver(globalResolver, EAR, appInfo.ejbJars);

        // EJBJAR-scoped EJB Resolver(s)
        for (EjbJarInfo ejbJarInfo : appInfo.ejbJars) {
            final EjbResolver ejbJarResolver = new EjbResolver(earResolver, EJBJAR, ejbJarInfo);
            this.ejbJarResolvers.put(ejbJarInfo.moduleName, ejbJarResolver);
        }
    }
View Full Code Here

            this.ejbJarResolvers.put(ejbJarInfo.moduleName, ejbJarResolver);
        }
    }

    private EjbResolver getEjbResolver(String moduleId) {
        EjbResolver resolver = ejbJarResolvers.get(moduleId);
        if (resolver == null) {
            resolver = this.earResolver;
        }
        return resolver;
    }
View Full Code Here

                    insert(info, appInfo.globalJndiEnc.ejbReferences, appInfo.appJndiEnc.ejbReferences, moduleJndiEnc.ejbReferences, compJndiEnc.ejbReferences);
                }
                continue;
            }

            final EjbResolver ejbResolver = getEjbResolver(moduleId);
            final String deploymentId = ejbResolver.resolve(new Ref(ref), moduleUri);
            info.ejbDeploymentId = deploymentId;

            if (info.ejbDeploymentId == null) {
                if (info.link != null) {
                    logger.warning("config.noBeanFoundEjbLink", ref.getName(), ejbName, ref.getEjbLink());
                } else {
                    logger.warning("config.noBeanFound", ref.getName(), ejbName, ref.getEjbLink());
                }

            } else {
                final EjbResolver.Scope scope = ejbResolver.getScope(deploymentId);
                info.externalReference = (scope != EAR && scope != EJBJAR);

                if (ref.getRefType() == EjbReference.Type.UNKNOWN) {
                    EnterpriseBeanInfo otherBean = ejbResolver.getEnterpriseBeanInfo(deploymentId);
                    if (otherBean != null) {
                        if (otherBean.businessLocal.contains(ref.getInterface()) || otherBean.ejbClass.equals(ref.getInterface())) {
                            ref.setRefType(EjbReference.Type.LOCAL);
                            ejbRefs.remove(ref);
                            ejbLocalRefs.add(new EjbLocalRef(ref));
View Full Code Here

        if (moduleId == null) {
            moduleUri = null;
        } else {
            moduleUri = URLs.uri(moduleId);
        }
        final EjbResolver ejbResolver = getEjbResolver(moduleId);

        if (sessionBean.getDependsOn() != null) {
            for (String ejbName : sessionBean.getDependsOn()) {
                final String deploymentId = ejbResolver.resolve(new SimpleRef(ejbName), moduleUri);
                if (deploymentId != null) {
                    beanInfo.dependsOn.add(deploymentId);
                }
            }
        }
View Full Code Here

    public JndiEncInfoBuilder(AppInfo appInfo) {
        this.appInfo = appInfo;

        // Global-scoped EJB Resolver

        EjbResolver globalResolver = SystemInstance.get().getComponent(EjbResolver.class);

        // EAR-scoped EJB Resolver

        earResolver = new EjbResolver(globalResolver, EAR, appInfo.ejbJars);

        // EJBJAR-scoped EJB Resolver(s)

        for (EjbJarInfo ejbJarInfo : appInfo.ejbJars) {

            EjbResolver ejbJarResolver = new EjbResolver(earResolver, EJBJAR, ejbJarInfo);

            ejbJarResolvers.put(ejbJarInfo.moduleName, ejbJarResolver);
        }
    }
View Full Code Here

            ejbJarResolvers.put(ejbJarInfo.moduleName, ejbJarResolver);
        }
    }

    private EjbResolver getEjbResolver(String moduleId) {
        EjbResolver resolver = ejbJarResolvers.get(moduleId);
        if (resolver == null){
            resolver = earResolver;
        }
        return resolver;
    }
View Full Code Here

                    insert(info, appInfo.globalJndiEnc.ejbReferences, appInfo.appJndiEnc.ejbReferences, moduleJndiEnc.ejbReferences, compJndiEnc.ejbReferences);
                }
                continue;
            }

            EjbResolver ejbResolver = getEjbResolver(moduleId);

            String deploymentId = ejbResolver.resolve(new Ref(ref), moduleUri);

            info.ejbDeploymentId = deploymentId;

            if (info.ejbDeploymentId == null) {
                if (info.link != null){
                    logger.warning("config.noBeanFoundEjbLink", ref.getName(), ejbName, ref.getEjbLink());
                } else {
                    logger.warning("config.noBeanFound", ref.getName(), ejbName, ref.getEjbLink());
                }
            } else {

//            info.localbean = isLocalBean(moduleId, deploymentId);

                EjbResolver.Scope scope = ejbResolver.getScope(deploymentId);

                info.externalReference = (scope != EAR && scope != EJBJAR);

                if (ref.getRefType() == EjbReference.Type.UNKNOWN) {
                    EnterpriseBeanInfo otherBean = ejbResolver.getEnterpriseBeanInfo(deploymentId);
                    if (otherBean != null) {
                        if (otherBean.businessLocal.contains(ref.getInterface()) || otherBean.ejbClass.equals(ref.getInterface())) {
                            ref.setRefType(EjbReference.Type.LOCAL);
                            jndiConsumer.getEjbRef().remove(ref);
                            jndiConsumer.getEjbLocalRef().add(new EjbLocalRef(ref));
View Full Code Here

        URI moduleUri = null;
        if (moduleId != null) {
            moduleUri = URLs.uri(moduleId);
        }

        EjbResolver ejbResolver = getEjbResolver(moduleId);

        if (sessionBean.getDependsOn() != null) {
            for (String ejbName : sessionBean.getDependsOn()) {
                String deploymentId = ejbResolver.resolve(new SimpleRef(ejbName), moduleUri);
                if (deploymentId != null) {
                    beanInfo.dependsOn.add(deploymentId);
                }
            }
        }
View Full Code Here

    public JndiEncInfoBuilder(AppInfo appInfo) {
        this.appInfo = appInfo;

        // Global-scoped EJB Resolver

        EjbResolver globalResolver = SystemInstance.get().getComponent(EjbResolver.class);

        // EAR-scoped EJB Resolver

        earResolver = new EjbResolver(globalResolver, EAR, appInfo.ejbJars);

        // EJBJAR-scoped EJB Resolver(s)

        for (EjbJarInfo ejbJarInfo : appInfo.ejbJars) {

            EjbResolver ejbJarResolver = new EjbResolver(earResolver, EJBJAR, ejbJarInfo);

            ejbJarResolvers.put(ejbJarInfo.moduleName, ejbJarResolver);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.openejb.assembler.classic.EjbResolver$Reference

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.