- // Check if state is in line with environment
- // Dictionary<String, Object> envProps = new Hashtable<>();
- // for (String key : LangUtils.keys(envProps)) {
- // Object envValue = envProps.get(key);
- // Object storedValue = props.get(key);
- // if (storedValue == null)
- // throw new CmsException("No state value for env " + key + "=" +
- // envValue
- // + ", please clean the OSGi configuration.");
- // if (!storedValue.equals(envValue))
- // throw new CmsException("State value for " + key + "=" +
- // storedValue
- // + " is different from env value =" + envValue + ", please clean
- // the OSGi configuration.");
- // }
- cn = props.get(NodeConstants.CN);
- if (cn == null)
- throw new CmsException("No state UUID available");
- }
-
- Dictionary<String, Object> regProps = LangUtils.init(Constants.SERVICE_PID, NodeConstants.NODE_STATE_PID);
- regProps.put(NodeConstants.CN, cn);
- bc.registerService(LangUtils.names(NodeState.class, ManagedService.class), nodeState, regProps);
-
- try {
- nodeDeployment = new CmsDeployment();
- bc.registerService(LangUtils.names(NodeDeployment.class), nodeDeployment, null);
- } catch (RuntimeException e) {
- e.printStackTrace();
- throw e;