Within a route defined in camel context I would like to access a method of an abstract class that is contained in a 3rd party library I am using.
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:camel="http://camel.apache.org/schema/spring"
xmlns:osgi="http://www.springframework.org/schema/osgi"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean id="objectFactory" class="org.example.Factory" abstract="true"/>
<camelContext xmlns="http://camel.apache.org/schema/spring">
<route>
...
<marshal>
<rss/>
</marshal>
<marshal>
<string/>
</marshal>
<to uri="jms:feeds"/>
<to uri="file:/tmp/output"/>
<!-- That is the point in the route where I would like to pass the URL of
the folder the files have been written to a static method of an abstract
class in order to instantiate an object
-->
</route>
...
The above snippet shows the route definition in Spring DSL and the definition of the abstract bean. I have tried using the <bean>
tag to achieve what I want, but this always ends with a org.springframework.beans.factory.BeanIsAbstractException
. Is there no way to just simply access a static method of an abstract class within a camelcontext?