Hello, I need to write some objects to a file, then when I 'read' them back to the program, they have to be exactly the same, they have to be the same kind of objects, with the same name and everything, I have tried several different approches, but it all fails, the objects are 'accounts' for a bank (run over rmi)
AccountServer KAC= new AccountServer("Jane"); AccountServer JAC = new AccountServer("John"); Naming.rebind("Jane",KAC); KAC.setName("Jane"); KAC.setNumber(1234); KAC.setBalance(600); Naming.rebind("John",JAC); JAC.setName("John"); JAC.setNumber(2345); JAC.setBalance(50);
The important thing here is the 'Naming.rebind' is has to become "Jane"/"John" or whatever the name is, becouse the bank client finds the account using 'Naming'
Any thoughts? I am loosing my mind here