camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1244861 - /camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/CamelNamespaceHandler.java
Date Thu, 16 Feb 2012 07:05:41 GMT
Author: davsclaus
Date: Thu Feb 16 07:05:41 2012
New Revision: 1244861

URL: http://svn.apache.org/viewvc?rev=1244861&view=rev
Log:
CAMEL-5010: Removed osgi environment detection logging as it has no value anymore, and also
causes JBoss7 to do a WARN logging.

Modified:
    camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/CamelNamespaceHandler.java

Modified: camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/CamelNamespaceHandler.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/CamelNamespaceHandler.java?rev=1244861&r1=1244860&r2=1244861&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/CamelNamespaceHandler.java
(original)
+++ camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/CamelNamespaceHandler.java
Thu Feb 16 07:05:41 2012
@@ -122,26 +122,7 @@ public class CamelNamespaceHandler exten
         registerParser("errorHandler", errorHandlerParser);
         parserMap.put("errorHandler", errorHandlerParser);
 
-        // camel context
-        boolean osgi = false;
         Class<?> cl = CamelContextFactoryBean.class;
-        try {
-            Class<?> c = Class.forName("org.apache.camel.osgi.Activator");
-            Method mth = c.getDeclaredMethod("getBundle");
-            Object bundle = mth.invoke(null);
-            if (bundle != null) {
-                cl = Class.forName("org.apache.camel.osgi.CamelContextFactoryBean");
-                osgi = true;
-            }
-        } catch (Throwable t) {
-            // not running with camel-osgi so we fallback to the regular factory bean
-            LOG.trace("Cannot find class so assuming not running in OSGi container: " + t.getMessage());
-        }
-        if (osgi) {
-            LOG.info("OSGi environment detected.");
-        } else {
-            LOG.info("OSGi environment not detected.");
-        }
         LOG.debug("Using {} as CamelContextBeanDefinitionParser", cl.getCanonicalName());
         registerParser("camelContext", new CamelContextBeanDefinitionParser(cl));
     }



Mime
View raw message