Hi riders,
I have a couple of properties in my RouteBuilder class that needed to be
initialized using Spring application context file.
public class MailRouteBuilder extends RouteBuilder
{
private static MailConfigure mailConfig;
private static IEmailMessageProcessor messageProcessor;
...
}
then in my Spring context file I have this
<camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
<package>com.lyfam.component.mail</package>
</camelContext>
<bean id="mailRoute" class="com.lyfam.component.mail.MailRouteBuilder">
<property name="mailConfig" ref="mailConfigure" />
<property name="messageProcessor" ref="messageProcessor" />
</bean>
Spring will try to create 2 instances of this MailRouteBuilder: one in the
camel context initialization and the other for the bean "mailRoute".
Obviously, this is not what I want.
Can I reuse/instruct camelContext to use the existing bean after it is
configured. In this case I need the camel context to use my "mailRoute"
bean.
Thank you guys,
Doug
--
View this message in context:
http://www.nabble.com/Configure-Route-in-Spring-Context-tp20946948s22882p20946948.html
Sent from the Camel - Users mailing list archive at Nabble.com.