public REMProxyFactoryRegistry(REMRegistryController registryController, String name) { super(REMOTE_REGISTRY_TYPE_ID); fRegistryController = registryController; fRegistryKey = fRegistryController.registerRegistry(this); // Register the registry with the plugin. fName = name; // Get the waitRegistrationThread started before we actually launch remote vm so // that it is waiting when the callback comes in. synchronized (this) { waitRegistrationThread = new WaitForRegistrationThread(); waitRegistrationThread.start(); // Now we will wait until the registration callback has been done. The thread will // signal us when that is done. This is so that we don't continue on and let // a work connection be requested before we even got a chance to start waiting // for the registration. while (true) { try { wait(); break; } catch (InterruptedException e) { } } ; } }