camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r656177 - in /activemq/camel/trunk/components/camel-spring: pom.xml src/main/java/org/apache/camel/spring/handler/CamelNamespaceHandler.java
Date Wed, 14 May 2008 09:26:53 GMT
Author: gnodet
Date: Wed May 14 02:26:53 2008
New Revision: 656177

URL: http://svn.apache.org/viewvc?rev=656177&view=rev
Log:
CAMEL-513: Allow automatic use of the osgi factory bean when creating a camel context from
spring

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

Modified: activemq/camel/trunk/components/camel-spring/pom.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/pom.xml?rev=656177&r1=656176&r2=656177&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-spring/pom.xml (original)
+++ activemq/camel/trunk/components/camel-spring/pom.xml Wed May 14 02:26:53 2008
@@ -34,6 +34,11 @@
   <packaging>bundle</packaging>
 
   <properties>
+  <camel.osgi.import>
+    !javax.xml.bind.annotation.adapters,
+    org.apache.camel.osgi;resolution:=optional,
+    *
+  </camel.osgi.import>
   <camel.osgi.export>
     org.apache.camel.spring.*;${camel.osgi.version},
     org.apache.camel.component;${camel.osgi.split.pkg};${camel.osgi.version},

Modified: activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/CamelNamespaceHandler.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/CamelNamespaceHandler.java?rev=656177&r1=656176&r2=656177&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/CamelNamespaceHandler.java
(original)
+++ activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/CamelNamespaceHandler.java
Wed May 14 02:26:53 2008
@@ -87,7 +87,12 @@
         // TODO switch to use the above mechanism?
         registerParser("endpoint", endpointParser);
 
-        registerParser("camelContext", new CamelContextBeanDefinitionParser(CamelContextFactoryBean.class));
+        Class cl = CamelContextFactoryBean.class;
+        try {
+            cl = Class.forName("org.apache.camel.osgi.CamelContextFactoryBean");
+        } catch (Throwable t) {
+        }
+        registerParser("camelContext", new CamelContextBeanDefinitionParser(cl));
     }
 
     private void addBeanDefinitionParser(String elementName, Class<?> type) {



Mime
View raw message