Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/osgi
diff options
context:
space:
mode:
authorslewis2018-04-17 18:17:31 -0400
committerslewis2018-04-17 18:17:31 -0400
commit73d98f1103eba5f88ccbe9c3e564ba1a2aff5542 (patch)
treeaa542e1b9876619049620515a961c59fd6282f5c /osgi
parent2ddb9468a4d091e75a20fe39763d1116e199d756 (diff)
downloadorg.eclipse.ecf-73d98f1103eba5f88ccbe9c3e564ba1a2aff5542.tar.gz
org.eclipse.ecf-73d98f1103eba5f88ccbe9c3e564ba1a2aff5542.tar.xz
org.eclipse.ecf-73d98f1103eba5f88ccbe9c3e564ba1a2aff5542.zip
Fix for getFrameworkUUID on Felix
Diffstat (limited to 'osgi')
-rw-r--r--osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/TopologyManagerImpl.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/TopologyManagerImpl.java b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/TopologyManagerImpl.java
index 7aaac8519..332bdc2d9 100644
--- a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/TopologyManagerImpl.java
+++ b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/TopologyManagerImpl.java
@@ -10,6 +10,7 @@
package org.eclipse.ecf.osgi.services.remoteserviceadmin;
import java.util.Map;
+import java.util.UUID;
import org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractTopologyManager;
import org.eclipse.ecf.osgi.services.remoteserviceadmin.EndpointDescription;
@@ -32,7 +33,16 @@ public class TopologyManagerImpl extends AbstractTopologyManager implements Endp
}
protected String getFrameworkUUID() {
- return super.getFrameworkUUID();
+ synchronized ("org.osgi.framework.uuid") { //$NON-NLS-1$
+ String result = getContext().getProperty("org.osgi.framework.uuid"); //$NON-NLS-1$
+ if (result == null) {
+ UUID newUUID = UUID.randomUUID();
+ result = newUUID.toString();
+ System.setProperty("org.osgi.framework.uuid", //$NON-NLS-1$
+ newUUID.toString());
+ }
+ return result;
+ }
}
protected void handleEndpointAdded(org.osgi.service.remoteserviceadmin.EndpointDescription endpoint,

Back to the top