Hi If you use JMS as a queue then you can use the concurrentConsumers option and set it eg to 5 - concurrentConsumers=5
http://activemq.apache.org/camel/jms.html And then you can drop the .thread(5) from the route path. This is the more correct way of using concurrency for JMS. I am actually not familiar if Camel currently has a tweak where you can eg. configure it to terminate threads immediately on route stop. If not maybe we should add such a feature. Will have to dig into the code. Med venlig hilsen Claus Ibsen ...................................... Silverbullet Skovsgårdsvænget 21 8362 Hørning Tlf. +45 2962 7576 Web: www.silverbullet.dk -----Original Message----- From: carloc [mailto:[EMAIL PROTECTED] Sent: 5. august 2008 21:31 To: [email protected] Subject: Re: Camel, Websphere, And Long Running Threads I think the other processes are oracle processes. Anyway I tried using direct instead of activemq component. The application can be stopped normally from the console. However the threads still remain. Is there any setting that I can tweak so that once the threads parent has died the other threads will die as well? Looking at it it seems that thread death does not occur even when the web application was stopped. Here is my route from("file://c://ufm//upload?moveNamePrefix=c://ufm//processed//&moveNamePostfix=USED").process(new Processor() { public void process(Exchange exchange) throws Exception { FileModel fileModel = new FileModel(); fileModel.setFileName(exchange.getIn().getHeader("org.apache.camel.file.name").toString()); fileModel.setContent(exchange.getIn().getBody(String.class)); exchange.getOut().setBody(fileModel); } }).to("direct:carlo"); from("direct:carlo").thread(5).process(new Processor() { public void process(Exchange exchange) throws Exception { FileModel fileModel = (FileModel) exchange.getIn().getBody(); System.out.println(fileModel.getFileName()); System.out.println(fileModel.getContent()); while(1==1) { System.out.println("aaa"); try { } catch(Exception e) { e.printStackTrace(); } } } }); This is just for investigation. Also if i use activemq instead of direct. The application just doesn't stop. -- View this message in context: http://www.nabble.com/Camel%2C-Websphere%2C-And-Long-Running-Threads-tp18834455s22882p18838295.html Sent from the Camel - Users mailing list archive at Nabble.com.
