private synchronized void manageWishes()
   {
      IMarketCommunicator buyer = null;
      boolean any = false;
      
      ArrayList<Item> newsWishes = new ArrayList<Item>();
      
      for (int i = 0; i < wishes.size(); ++i)
      {
         Item wish = wishes.get(i);
         newsWishes.add(wish);
         
         List<Item> workingItems = items;
         
         for (int j = 0; j < workingItems.size(); ++j)
         {
            //buyer = null;
            Item item = workingItems.get(j);
            
            if (item.getName().equals(wish.getName()))
            {
               if (item.getPrice() <= wish.getPrice())
               {
                  boolean ok = makePurchase(item, wish.getOwner(), item.getOwner());
                  if (!ok)
                  {
                     System.err.println("Error making the purchase of a wish.");
                  }
                  else
                  {
                     buyer = customers.get(wish.getOwner());
                     if (buyer == null)
                     {
                        System.err.println("Error updating buyer wish list.");
                     }
                     else
                     {
                        newsWishes.remove(wish);
                        deleteWishFromDatabase(wish);
                        any = true;
                        break;
                     }
                  }
               }
            }
         }
      }
      
      if (any)
      {
         wishes = newsWishes;
         updateCustomerWishList(buyer);
      }
   }