code: public static Topic asRef( Topic topic ) throws JMSException
      {
          if (topic == null)
              return null;
              
          if (topic instanceof TopicRef)
              return topic;
          
          return new TopicRef(topic.getTopicName());
      }
docs: Make sure the given destination is a light-weight serializable destination reference