My test bed is WF 36.0.1.Final.
I do have this:
/subsystem=ee:write-attribute(name=annotation-property-replacement,value=true)
in my standalone or my BWF cli (also verified via spelunking in generated BWF artifact).
I tried multiple variations of (in a ApplicationScoped .java file) :
@DataSourceDefinition(
name = "java:/SillyDS",
className = "blah.blah",
url = "hard coded for testing",
user = "${env.DB_USER}",
password = "hardcoded for testing"
)
Also tried this:
user = "${DB_USER}",
Also I have a startup observer that prints out System.getenv("DB_USER") -- value is there and set to the expected thing.
It doesn't seem like @DataSourceDefinition can do this type of ENV var expansion in BWF (hollowed) or standalone WF. Or perhaps I am doing something wrong?
NOTE:
I don't think it is related, but I also set it to 'true' the following: 'jboss-descriptor-property-replacement' and 'spec-descriptory-property-replacement' .
AND, the syntax:
"${env.DB_USER}"
works as expected using WF CLI constructs. Or better said, defining an instance level datasource will grab/expand env vars.