code: private void removeClientId(String clientId) {
          //Sometimes the client Id will be null. For instance in the case QueueConnectionFactory, there is no default client Id specified in metatype.xml. 
          if (clientId == null)
              return; //do nothing
  
          ConcurrentHashMap<String, Integer> clientIdTable = JmsFactoryFactoryImpl.getClientIdTable();
  
          if (clientIdTable.containsKey(clientId)) {
              int referenceCount = clientIdTable.get(clientId).intValue();
              if (referenceCount == 1) {
                  clientIdTable.remove(clientId);
              } else {
                  clientIdTable.put(clientId, clientIdTable.get(clientId).intValue() - 1);
              }
          }
      }
docs: To remove the client id from client table.
  Whenever this method is called, the counter of respective HashMap entry is decremented by one. If the count reaches "0", then that entry wil be removed from the
  clientIdTable.
  
  @param clientId