After researching what the SCA spec says, looks like your scenario is valid :
from Java C&I: 391 A component type can optionally be specified in a side file. The component type side file is found with the 392 same classloader that loaded the Java class. The side file must be located in a directory that corresponds to 393 the namespace of the implementation and have the same name as the Java class, but with a 394 .componentType extension instead of the .class extension. Also, as you mentioned, the current implementation does not consider "import/export" when resolving the componentTypes. I think we should start by raising a jira, and discussing what's the best solution here, should we just reuse some already existent import/export to configure the componentType model resolver ? You mentioned the name space import, but as this is related to specific implementation types, maybe the java import/export ? I'll keep thinking and do some investigation on this area... Thoughts ? On 10/25/07, Rajini Sivaram <[EMAIL PROTECTED]> wrote: > Hello, > > Is there any reason why unlike CompositeModelResolver and > ConstrainingTypeModelResolver, ComponentTypeModelResolver does not look at > imported namespaces for resolving component type files? > > My test case contains: > ContributionA : contains a composite file, with a component C1 > ContributionB: contains the Java implementation classes for C1 ( > x.y.C1.class), and the componentType file (x.y.C1.componentType) > > The model resolver used to resolve the composite is associated with > ContributionA, and when implementation.java looks for the componentType > file using this model resolver, it does not find it, since it doesn't look > anywhere except in ContributionA. > > Is this a valid test case, or should the componentType file always be in > ContributionA, along with the composite? > > If the componentType file is allowed to be inside ContributionB (since > componentType file describes an implementation, I would have expected it to > be colocated with the implementation), what type of import/export statement > should be used in ContributionA? ContributionA contains <import.javapackage=" > x.y"/> to find the implementation class x.y.C1. Should that be somehow used > to resolve the componentType file as well, or should there be another > namespace import specifically for the componentType file (<import > namespace="x.y"/>)? > > > Thank you... > > Regards, > > Rajini > -- Luciano Resende Apache Tuscany Committer http://people.apache.org/~lresende http://lresende.blogspot.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]