You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Vamsavardhana Reddy (JIRA)" <tu...@ws.apache.org> on 2008/03/13 17:28:24 UTC

[jira] Commented: (TUSCANY-2076) Basic component service operation doesn't seem to match spec

    [ https://issues.apache.org/jira/browse/TUSCANY-2076?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12578370#action_12578370 ] 

Vamsavardhana Reddy commented on TUSCANY-2076:
----------------------------------------------

I am noticing that in the case when there is no @Service annotation in CalculatorServiceImpl class, the service name is that of the class name CalculatorServiceImpl rather than the interface name CalculatorService.  If  <service name="CalculatorServiceImpl"> is used instead of <service name="CalculatorService"> , the sample is running fine without having to add the @Service annotation in the implementation class.


> 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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org