The value of an external component substitution reference is computed first by resolving the component that is referenced by primary-component. If secondary-component is used as a primary-component, the component that contains the external component substitution reference serves as the initial current component that is used when resolving the primary-component. The component that is resolved by primary-component becomes the new current component. Then, each secondary-component in secondary-component-list is resolved by using the last resolved component as the current component. Finally, the provisioning system looks up and returns the variable, varname, in the last resolved component.
The value of an external component substitution reference is computed based on the value of the specified variable in the referenced component at the time the component was installed. You cannot refer to a variable that is not declared by the installed component or to a component that is not installed on the target host. You also cannot refer to a variable that is not accessible to the component or plan that declares the external component substitution reference. The variable is accessible only if it is declared with an accessible access mode, the declaring component is accessible, and each primary and secondary component that is traversed to get to that component is accessible.
External component substitution references are computed at the time that they are encountered during a plan run, not at the start of the run. Thus, an actual installed component that is being referenced might change based on the steps executed earlier in the plan. Furthermore, references to components that are installed on a host other than the current target host might be affected by other plans that are running concurrently on the other host. For predictable results, only refer to hosts that are included in the target set of the current plan run because they are guaranteed to be locked. Also, synchronize any <install> or <uninstall> operations on an externally referenced host in the plan by using retargeting or series execution mode.
The following are examples of external component substitution variable references that use explicit-external components:
:[component:installApache:sys.label] :[component:jdk#1.3:classpath] :[component:webApp#2.4@{/usr/local}:bannerColor] |
In the following example, the provisioning system resolves the component that is installed on the root physical host of the current target host:
:[component(/):IIS global settings:install_path] |
In this example, webAppPath is resolved as the name of a simple substitution variable that is set in the associated component of the generation context. It is not a variable that is defined in the externally referenced component.
:[component:webApp@{:[webAppPath]}:bannerColor] |
The following examples show external component substitution variable references that use targetable-component:
:[targetableComponent:hostName] :[targetableComponent(host1):port] |
The following are examples of external component substitution variable references that use nested-component and toplevel-component:
:[nestedRef:ref1:sys.label] :[toplevelRef:ref2:sys.name] :[toplevelRef(/):ref3@{/usr/local}:var1] |
The following are examples of external component substitution variable references that use system-type-component and system-service-component:
:[systemService:com.sun.windows#Windows SS:classPath] :[systemType:com.sun.weblogic#WL Target Type:serverName] :[systemType(..):MyType@{/tmp}:var1] |
The following is an example of an external component substitution variable reference that uses dependee-component:
:[dependee:app2domain:domainName] |
The following is an example of an external component substitution variable reference that uses container-component:
:[container:sys.installPath] |
The following is an example of a chained component reference. This reference assumes that the current target component is installed as a nested component of another container component. The container: part resolves to the component that contains the current component, which for this example is called X. The nestedRef:ref1 part resolves to the component that is referenced by component X by using its component reference named ref1, which is component Y. The toplevelRef:ref1 part resolves to the component that component Y refers to by using its component reference ref1, which is component Z. Finally, the provisioning system resolves and uses the value of the label attribute that is defined by component Z.
:[container:nestedRef:ref1:toplevelRef:ref1:sys.label] |