Basic component service operation doesn't seem to match spec
------------------------------------------------------------

                 Key: TUSCANY-2076
                 URL: https://issues.apache.org/jira/browse/TUSCANY-2076
             Project: Tuscany
          Issue Type: Bug
          Components: Java SCA Core Runtime
    Affects Versions: Java-SCA-1.1
         Environment: Windows XP SP2, IBM JDK V5
            Reporter: Simon Laws
             Fix For: Java-SCA-1.2


samples/calculator uses very basic and minimal SCA confiburation and works just 
find. However is you go and extend the composite file slightly changing

    <component name="CalculatorServiceComponent">
        <implementation.java class="calculator.CalculatorServiceImpl"/>
        <reference name="addService" target="AddServiceComponent" />
        <reference name="subtractService" target="SubtractServiceComponent" />
        <reference name="multiplyService" target="MultiplyServiceComponent" />
        <reference name="divideService" target="DivideServiceComponent" />
    </component>

To read

    <component name="CalculatorServiceComponent">
        <implementation.java class="calculator.CalculatorServiceImpl"/>
        <service name="CalculatorService">
           <binding.sca/>
        </service>
        <reference name="addService" target="AddServiceComponent" />
        <reference name="subtractService" target="SubtractServiceComponent" />
        <reference name="multiplyService" target="MultiplyServiceComponent" />
        <reference name="divideService" target="DivideServiceComponent" />
    </component>

Then I get the following output...

13-Mar-2008 11:19:52 
org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl$1 problem
WARNING: Service not found for component service: 
CalculatorServiceComponent/CalculatorService
13-Mar-2008 11:19:52 
org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl$1 problem
WARNING: Service not found for component service: 
CalculatorServiceComponent/CalculatorService
13-Mar-2008 11:19:53 
org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl activate
WARNING: Skipping component service not defined in the component type: 
CalculatorServiceComponent#CalculatorService

If I then go and force the component to recognize the service by adding an 
@Service annotation to the calculator component implementation by changing

public class CalculatorServiceImpl implements CalculatorService {

to read 

@Service(CalculatorService.class)
public class CalculatorServiceImpl implements CalculatorService {

It then works again. 

I believe the spec implies that the basic service definition in the composite 
file should be valid without the need to further annotate the service 
implementation. 



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to