sca-assembly message
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]
Subject: Re: [sca-assembly] [ISSUE 214] cyclic import resolutions in testcasesASM_13001, ASM_13002, ASM_13003, ASM_13004, ASM_13005, ASM_13006, ASM_13007, ASM_13008
- From: Mike Edwards <mike_edwards@uk.ibm.com>
- To: OASIS Assembly <sca-assembly@lists.oasis-open.org>
- Date: Mon, 18 Jan 2010 10:34:57 +0000
Jim,
I believe that the issue you are talking
about here is less the question of cyclic import and more the matter of
ensuring that
if contribution B imports an artifact
Z, that contribution A imports the same artifact Z, in an environment where
multiple versions
of Z exist and are all valid for importing
into A.
I think that this is handled by the
"uses" directive of OSGi.
<import.java>, as defined in section
10.1 of the Java POJO CI spec, has the "uses" as a feature of
the import.java element, with the
same semantics as OSGi.
We have not tried to extend this model
to <import> for XML artifacts. We did think about it, but the
situation is more complex for
XML artifacts and we did not feel able
to propose a model that was consistent.
However, you are welcome to propose
something along these lines to the Assembly TC - please raise an issue.
I'm happy to help
build a proposal, but I am not sure
that it will be easy or quick.
Yours, Mike.
Strategist - Emerging Technologies, SCA & SDO.
Co Chair OASIS SCA Assembly TC.
IBM Hursley Park, Mail Point 146, Winchester, SO21 2JN, Great Britain.
Phone & FAX: +44-1962-818014 Mobile: +44-7802-467431
Email: mike_edwards@uk.ibm.com
From:
| Jim Marino <jim.marino@gmail.com>
|
To:
| OASIS Assembly <sca-assembly@lists.oasis-open.org>
|
Date:
| 17/01/2010 13:36
|
Subject:
| Re: [sca-assembly] [ISSUE 214] cyclic
import resolutions in testcases ASM_13001, ASM_13002, ASM_13003, ASM_13004,
ASM_13005, ASM_13006, ASM_13007, ASM_13008 |
On Jan 12, 2010, at 3:29 PM, Mike Edwards wrote:
Folks,
I believe that this issue is invalid.
The issue claims that "cyclic import resolutions" exist in the
named testcases.
I believe that cyclic import resolutions are impossible by design for the
SCA artifact resolution mechanism, as stated in Section 10.2.1 of the Assembly
spec (CD04):
"When a contribution contains a reference
to an artifact from a namespace that is declared in an import statement
of the contribution, if the SCA artifact resolution mechanism is used to
resolve the artifact, the SCA runtime MUST resolve artifacts in the following
order:
1. from the locations identified by the import
statement(s) for the namespace. Locations MUST NOT be searched recursively
in order to locate artifacts (i.e. only a one-level search is performed).
2. from the contents of the contribution itself.
[ASM12023]"
I agree they are for namespace import/export *if* a contribution
does not export the a namespace it imports or if exporting an imported
namespace is defined as follows:
"if a contribution exports a namespace it imports,
other contributions importing the namespace will resolve only to artifacts
contained in the exporting contribution"
I actually think that would be a bad thing as it means
artifacts would always resolve differently from within a contribution that
exports a namespace it imports. Given this:
A<---import----(export)B<---import---(export)C
A would resolve an artifact contained in B while any references
to the artifact in B would resolve to C. Note this is also different from
how OSGi behaves for Java packages.
So, I think we need to define SCA import/export mechanisms
more clearly and have that reflected in the test suite.
Note the normative statement here that
forbids recursive searching of locations.
This means that if contribution A imports artifacts from a given namespace
from contribution B,
and contribution B also imports artifacts in the same namespace from contribution
C, then contribution A
DOES NOT import any artifacts in that namespace from contribution C (assuming
A has no explicit imports
from contribution C).
This one-deep import mechanism precludes cycles.
Yours, Mike.
Strategist - Emerging Technologies, SCA & SDO.
Co Chair OASIS SCA Assembly TC.
IBM Hursley Park, Mail Point 146, Winchester, SO21 2JN, Great Britain.
Phone & FAX: +44-1962-818014 Mobile: +44-7802-467431
Email: mike_edwards@uk.ibm.com
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU
- References:
- [ISSUE 214] cyclic import resolutions in testcases ASM_13001, ASM_13002, ASM_13003, ASM_13004, ASM_13005, ASM_13006, ASM_13007, ASM_13008
- From: Mike Edwards <mike_edwards@uk.ibm.com>
- Re: [sca-assembly] [ISSUE 214] cyclic import resolutions in testcases ASM_13001, ASM_13002, ASM_13003, ASM_13004, ASM_13005, ASM_13006, ASM_13007, ASM_13008
- From: Jim Marino <jim.marino@gmail.com>
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]