Can I set a timeout for Component activation

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Can I set a timeout for Component activation

kamilantlgc

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

Reply | Threaded
Open this post in threaded view
|

Re: Can I set a timeout for Component activation

David Jencks-2
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 <[hidden email]> 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

Reply | Threaded
Open this post in threaded view
|

ODP: Can I set a timeout for Component activation

kamilantlgc

Thanks!

 

Od: [hidden email]
Wysłano: czwartek, 29 sierpnia 2019 15:34
Do: [hidden email]
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 <[hidden email]> 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