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;
connectionFactory = template.getConnectionFactory();  if (template instanceof org.springframework.jms.core.JmsTemplate102) {  if (template.isPubSubDomain()) { javax.jms.TopicConnection tc; connection = tc = ((javax.jms.TopicConnectionFactory)connectionFactory).createTopicConnection(); session = tc.createTopicSession(template.isSessionTransacted(), template.getSessionAcknowledgeMode());
    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);    }