code: public synchronized int reserveId() throws IdTableFullException
     {
        if (tc.isEntryEnabled()) SibTr.entry(this, tc, "reserveId");
        boolean found = false;
        boolean full = false;
        short id = (short)(lastAllocatedId + 1);
        while(!found && !full)
        {      
           if (id == 0) id = 1;             // Never return zero.
           full = id == (lastAllocatedId);                  
           found = !contains(id);
           if (!found)
               ++id;
        }
        if (found) 
           idToConvTable.put(new ImmutableKey(id), reservedObject);
        else 
           throw new IdTableFullException();
        lastAllocatedId = id;
        if (tc.isEntryEnabled()) SibTr.exit(this, tc, "reserveId", ""+id);
        return id;
     }
docs: Reserves an ID in the connection table.  This provides a way of obtaining
  the ID of an unused entry.  Once an entry is reserved, a conversation may
  still be added to the table which uses this ID and the reserved entry may
  be removed.  Until a reserved entry is removed (or a conversation is added
  with the reserved entry and subsequently removed) the ID will never be
  returned by this method.
  @return int The ID which was reserved.
  @throws IdTableFullException Thrown if no free table entries exist.