camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Esmann <michael_esm...@hotmail.com>
Subject Set shutdown timeout with blueprint
Date Thu, 21 Dec 2017 10:27:22 GMT
Hi,

I am using Apache Camel 2.17.3 and Karaf 4.0.6.
I would like to change the default shutdown startegy timeout with blueprint.
It works if I do it like this, with a hardcoded timeout value:

<bean id="MyShutdownStrategy" 
class="org.apache.camel.impl.DefaultShutdownStrategy">
     <property name="timeout" value="100"/>
</bean>

But I would like the timeout to be configurable with a property like this:

<bean id="MyShutdownStrategy" 
class="org.apache.camel.impl.DefaultShutdownStrategy">
     <property name="timeout" value="${camel.shutdownstrategy.timeout}"/>
</bean>

If I do it like this I get an error when deploying:

"Unable to start blueprint container for bundle MyBundle
org.osgi.service.blueprint.container.ComponentDefinitionException: Name 
MyShutdownStrategy is already instanciated as null and cannot be removed."

Even if I resolve this problem then I could be afraid that I will get 
another error because "timeout" property is a long value(?).

Any suggestions about how I can solve these problems?

Thanks,
Michael

Mime
View raw message