X-Git-Url: https://xp-dev.com/git/RRRRHHHH_Code/blobdiff_plain/7999499eee1fc932aeef9a813206d37313d7a753..578bec184aad79cdf233d774c8f574c9de8438b8:/ruralHouses/src/launcher/RMILauncher.java diff --git a/ruralHouses/src/launcher/RMILauncher.java b/ruralHouses/src/launcher/RMILauncher.java index f5a4cf8..167f1e0 100644 --- a/ruralHouses/src/launcher/RMILauncher.java +++ b/ruralHouses/src/launcher/RMILauncher.java @@ -4,6 +4,7 @@ import java.rmi.Naming; import java.rmi.RMISecurityManager; import java.rmi.Remote; +import businessLogic.AccountManager; import businessLogic.AdminManager; import businessLogic.BookingManager; import businessLogic.HouseManager; @@ -37,13 +38,15 @@ public class RMILauncher { boolean off = runOffer(); boolean own = runOwner(); boolean log = runLogin(); + boolean acc = runAccount(); System.out.println(" Admin: "+adm+ "\t Booking: "+bok+ "\t House: "+hou+ "\t Login: "+log+ "\t Offer: "+off+ - "\t Owner: "+own); + "\t Owner: "+own+ + "\t Account: "+acc); } private static boolean runAdmin() { @@ -58,6 +61,17 @@ public class RMILauncher { } } + private static boolean runAccount() { + try { + Remote remoteObject = new AccountManager(); + String authService = "rmi://localhost:9999//AcM"; + Naming.rebind(authService, remoteObject); + return true; + } catch (Exception e) { + System.out.println(e.toString()); + return false; + } + } private static boolean runBooking() { try {