Package org.apache.geronimo.xbeans.javaee

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


                resourceEnvRef.setMappedName(mappedName);
            }
        }

        private void addMethodDestinationRef(AnnotatedApp annotatedApp, String resourceName, String resourceType, Method method, Field field, Resource annotation) {
            MessageDestinationRefType messageDestinationRef = annotatedApp.addNewMessageDestinationRef();

            //------------------------------------------------------------------------------
            // <message-destination-ref> required elements:
            //------------------------------------------------------------------------------

            // message-destination-ref-name
            JndiNameType messageDestinationRefName = messageDestinationRef.addNewMessageDestinationRefName();
            messageDestinationRefName.setStringValue(resourceName);
            messageDestinationRef.setMessageDestinationRefName(messageDestinationRefName);

            if (!resourceType.equals("")) {
                // message-destination-ref-type
                MessageDestinationTypeType msgDestType = messageDestinationRef.addNewMessageDestinationType();
                msgDestType.setStringValue(resourceType);
                messageDestinationRef.setMessageDestinationType(msgDestType);
            }
            if (method != null || field != null) {
                // injectionTarget
                InjectionTargetType injectionTarget = messageDestinationRef.addNewInjectionTarget();
                configureInjectionTarget(injectionTarget, method, field);
            }

            //------------------------------------------------------------------------------
            // <message-destination-ref> optional elements:
            //------------------------------------------------------------------------------

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

            // mappedName
            String mappdedNameAnnotation = annotation.mappedName();
            if (!mappdedNameAnnotation.equals("")) {
                XsdStringType mappedName = messageDestinationRef.addNewMappedName();
                mappedName.setStringValue(mappdedNameAnnotation);
                messageDestinationRef.setMappedName(mappedName);
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.xbeans.javaee.MessageDestinationRefType

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.