[ https://issues.apache.org/jira/browse/FELIX-6565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17681343#comment-17681343 ]
Amit Mondal commented on FELIX-6565: ------------------------------------ I just added a new commit to update to HTTP whiteboard. There was no runtime issue to use the old pattern of using {{HttpService}} to register the servlets, but dependency to {{HttpService}} introduces a mandatory requirement to {{osgi.service}} namespace. {{osgi.service;filter:="(objectClass=org.osgi.service.http.HttpService)";effective:=active}} This requirement doesn't play any role in the runtime but it plays a significant role in composing systems. If we use bndtools and use this bundle as an initial requirement to resolve the dependencies, this will fail as the {{requirement}} needs to be satisfied first. We also use similar mechanism in our company to compose systems using {{OSGi Resolver}} which would not work if this bundle comprises such mandatory dependency to {{{}HttpService{}}}. That's why, a cleaner approach would be to go for *OSGi HTTP Whiteboard* where dependency to {{HttpService}} is not required at all, and it now optionally requires HTTP whiteboard. > Make OSGi HTTP Package dependency optional in HealthCheck core bundle > --------------------------------------------------------------------- > > Key: FELIX-6565 > URL: https://issues.apache.org/jira/browse/FELIX-6565 > Project: Felix > Issue Type: Improvement > Components: Health Checks > Reporter: Amit Mondal > Priority: Minor > > Currently, the Felix HealthCheck core bundle mandatorily imports > org.osgi.service.http package which is used by > {_}*HealthCheckExecutorServlet*{_}. In our current system, we don't use HTTP > at all, hence, neither _*javax.servlet*_ nor _*org.osgi.service.http*_ is > available in the runtime. Hence, the health checks don't work as it > mandatorily requires _*org.osgi.service.http*_ package dependency. Since, > _*HealthCheckExecutorServlet*_ is not a core component for the health checks, > we can consider the following options: > # Provide a separate bundle with HTTP dependency (invasive approach) > # Make _*org.osgi.service.http*_ an optional package for HealthCheck core > and conditionally enable _*HealthCheckExecutorServlet*_ component if > _*org.osgi.service.http*_ is wired to the HealthCheck core bundle (similar > approach we did for Quartz to check the availability of Quartz in runtime) -- This message was sent by Atlassian Jira (v8.20.10#820010)