Examples of GerPatternType


Examples of org.apache.geronimo.xbeans.geronimo.naming.GerPatternType

                AbstractNameQuery cssBean;
                if (remoteRef.isSetCssLink()) {
                    String cssLink = remoteRef.getCssLink().trim();
                    cssBean = buildAbstractNameQuery(null, null, cssLink, NameFactory.CORBA_CSS, NameFactory.EJB_MODULE);
                } else {
                    GerPatternType css = remoteRef.getCss();
                    cssBean = buildAbstractNameQuery(css, NameFactory.CORBA_CSS, NameFactory.EJB_MODULE, null);
                }

                // verify the cssBean query is valid
                try {
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.naming.GerPatternType

                // handle external refs

                if (ejbRefType.getPattern() != null) {
                    // external ear ref
                    // set mapped name to the deploymentId of the external ref
                    GerPatternType pattern = ejbRefType.getPattern();
                    String module = pattern.getModule();
                    if (module == null) {
                        module = pattern.getArtifactId();
                    }
                    String ejbName = pattern.getName();
                    String deploymentId = module.trim() + "/" + ejbName;
                    spec_ejbRef.setMappedName(deploymentId.trim());
                }

                if (ejbRefType.getEjbLink() != null) {
                    spec_ejbRef.setEjbLink(getStringValue(ejbRefType.getEjbLink()));
                }



                // openejb handling of injection-targets
                if (spec_ejbRef.getInjectionTarget() != null) {

                    List<InjectionTarget> injectionTargetsToAdd=new ArrayList<InjectionTarget>();
                    for (InjectionTarget injectionTargetType : spec_ejbRef.getInjectionTarget()) {
                        InjectionTarget newInjectionTarget = new InjectionTarget();
                        newInjectionTarget.setInjectionTargetClass(getStringValue(injectionTargetType
                                .getInjectionTargetClass()));
                        newInjectionTarget.setInjectionTargetName(getStringValue(injectionTargetType
                                .getInjectionTargetName()));
                        injectionTargetsToAdd.add(newInjectionTarget);
                    }
                    spec_ejbRef.getInjectionTarget().addAll(injectionTargetsToAdd);
                }

                // TODO: geronimo's handling of injection-target
                // addInjections(refName, spec_ejbRef.getInjectionTarget(), NamingBuilder.INJECTION_KEY.get(sharedContext));

            }

        }

        for (EjbLocalRef localRefFromSpecDD : jndiConsumer.getEjbLocalRef()) {

            String refName = getStringValue(localRefFromSpecDD.getEjbRefName());

            // skip corba refs
            GerEjbLocalRefType ejbLocalRefType = localRefMap.get(refName);

            // merge info in alt-DD to spec DD.
            if (ejbLocalRefType != null) {

                // ejb-ref-name
                localRefFromSpecDD.setEjbRefName(refName);

                // ejb-ref-type
                String refType = getStringValue(localRefFromSpecDD.getType());
                if ("SESSION".equalsIgnoreCase(refType)) {
                    localRefFromSpecDD.setEjbRefType(org.apache.openejb.jee.EjbRefType.SESSION);
                } else if ("ENTITY".equalsIgnoreCase(refType)) {
                    localRefFromSpecDD.setEjbRefType(org.apache.openejb.jee.EjbRefType.ENTITY);
                }

                // home
                localRefFromSpecDD.setLocalHome(getStringValue(localRefFromSpecDD.getLocalHome()));

                // remote
                localRefFromSpecDD.setLocal(getStringValue(localRefFromSpecDD.getLocal()));

                // ejb-link
                localRefFromSpecDD.setEjbLink(getStringValue(localRefFromSpecDD.getEjbLink()));

                // mapped-name
                localRefFromSpecDD.setMappedName(getStringValue(localRefFromSpecDD.getMappedName()));

                // handle external refs
                if (ejbLocalRefType.getPattern() != null) {
                    // external ear ref
                    // set mapped name to the deploymentId of the external ref
                    GerPatternType pattern = ejbLocalRefType.getPattern();
                    String module = pattern.getModule();
                    if (module == null) {
                        module = pattern.getArtifactId();
                    }
                    String ejbName = pattern.getName();
                    String deploymentId = module.trim() + "/" + ejbName;
                    localRefFromSpecDD.setMappedName(deploymentId.trim());
                }

                // openejb handling of injection-targets
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.naming.GerPatternType

        AbstractNameQuery persistenceUnitNameQuery;
        if (gerPersistenceRef.isSetPersistenceUnitName()) {
            String persistenceUnitName = gerPersistenceRef.getPersistenceUnitName();
            persistenceUnitNameQuery = new AbstractNameQuery(null, Collections.singletonMap("name", persistenceUnitName), PERSISTENCE_UNIT_INTERFACE_TYPES);
        } else {
            GerPatternType gbeanLocator = gerPersistenceRef.getPattern();

            persistenceUnitNameQuery = buildAbstractNameQuery(gbeanLocator, null, null, PERSISTENCE_UNIT_INTERFACE_TYPES);
        }
        checkForGBean(localConfiguration, persistenceUnitNameQuery, false, false, new HashSet<AbstractName>());
        return persistenceUnitNameQuery;
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.naming.GerPatternType

        AbstractNameQuery persistenceUnitNameQuery;
        if (persistenceContextRef.isSetPersistenceUnitName()) {
            String persistenceUnitName = persistenceContextRef.getPersistenceUnitName();
            persistenceUnitNameQuery = new AbstractNameQuery(null, Collections.singletonMap("name", persistenceUnitName), PERSISTENCE_UNIT_INTERFACE_TYPES);
        } else {
            GerPatternType gbeanLocator = persistenceContextRef.getPattern();

            persistenceUnitNameQuery = buildAbstractNameQuery(gbeanLocator, null, null, PERSISTENCE_UNIT_INTERFACE_TYPES);
        }
        checkForGBean(localConfiguration, persistenceUnitNameQuery, false, false, new HashSet<AbstractName>());
        return persistenceUnitNameQuery;
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.naming.GerPatternType

            String referenceLink = request.getParameter(prefix + REF_LINK);
            if (isEmpty(referenceLink)) {
                referenceNotResolved = true;
            }
            dependenciesSet.add(getDependencyString(referenceLink));
            GerPatternType pattern = createPattern(referenceLink);
            // GERONIMO-5981
            // OpenEJB requires the type of the ejb for jndi binding
            pattern.setArtifactId(pattern.getArtifactId() + ".jar");
            webApp.getEjbRefArray(index).setPattern(pattern);
            index++;
        }
        index = 0;
        while (true) {
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.naming.GerPatternType

        String[] elements = patternString.split("/", 6);
        return elements[0] + "/" + elements[1] + "/" + elements[2] + "/" + elements[3];
    }

    public static GerPatternType createPattern(String patternString) {
        GerPatternType pattern = GerPatternType.Factory.newInstance();
        String[] elements = patternString.split("/", 6);
        if (!isEmpty(elements[0])) {
            pattern.setGroupId(elements[0]);
        }
        if (!isEmpty(elements[1])) {
            pattern.setArtifactId(elements[1]);
        }
        if (!isEmpty(elements[2])) {
            pattern.setVersion(elements[2]);
        }
        if (!isEmpty(elements[3])) {
            // pattern.setType(elements[3]);
        }
        if (!isEmpty(elements[4])) {
            pattern.setModule(elements[4]);
        }
        if (!isEmpty(elements[5])) {
            pattern.setName(elements[5]);
        }
        return pattern;
    }
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.naming.GerPatternType

     * JavaBean getter for the Pattern property.  Gets a JavaBean of type
     * Pattern for the pattern child of this element, or null if there is no
     * pattern child.
     */
    public Pattern getPattern() {
        GerPatternType patternType = findPattern();
        if(patternType == null) return null;
        Pattern group = new Pattern();
        group.setGroupId(patternType.getGroupId());
        group.setArtifactId(patternType.getArtifactId());
        group.setVersion(patternType.getVersion());
        group.setModule(patternType.getModule());
        group.setName(patternType.getName());
        return group.empty() ? null : group;
    }
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.naming.GerPatternType

     * clearNonPatternFromChoice if a non-null Pattern is set.
     */
    public void setPattern(Pattern group) {
        Pattern old = getPattern();
        if(group != null) {
            GerPatternType patternType;
            if(old == null) {
                patternType = (GerPatternType) ((XmlObjectBase)getXmlObject()).get_store().add_element_user(new QName("http://geronimo.apache.org/xml/ns/naming-1.2", "pattern"));
            } else {
                patternType = findPattern();
            }
            if(!isEmpty(group.getGroupId())) {
                patternType.setGroupId(group.getGroupId());
            } else {
                if(patternType.isSetGroupId()) patternType.unsetGroupId();
            }
            if(!isEmpty(group.getArtifactId())) {
                patternType.setArtifactId(group.getArtifactId());
            } else {
                if(patternType.isSetArtifactId()) patternType.unsetArtifactId();
            }
            if(!isEmpty(group.getModule())) {
                patternType.setModule(group.getModule());
            } else {
                if(patternType.isSetModule()) patternType.unsetModule();
            }
            patternType.setName(group.getName());
            if(!isEmpty(group.getVersion())) {
                patternType.setVersion(group.getVersion());
            } else {
                if(patternType.isSetVersion()) patternType.unsetVersion();
            }
            clearNonPatternFromChoice();
        } else {
            if(old != null) {
                ((XmlObjectBase)getXmlObject()).get_store().remove_element(new QName("http://geronimo.apache.org/xml/ns/naming-1.2", "pattern"), 0);
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.naming.GerPatternType

                moduleURI = gerResourceEnvRef.getAdminObjectModule().trim();
            }
            containerId = buildAbstractNameQuery(null, moduleURI, gerResourceEnvRef.getAdminObjectLink().trim(), NameFactory.JCA_ADMIN_OBJECT, NameFactory.RESOURCE_ADAPTER_MODULE);
        } else {
            //construct name from components
            GerPatternType patternType = gerResourceEnvRef.getPattern();
            containerId = buildAbstractNameQuery(patternType, NameFactory.JCA_ADMIN_OBJECT, NameFactory.RESOURCE_ADAPTER_MODULE, null);
        }
        return containerId;
    }
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.naming.GerPatternType

                moduleURI = gerResourceEnvRef.getAdminObjectModule().trim();
            }
            containerId = buildAbstractNameQuery(null, moduleURI, gerResourceEnvRef.getAdminObjectLink().trim(), NameFactory.JCA_ADMIN_OBJECT, NameFactory.RESOURCE_ADAPTER_MODULE);
        } else {
            //construct name from components
            GerPatternType patternType = gerResourceEnvRef.getPattern();
            containerId = buildAbstractNameQuery(patternType, NameFactory.JCA_ADMIN_OBJECT, NameFactory.RESOURCE_ADAPTER_MODULE, null);
        }
        return containerId;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.