[ 
https://issues.apache.org/jira/browse/TOMEE-4728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Markus Jung reassigned TOMEE-4728:
----------------------------------

    Assignee: Markus Jung

> MicroProfile Health endpoint runs the providers of a declared JAX-RS 
> application
> --------------------------------------------------------------------------------
>
>                 Key: TOMEE-4728
>                 URL: https://issues.apache.org/jira/browse/TOMEE-4728
>             Project: TomEE
>          Issue Type: Bug
>            Reporter: Markus Jung
>            Assignee: Markus Jung
>            Priority: Major
>             Fix For: 11.0.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Since TOMEE-4716, {{RESTService}} deploys the MicroProfile Health endpoint 
> ({{MicroProfileHealthChecksEndpoint}}) in its own {{InternalApplication}} at 
> the context root when the webapp declares JAX-RS applications, but none at 
> the context root.
> That application is deployed with {{additionalProviders}}, the collection 
> that the loop over the declared applications fills with the providers each 
> one lists in {{getClasses()}} / {{getSingletons()}}. So a provider meant for 
> one application, e.g. an unbound {{@PreMatching}} {{ContainerRequestFilter}} 
> of an application at {{/api}}, also runs for {{/health}}, {{/health/live}}, 
> {{/health/ready}} and {{/health/started}}.
> With a filter that aborts every request it doesn't recognize, all health 
> endpoints answer with that filter's response instead of the health checks. 
> Seen with an MCP server application whose pre-matching filter answers {{503}} 
> with an empty body outside its own application: every {{/health}} request 
> returns {{503}}, and the endpoint method never runs.
> Fix: deploy the container application with only the webapp-wide providers, 
> those collected before the declared applications add their own.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to