Package org.apache.camel.component.jms.JmsConfiguration

Examples of org.apache.camel.component.jms.JmsConfiguration.CamelJmsTemplate102


     */
    protected void doSend(boolean inOut, String destinationName, Destination destination,
                          MessageCreator messageCreator, DeferredMessageSentCallback callback) {

        CamelJmsTemplate template = null;
        CamelJmsTemplate102 template102 = null;
        if (endpoint.isUseVersion102()) {
            template102 = (JmsConfiguration.CamelJmsTemplate102) (inOut ? getInOutTemplate() : getInOnlyTemplate());
        } else {
            template = (CamelJmsTemplate) (inOut ? getInOutTemplate() : getInOnlyTemplate());
        }

        if (LOG.isTraceEnabled()) {
            LOG.trace("Using " + (inOut ? "inOut" : "inOnly") + " jms template to send with API "
                    + (endpoint.isUseVersion102() ? "v1.0.2" : "v1.1"));
        }

        // destination should be preferred
        if (destination != null) {
            if (inOut) {
                if (template != null) {
                    template.send(destination, messageCreator, callback);
                } else if (template102 != null) {
                    template102.send(destination, messageCreator, callback);
                }
            } else {
                if (template != null) {
                    template.send(destination, messageCreator);
                } else if (template102 != null) {
                    template102.send(destination, messageCreator);
                }
            }
        } else if (destinationName != null) {
            if (inOut) {
                if (template != null) {
                    template.send(destinationName, messageCreator, callback);
                } else if (template102 != null) {
                    template102.send(destinationName, messageCreator, callback);
                }
            } else {
                if (template != null) {
                    template.send(destinationName, messageCreator);
                } else if (template102 != null) {
                    template102.send(destinationName, messageCreator);
                }
            }
        } else {
            throw new IllegalArgumentException("Neither destination nor destinationName is specified on this endpoint: " + endpoint);
        }
View Full Code Here


     */
    protected void doSend(boolean inOut, String destinationName, Destination destination,
                          MessageCreator messageCreator, DeferredMessageSentCallback callback) {

        CamelJmsTemplate template = null;
        CamelJmsTemplate102 template102 = null;
        if (endpoint.isUseVersion102()) {
            template102 = (JmsConfiguration.CamelJmsTemplate102) (inOut ? getInOutTemplate() : getInOnlyTemplate());
        } else {
            template = (CamelJmsTemplate) (inOut ? getInOutTemplate() : getInOnlyTemplate());
        }

        if (LOG.isTraceEnabled()) {
            LOG.trace("Using " + (inOut ? "inOut" : "inOnly") + " jms template to send with API "
                    + (endpoint.isUseVersion102() ? "v1.0.2" : "v1.1"));
        }

        // destination should be preferred
        if (destination != null) {
            if (inOut) {
                if (template != null) {
                    template.send(destination, messageCreator, callback);
                } else if (template102 != null) {
                    template102.send(destination, messageCreator, callback);
                }
            } else {
                if (template != null) {
                    template.send(destination, messageCreator);
                } else if (template102 != null) {
                    template102.send(destination, messageCreator);
                }
            }
        } else if (destinationName != null) {
            if (inOut) {
                if (template != null) {
                    template.send(destinationName, messageCreator, callback);
                } else if (template102 != null) {
                    template102.send(destinationName, messageCreator, callback);
                }
            } else {
                if (template != null) {
                    template.send(destinationName, messageCreator);
                } else if (template102 != null) {
                    template102.send(destinationName, messageCreator);
                }
            }
        } else {
            throw new IllegalArgumentException("Neither destination nor destinationName is specified on this endpoint: " + endpoint);
        }
View Full Code Here

     */
    protected void doSend(boolean inOut, String destinationName, Destination destination,
                          MessageCreator messageCreator, DeferredMessageSentCallback callback) {

        CamelJmsTemplate template = null;
        CamelJmsTemplate102 template102 = null;
        if (endpoint.isUseVersion102()) {
            template102 = (JmsConfiguration.CamelJmsTemplate102) (inOut ? getInOutTemplate() : getInOnlyTemplate());
        } else {
            template = (CamelJmsTemplate) (inOut ? getInOutTemplate() : getInOnlyTemplate());
        }

        if (LOG.isTraceEnabled()) {
            LOG.trace("Using " + (inOut ? "inOut" : "inOnly") + " jms template to send with API "
                    + (endpoint.isUseVersion102() ? "v1.0.2" : "v1.1"));
        }

        // destination should be preferred
        if (destination != null) {
            if (inOut) {
                if (template != null) {
                    template.send(destination, messageCreator, callback);
                } else if (template102 != null) {
                    template102.send(destination, messageCreator, callback);
                }
            } else {
                if (template != null) {
                    template.send(destination, messageCreator);
                } else if (template102 != null) {
                    template102.send(destination, messageCreator);
                }
            }
        } else if (destinationName != null) {
            if (inOut) {
                if (template != null) {
                    template.send(destinationName, messageCreator, callback);
                } else if (template102 != null) {
                    template102.send(destinationName, messageCreator, callback);
                }
            } else {
                if (template != null) {
                    template.send(destinationName, messageCreator);
                } else if (template102 != null) {
                    template102.send(destinationName, messageCreator);
                }
            }
        } else {
            throw new IllegalArgumentException("Neither destination nor destinationName is specified on this endpoint: " + endpoint);
        }
View Full Code Here

     */
    protected void doSend(boolean inOut, String destinationName, Destination destination,
                          MessageCreator messageCreator, DeferredMessageSentCallback callback) {

        CamelJmsTemplate template = null;
        CamelJmsTemplate102 template102 = null;
        if (endpoint.isUseVersion102()) {
            template102 = (JmsConfiguration.CamelJmsTemplate102) (inOut ? getInOutTemplate() : getInOnlyTemplate());
        } else {
            template = (CamelJmsTemplate) (inOut ? getInOutTemplate() : getInOnlyTemplate());
        }

        if (LOG.isTraceEnabled()) {
            LOG.trace("Using " + (inOut ? "inOut" : "inOnly") + " jms template to send with API "
                    + (endpoint.isUseVersion102() ? "v1.0.2" : "v1.1"));
        }

        // destination should be preferred
        if (destination != null) {
            if (inOut) {
                if (template != null) {
                    template.send(destination, messageCreator, callback);
                } else if (template102 != null) {
                    template102.send(destination, messageCreator, callback);
                }
            } else {
                if (template != null) {
                    template.send(destination, messageCreator);
                } else if (template102 != null) {
                    template102.send(destination, messageCreator);
                }
            }
        } else if (destinationName != null) {
            if (inOut) {
                if (template != null) {
                    template.send(destinationName, messageCreator, callback);
                } else if (template102 != null) {
                    template102.send(destinationName, messageCreator, callback);
                }
            } else {
                if (template != null) {
                    template.send(destinationName, messageCreator);
                } else if (template102 != null) {
                    template102.send(destinationName, messageCreator);
                }
            }
        } else {
            throw new IllegalArgumentException("Neither destination nor destinationName is specified on this endpoint: " + endpoint);
        }
View Full Code Here

TOP

Related Classes of org.apache.camel.component.jms.JmsConfiguration.CamelJmsTemplate102

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.