Package org.apache.openejb.jee

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


        try {
            final XMLStreamReader filter = Sxc.prepareReader(inputStream);
            synchronized (Adapters.handlerChainsStringQNameAdapterAdapter) { // few threads on it so synchronized > lock
                Adapters.handlerChainsStringQNameAdapterAdapter.setNamespaceContext(filter.getNamespaceContext());
                try {
                    return Sxc.unmarhsal(new HandlerChains$JAXB(), new XoXMLStreamReaderImpl(filter));
                } finally {
                    Adapters.handlerChainsStringQNameAdapterAdapter.setNamespaceContext(null);
                }
            }
        } finally {
View Full Code Here


            IO.close(inputStream);
        }
    }

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

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

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

        try {
            final XMLStreamReader filter = Sxc.prepareReader(inputStream);
            synchronized (Adapters.handlerChainsStringQNameAdapterAdapter) { // few threads on it so synchronized > lock
                Adapters.handlerChainsStringQNameAdapterAdapter.setNamespaceContext(filter.getNamespaceContext());
                try {
                    return Sxc.unmarhsal(new HandlerChains$JAXB(), new XoXMLStreamReaderImpl(filter));
                } finally {
                    Adapters.handlerChainsStringQNameAdapterAdapter.setNamespaceContext(null);
                }
            }
        } finally {
View Full Code Here

            IO.close(inputStream);
        }
    }

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

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

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

        try {
            final XMLStreamReader filter = Sxc.prepareReader(inputStream);
            synchronized (Adapters.handlerChainsStringQNameAdapterAdapter) { // few threads on it so synchronized > lock
                Adapters.handlerChainsStringQNameAdapterAdapter.setNamespaceContext(filter.getNamespaceContext());
                try {
                    return Sxc.unmarhsal(new HandlerChains$JAXB(), new XoXMLStreamReaderImpl(filter));
                } finally {
                    Adapters.handlerChainsStringQNameAdapterAdapter.setNamespaceContext(null);
                }
            }
        } finally {
View Full Code Here

            IO.close(inputStream);
        }
    }

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

            String name = entry.getKey();
            if (lookupJndiContextMap(module, name) != null) {
                // some other builder handled this entry already
                continue;
            }
            MessageDestinationRef messageDestinationRef = entry.getValue();
            String linkName = getStringValue(messageDestinationRef.getMessageDestinationLink());
            //TODO figure out something better to do here!
            if (linkName == null) {
                linkName = name;
            }
            String type = getStringValue(messageDestinationRef.getMessageDestinationType());
            type = inferAndCheckType(module, bundle, messageDestinationRef.getInjectionTarget(), name, type);

            GerMessageDestinationType destination = getMessageDestination(linkName, messageDestinations);

            Object value = null;
            if (destination == null) {
                String lookupName = getStringValue(messageDestinationRef.getLookupName());
                if (lookupName != null) {
                    if (lookupName.equals(getJndiName(name))) {
                        throw new DeploymentException("message-destination-ref lookup name refers to itself");
                    }
                    value = new JndiReference(lookupName);
                }
            }

            if (value == null) {
                value = buildMessageReference(module, linkName, type, destination);
            }

            if (value != null) {
                put(name, value, ReferenceType.RESOURCE_ENV, module.getJndiContext(), messageDestinationRef.getInjectionTarget(), sharedContext);
            }
        }

    }
View Full Code Here

            String resourceType = getResourceType(annotation, method, field);

            String jndiName = getJndiName(resourceName);

            //If it already exists in xml as a message-destination-ref or resource-env-ref, we are done.
            MessageDestinationRef messageDestinationRef = annotatedApp.getMessageDestinationRefMap().get(jndiName);
            if (messageDestinationRef != null) {
                if (method != null || field != null) {
                    Set<InjectionTarget> targets = messageDestinationRef.getInjectionTarget();
                    if (!hasTarget(method, field, targets)) {
                        messageDestinationRef.getInjectionTarget().add(configureInjectionTarget(method, field));
                    }
                }
                return true;
            }
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.