Skip to content
This repository has been archived by the owner on Dec 3, 2021. It is now read-only.

fix: make Jettys threads use gravitee context class loader #222

Merged
merged 1 commit into from Nov 3, 2021

Conversation

marcambier
Copy link
Contributor

gravitee-io/issues#6290
gravitee-io/issues#6494

Jetty version has been upgraded in this commit : gravitee-io/gravitee-bom@6eb8566
It introduced mutliple regressions in APIM.

Since 9.4.37, Jettys threads classloaders have been refactored to fix a leak (see jetty/jetty.project#5894).
After this fix, threads classpath is override with local classpath, so it does not contain gravitee context class loader nomore (see https://github.com/eclipse/jetty.project/pull/5894/files#diff-6f0181889aa765771dd358e58fc07e2a7d7bfa44c451359e34e3eea574a5a79cR696).

Created a JettyQueuedThreadPool, to override Jetty's default QueuedThreadPool and give the gravitee context class loader to created threads.

@marcambier marcambier requested a review from a team November 3, 2021 09:50
Jetty version has been upgraded in this commit : gravitee-io/gravitee-bom@6eb8566
It introduced mutliple regressions in APIM.

Since 9.4.37, Jettys threads classloaders have been refactored to fix a leak (see jetty/jetty.project#5894).
After this fix, threads classpath is override with local classpath, so it does not contain gravitee context class loader nomore (see https://github.com/eclipse/jetty.project/pull/5894/files#diff-6f0181889aa765771dd358e58fc07e2a7d7bfa44c451359e34e3eea574a5a79cR696).

Created a JettyQueuedThreadPool, to override Jetty's default QueuedThreadPool and give the gravitee context class loader to created threads.
@sonarcloud
Copy link

sonarcloud bot commented Nov 3, 2021

[Gravitee.io APIM - UI Portal] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@sonarcloud
Copy link

sonarcloud bot commented Nov 3, 2021

[Gravitee.io APIM - UI Console] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@graviteeio
Copy link
Contributor

Gravitee.io Automatic Deployment

Congrats, all the CI steps were 🟢 . The Bot was able to deploy the build of this PR, so you can now try it directly here! 🚀

Notes: The deployed app is linked to the management API of the Element Zero team's environment.

@marcambier marcambier merged commit 7317b95 into 3.10.x Nov 3, 2021
@marcambier marcambier deleted the fix/fixJettyClassPath branch November 3, 2021 14:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants