Package org.apache.openejb.jee

Examples of org.apache.openejb.jee.MessageDestinationRef$JAXB


            }
            annotatedApp.getResourceEnvRef().add(resourceEnvRef);
        }

        private void addMethodDestinationRef(JndiConsumer annotatedApp, String resourceName, String resourceType, Method method, Field field, Resource annotation) {
            MessageDestinationRef messageDestinationRef = new MessageDestinationRef();

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

            // message-destination-ref-name
            messageDestinationRef.setMessageDestinationRefName(resourceName);

            if (!resourceType.isEmpty()) {
                // message-destination-ref-type
                messageDestinationRef.setMessageDestinationType(resourceType);
            }
            if (method != null || field != null) {
                // injectionTarget
                messageDestinationRef.getInjectionTarget().add(configureInjectionTarget(method, field));
            }

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

            // description
            String descriptionAnnotation = annotation.description();
            if (!descriptionAnnotation.isEmpty()) {
                messageDestinationRef.setDescriptions(new Text[]{new Text(null, descriptionAnnotation)});
            }

            // mappedName
            String mappdedNameAnnotation = annotation.mappedName();
            if (!mappdedNameAnnotation.isEmpty()) {
                messageDestinationRef.setMappedName(mappdedNameAnnotation);
            }

            // lookup
            String lookup = annotation.lookup();
            if (!lookup.isEmpty()) {
                messageDestinationRef.setLookupName(lookup);
            }
            annotatedApp.getMessageDestinationRef().add(messageDestinationRef);
        }
View Full Code Here


            if (mergeItem != null) {
                if (mergeItem.isFromWebFragment()) {
                    throw new DeploymentException(WebDeploymentMessageUtils.createDuplicateJNDIRefMessage("message-destination-ref", messageDestinationRefName, mergeItem.getBelongedURL(), mergeContext.getCurrentJarUrl()));
                } else if (mergeItem.isFromWebXml() && !isMessageDestinationRefInjectTargetsConfiguredInInitialWebXML(messageDestinationRefName, mergeContext)) {
                    //Merge InjectTarget
                    MessageDestinationRef messageDestinationRef = (MessageDestinationRef) mergeItem.getValue();
                    for (InjectionTarget injectTarget : srcMessageDestinationRef.getInjectionTarget()) {
                        String messageDestinationRefInjectTargetKey = createMessageDestinationRefInjectTargetKey(messageDestinationRefName, injectTarget.getInjectionTargetClass(), injectTarget
                                .getInjectionTargetName());
                        if (!mergeContext.containsAttribute(messageDestinationRefInjectTargetKey)) {
                            messageDestinationRef.getInjectionTarget().add(injectTarget);
                            mergeContext.setAttribute(messageDestinationRefInjectTargetKey, Boolean.TRUE);
                        }
                    }
                }
            } else {
View Full Code Here

* @version $Rev$ $Date$
*/
public class TldTaglibXml {

    public static TldTaglib unmarshal(final InputStream inputStream) throws Exception {
        return Sxc.unmarshalJavaee(new TldTaglib$JAXB(), inputStream);
    }
View Full Code Here

    public static TldTaglib unmarshal(final URL url) throws Exception {
        final InputStream inputStream = IO.read(url);
        try {
            final XMLStreamReader filter = new TaglibNamespaceFilter(Sxc.prepareReader(inputStream));
            return Sxc.unmarhsal(new TldTaglib$JAXB(), new XoXMLStreamReaderImpl(filter));
        } finally {
            IO.close(inputStream);
        }
    }
View Full Code Here

            IO.close(inputStream);
        }
    }

    public static void marshal(final TldTaglib taglib, final OutputStream outputStream) throws Exception {
        Sxc.marshal(new TldTaglib$JAXB(), taglib, new StreamResult(outputStream));
    }
View Full Code Here

* @version $Rev$ $Date$
*/
public class TldTaglibXml {

    public static TldTaglib unmarshal(InputStream inputStream) throws Exception {
        return Sxc.unmarshalJavaee(new TldTaglib$JAXB(), inputStream);
    }
View Full Code Here

    public static TldTaglib unmarshal(URL url) throws Exception {
        final InputStream inputStream = IO.read(url);
        try {
            final XMLStreamReader filter = new TaglibNamespaceFilter(Sxc.prepareReader(inputStream));
            return Sxc.unmarhsal(new TldTaglib$JAXB(), new XoXMLStreamReaderImpl(filter));
        } finally {
            IO.close(inputStream);
        }
    }
View Full Code Here

            IO.close(inputStream);
        }
    }

    public static void marshal(TldTaglib taglib, OutputStream outputStream) throws Exception {
        Sxc.marshal(new TldTaglib$JAXB(), taglib, new StreamResult(outputStream));
    }
View Full Code Here

    }

    public static WebApp unmarshal(final URL url) throws Exception {
        final InputStream inputStream = IO.read(url);
        try {
            return Sxc.unmarshalJavaee(new WebApp$JAXB(), inputStream);
        } finally {
            IO.close(inputStream);
        }
    }
View Full Code Here

            IO.close(inputStream);
        }
    }

    public static void marshal(final WebApp webApp, final OutputStream outputStream) throws Exception {
        Sxc.marshal(new WebApp$JAXB(), webApp, new StreamResult(outputStream));
    }
View Full Code Here

TOP

Related Classes of org.apache.openejb.jee.MessageDestinationRef$JAXB

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.