try {
// Create a PeopleFinder RMI object
PeopleFinder finder = new PeopleFinderImpl();
// Create an RMI registry
Registry reg = LocateRegistry.createRegistry(1099);
// Bind our remote object to a name in the registry
reg.rebind("peopleFinder", finder);
sLog.info("PeopleFinder bound to name \"peopleFinder\", waiting...");
}
catch (AccessException ae) {
sLog.severe("Failed to register remote object: " + ae.getMessage());
}
catch (RemoteException re) {
sLog.severe("Failed to register remote object: " + re.getMessage());
}