/**
   * Create a new auction with the specified informations
   *
   * @param itemName Long name of the item
   * @param minValue minimum value of the item required
   * @param endTime End of the auction for the specified item
   * @param owner AuctionClient associated to this bid used for callback
   * @return the bid Identifier
   * @throws RemoteException on RMI error
   */
  public int createAuction(String itemName, double minValue, Date endTime, IAuctionClient owner)
      throws RemoteException {

    int auctionId = auctions.getUniqueId();
    AuctionItem item = new AuctionItem(auctionId, itemName, minValue, endTime, owner);

    // make sure that nothing happens to the item before it has been
    // added to the auction collection and to the cleaner
    synchronized (item) {
      auctions.add(auctionId, item);
      cleaner.add(item);
    }

    logger.info("Creating auction %d", auctionId);

    return auctionId;
  }