WEB开发网
开发学院软件开发Java 使用 Spring Framework 设计和开发 SCA 组件,第 ... 阅读

使用 Spring Framework 设计和开发 SCA 组件,第 2 部分: 使用 Apache Tuscany 的高级技巧

 2010-02-25 00:00:00 来源:WEB开发网   
核心提示: 清单 4. calculator.composite<compositexmlns="http://www.osoa.org/xmlns/sca/1.0"xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"

清单 4. calculator.composite

<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" 
   xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0" 
   targetNamespace="http://calc" 
   xmlns:c="http://calc" 
   name="Calculator"> 
 
  <service name="CalculatorService" promote=”CalculatorComponent"> 
    <interface.java interface="calculator.CalculatorService"/> 
    <t:binding.rmi host="localhost" port="8099" serviceName="CalculatorRMIService"/> 
  </service> 
 
  <component name="CalculatorComponent"> 
    <implementation.spring location="META-INF/spring/calculator-context.xml"/>     
    <reference name="addService" target="AddComponent" /> 
    <reference name="subtractService" target="SubtractComponent" /> 
    <reference name="multiplyService" target="MultiplyComponent"/> 
    <reference name="divideService" target="DivideComponent" /> 
    <property name="message">HelloWorld</property> 
  </component> 
 
  <component name="AddComponent"> 
    <t:implementation.script script="calculator/AddServiceImpl.js"/> 
  </component> 
 
  <component name="SubtractComponent"> 
    <implementation.java class="calculator.SubtractServiceImpl"/> 
  </component> 
 
  <component name="MultiplyComponent"> 
    <implementation.java class="calculator.MultiplyServiceImpl"/>     
  </component> 
 
  <component name="DivideComponent"> 
    <t:implementation.script script="calculator/DivideServiceImpl.groovy"/> 
  </component> 
</composite> 

上一页  1 2 3 4 5 6 7 8 9  下一页

Tags:使用 Spring Framework

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接