public static void connect() { try { serverPortal = connection.connect(); } catch (RemoteException | NotBoundException ex) { reconnect(ex); } }