if (trace) log.trace("Joining thread " + this);
   public void close() throws javax.jms.JMSException   {      if (trace) { log.trace("close " + this); }            closed = true;            //JMSInvocationHandler handler = (JMSInvocationHandler)Proxy.getInvocationHandler(cons);                  if (trace) { log.trace("Closed message handler"); }            //wait for the run thread to finish      if (internalThread != null && !internalThread.equals(Thread.currentThread()))      {         try         {            internalThread.interrupt();            if (trace)               log.trace("Joining thread " + this);            internalThread.join();            if (trace)               log.trace("Joined thread " + this);         }         catch (InterruptedException e)         {            if (trace)               log.trace("Ignoring interrupting while joining thread " + this);         }      }            sess.close();            if (trace) { log.trace("Closed: " + this); }   }