1 package org
.argeo
.cms
.internal
.kernel
;
5 import org
.argeo
.security
.SystemAuthentication
;
6 import org
.osgi
.framework
.BundleActivator
;
7 import org
.osgi
.framework
.BundleContext
;
10 * Activates the {@link Kernel} from the provided {@link BundleContext}. Gives
11 * access to kernel information for the rest of the bundle (and only it)
13 public class Activator
implements BundleActivator
{
14 private final static String systemKey
;
16 systemKey
= UUID
.randomUUID().toString();
17 System
.setProperty(SystemAuthentication
.SYSTEM_KEY_PROPERTY
, systemKey
);
20 private static BundleContext bundleContext
;
21 private Kernel kernel
;
24 public void start(BundleContext context
) throws Exception
{
25 assert bundleContext
== null;
26 assert kernel
== null;
28 bundleContext
= context
;
29 kernel
= new Kernel(bundleContext
);
34 public void stop(BundleContext context
) throws Exception
{
41 * Singleton interface to the {@link BundleContext} related to the calling
46 public static BundleContext
getBundleContext() {
51 * @return a String which is guaranteed to be unique between and constant
52 * within a Java static context (typically a VM launch)
55 public final static String
getSystemKey() {