We have some questions regarding the URI assignment and the relationship between URIs and QNames.
- Do I correctly understand that a user (i.e. the deployer) is supposed to provide an arbitrary contribution base URI.
For example by passing it as argument to an “install” command in a management console, like:
install <contribution_path> <contribution_uri>.
This how I interpret the statement regarding the install operation in line 3969: “Creates or updates an installed contribution
with a supplied root contribution, and installed at a _supplied_ base URI”
- Some question regarding URI assignment for composites. Let’s consider the following example:
Example:
Contribution:
----------------------------------------------
META_INF/
sca-contribution.xml
folder1/
MyComposite1.composite
folder2/
MyComposite2.composite
----------------------------------------------
MyComposite1.composite:
<composite name=”MyComposite” targetNamespace=”Namespace1”>…</composite>
MyComposite2.composite:
<composite name=”MyComposite” targetNamespace=”Namespace2”>…</composite>
It’s intended to let the both composites have the same NCName (they still have different QNames).
According to lines 3957, 3958:
“When a contribution is installed, all artifacts within the contribution are assigned URIs,
which are constructed by starting with the base URI of the contribution and adding the relative URI of each artifact […].”
Assuming that “relative URI of each artifact” corresponds to the file and directory structure, the both composites should
be assigned the following URIs after _installation_:
ContributionBaseURI/folder1/MyComposite1.composite
ContributionBaseURI/folder2/MyComposite2.composite
Now let’s say we want to apply the “add Deployment Composite” operation on the both composites.
- How the management console user is supposed to refer the corresponding composite: via its QName (as it’s done
in the <deployable> element) or via the above URIs?
- Furthermore the spec says:
“The added or updated deployment composite is given a relative URI that matches the @name attribute of the composite,
with a “.composite” suffix.”
According to the above statement and assuming that “relative” means “relative to the contribution base URI” the URIs
(including the contribution base URI) for the composites are as follows.
ContributionBaseURI /MyComposite.composite
ContributionBaseURI /MyComposite.composite
If this is the case, then it’s a conflict on the URI level even though the corresponding composites still have unique QNames.
- So what is the correct way to assign the URIs here?
- Why working with QNames if the namespace part is discarded on the URI level and hence leads to potential name clashes that
don’t exist in the realm of QNames?
- Do the URIs of the composites really change (compared to the URIs assigned during installation) after applying the
“add Deployment Composite” operation?
Thanks in advance
Konstantin