You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by jk...@apache.org on 2023/03/28 09:48:34 UTC
[unomi] branch async-save-export-config updated: small cleanup
This is an automated email from the ASF dual-hosted git repository.
jkevan pushed a commit to branch async-save-export-config
in repository https://gitbox.apache.org/repos/asf/unomi.git
The following commit(s) were added to refs/heads/async-save-export-config by this push:
new 3a8871b28 small cleanup
3a8871b28 is described below
commit 3a8871b2807ec4f826525d698bec0af6b4dcf66f
Author: Kevan <ke...@jahia.com>
AuthorDate: Tue Mar 28 11:48:25 2023 +0200
small cleanup
---
.../router/core/context/RouterCamelContext.java | 25 +---------------------
1 file changed, 1 insertion(+), 24 deletions(-)
diff --git a/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/context/RouterCamelContext.java b/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/context/RouterCamelContext.java
index fdcebfa24..524a9efbf 100644
--- a/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/context/RouterCamelContext.java
+++ b/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/context/RouterCamelContext.java
@@ -37,10 +37,7 @@ import org.apache.unomi.router.core.processor.ImportConfigByFileNameProcessor;
import org.apache.unomi.router.core.processor.ImportRouteCompletionProcessor;
import org.apache.unomi.router.core.processor.UnomiStorageProcessor;
import org.apache.unomi.router.core.route.*;
-import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleEvent;
-import org.osgi.framework.SynchronousBundleListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -50,7 +47,7 @@ import java.util.Map;
/**
* Created by amidani on 04/05/2017.
*/
-public class RouterCamelContext implements SynchronousBundleListener, IRouterCamelContext {
+public class RouterCamelContext implements IRouterCamelContext {
private Logger logger = LoggerFactory.getLogger(RouterCamelContext.class.getName());
private CamelContext camelContext;
@@ -163,14 +160,6 @@ public class RouterCamelContext implements SynchronousBundleListener, IRouterCam
logger.debug("postConstruct {" + bundleContext.getBundle() + "}");
- processBundleStartup(bundleContext);
- for (Bundle bundle : bundleContext.getBundles()) {
- if (bundle.getBundleContext() != null) {
- processBundleStartup(bundle.getBundleContext());
- }
- }
- bundleContext.addBundleListener(this);
-
importConfigurationService.setRouterCamelContext(this);
exportConfigurationService.setRouterCamelContext(this);
@@ -305,21 +294,9 @@ public class RouterCamelContext implements SynchronousBundleListener, IRouterCam
}
public void preDestroy() throws Exception {
- bundleContext.removeBundleListener(this);
//This is to shutdown Camel context
//(will stop all routes/components/endpoints etc and clear internal state/cache)
this.camelContext.stop();
logger.info("Camel context for profile import is shutdown.");
}
-
- private void processBundleStartup(BundleContext bundleContext) {
- if (bundleContext == null) {
- return;
- }
- }
-
- @Override
- public void bundleChanged(BundleEvent bundleEvent) {
-
- }
}