I have a test command which gets and displays some port values for the specified instance. Observations...
What works: tokens resolved for the currently running server (whether DAS, or instance) for server, <server>-config, domain
asadmin create-local-instance instance1
asadmin start-local-instance instance1
asadmin --port 24848 test-instance instance1
http-listener-1 port= 7777
http-listener-2 port= 28181
admin-listener port= 24848
What doesn't work:
1) tokens for another instance when running on DAS
2) cluster and <cluster>-config system-properties are ignored
asadmin test-instance instance1
http-listener-1 port= 3333 <---- uh oh system-property defined for DAS
http-listener-2 port= ${HTTP_SSL_LISTENER_PORT}
admin-listener port= ${ASADMIN_LISTENER_PORT}
SystemTasks (core\kernel) sets the server, <server>-config, domain system-property for currently running server in System.setProperty in the correct precedence.
TranslatedConfigView calls System.getProperty to find and return the value for ${some property}
Instead of saving just the system-property for the currently running server, I think we need to save system-property for all server, <server>-config, cluster, <cluster>-config element.
Or is there some other way?