public void send(
     Destination destination, Message message, int deliveryMode, int priority, long timeToLive)
     throws JMSException {
   session.lock();
   try {
     if (trace)
       log.trace(
           "send "
               + this
               + " destination="
               + destination
               + " message="
               + message
               + " deliveryMode="
               + deliveryMode
               + " priority="
               + priority
               + " ttl="
               + timeToLive);
     producer.send(destination, message, deliveryMode, priority, timeToLive);
     if (trace) log.trace("sent " + this + " result=" + message);
   } finally {
     session.unlock();
   }
 }
 public void send(Destination destination, Message message) throws JMSException {
   session.lock();
   try {
     if (trace) log.trace("send " + this + " destination=" + destination + " message=" + message);
     producer.send(destination, message);
     if (trace) log.trace("sent " + this + " result=" + message);
   } finally {
     session.unlock();
   }
 }