RmiDelegateUserbase userbaseStub = (RmiDelegateUserbase) UnicastRemoteObject.exportObject(rmidus, Integer.parseInt(p.getProperty("userbase.port", "0")), csf, ssf);
//registry.rebind("userbase", userbaseStub);
// maybe binding the rmidus instead of the stub keeps it from being GCed (http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=4&t=002159)
// changed to export the right object to prevent it from being garbage collected (i.e. don't export the stub)
registry.rebind("userbase", rmidus);
// STATISTICS
rmiuss = new RmiUserStatisticsServer(new LocalUserStatistics(new File(dataDirectory, "/logs/userstatistics")));
RmiUserStatistics statisticsStub = (RmiUserStatistics) UnicastRemoteObject.exportObject(rmiuss, Integer.parseInt(p.getProperty("statistics.port", "0")), csf, ssf);
//registry.rebind("statistics", statisticsStub);