X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.cms%2Fsrc%2Forg%2Fargeo%2Fcms%2Finternal%2Fkernel%2FActivator.java;h=7b2cb78bfe403105566d7b1a60468cf399b711ab;hb=a5041ede454d2cb851aa2908f75e25fce43e639a;hp=d2d7d25b7cae3602728a03771af0872269bd0e41;hpb=c5e7dfede43f8b53710baa406b334792a7603d45;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.cms/src/org/argeo/cms/internal/kernel/Activator.java b/org.argeo.cms/src/org/argeo/cms/internal/kernel/Activator.java index d2d7d25b7..7b2cb78bf 100644 --- a/org.argeo.cms/src/org/argeo/cms/internal/kernel/Activator.java +++ b/org.argeo.cms/src/org/argeo/cms/internal/kernel/Activator.java @@ -2,10 +2,7 @@ package org.argeo.cms.internal.kernel; import java.io.IOException; import java.net.URL; -import java.nio.file.Files; -import java.nio.file.Path; import java.security.AllPermission; -import java.util.Dictionary; import java.util.List; import java.util.Locale; import java.util.concurrent.ExecutorService; @@ -22,7 +19,6 @@ import org.argeo.api.NodeInstance; import org.argeo.api.NodeState; import org.argeo.cms.CmsException; import org.argeo.ident.IdentClient; -import org.argeo.util.LangUtils; import org.ietf.jgss.GSSCredential; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; @@ -137,18 +133,18 @@ public class Activator implements BundleActivator { private void initNode() throws IOException { // Node state - 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 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 regProps = LangUtils.dico(Constants.SERVICE_PID, NodeConstants.NODE_STATE_PID); +// regProps.put(NodeConstants.CN, stateUuid); + bc.registerService(NodeState.class, nodeState, null); // Node deployment nodeDeployment = new CmsDeployment();