/**
  * Overrides the superclass method to use the JMS 1.0.2 API to send a response.
  *
  * <p>Uses the JMS pub-sub API if the given destination is a topic, else uses the JMS queue API.
  */
 protected void sendResponse(Session session, Destination destination, Message response)
     throws JMSException {
   MessageProducer producer = null;
   try {
     if (destination instanceof Topic) {
       producer = ((TopicSession) session).createPublisher((Topic) destination);
       postProcessProducer(producer, response);
       ((TopicPublisher) producer).publish(response);
     } else {
       producer = ((QueueSession) session).createSender((Queue) destination);
       postProcessProducer(producer, response);
       ((QueueSender) producer).send(response);
     }
   } finally {
     JmsUtils.closeMessageProducer(producer);
   }
 }