SCA Java User Guide: Building The Calculator Sample In Java code snippet 
missing @Reference annontation
-------------------------------------------------------------------------------------------------------

                 Key: TUSCANY-1825
                 URL: https://issues.apache.org/jira/browse/TUSCANY-1825
             Project: Tuscany
          Issue Type: Bug
          Components: Website
            Reporter: Bruce Gallegos


I was following along trying to implement the Sample in the Users guide and was 
getting the following errors:

Oct 1, 2007 12:25:22 PM 
org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl$1 problem
WARNING: [WARNING] Reference not found for component reference: 
CalculatorServiceComponent/addService null

so I compared my source to the source provided I realized that the [EMAIL 
PROTECTED] annotation was missing from the setters methods in my source.  Once 
I added the annotation everything worked perfectly.

At any rate, I was thinking it might be worth adding the annotation in the wiki 
example source.

{code}
public class CalculatorServiceImpl implements CalculatorService {

    private AddService addService;
    private SubtractService subtractService;
    private MultiplyService multiplyService;
    private DivideService divideService;

   @Reference   
    public void setAddService(AddService addService) {
        this.addService = addService;
    }

    ...set methods for the other attributes would go here

    public double add(double n1, double n2) {
        return addService.add(n1, n2);
    }

    ...implementations of the other methods would go here
}
{code}

Thanks,
Bruce

-- 
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