// b) in the shared configuration area (typically, shared install is used)
File[] registryLocations;
boolean[] readOnlyLocations;
RegistryStrategy strategy = null;
Location configuration = OSGIUtils.getDefault().getConfigurationLocation();
if (configuration == null) {
RegistryProperties.setProperty(IRegistryConstants.PROP_NO_REGISTRY_CACHE, "true"); //$NON-NLS-1$
RegistryProperties.setProperty(IRegistryConstants.PROP_NO_LAZY_CACHE_LOADING, "true"); //$NON-NLS-1$
strategy = new RegistryStrategyOSGI(null, null, masterRegistryKey);
} else {
File primaryDir = new File(configuration.getURL().getPath() + '/' + STORAGE_DIR);
boolean primaryReadOnly = configuration.isReadOnly();
Location parentLocation = configuration.getParentLocation();
if (parentLocation != null) {
File secondaryDir = new File(parentLocation.getURL().getFile() + '/' + IRegistryConstants.RUNTIME_NAME);
registryLocations = new File[] {primaryDir, secondaryDir};
readOnlyLocations = new boolean[] {primaryReadOnly, true}; // secondary Eclipse location is always read only
} else {
registryLocations = new File[] {primaryDir};
readOnlyLocations = new boolean[] {primaryReadOnly};