+1 for a @RequireFelixHealthCheck annotation. I think we then also need an annotation for requiring the health check web console plugin, or do you see a way to automate this when web console is present.
I just also checked where we could put the annotations. We have the bundles API and annotation. This makes me wonder if we could put the annotations into the API bundle. WDYT? Christian Am Sa., 26. Jan. 2019 um 00:04 Uhr schrieb Raymond Auge < raymond.a...@liferay.com>: > So, I wasn't suggesting to make an explicit requirement needed for this, > but rather a convenience annotation similar to > > @RequireJaxrsWhiteboard [1] > > which is an annotation that I can use if I want to assert that the > deployment will calculate that I want a JAXRS whiteboard dpeloyed. > > :) > > This is a way to build a deployment descriptor into what you might refer to > as an "Application bundle" which might be a package-info.java containing: > > @RequireJaxrsWhiteboard > @RequireCDIExtender > @RequireGogo > @RequireFelixHealthCheck > package com.acme.application; > > This is in place of having to write out some deployment descriptor > somewhere in like a bndrun or feature file. The resolver can simple resolve > those from some set of repositories with no other input other than your > application bundle. > > Sincerely, > - Ray > > [1] > > https://osgi.org/specification/osgi.cmpn/7.0.0/service.jaxrs.html#org.osgi.service.jaxrs.whiteboard.annotations.RequireJaxrsWhiteboard > > On Fri, Jan 25, 2019 at 4:50 PM Georg Henzler <fe...@ghenzler.de> wrote: > > > Having thought a bit more about this, for most bundles implementing a > > health check it is more of an optional extension. This means bundle-XYZ > > primarily will provide the functionality XYZ with an optional health > > check testing state around functionality XYZ in action. Usually you > > would even make the package dependency to org.apache.felix.hc.api > > optional with the result that > > > > - if bundle org.apache.sling.hc.api is *not* available, > > functionality XYZ is still fully working > > - if bundle org.apache.sling.hc.api *is* available, > > functionality XYZ is working and can be checked via provided HC(s) > > > > So I think it's fine to start without an explicitly declared capability, > > we can add this easily later if desired. > > > > -Georg > > > > > > On 2019-01-21 15:06, Raymond Auge wrote: > > > On Mon, Jan 21, 2019 at 2:19 AM Georg Henzler <fe...@ghenzler.de> > > > wrote: > > > > > >> Hi Ray, > > >> > > >> so your suggestion is more about referring to a capability like > > >> "org.apache.felix.healthcheck" by using requirements in other bundles > > >> than writing a health check that ensures the framework provides a > > >> certain non-healthcheck-related capability. > > >> > > > > > > Precisely, > > > > > > - Ray > > > > > > > > >> > > >> > I can probably try it out and submit the proper cap&req. > > >> > > >> that would be great! > > >> > > >> -Georg > > >> > > >> > > > > > -- > *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile> > (@rotty3000) > Senior Software Architect *Liferay, Inc.* <http://www.liferay.com> > (@Liferay) > Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org> > (@OSGiAlliance) > -- -- Christian Schneider http://www.liquid-reality.de Computer Scientist http://www.adobe.com