Hi,
@Claus: Thanks a lot for your help.
Found a configuration that works, for the record, here it is:
The JmsComponent must not have "lazy-init=true", because Camel expects the
bean to be there to initialize the route. But with "lookupOnStartup =false"
in the JndiObjectFactoryBean, the JMSConnection is looked up not before it
is actually needed by a route, and therefore camel doesn't freeze (or wait
unnessecary long) on test systems where there is no connection to JMS but a
file consumer endpoint with testdata instead.
Note that you need to set the expectedType property on the JndiObjectfactory
bean if you use "lookupOnStartup=false" so that spring can pass a correct
interface to the JmsComponent:
<bean class="org.apache.camel.component.jms.JmsComponent" id="myqueue">
<property name="connectionFactory" ref="jmsQueueConnectionFactory"
/>
</bean>
<bean class="org.springframework.jndi.JndiObjectFactoryBean"
id="jmsQueueConnectionFactory">
<property name="jndiTemplate" ref="jndiTemplate" />
* <property name="lookupOnStartup" value="false" />
<property name="expectedType" value="javax.jms.ConnectionFactory"
/>*
<property name="jndiName" value="${connectionFactoryName}" />
</bean>
Joerg
--
View this message in context:
http://camel.465427.n5.nabble.com/Lazy-init-for-JMS-Component-tp5769586p5769823.html
Sent from the Camel - Users mailing list archive at Nabble.com.