On Jul 21, 2006, at 1:54 PM, Ken Tam wrote:

<snip/>


Working on understanding the deployment code; here's a snippet that's
unclear to me:

In DeployerImpl.deploy(CompositeComponent<?> parent,
CompositeDefinition<I> componentDefinition) :

DeploymentContext deploymentContext = new RootDeploymentContext(null,
xmlFactory, moduleScope, null)

For the case where componentDefinition.getImplementation() is an
instance of SystemCompositeImplementation, shouldn't the SCDL URL be
passed into the RootDeploymentContext?  (as opposed to null)

The ComponentDefinition that is at the root of the deployment does not have any SCDL associated with it - it was created in memory by the thing that called the deployer. So at that time there is no scdlLocation for the deployment context (which is why it is null).

That component is implemented by a SystemCompositeImplementation which has a name that identifies which composite to use. It also contains a scdlLocation which is a used by the implementation loader as a (really really strong) hint on where to find the SCDL. When it recurses into that composite then the loader pushes that location into the child context as the scdlLocation that was actually used (for the purposes or resolving other relative locations).

There is a subtle distinction here about what it means to "deploy" a composite. As a "type" of thing, a composite is insubstantial and cannot actually be physically materialized. Instead, you create an "instance" of a component that is implemented by that type.

--
Jeremy


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to