svn commit: r702569 - /activemq/camel/trunk/components/camel-osgi/src/main/java/org/apache/camel/osgi/CamelContextFactoryBean.java

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r702569 - /activemq/camel/trunk/components/camel-osgi/src/main/java/org/apache/camel/osgi/CamelContextFactoryBean.java

gnodet
Author: gnodet
Date: Tue Oct  7 11:11:32 2008
New Revision: 702569

URL: http://svn.apache.org/viewvc?rev=702569&view=rev
Log:
CAMEL-965: When camel-osgi is on the classpath but camel is not used in an OSGi context, camel-osgi behaves badly

Modified:
    activemq/camel/trunk/components/camel-osgi/src/main/java/org/apache/camel/osgi/CamelContextFactoryBean.java

Modified: activemq/camel/trunk/components/camel-osgi/src/main/java/org/apache/camel/osgi/CamelContextFactoryBean.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-osgi/src/main/java/org/apache/camel/osgi/CamelContextFactoryBean.java?rev=702569&r1=702568&r2=702569&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-osgi/src/main/java/org/apache/camel/osgi/CamelContextFactoryBean.java (original)
+++ activemq/camel/trunk/components/camel-osgi/src/main/java/org/apache/camel/osgi/CamelContextFactoryBean.java Tue Oct  7 11:11:32 2008
@@ -43,7 +43,9 @@
 
     protected SpringCamelContext createContext() {
         SpringCamelContext context = super.createContext();
-        context.setComponentResolver(new OsgiComponentResolver(bundleContext));
+        if (bundleContext != null) {
+            context.setComponentResolver(new OsgiComponentResolver(bundleContext));
+        }
         return context;
     }