]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - jjs/cms.js
1 var System
= Java
.type("java.lang.System")
2 var OsgiBuilder
= Java
.type("org.argeo.osgi.boot.OsgiBuilder");
4 var osgi
= new OsgiBuilder();
6 osgi
.start(2, "org.eclipse.equinox.http.servlet");
7 osgi
.start(2, "org.eclipse.equinox.http.jetty");
8 osgi
.start(2, "org.eclipse.equinox.metatype");
9 osgi
.start(2, "org.eclipse.equinox.cm");
10 osgi
.start(2, "org.eclipse.rap.rwt.osgi");
11 osgi
.start(3, "org.argeo.cms");
12 osgi
.start(4, "org.eclipse.gemini.blueprint.extender");
13 osgi
.start(4, "org.eclipse.equinox.http.registry");
14 // specific properties
15 osgi
.conf("org.eclipse.rap.workbenchAutostart", "false");
16 osgi
.conf("org.eclipse.equinox.http.jetty.autostart", "false");
17 osgi
.conf("org.osgi.framework.bootdelegation", "com.sun.jndi.ldap,"
18 + "com.sun.jndi.ldap.sasl," + "com.sun.security.jgss,"
19 + "com.sun.jndi.dns," + "com.sun.nio.file," + "com.sun.nio.sctp");
21 if (typeof app
!== 'undefined') {
22 if (typeof appHome
== 'undefined') {
23 var appHome
= $ENV
.HOME
+ "/.a2/var/lib/" + app
;
25 if (typeof appConf
== 'undefined') {
26 var appConf
= $ENV
.HOME
+ "/.a2/etc/" + app
;
28 if (typeof policyFile
== 'undefined') {
29 var policyFile
= "node.policy";
31 osgi
.conf("osgi.configuration.area", appHome
+ "/state");
32 osgi
.conf("osgi.instance.area", appHome
+ "/data");
33 System
.setProperty("java.security.manager", "");
34 System
.setProperty("java.security.policy", "file://" + appConf
+ "/"
36 System
.setProperty("log4j.configuration", "file://" + appConf
37 + "/log4j.properties");
40 function openWorkbench() {
41 osgi
.spring("org.argeo.cms.ui.workbench.rap");
42 var appUrl
= "http://localhost:" + osgi
.httpPort
+ "/ui/node";
43 $EXEC("/usr/bin/chromium-browser --app=" + appUrl
);
44 // shutdown when the window is closed