endpoints.put(id, endpoint);
endpoints.put(Integer.valueOf(id), endpoint);
   public synchronized String registerConnectionFactory(String clientID,                                                        JNDIBindings jndiBindings) throws Exception   {      String id = generateConnectionFactoryID();      ServerConnectionFactoryEndpoint endpoint =         new ServerConnectionFactoryEndpoint(id, serverPeer, clientID, jndiBindings);      ClientConnectionFactoryDelegate delegate;      try      {         delegate = new ClientConnectionFactoryDelegate(id, serverPeer.getLocatorURI());      }      catch (Exception e)      {         throw new JBossJMSException("Failed to create connection factory delegate", e);      }      Dispatcher.singleton.registerTarget(id, endpoint);      endpoints.put(id, endpoint);      JBossConnectionFactory cf = new JBossConnectionFactory(delegate);      if (jndiBindings != null)      {         List jndiNames = jndiBindings.getNames();         for(Iterator i = jndiNames.iterator(); i.hasNext(); )         {            String jndiName = (String)i.next();            initialContext.rebind(jndiName, cf);         }      }      factories.put(id, cf);      return id;   }