I'm not sure how the Eclipse stop the process that it start.
But if you use Java to run the Main class, you can stop the Main by
using the ctrl + c.
If you take a look at the Main class, it register a HangupInterceptor
and it will close the Spring Application context which it starts.
Willem
vcheruvu wrote:
Hi,
My application runs on windows through Eclipse IDE. It calls
org.apache.camel.spring.Main class to start the application. When I shutdown
the application through the stop button, I do not see any shutdown messages
from Camel on Eclipse console. So, I have placed breakpoints in many places
in DefaultShutDownStrategy class. It never reached to the breakpoint. I
have also placed breakpoints in DefaultCamelContext.shutdown() and it never
reached there either. It appears to me on windows, when I use stop button
through eclipse ide, it is doing force kill instead of graceful shutdown. I
looked for examples in your book and I didn't see any special notes on
graceful shutdown. How can I invoke graceful shutdown through eclipse ide on
windows?
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
<package>com.example</package>
<jmxAgent id="agent" createConnector="true" registryPort="22005"/>
<route id="readRawData" startupOrder="2" shutdownRoute="Defer">
<from
uri="file://source/raw/con_date?delay=60000&delete=false&exclude=.done&move=.done/${file:name.noext}-${date:now:yyyyMMddHHmmss}&moveFailed=.error/${file:name.noext}-${date:now:yyyyMMddHHmmss}.error&autoCreate=false"/>
<unmarshal> <csv/> </unmarshal>
<split stopOnException="true">
<simple>body</simple>
<to
uri="bean:saveData?method=convertDataAndRouteToPersist"/>
</split>
</route>
<route id="persistStaticData" startupOrder="1"
shutdownRoute="Defer">
<from
uri="vm:persistQueue?size=500000&timeout=1000000&concurrentConsumers=80"
/>
<convertBodyTo type="com.example.RawEntity"/>
<to uri="jpa:com.example.RawEntity"/>
</route>
Kind regards,
-Vid-