Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • PackageScanClassResolver
  • ClassResolver
  • FactoryFinderResolver
  • FactoryFinder

In camel-osgi we provide OSGi aware class resolver allowing Camel to run in any OSGi container.

...

In the sample above the CamelContext will automatic detect the jbossresolver bean and use it instead of its default one.

FactoryFinder

FactoryFinder is used to lookup resource files in the classpath in the META-INF/services. It is used internally by Camel to look in .jars for Camel components. For instance to look for the file component Camel will use the FactoryFinder to look the the file named file in META-INF/services/org/apache/camel/component. The CamelContext have methods to inject a custom FactoryFinderResolver.

Easy configuration in Spring XML

We have provided easy configuration in Spring XML as you just need to declare a spring bean with your custom factory finder resolver and Camel will pick it up automatically.

Code Block
xml
xml

  <bean id="jbossFactoryFinderResolver" class="com.mycompany.jboss.JBossFactoryFinderResolver"/>

  <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
    <route>
      <from uri="seda:start"/>
      <to uri="mock:result"/>
    </route>
  </camelContext>