public static void addcomment(String key, String text) {
		try {
			int id=getUserByKey(key); 
			if (sessionPerimee(key)||(id==-1)){//on crée une erreur pour sortir directement
				throw new EndOfSessionException("Session terminee");
			}
			Mongo m = new Mongo("132.227.201.134",27017);
			DB db = m.getDB("li328");
			DBCollection coll = db.getCollection("binome10");
			BasicDBObject com = new BasicDBObject();
			com.put("auteur", id);
			com.put("texte", text);
			GregorianCalendar cal = new GregorianCalendar();
			Date d = cal.getTime();
			com.put("date", d);
			coll.insert(com);
		}catch (EndOfSessionException e){
			e.printStackTrace();
		}catch (UnknownHostException e) {
			e.printStackTrace();
		} catch (MongoException e) {
			e.printStackTrace();
		}catch (Exception e){
			e.printStackTrace();
		}
	}