@Override
    public void setJMSDestination(Destination destination) throws JMSException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setJMSDestination", destination);

        setDestReference(destination);

        // The given destination is a native (jetstream) jms destination,
        // so set js destination, and jms destination (in encoded form).
        if (destination instanceof JmsDestinationImpl) {
            msg.setJmsDestination(((JmsDestinationImpl) destination).encodeToBytes(EncodingLevel.FULL));
        }

        // The given destination is a foreign (non-jetstream) jms destination,
        // so unset js destination and jms destination.
        else {
            msg.uncheckedSetForwardRoutingPath(null);
            msg.setJmsDestination(null);
        }

        // Invalidate the toString cache
        cachedToString = null;

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "setJMSDestination(Destination)");
    }
@ Override public void setJMSDestination ( Destination destination ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setJMSDestination" , destination ) ; setDestReference ( destination ) ; if ( destination instanceof JmsDestinationImpl ) { msg . setJmsDestination ( ( ( JmsDestinationImpl ) destination ) . encodeToBytes ( EncodingLevel . FULL ) ) ; } else { msg . uncheckedSetForwardRoutingPath ( null ) ; msg . setJmsDestination ( null ) ; } cachedToString = null ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "setJMSDestination(Destination)" ) ; }
@see javax.jms.Message#setJMSDestination(Destination)