Hi,
I went ahead and tried to implement this thinking thro some scenarios
along. Here is one that seemed to have a problem with this approach. Take
the composite...
<composite...
<component name="CalculatorServiceComponent">
<implementation.java class="calculator.CalculatorServiceImpl">
<operation name="add" requires="tuscany:logging"/>
<operation name="subtract" requires="tuscany:logging"/>
</implementation.java>
</component
<component name="AnotherCalculatorServiceComponent">
<implementation.java class="calculator.CalculatorServiceImpl">
<operation name="multiply" requires="tuscany:logging"/>
<operation name="divide" requires="tuscany:logging"/>
</implementation.java>
</component
</composite>
While processing 'CalculatorServiceComponent' the add and subtract
operations will be added to the logging Intent. While processing the
'AnotherCalculatorServiceComponent' the multiply and divide oeprations will
be added to the logging intent. Since there is one instance of the logging
intent that is shared by these two components, it ends up that the logging
intent gets to apply for all four methods in both components, which is not
what is intended.
Thoughts ?
Thanks
- Venkat