camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: stop CamelContext in main()
Date Thu, 07 May 2009 15:31:30 GMT
camel-spring.jar have a Main.class that you can use to start with. It
should be able to stop.

Can you try to do a thread dump, could be a non deamon thread hanging somewhere.
We have done some work on that but I cannot remember if that was
before 2.0m1 was released or after.


On Thu, May 7, 2009 at 1:30 PM, pevgen <pevgen@km.ru> wrote:
>
> Hello.
>
> I use camel-2.0-M1, and I have a spring configuration like this :
>
> <camel:camelContext xmlns="http://camel.apache.org/schema/spring" id="test">
>    <route>
>        <from uri="direct:a"/>
>        <to uri="mock:t1"/>
>    </route>
> </camel:camelContext>
>
> and a method :
>
> public static void main() throws Exception {
>
>     ApplicationContext context = new FileSystemXmlApplicationContext(new
> String[]{
>
> "./config/test.xml"});
>
>     CamelContext camelContext = (CamelContext)context.getBean("test");
>
>     camelContext.stop();
>     context.stop();
>     context.close();
> }
>
> but when the method finished then application didn't finish.  (I can close
> my application only with         System.exit(1) statement, but it's not
> fine)
>
> Can anybody help me ?
>
> Thanks, Evgeny
>
>
>
> --
> View this message in context: http://www.nabble.com/stop-CamelContext-in-main%28%29-tp23424821p23424821.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Apache Camel Reference Card:
http://refcardz.dzone.com/refcardz/enterprise-integration
Interview with me:
http://architects.dzone.com/articles/interview-claus-ibsen-about?mz=7893-progress

Mime
View raw message