cm.unregisterConnection(remotingClientSessionId);
cm.unregisterConnection(jmsClientId, remotingClientSessionId);
   public void close() throws JMSException   {      try      {         closeLock.writeLock().acquire();      }      catch (InterruptedException e)      {         // Ignore      }      try      {         if (trace) { log.trace("close()"); }                  if (closed)         {            log.warn("Connection is already closed");            return;         }         // We clone to avoid concurrent modification exceptions         for(Iterator i = new HashSet(sessions.values()).iterator(); i.hasNext(); )         {            ServerSessionEndpoint sess = (ServerSessionEndpoint)i.next();            // clear all consumers associated with this session from the serverPeer's cache            for(Iterator j = sess.getConsumerEndpointIDs().iterator(); j.hasNext(); )            {               Integer consumerID = (Integer)j.next();               serverPeer.removeConsumerEndpoint(consumerID);            }            // ... and also close the session            sess.close();         }                  for(Iterator i = temporaryDestinations.iterator(); i.hasNext(); )         {            JBossDestination dest = (JBossDestination)i.next();            channelMapper.undeployCoreDestination(dest.isQueue(), dest.getName());         }                  temporaryDestinations.clear();         cm.unregisterConnection(remotingClientSessionId);         JMSDispatcher.instance.unregisterTarget(new Integer(connectionID));         closed = true;      }      finally      {         closeLock.writeLock().release();      }   }