Conversation
|
FWIW: AI says: Analysis of Validator Triggering in JSF 4.0 / Payara 7
In Jakarta EE 11 (JSF 4.0), Mojarra has become stricter about processing the tree, and if jakarta.faces.VALIDATE_EMPTY_FIELDS is Best Practices to Avoid Unnecessary Validation
ΓÇó How it works: When dynamic="true", PrimeFaces does not render the dialog's content into the component tree until the dialog is
ΓÇó Best Practice: Use process="@Form" for most save/submit actions. This ensures that only the inputs within the current form are
ΓÇó Safe Validators: Validators should check if the component is actually required in the current context (e.g., via ((UIInput) |
# Conflicts: # doc/release-notes/6.12-release-notes.md # doc/sphinx-guides/source/installation/prerequisites.rst
| Method method = resourceInfo.getResourceMethod(); | ||
| Class<?> clazz = resourceInfo.getResourceClass(); |
There was a problem hiding this comment.
A smaller fix instead of complete remodelling, only dropping the injection of ResourceInfo above:
// Jersey-specific, but avoids any reliance on @Context/@Inject of ResourceInfo,
// which is not available to CDI-managed providers on Payara 7.
ResourceMethod matched = requestContext.getUriInfo() instanceof ExtendedUriInfo extendedUriInfo
? extendedUriInfo.getMatchedResourceMethod()
: null;
if (matched == null) {
// Fail closed: a blocking filter must never let a request through it cannot classify.
logger.severe("Could not determine matched resource method for "
+ requestContext.getUriInfo().getRequestUri() + " - denying request.");
requestContext.abortWith(Response.status(Response.Status.SERVICE_UNAVAILABLE).entity(errorJson)
.type(jakarta.ws.rs.core.MediaType.APPLICATION_JSON).build());
return;
}
Invocable invocable = matched.getInvocable();
Method method = invocable.getHandlingMethod();
Class<?> clazz = invocable.getHandler().getHandlerClass();|
I also found a usage of - @Context
+ @Inject
protected HttpServletRequest httpRequest; |
Thanks for the catch! FWIW: The test was mocking the httpRequest and hence didn't catch this. |
| <p:tabView id="themeWidgetsTabView" rendered="#{themeWidgetFragment.editDv!=null}" widgetVar="content"> | ||
| <p:tabView id="themeWidgetsTabView" rendered="#{themeWidgetFragment.editDv!=null}" widgetVar="content" dynamic="true"> | ||
| <p:tab id="themeTab" title="#{bundle['dataverse.theme.title']}" rendered="#{not settingsWrapper.rootDataverseThemeDisabled or themeWidgetFragment.editDv.owner != null}"> | ||
| <p:fragment> |
There was a problem hiding this comment.
Just noting at the bottom that API tests failed but it's just a search test:
SearchIT.testSearchWithInvalidDateField
Hopefully merging the following PR will help:
Co-authored-by: Philip Durbin <philipdurbin@gmail.com>
Co-authored-by: landreev <leonid@hmdc.harvard.edu>
|
@pdurbin lol, I'm not making this up: rather than fixing it, they have |
|
Builds and deploys fine, main pages are looking ok so far. |
|
As I reported on slack earlier: A re-run of the standard Locust test shows that the "payara7 premium", first encountered when testing 6.10-RC appears to be gone. I.e., the results are back to what was recorded for 6.11-RC deployed under payara6 3 months ago. The spreadsheet reflects that it was still there when testing under payara7.2026.8 for 6.12-RC 10 days ago. The granular results and the html report are checked in in the usual place. I said in an earlier conversation about 7.2026.9 that I had a "glimmer of hope" that maybe it would fix this (still a mystery of a) problem; based on the updated components in it. But it really was a glimmer only. |
|
FWIW, some words from ai re: potential explanation behind the observed speedup. [warning: unfiltered/unverified, potential slop] Why Jersey Was Slowing Down Your JSF PagesEven if your JSF pages don't explicitly fetch data from a REST endpoint, Jersey sits in the global deployment pipeline of your web application. When you upgraded from Payara 6 to Payara 7 (the transition into Jakarta EE 11), application servers intensified how aggressively they scan packages for annotations. There are two massive reasons Jersey can cause a blanket overhead that ruins JSF page-load performance:
What Fixed It in Payara 7.2026.9?The Payara 7.2026.9 release explicitly resolved severe internal context and injection overhead bugs. Specifically, two major fixes directly correlate with the performance recovery you observed:
Because Payara resolved Jersey's thread-context pollution and streamlined how it hooks into the global request pipeline, your JSF pages are finally free from that hidden processing tax. |
|
Re:
we started dynamic scanning in 6.7 so the timing isn't right for this to be the issue unless there were other Payara changes that interacted. |
What this PR does / why we need it: This PR includes the basic update to Payara 7.2026.9 as well as fixes required due to changes in Payara and/or the libraries it uses. Issues identified/fixed so far include:
The PR also fixes some minor issues discovered when testing:
FWIW: I noticed a similar issue in the group creation page/dialog - a validation error, e.g. for null group name, pops up a warning in the messagePanel (grayed out behind the dialog in this case) and cancel doesn't clear it. As it seems odd to put a warning in the grayed-out background to begin with, I didn't just add code to update the messagePanel on cancel (also more work than with the account page since the cancel is not a p:commandButton here).
Which issue(s) this PR closes:
Special notes for your reviewer: FWIW: Azul mentions the DynamicFeature approach in a blog post (although the post is primarily about simpler, but less flexible approaches). It sounds like this is more of a pure JAX-RS approach that relying on @Inject, and it should be slightly more efficient that we had (since api endpoint paths are all calculated once at startup instead of happening repeatedly during the filtering (for whatever api call is made). I think a key benefit of this fix is that it retains the idea of getting the path from JAX-RS itself, rather than our code trying to infer what the path is from the URL as was the case < v6.7).
Suggestions on how to test this: As this changes the API Blocking filter, testing that the admin API etc. are still blocked by the settings is important (and not just by the proxy), though I don't think there will be any issues. The main change was to when the api paths are calculated (not how, which we had to update for 6.7, and the code to implement the policy moved to a new class but isn't really different). I haven't seen any issues in my testing.
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Is there a release notes update needed for this change?:
Additional documentation: