Smutje
Smutje

Reputation: 18123

Wildfly, WAR and virtual hosts

currently I have a problem with the following situation:

  1. In Wildfly, virtual hosts are defined in the standalone.xml file.
  2. To bind a deployed .war-Artifact to a virtual host, the virtual host is placed in the jboss-web.xml of the .war-Artifact.

which leads to the fact that the .war-Artifacts depend on the current (Wildfly) environment to work and are therefore not exchangeable, e.g. to store in a artifact store like Artifactory.

Is there a way to overcome the problem or are even the assumptions 1 and/or 2 wrong in the first place?

Upvotes: 2

Views: 381

Answers (1)

Smutje
Smutje

Reputation: 18123

Obviously and unbeknownst to me there is a way to use placeholders in certain deployment descriptors:

jboss-descriptor-property-replacement is used to enable or disable property replacement in the following descriptors:

jboss-ejb3.xml
jboss-app.xml
jboss-web.xml
*-jms.xml
*-ds.xml 

respectively

spec-descriptor-property-replacement is used to enable or disable property replacement in the following descriptors:

ejb-jar.xml
persistence.xml 

(https://access.redhat.com/documentation/en-us/jboss_enterprise_application_platform/6.2/html/security_guide/enablingdisabling_descriptor_based_property_replacement1)

Upvotes: 2

Related Questions