Examples of DescriptionType


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

                        //------------------------------------------------------------------------------

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

                        // service-ref-type
                        if (!serviceRef.isSetServiceRefType()) {
                            FullyQualifiedClassType serviceRefTypeClass = serviceRef.addNewServiceRefType();
View Full Code Here

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

                        //------------------------------------------------------------------------------

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

                        // authentication
                        if (annotation.authenticationType() == Resource.AuthenticationType.CONTAINER) {
                            ResAuthType resAuth = resourceRef.addNewResAuth();
View Full Code Here

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

            //------------------------------------------------------------------------------

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

            // mappedName
            String mappdedNameAnnotation = annotation.mappedName();
            if (!mappdedNameAnnotation.equals("")) {
View Full Code Here

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

            //------------------------------------------------------------------------------

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

            // mappedName
            String mappdedNameAnnotation = annotation.mappedName();
            if (!mappdedNameAnnotation.equals("")) {
View Full Code Here

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

                    }

                    // 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

            //--------------------------------------------------------------------------------------
            // 2. <ejb-ref>
            //--------------------------------------------------------------------------------------

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

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

            EjbRefType ejbRef = null;

            EjbRefType[] ejbRefEntries = annotatedApp.getEjbRefArray();
            for (EjbRefType ejbRefEntry : ejbRefEntries) {
                if (ejbRefEntry.getEjbRefName().getStringValue().trim().equals(remoteRefName)) {
                    ejbRef = ejbRefEntry;
                    break;
                }
            }
            if (ejbRef == null) {
                try {

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

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

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

                    // ejb-ref-name
                    EjbRefNameType ejbRefName = ejbRef.addNewEjbRefName();
                    ejbRefName.setStringValue(remoteRefName);
                    ejbRef.setEjbRefName(ejbRefName);

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

                    // remote
                    if (interfce != null) {
                        String remoteAnnotation = interfce.getName();
                        if (!remoteAnnotation.equals("")) {
                            RemoteType remote = ejbRef.addNewRemote();
                            remote.setStringValue(remoteAnnotation);
                            ejbRef.setRemote(remote);
                        }
                    }

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

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

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

            //--------------------------------------------------------------------------------------
            // 3. <UNKNOWN>
            //--------------------------------------------------------------------------------------
            log.debug("addEJB(): <UNKNOWN> found");

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

            EjbRefType ejbRef = null;

            EjbRefType[] ejbRefEntries = annotatedApp.getEjbRefArray();
            for (EjbRefType ejbRefEntry : ejbRefEntries) {
                if (ejbRefEntry.getEjbRefName().getStringValue().trim().equals(remoteRefName)) {
                    ejbRef = ejbRefEntry;
                    break;
                }
            }
            if (ejbRef == null) {
                try {

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

                    // Doesn't exist in deployment descriptor -- add as an <ejb-ref> to the
                    // ambiguous list so that it can be resolved later
                    ejbRef = EjbRefType.Factory.newInstance();
                    annotatedApp.getAmbiguousEjbRefs().add(ejbRef);

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

                    // ejb-ref-name
                    EjbRefNameType ejbRefName = ejbRef.addNewEjbRefName();
                    ejbRefName.setStringValue(remoteRefName);
                    ejbRef.setEjbRefName(ejbRefName);

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

                    // remote
                    if (interfce != null) {
                        String remoteAnnotation = interfce.getName();
                        if (!remoteAnnotation.equals("")) {
                            RemoteType remote = ejbRef.addNewRemote();
                            remote.setStringValue(remoteAnnotation);
                            ejbRef.setRemote(remote);
                        }
                    }

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

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

                    // description
                    String descriptionAnnotation = annotation.description();
                    if (!descriptionAnnotation.equals("")) {
                        DescriptionType description = ejbRef.addNewDescription();
                        description.setStringValue(descriptionAnnotation);
                    }
                }
                catch (Exception e) {
                    log.debug("EJBAnnotationHelper: Exception caught while processing <UNKNOWN>", e);
                }               
View Full Code Here

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

                        //------------------------------------------------------------------------------

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

                    }
                    catch (Exception anyException) {
                        log.debug("ResourceAnnotationHelper: Exception caught while processing <env-entry>");
View Full Code Here

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

            //------------------------------------------------------------------------------

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

            // mappedName
            String mappdedNameAnnotation = annotation.mappedName();
            if (!mappdedNameAnnotation.equals("")) {
View Full Code Here

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

            //------------------------------------------------------------------------------

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

            // mappedName
            String mappdedNameAnnotation = annotation.mappedName();
            if (!mappdedNameAnnotation.equals("")) {
View Full Code Here

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

                        //------------------------------------------------------------------------------

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

                        // authentication
                        if (annotation.authenticationType() == Resource.AuthenticationType.CONTAINER) {
                            ResAuthType resAuth = resourceRef.addNewResAuth();
View Full Code Here

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

                        //------------------------------------------------------------------------------

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

                    }
                    catch (Exception anyException) {
                        log.debug("ResourceAnnotationHelper: Exception caught while processing <env-entry>");
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.