addGroup(groups[i]);
newGroup(groups[i]);
	public synchronized void setUser(User user) {		if (user.getUID() < 0)			user.setUID(++nextUserId);		users.put(user.getUID(), user);		String[] groups = user.getGroups();		for (int i = 0; i < groups.length; i++) {			if (!hasGroup(groups[i]))				addGroup(groups[i]);		}        TransactionManager transact = pool.getTransactionManager();        Txn txn = transact.beginTransaction();		DBBroker broker = null;		try {			broker = pool.get();			save(broker, txn);			createUserHome(broker, txn, user);            transact.commit(txn);		} catch (EXistException e) {            transact.abort(txn);			LOG.debug("error while creating user", e);		} catch (PermissionDeniedException e) {            transact.abort(txn);			LOG.debug("error while creating home collection", e);		} finally {			pool.release(broker);		}	}