Skip to content

Commit

Permalink
revert(config): make web.xml variable substitution compatible with Pa…
Browse files Browse the repository at this point in the history
…yara 5.2020.6 #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 #7700 is
resolved.
  • Loading branch information
poikilotherm committed Mar 26, 2021
1 parent cc022cf commit 48d6501
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
10 changes: 1 addition & 9 deletions src/main/resources/META-INF/microprofile-config.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,4 @@
dataverse.db.host=localhost
dataverse.db.port=5432
dataverse.db.user=dataverse
dataverse.db.name=dataverse

# WEB.XML / JSF
dataverse.jsf.project-stage=Production
dataverse.jsf.primefaces.theme=bootstrap
dataverse.jsf.empty-string-null=true
dataverse.jsf.skip-comments=true
dataverse.jsf.buffer-size=102400
dataverse.jsf.refresh-period=-1
dataverse.db.name=dataverse
12 changes: 6 additions & 6 deletions src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<!-- Uses Microprofile Config to replace at runtime. Not standardized, Payara App Server specific. -->
<param-value>${MPCONFIG=dataverse.jsf.project-stage}</param-value>
<param-value>${MPCONFIG=dataverse.jsf.project-stage:Production}</param-value>
</context-param>
<context-param>
<param-name>primefaces.THEME</param-name>
<!-- Uses Microprofile Config to replace at runtime. Not standardized, Payara App Server specific. -->
<param-value>${MPCONFIG=dataverse.jsf.primefaces.theme}</param-value>
<param-value>${MPCONFIG=dataverse.jsf.primefaces.theme:bootstrap}</param-value>
</context-param>
<!-- example of a hard-coded PrimePush configuration: -->
<!-- context-param -->
Expand All @@ -46,22 +46,22 @@
javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL
</param-name>
<!-- Uses Microprofile Config to replace at runtime. Not standardized, Payara App Server specific. -->
<param-value>${MPCONFIG=dataverse.jsf.empty-string-null}</param-value>
<param-value>${MPCONFIG=dataverse.jsf.empty-string-null:true}</param-value>
</context-param>
<context-param>
<param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
<!-- Uses Microprofile Config to replace at runtime. Not standardized, Payara App Server specific. -->
<param-value>${MPCONFIG=dataverse.jsf.skip-comments}</param-value>
<param-value>${MPCONFIG=dataverse.jsf.skip-comments:true}</param-value>
</context-param>
<context-param>
<param-name>javax.faces.FACELETS_BUFFER_SIZE</param-name>
<!-- Uses Microprofile Config to replace at runtime. Not standardized, Payara App Server specific. -->
<param-value>${MPCONFIG=dataverse.jsf.buffer-size}</param-value>
<param-value>${MPCONFIG=dataverse.jsf.buffer-size:102400}</param-value>
</context-param>
<context-param>
<param-name>javax.faces.FACELETS_REFRESH_PERIOD</param-name>
<!-- Uses Microprofile Config to replace at runtime. Not standardized, Payara App Server specific. -->
<param-value>${MPCONFIG=dataverse.jsf.refresh-period}</param-value>
<param-value>${MPCONFIG=dataverse.jsf.refresh-period:-1}</param-value>
</context-param>
<!-- JSF mapping -->
<filter>
Expand Down

0 comments on commit 48d6501

Please sign in to comment.