public static void main(String[] args) {
		int port;
		
		if (args.length != 2) {
			System.err.println("Usage: java ChatServer <port> <database name>");
			return;
		}
		try {
			port = Integer.parseInt(args[0]);
		} catch (NumberFormatException nfe) {
			System.err.println("Usage: java ChatServer <port>");
			return;
		}
		try {
			ss = new ServerSocket(port);
		} catch (IOException ioe) {
			System.err.println("Cannot use port number "+port);
			return;
		}
		
		Database d = null;
		try {
			d = new Database(args[1]);
		} catch (ClassNotFoundException | SQLException e) {
			e.printStackTrace();
		}
		mq = new MultiQueue<Message>();
		
		if (d != null) begin(d);
	}