Consider the scenario where a developer wants to set the hostname of a platform as a system property when realizing an application.
When they define the schema for the application they may not know, care or don't want to be bound to the actual platform. Furthermore the platform on which they want to realize the application may not yet be created.
The challenge we have at the moment is that we have no way of parameterizing system properties or for that matter Options, that may need to be resolved during realization time. This forces developers to a). make Schema's dependent on specific Platforms, which is against the underlying objectives of Schemas in the first place and b). define platforms before schemas, ie: "correctly order their code", when in reality it is not required.
NOTE: This also removes the requirement for the PlatformAware interface. See #218.
Ultimately we should provide support for both eager ($-based expressions) and lazy (#-based expression) evaluation. Eager evaluation would occur prior to an Application/Platform etc being realized. Lazy would occur (for Java applications only), after a Java Application was realized. eg: Once the JavaApplicationLauncher has started we could perform another pass of expression evaluation for lazily defined expressions in System Properties.
We could also use this for generating unique ports.
eg:
Consider the scenario where a developer wants to set the hostname of a platform as a system property when realizing an application.
When they define the schema for the application they may not know, care or don't want to be bound to the actual platform. Furthermore the platform on which they want to realize the application may not yet be created.
The challenge we have at the moment is that we have no way of parameterizing system properties or for that matter Options, that may need to be resolved during realization time. This forces developers to a). make Schema's dependent on specific Platforms, which is against the underlying objectives of Schemas in the first place and b). define platforms before schemas, ie: "correctly order their code", when in reality it is not required.
eg:
Instead we should be able to define the above Schema as follows;
And then later when an application is realized with a Platform, the property "{$platform.foo}" is evaluated and injected.
This effectively removes the requirement for many specialized methods in Oracle Tools, particularly when dealing with Remote Platforms.
eg:
NOTE: This also removes the requirement for the PlatformAware interface. See #218.
Ultimately we should provide support for both eager ($-based expressions) and lazy (#-based expression) evaluation. Eager evaluation would occur prior to an Application/Platform etc being realized. Lazy would occur (for Java applications only), after a Java Application was realized. eg: Once the JavaApplicationLauncher has started we could perform another pass of expression evaluation for lazily defined expressions in System Properties.
We could also use this for generating unique ports. eg: