SCA学习之2--SCA中使用SPRING笔记
来源:互联网 发布:ecs windows 编辑:程序博客网 时间:2024/05/01 20:27
首先看resources目录下bigbank.compsite文件
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
targetNamespace="http://bigbank"
xmlns:s="http://stockquote"
name="BigBank">
<component name="AccountServiceComponent">
<implementation.spring location="Account-spring-context.xml"/>
<reference name="stockQuoteService" target="StockQuoteServiceComponent"/>
</component>
<component name="StockQuoteServiceComponent">
<implementation.composite name="s:StockQuote"/>
</component>
</composite>
可以看到,在AccountServiceComponent这个组件中,其实现是直接用<implementation.spring location="Account-spring-context.xml"/>
指向了spring的配置文件。再看具体的这个SPRING配置文件
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:sca="http://www.springframework.org/schema/sca"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/sca http://www.springframework.org/schema/sca/spring-sca.xsd">
<sca:service name="AccountService"
type="bigbank.account.AccountService" target="AccountServiceBean"/>
<bean id="AccountServiceBean" class="bigbank.account.AccountServiceImpl">
<property name="accountDataService" ref="AccountDataServiceBean"/>
<property name="stockQuoteService" ref="stockQuoteService"/>
<property name="currency" value="USD"/>
</bean>
<bean id="AccountDataServiceBean" class="bigbank.accountdata.AccountDataServiceImpl">
</bean>
<sca:reference name="stockQuoteService"
type="bigbank.stockquote.StockQuoteService"/>
</beans>
由于是在SCA的容器内,所以这里要引用外部的服务的话,依然要用<sca:reference>来进行。
- SCA学习之2--SCA中使用SPRING笔记
- SCA学习之2--SCA中使用SPRING笔记
- SCA
- SCA
- SCA
- php sca学习之1
- SCA(Tuscany)+Spring+Hibernate使用范例
- SOA学习笔记三:SCA分析
- SCA与Spring框架
- SCA-CNN算法笔记
- SCA学习入门
- SOA标准之SCA
- Tuscany SCA与Spring、Hibernate整合之简洁方法
- SCA 之Tuscany 5 ——helloworld Spring Bean
- 使用OSGi,SCA,BPEL和Spring增强可管理性
- SCA--Spring Component Implementation Specification
- SCA 之Tuscany 6 ——helloworld SCA Client
- SCA 之Tuscany 10 ——SCA模型的理解
- asp.net 2.0中显示主从关系另一个方法
- TOMCAT 5的一些优化笔记
- (转)遭遇PHP has encountered an Access Violation
- 策略模式笔记
- 数据调优好的文章收集1
- SCA学习之2--SCA中使用SPRING笔记
- sql 2005学习笔记1
- mysql 5中遭遇data too long问题
- SVN的安装笔记和要注意的问题
- tomcat 5.5下的一个要注意的问题
- structs 2中的一个要注意的地方
- SCA初探
- ie里打印的一个好控件介绍
- 用iframe实现灵活的上传文件