Hi,

I try to inject a bean in a class which extends a
org.apache.camel.builder.RouteBuilder without success. So my question is
simple, is it possible ?

e.g.

1) MyRouterBuilder class wher I want to inject a bean (= EndPoint bean)

MyRouterBuilder class {

        private EndPointName endpointName = null;

        @Override
        public void configure() {

        // endpoint that I would like to inject
        from(EndPoints.FileClientIn)
       .to("");
     }
      
     // Inject endpoints dependency through Spring into my RouteBuilder
class
     public void setEndpointName(EndPointName endpointName) {
          this.endpointName = endpointName;
     }
}
2) Camel context file where the endPoint bean is declared

<bean id="endpointName" class="com.myApplication.util.EndPointName">
<property name="FileClientIn"
value="file:///c:/temp/xxx/clientA/input/?delete=false&amp;lock=true&amp;consumer.delay=500&amp;consumer.initialDelay=10"
/>
<property name="FileClientOutput" value="file:///c:/temp/xxx/clientA/output"
/>
<property name="RejectedQueueClientIn"
value="activemq:queue:rejectedmessages.clientA.queue" />
<property name="AcceptedQueueClientIn"
value="activemq:queue:xxx.clientA.queue" />
</bean>

Regards,



Charles Moulliard



-----
Enterprise Architect

Xpectis
12, route d'Esch
L-1470 Luxembourg

Phone +352 25 10 70 470
Mobile +352 621 45 36 22

e-mail : [EMAIL PROTECTED]
web site : www.xpectis.com 
-- 
View this message in context: 
http://www.nabble.com/Is-it-possible-to-inject-a-bean-in-a-class-which-extends-a-org.apache.camel.builder.RouteBuilder---tp18489666s22882p18489666.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to