Skip to content
Snippets Groups Projects
Commit 44ed2321 authored by fernando.ferreira.129's avatar fernando.ferreira.129
Browse files

mudancas em sala

parent f979f42d
No related branches found
No related tags found
No related merge requests found
banking-server/target/
/banking-server/target/
......@@ -24,15 +24,14 @@ public class BalanceControllerImpl extends UnicastRemoteObject implements Contro
public BalanceControllerImpl(BalanceService service) throws RemoteException, MalformedURLException, AlreadyBoundException {
super();
LocateRegistry.createRegistry(PORT_BALANCE_SERVICE);
Naming.bind(HOST_BALANCE_SERVICE, this);
log.info("Starting Deposit service!");
new Notify(service).start();
log.info(String.format("Initializing server in %s", HOST_BALANCE_SERVICE));
LocateRegistry.createRegistry(PORT_BALANCE_SERVICE);
Naming.bind(HOST_BALANCE_SERVICE, this);
}
@Override
......
......@@ -12,7 +12,10 @@ import java.io.Serializable;
public class Account implements Serializable {
private static final long serialVersionUID = 2L;
private Integer id;
private String number;
private Double balance;
}
......@@ -4,8 +4,10 @@ public class NameSpace {
public final static Integer PORT_BALANCE_SERVICE = 1908;
public final static Integer PORT_DEPOSIT_SERVICE = 1907;
public final static String HOST_DEPOSIT_SERVICE =
String.format("rmi://127.0.0.1:%d/%s", PORT_DEPOSIT_SERVICE, "deposit");
public final static String HOST_BALANCE_SERVICE =
String.format("rmi://127.0.0.1:%d/%s", PORT_BALANCE_SERVICE, "balance");
}
No preview for this file type
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment