Mike Edwards wrote:

Jean-Sebastien Delfino wrote:


Nobody picked up my earlier post to this thread, I thought that my concrete examples were interesting though :) so I'll repeat a concrete example again here:

<implementation.java class="calculator.CalculatorImpl">

componentType file: calculator/CalculatorImpl.componentType

- The relationship is obvious to a human
- There is no SCDL attribute pointing to the componentType
- The relationship class name -> .componentType file location is specific to the Java implementation type.

IMHO you need implementation specific code to derive the .componentType file location from the attributes of the <implementation>.

I think that I'm agreeing with you very strongly - I just said it a different way.

The C++ example I gave was a more stark example of the problem of why there is no direct relationship between component and componentType file independent from the implementation type itself.

You are right - the SCDL does not point to the componentType file. If we had called componentType files "implementationInfo" files instead, this would perhaps have made the situation clearer - that componentType side files are there to provide extra information about an implementation for those situations where you can't get the information directly from the implementation (ie via introspection).


Yours,  Mike.


To illustrate what we've been discussing here, I added code to the implementation-pojo2-extension sample to show how to get the model representing a .componentType file (if there is one) corresponding to a POJO class, and merge it into the POJO implementation model in the model resolution phase.

See the resolve() method in [1]. That code takes the POJO implementation class name, replaces '.' by '/', adds .componentType and calls the ModelResolver as usual to resolve the ComponentType.

The POJO2 sample just uses the info from the .componentType as-is but other component implementation extensions can obviously implement more useful merging rules. If I remember correctly the Java API and Annotations spec describes the merging rules for Java components, there may be slightly different rules for BPEL etc.

[1] http://svn.apache.org/repos/asf/incubator/tuscany/java/sca/samples/implementation-pojo2-extension/src/main/java/pojo2/extension/POJOImplementationProcessor.java

--
Jean-Sebastien


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

Reply via email to