String tmpDir = System.getProperty("java.io.tmpdir");
ServerInfo serverInfo = new BasicServerInfo(tmpDir);
Bundle bundle = new MockBundle(getClass().getClassLoader(), "", 0);
ORBConfigAdapter adapter = new ORBConfigAdapter(bundle);
// make sure all system properties are initialized.
nameService = new NameService(serverInfo, adapter, "localhost", 8050);
nameService.doStart();
// create the ORB
Properties properties = new Properties();
String[] initArgs = { "-ORBInitRef", "NameService=" + nameService.getURI() };