Hi,
I´m not calling web service. In my case I had just file poller, splitter
with streaming (line by line processing using Camel Bindy), then aggregator
with parallelProcessing set true. Basically very simple flow. I wanted to
see the threads using JVVM but the JVM connection attempt always resulted in
sudden process terminat ion. 

I´m quite struggling with these lifecycle basics. The thing is that I´m
using Camel for implementing simple batch jobs - not my decision but still
it is convenient as there are many handy components and EIPs. This means I´m
not interested in running Camel as server/service which I can always stop
from operating system environment. How to properly write Main class with
main() method is becoming big excercise :-)
Currently I have working but quite ugly solution. I would like to ask
experienced Camel users how to implement simple 100% SEQUENTIAL and thus
deterministic flow (1-N tasks) where from performance reasons certain stage
or task should be done in parallel (something like
ExecutorService.invokeAll() - i.e. from client/caller perspective it is
synchronous call but behind the scenes the job is done quickly using N
threads). 

The flow is starting using ProducerTemplate - not by any poller etc.
When implementing batch you often need to know when all is done (no more
inflight messages, so you can verify results etc.) and then gracefully exit
the application using either zero or non-zero (errors) exit code.









--
View this message in context: 
http://camel.465427.n5.nabble.com/After-camelContext-shutdown-is-any-way-to-exit-the-Java-main-method-tp5735993p5739962.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to