Allow dynamic config customization when embedding Karaf using the Main class
@@ -230,7 +230,9 @@ public class Main {
}
public void launch() throws Exception {
+ if (config == null) {
config = new ConfigProperties();
+ }
config.performInit();
if (config.delayConsoleStart) {
System.out.println(config.startupMessage);
@@ -603,6 +605,14 @@ public class Main {
framework.adapt(FrameworkStartLevel.class).setStartLevel(level);
}
+ public ConfigProperties getConfig() {
+ return config;
+ }
+
+ public void setConfig(ConfigProperties config) {
+ this.config = config;
+ }
+
public void awaitShutdown() throws Exception {
if (framework == null) {
return;
