RRRRHHHH_Code
Diff Revisions
799949 ...
vs
578bec ...
for ruralHouses/src/launcher/RMILauncher.java
|
@@ -4,6 +4,7 @@ |
4 |
4 |
|
import java.rmi.RMISecurityManager; |
5 |
5 |
|
import java.rmi.Remote; |
6 |
6 |
|
|
|
7 |
+ |
import businessLogic.AccountManager; |
7 |
8 |
|
import businessLogic.AdminManager; |
8 |
9 |
|
import businessLogic.BookingManager; |
9 |
10 |
|
import businessLogic.HouseManager; |
|
@@ -37,13 +38,15 @@ |
37 |
38 |
|
boolean off = runOffer(); |
38 |
39 |
|
boolean own = runOwner(); |
39 |
40 |
|
boolean log = runLogin(); |
|
41 |
+ |
boolean acc = runAccount(); |
40 |
42 |
|
|
41 |
43 |
|
System.out.println(" Admin: "+adm+ |
42 |
44 |
|
"\t Booking: "+bok+ |
43 |
45 |
|
"\t House: "+hou+ |
44 |
46 |
|
"\t Login: "+log+ |
45 |
47 |
|
"\t Offer: "+off+ |
46 |
|
- |
"\t Owner: "+own); |
|
48 |
+ |
"\t Owner: "+own+ |
|
49 |
+ |
"\t Account: "+acc); |
47 |
50 |
|
} |
48 |
51 |
|
|
49 |
52 |
|
private static boolean runAdmin() { |
|
@@ -58,6 +61,17 @@ |
58 |
61 |
|
} |
59 |
62 |
|
} |
60 |
63 |
|
|
|
64 |
+ |
private static boolean runAccount() { |
|
65 |
+ |
try { |
|
66 |
+ |
Remote remoteObject = new AccountManager(); |
|
67 |
+ |
String authService = "rmi://localhost:9999//AcM"; |
|
68 |
+ |
Naming.rebind(authService, remoteObject); |
|
69 |
+ |
return true; |
|
70 |
+ |
} catch (Exception e) { |
|
71 |
+ |
System.out.println(e.toString()); |
|
72 |
+ |
return false; |
|
73 |
+ |
} |
|
74 |
+ |
} |
61 |
75 |
|
|
62 |
76 |
|
private static boolean runBooking() { |
63 |
77 |
|
try { |