0

I'm trying to generalize Wildfly (8.2 Final) XML configuration in order to have a single configuration XML file with references of system properties (${what.ever.value.key.from.proerties}) in order to distinguish dev. and prod. env. by different .properties-files.

Worked fine till I've rich the undertow subsystem. When I try to reference value from property for the alias attribute of vertual host configuration - it doesn't seem to recognize and resolve at this position the key with value from .properties.

A small snippet of Wildfly XML configuration to show what I mean exactly:

<subsystem xmlns="urn:jboss:domain:undertow:1.2">
    ...
    <server name="default-server">
        ...
        <host name="default-host" alias="${undertow.virtual.host.alias.mydomain}">
            ...
        </host>
    </server>
    ...
</subsystem>

And corresponding entries in dev.properties file:

undertow.virtual.host.alias.mydomain=localhost

and in prod.properties file:

undertow.virtual.host.alias.mydomain=www.mydomain.com

The value of the key 'undertow.virtual.host.alias.mydomain' will not be substituted. What do I do wrong here? Or such functionality does not support for alias attribute?

Thanks in advance!

Korvin
  • 35
  • 1
  • 7

1 Answers1

1

That attribute doesn't:

"alias" => {
    "type" => LIST,
    "description" => "Aliases for the host",
    "expressions-allowed" => false,
    "nillable" => true,
    "value-type" => STRING,
    "access-type" => "read-write",
    "storage" => "configuration",
    "restart-required" => "all-services"
}

You can use the read-resource-description operation to see if expressions are allowed. For example /subsystem=undertow/server=default-server/host=default-host:read-resource-description for this resource.

You could also look at the wildscribe site which should have most versions available.

James R. Perkins
  • 16,800
  • 44
  • 60
  • we could actually improve this. @korvin can you report and enhancement to WildFly jira https://issues.jboss.org/browse/WFLY – Tomaz Cerar Jul 10 '15 at 09:33
  • @James R. Perkins - thank you, now it is clear. Do you know is it planed to improve that attribute in order to allow expressions? Could be sueful, imho. – Korvin Jul 11 '15 at 22:09
  • @Korvin sure, why not, just report enhancement into jira I linked above. Otherwise it can quickly fall under the radar. – Tomaz Cerar Jul 13 '15 at 10:28