- Introduce WebCmsSession
[lgpl/argeo-commons.git] / org.argeo.cms / src / org / argeo / cms / internal / kernel / Kernel.java
index 199356198e259e7eee547609b0d56cfad04b655b..a1988a2181487abf43a1f51676f9deb8da694c09 100644 (file)
@@ -256,6 +256,26 @@ final class Kernel implements KernelHeader, KernelConstants, ServiceListener {
                props.put("contextName", "user");
                bc.registerService(ApplicationConfiguration.class, userUi, props);
 
+               // Bundle rapWorkbenchBundle =
+               // findBundle("org.eclipse.rap.ui.workbench");
+               // if (rapWorkbenchBundle != null)
+               // try {
+               // Class<?> clss = rapWorkbenchBundle
+               // .loadClass("org.eclipse.rap.ui.internal.servlet.WorkbenchApplicationConfiguration");
+               //
+               // Hashtable<String, String> rapWorkbenchProps = new Hashtable<String,
+               // String>();
+               // rapWorkbenchProps.put("contextName", "ui");
+               // ApplicationConfiguration workbenchApplicationConfiguration =
+               // (ApplicationConfiguration) clss
+               // .newInstance();
+               // bc.registerService(ApplicationConfiguration.class,
+               // workbenchApplicationConfiguration,
+               // rapWorkbenchProps);
+               // } catch (Exception e) {
+               // log.error("Cannot initalize RAP workbench", e);
+               // }
+
                // Kernel thread
                kernelThread = new KernelThread(this);
                kernelThread.setContextClassLoader(Kernel.class.getClassLoader());
@@ -425,6 +445,14 @@ final class Kernel implements KernelHeader, KernelConstants, ServiceListener {
                return bc.getService(configurationAdmin);
        }
 
+       /** Can be null */
+       Bundle findBundle(String symbolicName) {
+               for (Bundle b : bc.getBundles())
+                       if (b.getSymbolicName().equals(symbolicName))
+                               return b;
+               return null;
+       }
+
        private void initTransactionManager() {
                bitronix.tm.Configuration tmConf = TransactionManagerServices.getConfiguration();
                tmConf.setServerId(getFrameworkProp(FRAMEWORK_UUID));