Examples of DestinationResolver


Examples of org.springframework.jms.support.destination.DestinationResolver

            // use a dynamic message selector which will select the message we want to receive as reply
            dynamicMessageSelector = new MessageSelectorCreator();
            answer = new PersistentQueueMessageListenerContainer(dynamicMessageSelector);
        }

        DestinationResolver resolver = endpoint.getDestinationResolver();
        if (resolver == null) {
            resolver = answer.getDestinationResolver();
        }
        answer.setDestinationResolver(new DestinationResolverDelegate(resolver));
        answer.setDestinationName(endpoint.getReplyTo());
View Full Code Here

Examples of org.springframework.jms.support.destination.DestinationResolver

                    ConnectionFactory cf = (ConnectionFactory)beansOfType.values().iterator().next();
                    configuration.setConnectionFactory(cf);
                }
                beansOfType = applicationContext.getBeansOfType(DestinationResolver.class);
                if (!beansOfType.isEmpty()) {
                    DestinationResolver destinationResolver = (DestinationResolver)beansOfType.values()
                        .iterator().next();
                    configuration.setDestinationResolver(destinationResolver);
                }
            }
        }
View Full Code Here

Examples of org.springframework.jms.support.destination.DestinationResolver

    protected AbstractMessageListenerContainer createListenerContainer() {
        SimpleMessageListenerContainer answer = configuration.isUseVersion102()
            ? new SimpleMessageListenerContainer102() : new SimpleMessageListenerContainer();
        answer.setDestinationName("temporary");
        answer.setDestinationResolver(new DestinationResolver() {

            public Destination resolveDestinationName(Session session, String destinationName,
                                                      boolean pubSubDomain) throws JMSException {
                TemporaryQueue queue = session.createTemporaryQueue();
                replyTo = queue;
View Full Code Here

Examples of org.springframework.jms.support.destination.DestinationResolver

                    ConnectionFactory cf = (ConnectionFactory) beansOfType.values().iterator().next();
                    configuration.setConnectionFactory(cf);
                }
                beansOfType = applicationContext.getBeansOfType(DestinationResolver.class);
                if (!beansOfType.isEmpty()) {
                    DestinationResolver destinationResolver = (DestinationResolver) beansOfType.values().iterator().next();
                    configuration.setDestinationResolver(destinationResolver);
                }
            }
        }
        return configuration;
View Full Code Here

Examples of org.springframework.jms.support.destination.DestinationResolver

        Thread t = new Thread() {
            public void run() {
                Destination destination = jmsTemplate.execute(new SessionCallback<Destination>() {
                    public Destination doInJms(Session session) throws JMSException {
                        DestinationResolver resolv = jmsTemplate.getDestinationResolver();
                        return resolv.resolveDestinationName(session, jmsConfig.getTargetDestination(),
                                                             false);
                    }
                });
               
                final Message message = jmsTemplate.receive(destination);
                MessageCreator messageCreator = new MessageCreator() {
                    public Message createMessage(Session session) {
                        return message;
                    }
                };
                   
                Destination destination2 = jmsTemplate
                    .execute(new SessionCallback<Destination>() {
                        public Destination doInJms(Session session) throws JMSException {
                            DestinationResolver resolv = jmsTemplate.getDestinationResolver();
                            return resolv.resolveDestinationName(session,
                                                             jmsConfig.getReplyDestination(),
                                                             false);
                        }
                    });
                jmsTemplate.send(destination2, messageCreator);
View Full Code Here

Examples of org.springframework.jms.support.destination.DestinationResolver

                    } else {
                        // For JMS 1.1
                        return session.createTemporaryQueue();
                    }
                }
                DestinationResolver resolv = jmsTemplate.getDestinationResolver();
                return resolv.resolveDestinationName(session, replyToDestinationName, pubSubDomain);
            }
        });
    }
View Full Code Here

Examples of org.springframework.jms.support.destination.DestinationResolver

    }

    private Destination resolveDestinationName(final JmsTemplate jmsTemplate, final String name) {
        return (Destination)jmsTemplate.execute(new SessionCallback() {
            public Object doInJms(Session session) throws JMSException {
                DestinationResolver resolv = jmsTemplate.getDestinationResolver();
                return resolv.resolveDestinationName(session, name, jmsConfig.isPubSubDomain());
            }
        });
    }
View Full Code Here

Examples of org.springframework.jms.support.destination.DestinationResolver

        Thread t = new Thread() {
            public void run() {
                @SuppressWarnings("unchecked")
                Destination destination = (Destination)jmsTemplate.execute(new SessionCallback() {
                    public Object doInJms(Session session) throws JMSException {
                        DestinationResolver resolv = jmsTemplate.getDestinationResolver();
                        return resolv.resolveDestinationName(session, jmsConfig.getTargetDestination(),
                                                             false);
                    }
                });
               
                final Message message = jmsTemplate.receive(destination);
                MessageCreator messageCreator = new MessageCreator() {
                    public Message createMessage(Session session) {
                        return message;
                    }
                };
                   
                @SuppressWarnings("unchecked")
                Destination destination2 = (Destination)jmsTemplate.execute(new SessionCallback() {
                    public Object doInJms(Session session) throws JMSException {
                        DestinationResolver resolv = jmsTemplate.getDestinationResolver();
                        return resolv.resolveDestinationName(session,
                                                             jmsConfig.getReplyDestination(),
                                                             false);
                    }
                });
                jmsTemplate.send(destination2, messageCreator);
View Full Code Here

Examples of org.springframework.jms.support.destination.DestinationResolver

            // use a dynamic message selector which will select the message we want to receive as reply
            dynamicMessageSelector = new MessageSelectorCreator();
            answer = new PersistentQueueMessageListenerContainer(dynamicMessageSelector);
        }

        DestinationResolver resolver = endpoint.getDestinationResolver();
        if (resolver == null) {
            resolver = answer.getDestinationResolver();
        }
        answer.setDestinationResolver(new DestinationResolverDelegate(resolver));
        answer.setDestinationName(endpoint.getReplyTo());
View Full Code Here

Examples of org.springframework.jms.support.destination.DestinationResolver

                    } else {
                        // For JMS 1.1
                        return session.createTemporaryQueue();
                    }
                }
                DestinationResolver resolv = jmsTemplate.getDestinationResolver();
                return resolv.resolveDestinationName(session, replyToDestinationName, pubSubDomain);
            }
        });
    }
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.