You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Kamil Paśko <ka...@antologic.com> on 2019/08/29 11:44:54 UTC

Can I set a timeout for Component activation

Dear Karaf users,

Is it possible to set a timeout for Component activation?
Let’s say: If Component’s references are not satisfied withing 10 seconds, then Component should stop waiting for them.
I’d like to achieve the same behaviour as when an Exception is being thrown from activate method.

Kind regards,
Kamil

ODP: Can I set a timeout for Component activation

Posted by Kamil Paśko <ka...@antologic.com>.
Thanks!

Od: David Jencks
Wysłano: czwartek, 29 sierpnia 2019 15:34
Do: user@karaf.apache.org
Temat: Re: Can I set a timeout for Component activation

If you are asking about SCR/DS components, then no, and that’s a good thing. However it’s pretty easy to write a (separate) monitoring component with an optional reference to the component you’re waiting for and a timer. I’ve seen that there is a Felix health check project that might be useful for this but I don’t know what it does.

David Jencks 
Sent from my iPhone

On Aug 29, 2019, at 4:44 AM, Kamil Paśko <ka...@antologic.com> wrote:
Dear Karaf users,
 
Is it possible to set a timeout for Component activation?
Let’s say: If Component’s references are not satisfied withing 10 seconds, then Component should stop waiting for them.
I’d like to achieve the same behaviour as when an Exception is being thrown from activate method.
 
Kind regards,
Kamil


Re: Can I set a timeout for Component activation

Posted by David Jencks <da...@gmail.com>.
If you are asking about SCR/DS components, then no, and that’s a good thing. However it’s pretty easy to write a (separate) monitoring component with an optional reference to the component you’re waiting for and a timer. I’ve seen that there is a Felix health check project that might be useful for this but I don’t know what it does.

David Jencks 

Sent from my iPhone

> On Aug 29, 2019, at 4:44 AM, Kamil Paśko <ka...@antologic.com> wrote:
> 
> Dear Karaf users,
>  
> Is it possible to set a timeout for Component activation?
> Let’s say: If Component’s references are not satisfied withing 10 seconds, then Component should stop waiting for them.
> I’d like to achieve the same behaviour as when an Exception is being thrown from activate method.
>  
> Kind regards,
> Kamil