Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quarkus needs the ability to change the ClassLoader #4025

Open
stuartwdouglas opened this issue Jul 20, 2021 · 3 comments
Open

Quarkus needs the ability to change the ClassLoader #4025

stuartwdouglas opened this issue Jul 20, 2021 · 3 comments
Milestone

Comments

@stuartwdouglas
Copy link
Contributor

Describe the feature

Quarkus Development mode works by dropping and re-creating a class loader every time code is changed. As this is triggered by a HTTP request vert.x is not restarted each time, so the HTTP requests work as expected.

This is causing issues such as quarkusio/quarkus#18299 where vert.x is hanging onto the original ClassLoader that was passed in at creation time. With Vert.x 3 we worked around this by manually scheduling a task on each IO thread that updated the Thread context ClassLoader, however this no longer works in Vert.x 4, as Vert.x is resetting the CL each time.

For now we are likely going to work around it via vertx.disableTCCL=true and filtering out the resulting warnings.

In terms of implementation I was thinking maybe instead of Vert.x taking a ClassLoader it could take a Supplier, and this could be use to obtain the correct TCCL each time.

Contribution

I can implement it if there is consensus on what it should look like.

@vietj
Copy link
Member

vietj commented Jul 21, 2021

I am assuming this is the class loader hold by the Context that is used to be set as TCCL ?

@vietj vietj added this to the 4.2.0 milestone Jul 21, 2021
@stuartwdouglas
Copy link
Contributor Author

Yes, although ideally this will apply everywhere so that the original CL does not leak.

@vietj
Copy link
Member

vietj commented Jul 22, 2021

would the ability to disable the TCCL with a flag in VertxOptions work (instead of using a system property) ?

@tsegismont tsegismont modified the milestones: 4.2.0, 4.3.0 Oct 14, 2021
@vietj vietj modified the milestones: 4.3.0, 4.3.1 May 12, 2022
@vietj vietj modified the milestones: 4.3.1, 4.3.2 May 25, 2022
@vietj vietj modified the milestones: 4.3.2, 4.3.3 Jul 6, 2022
@vietj vietj modified the milestones: 4.3.3, 4.3.4 Aug 9, 2022
@vietj vietj modified the milestones: 4.3.4, 4.3.5 Oct 1, 2022
@vietj vietj modified the milestones: 4.3.5, 4.4.0 Nov 18, 2022
@vietj vietj modified the milestones: 4.4.0, 4.4.1 Mar 2, 2023
@vietj vietj modified the milestones: 4.4.1, 4.4.2 Mar 31, 2023
@vietj vietj modified the milestones: 4.4.2, 4.4.3 May 12, 2023
@vietj vietj modified the milestones: 4.4.3, 4.4.4-SNAPSHOT, 4.4.4 Jun 7, 2023
@vietj vietj removed this from the 4.4.4 milestone Jun 22, 2023
@vietj vietj added this to the 4.4.5 milestone Jun 22, 2023
@vietj vietj modified the milestones: 4.4.5, 4.4.6 Aug 30, 2023
@vietj vietj modified the milestones: 4.4.6, 4.5.0 Sep 12, 2023
@vietj vietj modified the milestones: 4.5.0, 4.5.1 Nov 15, 2023
@vietj vietj modified the milestones: 4.5.1, 4.5.2 Dec 13, 2023
@vietj vietj modified the milestones: 4.5.2, 4.5.3 Jan 30, 2024
@vietj vietj modified the milestones: 4.5.3, 4.5.4 Feb 6, 2024
@vietj vietj modified the milestones: 4.5.4, 4.5.5 Feb 22, 2024
@vietj vietj modified the milestones: 4.5.5, 4.5.6 Mar 14, 2024
@vietj vietj modified the milestones: 4.5.6, 4.5.7, 4.5.8 Mar 21, 2024
@vietj vietj modified the milestones: 4.5.8, 4.5.9 May 24, 2024
@vietj vietj modified the milestones: 4.5.9, 4.5.10 Jul 17, 2024
@vietj vietj modified the milestones: 4.5.10, 4.5.11 Sep 4, 2024
@vietj vietj modified the milestones: 4.5.11, 4.5.12 Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants