public static Queue asRef( Queue queue ) throws JMSException
    {
        if (queue == null)
            return null;
            
        if (queue instanceof QueueRef)
            return queue;
        
        return new QueueRef(queue.getQueueName());
    }
public static Queue asRef ( Queue queue ) throws JMSException { if ( queue == null ) return null ; if ( queue instanceof QueueRef ) return queue ; return new QueueRef ( queue . getQueueName ( ) ) ; }
Make sure the given destination is a light-weight serializable destination reference