Use OSGi framework UUID as CMS State UUID
[lgpl/argeo-commons.git] / org.argeo.cms / src / org / argeo / cms / internal / runtime / CmsStateImpl.java
index 6fe8dcb7b2b5a175eec5141ec16674b8dbff34c9..ee7f06340d521a76642c0bd9424436c4244e3629 100644 (file)
@@ -111,7 +111,8 @@ public class CmsStateImpl implements CmsState {
                        if (log.isTraceEnabled())
                                log.trace("CMS State started");
 
-                       this.uuid = uuidFactory.timeUUID();
+                       String frameworkUuid = KernelUtils.getFrameworkProp(KernelUtils.OSGI_FRAMEWORK_UUID);
+                       this.uuid = frameworkUuid != null ? UUID.fromString(frameworkUuid) : uuidFactory.timeUUID();
 
                        // hostname
                        this.hostname = getDeployProperty(CmsDeployProperty.HOST);