Hi,

As I am extending policy support for implementations I realize that we have
trouble with aggregating intents and policysets in an JavaImplementation
instance.  The reason for this is that JavaImplementation instances could be
reused in cases where two or more components provide services thro the same
implementation.

There is also a JIRA -
https://issues.apache.org/jira/browse/TUSCANY-1765that talks of this
problem with a nice example.  The JIRA has a patch that
solves the issue to some extent and not entirely.

If JavaImplementaition instances are going to be reused when the same
implemenation is used by two or more components, then we need an alternative
to store the intents / policy sets so that they are unique for each
component.  Take for example

<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"; name="CompositeX">
    <component name="ComponentA" requires="managedTransaction.none">
        <implementation.java class="test.DataServiceImpl" />
    </component>
    <component name="ComponentB" requires="managedTransaction.global">
        <implementation.java class="test.DataServiceImpl" r/>
    </component>
</composite>

Here there is going to be a single instance of JavaImplementation that will
be used for both components.  But it happens that both these components have
different intents defined and these intents will be inherited by the
implementations.  At the present moment I can only think of storing this
info in the Component but I am absolutely uncomfortable with this pollutes
the assembly model design for 'Component'.  Any other ideas that folks can
suggest for this ?

Thanks

- Venkat

Reply via email to