Skip to content

FISH-12192 bugfix: initialize WebContainer before HK2 class scanning so Rest APIs… - #7902

Open
lprimak wants to merge 1 commit into
payara:mainfrom
flowlogix:fix-web-container
Open

lprimak wants to merge 1 commit into
payara:mainfrom
flowlogix:fix-web-container

Conversation

@lprimak

@lprimak lprimak commented Jan 26, 2026

Copy link
Copy Markdown
Contributor

… get loaded properly

fixes #7655

Description

This is a bugfix.

This PR forces loading of WebContainer (if exists) prior to HK2 class scanning.
If this is not done, classes such as @RegisterRestClient that are not directly CDI beans (but are @stereotypes) will not correctly register as valid CDI beans, and deployments will fail in postboot or when starting the server with applications already deployed.

lprimak added a commit to flowlogix/Payara that referenced this pull request Jan 26, 2026
@kalinchan kalinchan added the PR: CLA CLA submitted on PR by the contributor label Jan 29, 2026
@Pandrex247 Pandrex247 changed the title bugfix: initialze WebContainer before HK2 class scanning so Rest APIs… FISH-12945 bugfix: initialze WebContainer before HK2 class scanning so Rest APIs… Feb 6, 2026
@Pandrex247 Pandrex247 changed the title FISH-12945 bugfix: initialze WebContainer before HK2 class scanning so Rest APIs… FISH-12192 bugfix: initialize WebContainer before HK2 class scanning so Rest APIs… Feb 6, 2026
@Pandrex247

Copy link
Copy Markdown
Member

FYI: Conflicts

@lprimak

lprimak commented Feb 6, 2026

Copy link
Copy Markdown
Contributor Author

Conflicts resolved, thanks!

@lprimak

lprimak commented Apr 27, 2026

Copy link
Copy Markdown
Contributor Author

@Pandrex247 Any updates on this? It's the "next on the priority list" of my PRs.

Thank you :)

@lprimak

lprimak commented Jul 4, 2026

Copy link
Copy Markdown
Contributor Author

@Pandrex247 @stian-sigvartsen
This one is up next :) It's been out for a while and works very well :)

@lprimak

lprimak commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

ping...thank you!

@lprimak
lprimak force-pushed the fix-web-container branch from 31c8009 to 8543d9b Compare August 25, 2026 02:17
@lprimak

lprimak commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

@Pandrex247 @stian-sigvartsen Please bump... thank you

@Pandrex247

Copy link
Copy Markdown
Member

Need to sit down with this and a debugger (and run through the reproducer).
From a quick eyeballing: won't this cause the web container to start for everything including things which didn't cause it to before e.g. EJB JARs?

@lprimak

lprimak commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

No. This just loads bundle. This doesn't start anything.

@Pandrex247

Copy link
Copy Markdown
Member

This doesn't start anything.

Surely it does? Getting the service will call its post construct, which will create and start a web container

@lprimak

lprimak commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

I believe that in this code path, the startup level is below the one that triggers post-construct callbacks.

But in any case, this should not introduce any additional issues, as web containers "starts" in similar sequence even without the "triggering" getService() call - i.e. no bad sideffects,
but again, the more testing the better :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: CLA CLA submitted on PR by the contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug Report: MP Rest Client is not deployed on Payara startup only/FISH-12192

3 participants