camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1439433 - in /camel/trunk/components/camel-blueprint/src/main/java/org/apache/camel/blueprint: BlueprintCamelContext.java BlueprintComponentResolver.java
Date Mon, 28 Jan 2013 14:56:00 GMT
Author: davsclaus
Date: Mon Jan 28 14:56:00 2013
New Revision: 1439433

URL: http://svn.apache.org/viewvc?rev=1439433&view=rev
Log:
Polished camel-blueprint with more TRACE logging.

Modified:
    camel/trunk/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintCamelContext.java
    camel/trunk/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintComponentResolver.java

Modified: camel/trunk/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintCamelContext.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintCamelContext.java?rev=1439433&r1=1439432&r2=1439433&view=diff
==============================================================================
--- camel/trunk/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintCamelContext.java
(original)
+++ camel/trunk/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintCamelContext.java
Mon Jan 28 14:56:00 2013
@@ -73,12 +73,18 @@ public class BlueprintCamelContext exten
     }
 
     public void init() throws Exception {
+        if (LOG.isTraceEnabled()) {
+            LOG.trace("init {}", this);
+        }
         // add service listener so we can be notified when blueprint container is done
         // and we would be ready to start CamelContext
         bundleContext.addServiceListener(this);
     }
 
     public void destroy() throws Exception {
+        if (LOG.isTraceEnabled()) {
+            LOG.trace("destroy {}", this);
+        }
         // remove listener and stop this CamelContext
         bundleContext.removeServiceListener(this);
         stop();
@@ -118,6 +124,9 @@ public class BlueprintCamelContext exten
     }
 
     private void maybeStart() throws Exception {
+        if (LOG.isTraceEnabled()) {
+            LOG.trace("maybeStart: {}", this);
+        }
         if (!isStarted() && !isStarting()) {
             final ClassLoader original = Thread.currentThread().getContextClassLoader();
             try {

Modified: camel/trunk/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintComponentResolver.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintComponentResolver.java?rev=1439433&r1=1439432&r2=1439433&view=diff
==============================================================================
--- camel/trunk/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintComponentResolver.java
(original)
+++ camel/trunk/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintComponentResolver.java
Mon Jan 28 14:56:00 2013
@@ -22,6 +22,7 @@ import org.apache.camel.core.osgi.OsgiCo
 import org.apache.camel.spi.ComponentResolver;
 import org.apache.camel.util.CamelContextHelper;
 import org.osgi.framework.BundleContext;
+import org.osgi.service.blueprint.container.NoSuchComponentException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -48,6 +49,9 @@ public class BlueprintComponentResolver 
                     return component;
                 }
             }
+        } catch (NoSuchComponentException e) {
+            // can be expected so ignore
+            LOG.trace("Component: {} not found in registry.", name);
         } catch (Exception e) {
             LOG.trace("Ignored error looking up bean: " + name + " due: " + e.getMessage(),
e);
         }



Mime
View raw message