You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Ioan Eugen Stan <st...@gmail.com> on 2013/05/23 10:36:39 UTC

prevent CamelContext from shutting down in blueprint

Hello,

I'm using Camel 2.11.0 under Karaf 2.3.1. I'm creating the camel
context via blueprint and Ican't figure out how to prevent it from
shutting down instantly after starting.

I've pasted some trimmed log messages. You can see that the context
shuts down right after startup without throwing Exception. I believe
that I should put something that the Camel will wait for (like
TimeUnit.SECONDS.sleep() ) until it calls stop() but I don't know
where.

2013-05-23 11:20:12,976 | INFO  | BlueprintCamelContext            |
Apache Camel 2.11.0 (CamelContext: process-context) started in 0.234
seconds
2013-05-23 11:20:12,984 | INFO  | BlueprintCamelContext            |
Apache Camel 2.11.0 (CamelContext: process-context) is shutting down
2013-05-23 11:20:12,987 | INFO  | DefaultShutdownStrategy          |
Starting to graceful shutdown 4 routes (timeout 300 seconds)
2013-05-23 11:20:13,980 | INFO  | DefaultShutdownStrategy          |
Route: process-format-error-invoices shutdown complete, was consuming
from: Endpoint[activemq://temp.format.error]
2013-05-23 11:20:13,988 | INFO  | DefaultShutdownStrategy          |
Route: process-good-invoices shutdown complete, was consuming from:
Endpoint[activemq://temp.format.ok]
2013-05-23 11:20:13,995 | INFO  | DefaultShutdownStrategy          |
Route: validate-incoming-invoices shutdown complete, was consuming
from: Endpoint[activemq://incoming]
2013-05-23 11:20:13,997 | INFO  | DefaultShutdownStrategy          |
Route: fetch-local-data shutdown complete, was consuming from:
Endpoint[file:///home/vftp?antInclude=**%2Fin%2F*.xml&idempotent=true&recursive=true]
2013-05-23 11:20:14,000 | INFO  | DefaultShutdownStrategy          |
Graceful shutdown of 4 routes completed in 1 seconds

Cheers,

--
Ioan Eugen Stan
0720 898 747

Re: prevent CamelContext from shutting down in blueprint

Posted by Ioan Eugen Stan <st...@gmail.com>.
Hello Martin,

I've managed to make it work by trimming down and simplifying my
blueprint.xml config. Looks like I was doing something the wrong way.
I'll grow slowly so things and hopefully things won't break.

Cheers,

On Thu, May 23, 2013 at 3:06 PM, Martin Stiborský
<ma...@gmail.com> wrote:
> yes, it is doing the same to me :) -
> http://camel.465427.n5.nabble.com/Upgrade-Camel-2-10-1-2-11-0-Camel-keeps-restarting-td5731854.html
> I'll try to find out more what is happening there...
>
> On Thu, May 23, 2013 at 1:53 PM, Ioan Eugen Stan <st...@gmail.com> wrote:
>> Hello Martin,
>>
>> It's simple: Just after the Camel Context start it shuts down,
>> gracefully. I've pasted the logging with debug [1].
>> If it helps.
>>
>> [1] https://paste.apache.org/cnfW
>
>
>
> --
> S pozdravem / Best regards
> Martin Stiborský
>
> Jabber: stibi@njs.netlab.cz
> Twitter: http://www.twitter.com/stibi



-- 
Ioan Eugen Stan
0720 898 747

Re: prevent CamelContext from shutting down in blueprint

Posted by Martin Stiborský <ma...@gmail.com>.
yes, it is doing the same to me :) -
http://camel.465427.n5.nabble.com/Upgrade-Camel-2-10-1-2-11-0-Camel-keeps-restarting-td5731854.html
I'll try to find out more what is happening there...

On Thu, May 23, 2013 at 1:53 PM, Ioan Eugen Stan <st...@gmail.com> wrote:
> Hello Martin,
>
> It's simple: Just after the Camel Context start it shuts down,
> gracefully. I've pasted the logging with debug [1].
> If it helps.
>
> [1] https://paste.apache.org/cnfW



-- 
S pozdravem / Best regards
Martin Stiborský

Jabber: stibi@njs.netlab.cz
Twitter: http://www.twitter.com/stibi

Re: prevent CamelContext from shutting down in blueprint

Posted by Ioan Eugen Stan <st...@gmail.com>.
Hello Martin,

It's simple: Just after the Camel Context start it shuts down,
gracefully. I've pasted the logging with debug [1].
If it helps.

[1] https://paste.apache.org/cnfW

Re: prevent CamelContext from shutting down in blueprint

Posted by Martin Stiborský <ma...@gmail.com>.
Hello,
I have the same problem. I already posted a message about this some
time ago but since that I had no time to dig in debug log. Now you
reminded me with your post that I should fix it as well :)

Could you give me a bit more information what is the problem in your case?

On Thu, May 23, 2013 at 11:04 AM, Ioan Eugen Stan <st...@gmail.com> wrote:
> Hello Achim,
>
> Setting logging to DEBUG helped more than expected. The Context
> doesn't shut-down anymore. It's a synchronization issue which will be
> a a "joy" to debug.
>
> Have a great day,



-- 
S pozdravem / Best regards
Martin Stiborský

Jabber: stibi@njs.netlab.cz
Twitter: http://www.twitter.com/stibi

Re: prevent CamelContext from shutting down in blueprint

Posted by Ioan Eugen Stan <st...@gmail.com>.
Hello Achim,

Setting logging to DEBUG helped more than expected. The Context
doesn't shut-down anymore. It's a synchronization issue which will be
a a "joy" to debug.

Have a great day,

Re: prevent CamelContext from shutting down in blueprint

Posted by Achim Nierbeck <bc...@googlemail.com>.
Maybe turning on debug level in the logging will give you a better reason
why the camel context is destroyed right after startup.
This usually happens if you have something wrong in your route ...
regards, Achim


2013/5/23 Ioan Eugen Stan <st...@gmail.com>

> Hello,
>
> I'm using Camel 2.11.0 under Karaf 2.3.1. I'm creating the camel
> context via blueprint and Ican't figure out how to prevent it from
> shutting down instantly after starting.
>
> I've pasted some trimmed log messages. You can see that the context
> shuts down right after startup without throwing Exception. I believe
> that I should put something that the Camel will wait for (like
> TimeUnit.SECONDS.sleep() ) until it calls stop() but I don't know
> where.
>
> 2013-05-23 11:20:12,976 | INFO  | BlueprintCamelContext            |
> Apache Camel 2.11.0 (CamelContext: process-context) started in 0.234
> seconds
> 2013-05-23 11:20:12,984 | INFO  | BlueprintCamelContext            |
> Apache Camel 2.11.0 (CamelContext: process-context) is shutting down
> 2013-05-23 11:20:12,987 | INFO  | DefaultShutdownStrategy          |
> Starting to graceful shutdown 4 routes (timeout 300 seconds)
> 2013-05-23 11:20:13,980 | INFO  | DefaultShutdownStrategy          |
> Route: process-format-error-invoices shutdown complete, was consuming
> from: Endpoint[activemq://temp.format.error]
> 2013-05-23 11:20:13,988 | INFO  | DefaultShutdownStrategy          |
> Route: process-good-invoices shutdown complete, was consuming from:
> Endpoint[activemq://temp.format.ok]
> 2013-05-23 11:20:13,995 | INFO  | DefaultShutdownStrategy          |
> Route: validate-incoming-invoices shutdown complete, was consuming
> from: Endpoint[activemq://incoming]
> 2013-05-23 11:20:13,997 | INFO  | DefaultShutdownStrategy          |
> Route: fetch-local-data shutdown complete, was consuming from:
>
> Endpoint[file:///home/vftp?antInclude=**%2Fin%2F*.xml&idempotent=true&recursive=true]
> 2013-05-23 11:20:14,000 | INFO  | DefaultShutdownStrategy          |
> Graceful shutdown of 4 routes completed in 1 seconds
>
> Cheers,
>
> --
> Ioan Eugen Stan
> 0720 898 747
>



-- 

Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
OPS4J Pax for Vaadin <http://team.ops4j.org/wiki/display/PAXVAADIN/Home>
Commiter & Project Lead
blog <http://notizblog.nierbeck.de/>