ArrayList<RoomInfo> rooms = new ArrayList<RoomInfo>();
Collection<database.Room> dbRooms;
database.Configuration db = null;
Iterator i = null;
include.net.Server serv = new include.net.Server();
Validation val = new Validation();
RoomInfo tmpRi = null;
database.Room tmpDb = null;
System.out.println("[RoomInfoGetter] Executing function 'getRoomsInfo'. Parameters:");
System.out.println("[RoomInfoGetter] sid: '" + sid + "'");
System.out.println("[RoomInfoGetter] server: '" + server + "'");
try {
InitialContext ctx = new InitialContext();
db = (database.Configuration) ctx.lookup("ear3/CMPConfiguration/local");
} catch (NamingException e) {
e.printStackTrace();
}
if (serv.isMyName(server)) {
System.out.println("[RoomInfoGetter] Local execution");
if (val.validate(sid) != null) {
System.out.println("[RoomInfoGetter] Session is valid.");
System.out.println("[RoomInfoGetter] Gathering rooms.");
dbRooms = db.getRooms();