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

Support variable substitution in deployment descriptors and annotations #3963

Closed
NottyCode opened this issue Jun 13, 2018 · 4 comments
Closed

Comments

@NottyCode
Copy link
Member

Glassfish and payara allow for variables to be specified in deployment descriptors and annotation equivilents. This is documented here

This is non-portable if used, but it does mean that you can override the configuration at deployment time. In Liberty this is done by doing an override of the deployment descriptor in server.xml, but allowing variable substitution would be an alternative that might be simpler, especially in fat jar or docker deployment scenarios.

@NottyCode
Copy link
Member Author

On a call this was discussed and it was agreed this seemed like a good idea with the following observations:

  • We should look at how we can optionally integrate this with MP config. This shouldn't be a hard requirement, but an optional one.
  • We should look at providing default values for the variable substitution
  • We should ensure that if we can't resolve a variable something sensible happens at app startup time.
  • We need to look at dynamic configuration to ensure that variable changing works correctly. Ideally it wouldn't force an app restart.

@NottyCode
Copy link
Member Author

Closing since we found an alternative solution for the original issue that prompted this and we have significant concerns about how safe doing this would be.

@NottyCode NottyCode added this to Resolved Do Nothing in Design Issues Jul 16, 2019
@maroschutte
Copy link

maroschutte commented Oct 28, 2020

Hi @NottyCode ,

I found this issue because I wanted this exact feature. For me the reason is that in local development my eclipse IDE will edit the server.xml with an tag once I 'add' my EAR project to the server. So if I need for instance an application-bnd tag with security-roles, I would have to do that manually. But if I put these tags in the ibm-application-bnd.xml, I can't use variables for something that is environment specific like the group name=".." attribute.

Now my questions are:

  • is this similar to the original issue that you refer to?
  • what alternative solution did you use?
  • what are the safety concerns you mention ?

@maroschutte
Copy link

I solved this using the configDropins/overrides folder [1] where I use the id attribute of my enterpriseapplication to add to its configuration.

[1] https://www.ibm.com/support/knowledgecenter/SSEQTP_liberty/com.ibm.websphere.wlp.doc/ae/twlp_setup_dropins.html

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

No branches or pull requests

2 participants