Package org.springframework.jms.support.destination

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


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


     * @see org.springframework.jms.support.destination.CachingDestinationResolver
     */
    protected void refreshDestination() {
        String destName = getDestinationName();
        if (destName != null) {
            DestinationResolver destResolver = getDestinationResolver();
            if (destResolver instanceof CachingDestinationResolver) {
                ((CachingDestinationResolver) destResolver).removeFromCache(destName);
            }
        }
    }
View Full Code Here

   * @see org.springframework.jms.support.destination.CachingDestinationResolver
   */
  protected void refreshDestination() {
    String destName = getDestinationName();
    if (destName != null) {
      DestinationResolver destResolver = getDestinationResolver();
      if (destResolver instanceof CachingDestinationResolver) {
        ((CachingDestinationResolver) destResolver).removeFromCache(destName);
      }
    }
  }
View Full Code Here

            log.debug("Using destinationName: {} on listenerContainer: ", destinationName, listenerContainer);
        } else if (destination != null) {
            listenerContainer.setDestination(destination);
            log.debug("Using destination: {} on listenerContainer: ", destinationName, listenerContainer);
        } else {
            DestinationResolver resolver = getDestinationResolver();
            if (resolver != null) {
                listenerContainer.setDestinationResolver(resolver);
            } else {
                throw new IllegalArgumentException("Neither destination, destinationName or destinationResolver are specified on this endpoint!");
            }
View Full Code Here

        if (destination != null) {
            return scheme + ":" + destination;
        } else if (destinationName != null) {
            return scheme + ":" + destinationName;
        }
        DestinationResolver resolver = getDestinationResolver();
        if (resolver != null) {
            return scheme + ":" + resolver;
        }
        return super.createEndpointUri();
    }
View Full Code Here

                    ConnectionFactory cf = beansOfTypeConnectionFactory.values().iterator().next();
                    configuration.setConnectionFactory(cf);
                }
                Map<String, DestinationResolver> beansOfTypeDestinationResolver = applicationContext.getBeansOfType(DestinationResolver.class);
                if (!beansOfTypeDestinationResolver.isEmpty()) {
                    DestinationResolver destinationResolver = beansOfTypeDestinationResolver.values().iterator().next();
                    configuration.setDestinationResolver(destinationResolver);
                }
            }
        }
        return configuration;
View Full Code Here

    // Implementation methods
    // -------------------------------------------------------------------------

    public static DestinationResolver createDestinationResolver(final DestinationEndpoint destinationEndpoint) {
        return new DestinationResolver() {
            public Destination resolveDestinationName(Session session, String destinationName, boolean pubSubDomain) throws JMSException {
                return destinationEndpoint.getJmsDestination(session);
            }
        };
    }
View Full Code Here

            log.debug("Using destinationName: {} on listenerContainer: ", destinationName, listenerContainer);
        } else if (destination != null) {
            listenerContainer.setDestination(destination);
            log.debug("Using destination: {} on listenerContainer: ", destinationName, listenerContainer);
        } else {
            DestinationResolver resolver = getDestinationResolver();
            if (resolver != null) {
                listenerContainer.setDestinationResolver(resolver);
            } else {
                throw new IllegalArgumentException("Neither destination, destinationName or destinationResolver are specified on this endpoint!");
            }
View Full Code Here

        if (destination != null) {
            return scheme + ":" + destination;
        } else if (destinationName != null) {
            return scheme + ":" + destinationName;
        }
        DestinationResolver resolver = getDestinationResolver();
        if (resolver != null) {
            return scheme + ":" + resolver;
        }
        return super.createEndpointUri();
    }
View Full Code Here

            log.debug("Using exclusive queue:" + endpoint.getReplyTo() + " as reply listener: " + answer);
        } else {
            throw new IllegalArgumentException("ReplyToType " + type + " is not supported for persistent reply queues");
        }

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

TOP

Related Classes of org.springframework.jms.support.destination.DestinationResolver

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.