[ 
https://issues.apache.org/jira/browse/SLING-3207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13806633#comment-13806633
 ] 

Bertrand Delacretaz commented on SLING-3207:
--------------------------------------------

Thinking about this a bit more, the "when to execute a health check" issue is 
not related to JMX only, it's the exact same problem when you look at them via 
the webconsole or programatically. I'll discuss this on the dev this.

> Rethinking the mbean registration for health checks
> ---------------------------------------------------
>
>                 Key: SLING-3207
>                 URL: https://issues.apache.org/jira/browse/SLING-3207
>             Project: Sling
>          Issue Type: Improvement
>          Components: Health Check
>    Affects Versions: Health Check JMX 1.0.6
>            Reporter: Carsten Ziegeler
>             Fix For: Health Check JMX 1.0.8
>
>
> RIght now, the mbeans registered for a health check promote a set of 
> attributes (status, log messages etc). Whenever a client requests the 
> attributes, the health check is executed first, and the new result is 
> returned.
> For one this is a little bit unexpected as requesting attributes should not 
> alter the state of the mbean and secondly, there is no way to define when a 
> check should be done and to get the exact same result back on two consecutive 
> calls.
> I suggest that the attributes are changed to return the last result, maybe 
> together with a timestamp when this result was taken and an execute method to 
> actually execute the health check and update the attributes.
> This gives more control for the client while at the same time removes the 
> unexpected behaviour



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to