You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Jan Bernhardt <jb...@talend.com> on 2013/11/13 09:53:26 UTC
Who do I set ShutdownStrategy in CemelContext with Blueprint?
Hi Camel Users,
on the Camel Website it is only documented how to change the Default Timeout
for a Camel-Route shutdown via Java Code [1], but I could not find any
documentation of how to change the Timeout if I use Blueprint for my Camel
Setup.
Can someone please advice?
I added the following bean to my blueprint file:
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:camel="http://camel.apache.org/schema/blueprint">
<bean id="shutdownStrategy"
class="org.apache.camel.impl.DefaultShutdownStrategy">
<property name="timeout" value="100" />
</bean>
<camel:camelContext >
. . .
</camel:camelContext>
</blueprint>
[1] http://camel.apache.org/graceful-shutdown.html
--
View this message in context: http://camel.465427.n5.nabble.com/Who-do-I-set-ShutdownStrategy-in-CemelContext-with-Blueprint-tp5743160.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Who do I set ShutdownStrategy in CemelContext with Blueprint?
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
Yes this is how you can do it. Camel logs at INFO level if it pickup
your custom strategy, like
Using custom ShutdownStrategy:
org.apache.camel.impl.DefaultShutdownStrategy@d81c776
On Wed, Nov 13, 2013 at 9:53 AM, Jan Bernhardt <jb...@talend.com> wrote:
> Hi Camel Users,
>
> on the Camel Website it is only documented how to change the Default Timeout
> for a Camel-Route shutdown via Java Code [1], but I could not find any
> documentation of how to change the Timeout if I use Blueprint for my Camel
> Setup.
>
> Can someone please advice?
>
> I added the following bean to my blueprint file:
>
> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
> xmlns:camel="http://camel.apache.org/schema/blueprint">
> <bean id="shutdownStrategy"
> class="org.apache.camel.impl.DefaultShutdownStrategy">
> <property name="timeout" value="100" />
> </bean>
>
> <camel:camelContext >
> . . .
> </camel:camelContext>
>
> </blueprint>
>
> [1] http://camel.apache.org/graceful-shutdown.html
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Who-do-I-set-ShutdownStrategy-in-CemelContext-with-Blueprint-tp5743160.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen