Package org.apache.openejb.assembler.classic

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


    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.moduleId, ejbJarResolver);
        }
    }
View Full Code Here


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

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

                    jndi.ejbReferences.add(info);
                }
                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());
                }
                if (ref.getRefType() == EjbReference.Type.LOCAL) {
                    jndi.ejbLocalReferences.add(toLocal(info));
                } else {
                    jndi.ejbReferences.add(info);
                }
                continue;
            }

//            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())) {
                        ref.setRefType(EjbReference.Type.LOCAL);
                        jndiConsumer.getEjbRef().remove(ref);
                        jndiConsumer.getEjbLocalRef().add(new EjbLocalRef(ref));
View Full Code Here

            } catch (URISyntaxException e) {
                throw new OpenEJBException("Illegal moduleId " + moduleId, e);
            }
        }

        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

        }

        SystemInstance systemInstance = SystemInstance.get();


        EjbResolver resolver = systemInstance.getComponent(EjbResolver.class);

        String deploymentId = resolver.resolve(info, moduleUri);

        if (deploymentId == null) {
            String key = "lazyEjbRefNotResolved";
            if (info.getHome() != null){
                key += ".home";
View Full Code Here

    public JndiEncInfoBuilder(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.moduleId, ejbJarResolver);
        }
    }
View Full Code Here

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

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

                    jndi.ejbReferences.add(info);
                }
                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());
                }
                if (ref.getRefType() == EjbReference.Type.LOCAL) {
                    jndi.ejbLocalReferences.add(toLocal(info));
                } else {
                    jndi.ejbReferences.add(info);
                }
                continue;
            }

            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.businessRemote.contains(ref.getInterface())) {
                        ref.setRefType(EjbReference.Type.REMOTE);
                    } else {
                        ref.setRefType(EjbReference.Type.LOCAL);
View Full Code Here

    public JndiEncInfoBuilder(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.moduleId, ejbJarResolver);
        }
    }
View Full Code Here

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

    private EjbResolver getEjbResolver(String moduleId) {
        EjbResolver resolver = ejbJarResolvers.get(moduleId);
        if (resolver == null){
            resolver = earResolver;
        }
        return resolver;
    }
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.