}, true);
else { javax.jms.QueueConnection qc; connection = qc = ((javax.jms.QueueConnectionFactory)connectionFactory).createQueueConnection(); session = qc.createQueueSession(template.isSessionTransacted(), template.getSessionAcknowledgeMode()); } } else { connection = connectionFactory.createConnection(); session = connection.createSession(template.isSessionTransacted(), template.getSessionAcknowledgeMode()); }  Destination defaultDestination = template.getDefaultDestination(); if (defaultDestination == null) { defaultDestination = template.getDestinationResolver().resolveDestinationName(session, template.getDefaultDestinationName(), template.isPubSubDomain()); }   if (template instanceof org.springframework.jms.core.JmsTemplate102) {   if (template.isPubSubDomain()) { consumer = ((javax.jms.TopicSession)session).createSubscriber((javax.jms.Topic)defaultDestination, selector, template.isPubSubNoLocal()); } else { consumer = ((javax.jms.QueueSession)session).createReceiver((javax.jms.Queue)defaultDestination, selector); } } else { consumer = session.createConsumer(defaultDestination, selector); }
    public void afterPropertiesSet() throws Exception {        if (template == null) {            throw new IllegalArgumentException("Must have a template set");        }        template.execute(new SessionCallback() {            public Object doInJms(Session session) throws JMSException {                Destination defaultDestination = template.getDefaultDestination();                if (defaultDestination == null) {                    defaultDestination = template.getDestinationResolver().resolveDestinationName(session,                            template.getDefaultDestinationName(), template.isPubSubDomain());                }                consumer = session.createConsumer(defaultDestination, selector);                return null;            }        }, true);        consumer.setMessageListener(this);    }