- Path stateUuidPath = bc.getDataFile("stateUuid").toPath();
- String stateUuid;
- if (Files.exists(stateUuidPath)) {
- stateUuid = Files.readAllLines(stateUuidPath).get(0);
- } else {
- stateUuid = bc.getProperty(Constants.FRAMEWORK_UUID);
- Files.write(stateUuidPath, stateUuid.getBytes());
- }
- nodeState = new CmsState(stateUuid);
- Dictionary<String, Object> regProps = LangUtils.dico(Constants.SERVICE_PID, NodeConstants.NODE_STATE_PID);
- regProps.put(NodeConstants.CN, stateUuid);
- bc.registerService(NodeState.class, nodeState, regProps);
+// Path stateUuidPath = bc.getDataFile("stateUuid").toPath();
+// String stateUuid;
+// if (Files.exists(stateUuidPath)) {
+// stateUuid = Files.readAllLines(stateUuidPath).get(0);
+// } else {
+// stateUuid = bc.getProperty(Constants.FRAMEWORK_UUID);
+// Files.write(stateUuidPath, stateUuid.getBytes());
+// }
+ nodeState = new CmsState();
+// Dictionary<String, Object> regProps = LangUtils.dico(Constants.SERVICE_PID, NodeConstants.NODE_STATE_PID);
+// regProps.put(NodeConstants.CN, stateUuid);
+ bc.registerService(NodeState.class, nodeState, null);