camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndaniel <nicolas.dan...@canal-plus.com>
Subject activemq away catch exception
Date Fri, 26 Jun 2015 09:35:42 GMT
hi everyone,

I'm testing camel with activemq using servlet-rest-tomcat example (I'm not a
CAMEL expert).

I'm trying to response an error if I can't connect to activemq.

activemq is not start. I have the following line in my log :

11:22:43.003 [ActiveMQ Task-1] WARN  o.a.a.t.f.FailoverTransport - Failed to
connect to [tcp://localhost:61616] after: 10 attempt(s) continuing to retry.

but I'm not able to catch this exception in my route.

here is my route :

rest("/actofmanagement").description("rest Service")
         .consumes("application/json").produces("application/json")
         
         .put("/updateEmail").description("UPDATE an
email").outType(ActsOfManagementResponse.class)
  				.route()
  				.doTry()
  				.process(fillQueueUpdateEmail) // insert data in the queue
  				.doCatch(CamelException.class, JMSException.class,
ConnectException.class,Exception.class, IOException.class,
InterruptedException.class )
  			
.to("bean:ActsOfManagementWebService?method=responseErrorToClient(${body})").stop().end()
  			
.to("bean:ActsOfManagementWebService?method=responseToClient(${body})")
  				.endRest()

I also tried a global onException, but nothing happening too. (empty result) 

If someone has already tried this, let me know. 

thanks all. 











--
View this message in context: http://camel.465427.n5.nabble.com/activemq-away-catch-exception-tp5768595.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message