Hi,

Am not getting any exception if i try to pass invalid ip for sftp using
consumerTemplate. My spring dsl looks like this.

<bean id="poolConnectionFactory"
class="org.apache.activemq.pool.PooledConnectionFactory">
        <property name="maxConnections" value="8"/>
        <property name="connectionFactory" ref="jmsConnectionFactory"/>
        </bean>
        <bean id="jmsConnectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory">
                <property name="brokerURL" value="tcp://localhost:8181"/>
        </bean>
        <bean id="jmsTransactionManager"
class="org.springframework.jms.connection.JmsTransactionManager">
        <property name="connectionFactory" ref="poolConnectionFactory"/>
        </bean>
        <bean id="activemq"
class="org.apache.activemq.camel.component.ActiveMQComponent">
                <property name="connectionFactory" ref="poolConnectionFactory"/>
        <property name="transacted" value="true"/>
        <property name="transactionManager" ref="jmsTransactionManager"/>
        </bean>
                              
    <camelContext errorHandlerRef="txEH"
xmlns="http://camel.apache.org/schema/spring"; id="listener">
  
                 <consumerTemplate id="consumer"/> 
                 <onException>
            <exception>java.lang.Exception</exception>
                           <redeliveryPolicy maximumRedeliveries="6"/>  
            <handled><camel:constant>true</camel:constant></handled>
            <process ref="errorProcessor"/>
        </onException> 
        <route id="jmsTransport">
            <from uri="activemq:samplequeue"/>
            <transacted/> 
            <process ref="process1"/>
            <process ref="process2"/>
            <process ref="process3"/>
            <process ref="process4"/> 
        </route> 

In process3, i autowired the consumerTemplate and using 

consumer.receive("sftp://user1:pwd1@abcd:22//home/sample/op/?stepwise=false&consumer.bridgeErrorHandler=true&throwExceptionOnConnectFailed=true&fileName=sample.txt";);

What else i have to do for getting exception when ip address is incorrect?




--
View this message in context: 
http://camel.465427.n5.nabble.com/sftp-not-throwing-exception-tp5729470p5749727.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to