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

Bertrand Delacretaz commented on SLING-3624:
--------------------------------------------

Thanks for your contribution, committed in http://svn.apache.org/r1614676

I added a sample AnnotatedHealthCheckSample that uses the annotation.

For tests, best might be to expand the it module tests to use the samples 
bundle and verify that its health checks are present including this 
AnnotatedHealthCheckSample

Leaving this issue open as I suppose you'll want to add support for the 
SLING-3744 cron expression. We could then convert the AsyncHealthCheckSample to 
use the annotation as well.

Also, I don't see the MBean name in the SlingHealthCheck annotation.

> Add SlingHealthCheck annotation
> -------------------------------
>
>                 Key: SLING-3624
>                 URL: https://issues.apache.org/jira/browse/SLING-3624
>             Project: Sling
>          Issue Type: Improvement
>          Components: Health Check
>    Affects Versions: Health Check Core 1.1.0
>            Reporter: Bjoern Weide
>            Priority: Minor
>             Fix For: Health Check Core 1.1.2
>
>         Attachments: slinghealthcheck_annotation.txt
>
>
> Add a SlingHealthCheck annotation (similar to SlingServlet). The metatype 
> property should set to true per default since its probably common to 
> configure healthchecks. Usage examples:
> {code:title=Examples|borderStyle=solid}
> @SlingHealthCheck(name = BundlesStartedCheck.HC_NAME, label = "Apache Sling 
> Health Check - " + BundlesStartedCheck.HC_NAME, description = "Checks whether 
> all bundles are started.", tags = "osgi")
> @SlingHealthCheck(name = DiskSpaceCheck.HC_NAME, label = "Apache Sling Health 
> Check - " + DiskSpaceCheck.HC_NAME,
>         description = "Checks whether enough disk space is available.", tags 
> = "resources", configurationFactory = true,
>         configurationPolicy = ConfigurationPolicy.REQUIRE)
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to