Package org.apache.openejb.assembler.classic

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


                    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.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);

        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(final 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 (final 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(final 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) {
                    final 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 (final 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

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.