Greg Dritschler wrote:
This is a bit of a nit. It appears that the
SCARuntime.getComponentContextdoes not work if the given component is
implemented by another composite.
For example SCARuntime.getComponentContext("CalculatorServiceComponent")
returns null when CalculatorServiceComponent has a composite implementation.
<component name="CalculatorServiceComponent">
<implementation.composite name="foo:InnerCalculatorComposite"/>
</component>
Should CompositeComponentImpl implement ComponentContextProvider?


Greg,

Thanks for reporting this. This is the current design. I checked the spec documents, and I think we're going to have to ask the SCA Java Spec workgroup to clarify if a ComponentContext is meant to represent any kind of non-composite component or only Java components, and if a ComponentContext can represent a composite or not...

On one hand supporting ComponentContexts for composite components seems required to support what the SCA Java API and Annotation spec says on line 351: Non-SCA client code can use the ComponentContext API to perform operations against a component in an SCA domain.

On the other hand it seems odd - to me at least :) to allow Java code to sneak in the context of any component to get proxies for its references, as described on line 798: getService(Class<B> businessInterface, String referenceName) – Returns a proxy for the reference defined by the current component.

And I find this even more troubling given that references on composite components represent (through promotion) references declared by inner non-composite components. So, as an SCA application developer, if I had an OuterCompositeComponent/sampleReference reference promoting an InnerJavaComponent/sampleReference, I'm not sure at all which ComponentContext I should use to getService(BusinessInterface.class "sampleReference")... Should I use the ComponentContext for the OuterCompositeComponent or the InnerJavaComponent?

Another question is: What will a Java based ComponentContext mean if the component is a BPEL or C++ component?

I'll follow up with the SCA Java spec workgroup.

--
Jean-Sebastien


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

Reply via email to