-
Notifications
You must be signed in to change notification settings - Fork 477
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
As a developer, I want changes I make to the front end to be visible when I deploy from Netbeans #6953
Comments
Here's a workaround to avoid accidentally checking in a change to web.xml.
If you actually need to make an edit to web.xml, you must put it back to normal with this:
References: |
As @pdurbin already mentioned in #7457, using MicroProfile Config API would be an easy way to completely mitigate this problem without recompiling and just changing a config setting. When MicroProfile Config API 2.0 gets released, it's even easier by switching profiles and providing different setting inside those accordingly. See eclipse/microprofile-config#418 Problem: this is not yet supported with Payara, |
@poikilotherm we talked about this issue in sprint planning today and I just noticed your "Test using MPCONFIG variable substitution in web.xml" commit above. Does this actually work?!? I'd love a fix for this and if MPCONFIG can come to the rescue, that would be just fine with me! Also, please note that the original description of this issue has been updated. We figured out we only need to comment out FACELETS_REFRESH_PERIOD. |
Nope. Like I wrote above, for context params variable substitution is not supported in Payara. We might open an enhancement request and vote vote vote, especially for stuff like a configurable context root etc. |
@pdurbin as requested, I opened payara/Payara#5157. Remember, we will need to vote vote vote vote vote vote to make this happen. So spread the word... |
@poikilotherm thanks! Meanwhile, @scolapasta found what looks like a good fix. Here's the change we need to make:
Then, in domain.xml, developers would put this (positive 1):
Production installations would put this (negative 1):
For more on these numbers from https://javadoc.io/static/jakarta.faces/jakarta.faces-api/2.3.2/javax/faces/application/ViewHandler.html#FACELETS_REFRESH_PERIOD_PARAM_NAME
|
@pdurbin I gave this a shot today in my reproducer project with Arquillian. 🥳 Good news: WE CAN USE (And since 5.2021.1 we can also give a default value via I could not test so far if we can update this setting dynamically. Most likely you will need to redeploy, as the context is initialized once and an update would need a programmatic call to change to context. (If we want this, we might take a look at manipulating the context from the Dataverse codebase...) Note: using a variable here makes this not very portable, as var substitution is not part of the Jakarta EE standard and violates the TCK checks. But I don't think we care 😸 |
@poikilotherm that's awesome. I don't think it needs to be set dynamically. Would you want to make a pull request? (I suppose this includes an upgrade to Payara 5.2021.1.) Or should we go with the JVM approach (which I'm comfortable doing.) |
@poikilotherm I brought this up in sprint planning today and there is little desire to add a JVM option. Pull request #7695 looks great but requires an update to Payara. Did you say you might be able to make a similar pull request that doesn't require this upgrade? Thanks. |
Aye. PRs forthcoming. |
…l and a docs hint. IQSS#6953
…yara 5.2020.6 IQSS#6953 Reverts commit ca35411 Due to the nature of the application server, when the web app context is initialised, it cannot yet access the deployments default MPCONFIG source within META-INF/microprofile-config.properties. As a consequence, as long as we do not update to Payara 5.2021.1, we cannot provide sane defaults within the variable. That means that every installation would need to set the variables in MPCONFIG sources available at startup time and before the deployment finished: any are possible that are baked into Payara. As this doesn't seem feasible, this PR will be blocked until IQSS#7700 is resolved.
While it is possible to use the variable substitution, we cannot apply defaults from within our apps codebase. I put an extensive explanation in 48d6501 (tested this in deployments to verify). This is also true for all the other places we use the variable substitution in. Payara resolved this with payara/Payara#5089, included in 5.2021.1. We will need to either wait until we go for 5.2021.1+ in #7700 / #7701 or tell everyone to set the vars 😄 (I'm sure what the answer is...) Sorry @pdurbin. Guess we should either bribe @scolapasta or wait... |
[Formerly known as As a developer, I want changes I make to the front end to be visible when I deploy from Netbeans]
Ever since 5f99037 developers have had to remember to comment out part of
src/main/webapp/WEB-INF/web.xml
in order for changes they are making to the front end to be visible when deploying from Netbeans. At the very least we should document this in the dev guide. This is the part that has to be commented out (but not committed, of course):Even better would be to somehow fix it so developers don't have to comment this out but I'd be satisfied with some docs for now.
[GPD - 2020-12-16 - edited the original description -
Original said to also comment out
but doing so causes flash messages to become "sticky" - see issue #7305]
The text was updated successfully, but these errors were encountered: