Use OSGi framework UUID as CMS State UUID
[lgpl/argeo-commons.git] / org.argeo.cms / src / org / argeo / cms / internal / runtime / KernelUtils.java
index 943c06f4ec44a6914e73a41e0530c7e61aed5381..3797eb913ca05544d5f7c6042d89f2c7227c35a1 100644 (file)
@@ -22,6 +22,8 @@ class KernelUtils implements KernelConstants {
        final static String OSGI_INSTANCE_AREA = "osgi.instance.area";
        final static String OSGI_CONFIGURATION_AREA = "osgi.configuration.area";
 
+       final static String OSGI_FRAMEWORK_UUID = "org.osgi.framework.uuid";
+
        static void setJaasConfiguration(URL jaasConfigurationUrl) {
                try {
                        URIParameter uriParameter = new URIParameter(jaasConfigurationUrl.toURI());
@@ -138,6 +140,7 @@ class KernelUtils implements KernelConstants {
                if (uri == null)
                        throw new IllegalArgumentException("URI cannot be null");
                try {
+                       // FIXME does not work if URI contains illegal characters (such as spaces, etc.)
                        return new URI(uri);
                } catch (URISyntaxException e) {
                        throw new IllegalArgumentException("Badly formatted URI " + uri, e);