Examples of EjbLocalRefType


Examples of org.apache.geronimo.xbeans.j2ee.EjbLocalRefType

            String name = (String) it.next();
            newMap.put(name.trim(), ejbLocalRefMap.get(name));
        }
        ejbLocalRefMap = newMap;
        for (int i = 0; i < ejbLocalRefs.length; i++) {
            EjbLocalRefType ejbLocalRef = ejbLocalRefs[i];

            String ejbRefName = getStringValue(ejbLocalRef.getEjbRefName());
            GerEjbLocalRefType localRef = (GerEjbLocalRefType) ejbLocalRefMap.get(ejbRefName);

            Reference ejbReference = addEJBLocalRef(ejbContext, refContext, moduleURI, ejbLocalRef, localRef, cl);
            builder.bind(ejbRefName, ejbReference);
        }
View Full Code Here

Examples of org.apache.geronimo.xbeans.j2ee.EjbLocalRefType

    }

    static void addEJBLocalRefs(NamingContext ejbContext, RefContext refContext, URI moduleURI, EjbLocalRefType[] ejbLocalRefs, Map ejbLocalRefMap, ClassLoader cl, ComponentContextBuilder builder) throws DeploymentException {
        J2eeContext j2eeContext = ejbContext.getJ2eeContext();
        for (int i = 0; i < ejbLocalRefs.length; i++) {
            EjbLocalRefType ejbLocalRef = ejbLocalRefs[i];

            String ejbRefName = getStringValue(ejbLocalRef.getEjbRefName());

            String local = getStringValue(ejbLocalRef.getLocal());
            assureEJBLocalObjectInterface(local, cl);

            String localHome = getStringValue(ejbLocalRef.getLocalHome());
            assureEJBLocalHomeInterface(localHome, cl);

            boolean isSession = "Session".equals(getStringValue(ejbLocalRef.getEjbRefType()));

            String ejbLink = null;
            GerEjbLocalRefType localRef = (GerEjbLocalRefType) ejbLocalRefMap.get(ejbRefName);
            if (localRef != null && localRef.isSetEjbLink()) {
                ejbLink = localRef.getEjbLink();
            } else if (ejbLocalRef.isSetEjbLink()) {
                ejbLink = getStringValue(ejbLocalRef.getEjbLink());
            }

            Reference ejbReference;
            if (ejbLink != null) {
                ejbReference = refContext.getEJBLocalRef(moduleURI, ejbLink, isSession, localHome, local, ejbContext);
View Full Code Here

Examples of org.apache.geronimo.xbeans.j2ee.EjbLocalRefType

            String name = (String) it.next();
            newMap.put(name.trim(), ejbLocalRefMap.get(name));
        }
        ejbLocalRefMap = newMap;
        for (int i = 0; i < ejbLocalRefs.length; i++) {
            EjbLocalRefType ejbLocalRef = ejbLocalRefs[i];

            String ejbRefName = getStringValue(ejbLocalRef.getEjbRefName());
            GerEjbLocalRefType localRef = (GerEjbLocalRefType) ejbLocalRefMap.get(ejbRefName);

            Reference ejbReference = addEJBLocalRef(ejbContext, refContext, moduleURI, ejbLocalRef, localRef, cl);
            builder.bind(ejbRefName, ejbReference);
        }
View Full Code Here

Examples of org.apache.geronimo.xbeans.j2ee.EjbLocalRefType

    public static void addEJBLocalRefs(EARContext earContext, URI uri, EjbLocalRefType[] ejbLocalRefs, Map ejbLocalRefMap, ClassLoader cl, ComponentContextBuilder builder) throws DeploymentException {
        RefContext refContext = earContext.getRefContext();
        J2eeContext j2eeContext = earContext.getJ2eeContext();
        for (int i = 0; i < ejbLocalRefs.length; i++) {
            EjbLocalRefType ejbLocalRef = ejbLocalRefs[i];

            String ejbRefName = ejbLocalRef.getEjbRefName().getStringValue();

            String local = ejbLocalRef.getLocal().getStringValue();
            assureEJBLocalObjectInterface(local, cl);

            String localHome = ejbLocalRef.getLocalHome().getStringValue();
            assureEJBLocalHomeInterface(localHome, cl);

            boolean isSession = "Session".equals(ejbLocalRef.getEjbRefType().getStringValue());

            String ejbLink = null;
            GerEjbLocalRefType localRef = (GerEjbLocalRefType) ejbLocalRefMap.get(ejbRefName);
            if (localRef != null && localRef.isSetEjbLink()) {
                ejbLink = localRef.getEjbLink();
            } else if (ejbLocalRef.isSetEjbLink()) {
                ejbLink = getJ2eeStringValue(ejbLocalRef.getEjbLink());
            }

            Reference ejbReference;
            if (ejbLink != null) {
                ejbReference = refContext.getEJBLocalRef(uri, ejbLink, isSession, localHome, local);
View Full Code Here

Examples of org.apache.geronimo.xbeans.j2ee.EjbLocalRefType

    }

    static void addEJBLocalRefs(NamingContext ejbContext, RefContext refContext, URI moduleURI, EjbLocalRefType[] ejbLocalRefs, Map ejbLocalRefMap, ClassLoader cl, ComponentContextBuilder builder) throws DeploymentException {
        J2eeContext j2eeContext = ejbContext.getJ2eeContext();
        for (int i = 0; i < ejbLocalRefs.length; i++) {
            EjbLocalRefType ejbLocalRef = ejbLocalRefs[i];

            String ejbRefName = getStringValue(ejbLocalRef.getEjbRefName());

            String local = getStringValue(ejbLocalRef.getLocal());
            try {
                assureEJBLocalObjectInterface(local, cl);
            } catch (DeploymentException e) {
                throw new DeploymentException("Error processing 'local' element for EJB Local Reference '"+ejbRefName+"' for module '"+moduleURI+"': "+e.getMessage());
            }

            String localHome = getStringValue(ejbLocalRef.getLocalHome());
            try {
                assureEJBLocalHomeInterface(localHome, cl);
            } catch (DeploymentException e) {
                throw new DeploymentException("Error processing 'local-home' element for EJB Local Reference '"+ejbRefName+"' for module '"+moduleURI+"': "+e.getMessage());
            }

            boolean isSession = "Session".equals(getStringValue(ejbLocalRef.getEjbRefType()));

            String ejbLink = null;
            GerEjbLocalRefType localRef = (GerEjbLocalRefType) ejbLocalRefMap.get(ejbRefName);
            if (localRef != null && localRef.isSetEjbLink()) {
                ejbLink = localRef.getEjbLink();
            } else if (ejbLocalRef.isSetEjbLink()) {
                ejbLink = getStringValue(ejbLocalRef.getEjbLink());
            }

            Reference ejbReference;
            if (ejbLink != null) {
                ejbReference = refContext.getEJBLocalRef(moduleURI, ejbLink, isSession, localHome, local, ejbContext);
View Full Code Here

Examples of org.apache.geronimo.xbeans.j2ee.EjbLocalRefType

    public static void addEJBLocalRefs(EARContext earContext, URI uri, EjbLocalRefType[] ejbLocalRefs, Map ejbLocalRefMap, ClassLoader cl, ComponentContextBuilder builder) throws DeploymentException {
        RefContext refContext = earContext.getRefContext();
        J2eeContext j2eeContext = earContext.getJ2eeContext();
        for (int i = 0; i < ejbLocalRefs.length; i++) {
            EjbLocalRefType ejbLocalRef = ejbLocalRefs[i];

            String ejbRefName = getStringValue(ejbLocalRef.getEjbRefName());

            String local = getStringValue(ejbLocalRef.getLocal());
            assureEJBLocalObjectInterface(local, cl);

            String localHome = getStringValue(ejbLocalRef.getLocalHome());
            assureEJBLocalHomeInterface(localHome, cl);

            boolean isSession = "Session".equals(getStringValue(ejbLocalRef.getEjbRefType()));

            String ejbLink = null;
            GerEjbLocalRefType localRef = (GerEjbLocalRefType) ejbLocalRefMap.get(ejbRefName);
            if (localRef != null && localRef.isSetEjbLink()) {
                ejbLink = localRef.getEjbLink();
            } else if (ejbLocalRef.isSetEjbLink()) {
                ejbLink = getStringValue(ejbLocalRef.getEjbLink());
            }

            Reference ejbReference;
            if (ejbLink != null) {
                ejbReference = refContext.getEJBLocalRef(uri, ejbLink, isSession, localHome, local);
View Full Code Here

Examples of org.apache.geronimo.xbeans.javaee.EjbLocalRefType

                try {

                    log.debug("addEJB(): Does not exist in DD: " + localRefName);

                    // Doesn't exist in deployment descriptor -- add new
                    EjbLocalRefType ejbLocalRef = annotatedApp.addNewEjbLocalRef();

                    //------------------------------------------------------------------------------
                    // <ejb-local-ref> required elements:
                    //------------------------------------------------------------------------------

                    // ejb-ref-name
                    EjbRefNameType ejbRefName = ejbLocalRef.addNewEjbRefName();
                    ejbRefName.setStringValue(localRefName);
                    ejbLocalRef.setEjbRefName(ejbRefName);

                    //------------------------------------------------------------------------------
                    // <ejb-local-ref> optional elements:
                    //------------------------------------------------------------------------------

                    // local
                    if (interfce != null) {
                        String localAnnotation = interfce.getName();
                        if (!localAnnotation.equals("")) {
                            LocalType local = ejbLocalRef.addNewLocal();
                            local.setStringValue(localAnnotation);
                            ejbLocalRef.setLocal(local);
                        }
                    }

                    // ejb-link
                    String beanName = annotation.beanName();
                    if (!beanName.equals("")) {
                        EjbLinkType ejbLink = ejbLocalRef.addNewEjbLink();
                        ejbLink.setStringValue(beanName);
                        ejbLocalRef.setEjbLink(ejbLink);
                    }

                    // mappedName
                    String mappdedNameAnnotation = annotation.mappedName();
                    if (!mappdedNameAnnotation.equals("")) {
                        XsdStringType mappedName = ejbLocalRef.addNewMappedName();
                        mappedName.setStringValue(mappdedNameAnnotation);
                        ejbLocalRef.setMappedName(mappedName);
                    }

                    // description
                    String descriptionAnnotation = annotation.description();
                    if (!descriptionAnnotation.equals("")) {
                        DescriptionType description = ejbLocalRef.addNewDescription();
                        description.setStringValue(descriptionAnnotation);
                    }

                    // injectionTarget
                    if (method != null || field != null) {                            // No class-level injection
                        InjectionTargetType injectionTarget = ejbLocalRef.addNewInjectionTarget();
                        FullyQualifiedClassType qualifiedClass = injectionTarget.addNewInjectionTargetClass();
                        JavaIdentifierType javaType = injectionTarget.addNewInjectionTargetName();
                        if (method != null) {
                            qualifiedClass.setStringValue(method.getDeclaringClass().getName());
                            javaType.setStringValue(method.getName().substring(3));   // method should start with "set"
View Full Code Here

Examples of org.apache.geronimo.xbeans.javaee.EjbLocalRefType

            log.debug("addEJB(): <ejb-local-ref> found");

            String localRefName = getName(annotation.name(), method, field);

            EjbLocalRefType ejbLocalRef = null;
           
            EjbLocalRefType[] ejbLocalRefEntries = annotatedApp.getEjbLocalRefArray();
            for (EjbLocalRefType ejbLocalRefEntry : ejbLocalRefEntries) {
                if (ejbLocalRefEntry.getEjbRefName().getStringValue().trim().equals(localRefName)) {
                    ejbLocalRef = ejbLocalRefEntry;
                    break;
                }
            }
            if (ejbLocalRef == null) {
                try {

                    log.debug("addEJB(): Does not exist in DD: " + localRefName);

                    // Doesn't exist in deployment descriptor -- add new
                    ejbLocalRef = annotatedApp.addNewEjbLocalRef();

                    //------------------------------------------------------------------------------
                    // <ejb-local-ref> required elements:
                    //------------------------------------------------------------------------------

                    // ejb-ref-name
                    EjbRefNameType ejbRefName = ejbLocalRef.addNewEjbRefName();
                    ejbRefName.setStringValue(localRefName);
                    ejbLocalRef.setEjbRefName(ejbRefName);

                    //------------------------------------------------------------------------------
                    // <ejb-local-ref> optional elements:
                    //------------------------------------------------------------------------------

                    // local
                    if (interfce != null) {
                        String localAnnotation = interfce.getName();
                        if (!localAnnotation.equals("")) {
                            LocalType local = ejbLocalRef.addNewLocal();
                            local.setStringValue(localAnnotation);
                            ejbLocalRef.setLocal(local);
                        }
                    }

                    // ejb-link
                    String beanName = annotation.beanName();
                    if (!beanName.equals("")) {
                        EjbLinkType ejbLink = ejbLocalRef.addNewEjbLink();
                        ejbLink.setStringValue(beanName);
                        ejbLocalRef.setEjbLink(ejbLink);
                    }

                    // mappedName
                    String mappdedNameAnnotation = annotation.mappedName();
                    if (!mappdedNameAnnotation.equals("")) {
                        XsdStringType mappedName = ejbLocalRef.addNewMappedName();
                        mappedName.setStringValue(mappdedNameAnnotation);
                        ejbLocalRef.setMappedName(mappedName);
                    }

                    // description
                    String descriptionAnnotation = annotation.description();
                    if (!descriptionAnnotation.equals("")) {
                        DescriptionType description = ejbLocalRef.addNewDescription();
                        description.setStringValue(descriptionAnnotation);
                    }
                }
                catch (Exception e) {
                    log.debug("EJBAnnotationHelper: Exception caught while processing <ejb-local-ref>", e);
                }
            }
           
            // injectionTarget
            if (method != null || field != null) {
                InjectionTargetType[] targets = ejbLocalRef.getInjectionTargetArray();
                if (!hasTarget(method, field, targets)) {
                    configureInjectionTarget(ejbLocalRef.addNewInjectionTarget(), method, field);
                }
            }
        }                                                                           // end if local
        else if (remoteFlag) {                                                      // remote
View Full Code Here

Examples of org.apache.geronimo.xbeans.javaee.EjbLocalRefType

                try {

                    log.debug("addEJB(): Does not exist in DD: " + localRefName);

                    // Doesn't exist in deployment descriptor -- add new
                    EjbLocalRefType ejbLocalRef = annotatedApp.addNewEjbLocalRef();

                    //------------------------------------------------------------------------------
                    // <ejb-local-ref> required elements:
                    //------------------------------------------------------------------------------

                    // ejb-ref-name
                    EjbRefNameType ejbRefName = ejbLocalRef.addNewEjbRefName();
                    ejbRefName.setStringValue(localRefName);
                    ejbLocalRef.setEjbRefName(ejbRefName);

                    //------------------------------------------------------------------------------
                    // <ejb-local-ref> optional elements:
                    //------------------------------------------------------------------------------

                    // local
                    if (interfce != null) {
                        String localAnnotation = interfce.getName();
                        if (!localAnnotation.equals("")) {
                            LocalType local = ejbLocalRef.addNewLocal();
                            local.setStringValue(localAnnotation);
                            ejbLocalRef.setLocal(local);
                        }
                    }

                    // ejb-link
                    String beanName = annotation.beanName();
                    if (!beanName.equals("")) {
                        EjbLinkType ejbLink = ejbLocalRef.addNewEjbLink();
                        ejbLink.setStringValue(beanName);
                        ejbLocalRef.setEjbLink(ejbLink);
                    }

                    // mappedName
                    String mappdedNameAnnotation = annotation.mappedName();
                    if (!mappdedNameAnnotation.equals("")) {
                        XsdStringType mappedName = ejbLocalRef.addNewMappedName();
                        mappedName.setStringValue(mappdedNameAnnotation);
                        ejbLocalRef.setMappedName(mappedName);
                    }

                    // description
                    String descriptionAnnotation = annotation.description();
                    if (!descriptionAnnotation.equals("")) {
                        DescriptionType description = ejbLocalRef.addNewDescription();
                        description.setStringValue(descriptionAnnotation);
                    }

                    // injectionTarget
                    if (method != null || field != null) {                            // No class-level injection
                        InjectionTargetType injectionTarget = ejbLocalRef.addNewInjectionTarget();
                        FullyQualifiedClassType qualifiedClass = injectionTarget.addNewInjectionTargetClass();
                        JavaIdentifierType javaType = injectionTarget.addNewInjectionTargetName();
                        if (method != null) {
                            qualifiedClass.setStringValue(method.getDeclaringClass().getName());
                            javaType.setStringValue(method.getName().substring(3));   // method should start with "set"
View Full Code Here

Examples of org.apache.geronimo.xbeans.javaee.EjbLocalRefType

            log.debug("addEJB(): <ejb-local-ref> found");

            String localRefName = getName(annotation.name(), method, field);

            EjbLocalRefType ejbLocalRef = null;
           
            EjbLocalRefType[] ejbLocalRefEntries = annotatedApp.getEjbLocalRefArray();
            for (EjbLocalRefType ejbLocalRefEntry : ejbLocalRefEntries) {
                if (ejbLocalRefEntry.getEjbRefName().getStringValue().trim().equals(localRefName)) {
                    ejbLocalRef = ejbLocalRefEntry;
                    break;
                }
            }
            if (ejbLocalRef == null) {
                try {

                    log.debug("addEJB(): Does not exist in DD: " + localRefName);

                    // Doesn't exist in deployment descriptor -- add new
                    ejbLocalRef = annotatedApp.addNewEjbLocalRef();

                    //------------------------------------------------------------------------------
                    // <ejb-local-ref> required elements:
                    //------------------------------------------------------------------------------

                    // ejb-ref-name
                    EjbRefNameType ejbRefName = ejbLocalRef.addNewEjbRefName();
                    ejbRefName.setStringValue(localRefName);
                    ejbLocalRef.setEjbRefName(ejbRefName);

                    //------------------------------------------------------------------------------
                    // <ejb-local-ref> optional elements:
                    //------------------------------------------------------------------------------

                    // local
                    if (interfce != null) {
                        String localAnnotation = interfce.getName();
                        if (!localAnnotation.equals("")) {
                            LocalType local = ejbLocalRef.addNewLocal();
                            local.setStringValue(localAnnotation);
                            ejbLocalRef.setLocal(local);
                        }
                    }

                    // ejb-link
                    String beanName = annotation.beanName();
                    if (!beanName.equals("")) {
                        EjbLinkType ejbLink = ejbLocalRef.addNewEjbLink();
                        ejbLink.setStringValue(beanName);
                        ejbLocalRef.setEjbLink(ejbLink);
                    }

                    // mappedName
                    String mappdedNameAnnotation = annotation.mappedName();
                    if (!mappdedNameAnnotation.equals("")) {
                        XsdStringType mappedName = ejbLocalRef.addNewMappedName();
                        mappedName.setStringValue(mappdedNameAnnotation);
                        ejbLocalRef.setMappedName(mappedName);
                    }

                    // description
                    String descriptionAnnotation = annotation.description();
                    if (!descriptionAnnotation.equals("")) {
                        DescriptionType description = ejbLocalRef.addNewDescription();
                        description.setStringValue(descriptionAnnotation);
                    }
                }
                catch (Exception e) {
                    log.debug("EJBAnnotationHelper: Exception caught while processing <ejb-local-ref>", e);
                }
            }
           
            // injectionTarget
            if (method != null || field != null) {
                InjectionTargetType[] targets = ejbLocalRef.getInjectionTargetArray();
                if (!hasTarget(method, field, targets)) {
                    configureInjectionTarget(ejbLocalRef.addNewInjectionTarget(), method, field);
                }
            }
        }                                                                           // end if local
        else if (remoteFlag) {                                                      // remote
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.