pnoltes commented on issue #758:
URL: https://github.com/apache/celix/issues/758#issuecomment-2212521006

   > If CELIX_FRAMEWORK_UUID is designed to be configurable, what should be 
considered?
   
   Currently, a random UUID is generated in framework_create using the 
following snippet:
   ```C
       //create and store framework uuid
       char uuid[37];
       uuid_t uid;
       uuid_generate(uid);
       uuid_unparse(uid, uuid);
       celix_properties_set(framework->configurationMap, CELIX_FRAMEWORK_UUID, 
uuid);
   ```
   
   In my opinion, this code snippet should be extracted into a private function 
(e.g., `celix_framework_createFrameworkUUID`). In this function, a check should 
be performed to see if a UUID-parsable configuration property already exists 
before generating a random UUID. I think this is enough to add configurable 
framework UUID support. 
   
   Additionally, I suggest updating the original property name from 
"org.osgi.framework.uuid" to something like "CELIX_FRAMEWORK_CONFIGURED_UUID," 
as Celix configuration properties, today, typically follow a naming scheme more 
aligned with shell environment variables.
   
   Note that configurable framework UUIDs were likely supported in the past and 
may have been removed accidentally.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@celix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to