small changes to factory and implemented rmi awareness with a simple register/deregister program

This commit is contained in:
2014-12-01 02:03:48 +01:00
parent 238c61f4d3
commit 1ef2207245
10 changed files with 190 additions and 2 deletions

View File

@@ -0,0 +1,28 @@
package rmi_Awareness;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
/**
* Created by Giovanni on 01/12/2014.
*/
public class LaunchServer {
public static void main (String[] args){
try {
HelloInterface h = new HelloImplemented();
Registry r = LocateRegistry.getRegistry();
r.rebind("HelloServer",h);
} catch (RemoteException e) {
e.printStackTrace();
}
}
}