最近在看APACHE 的TUSCANY,其中的simple-bigbank-spring的例子,就是说如何在SCA中使用SPRING的。
首先看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>来进行。
分享到:
相关推荐
python库,解压后可用。 资源全名:sca2d-0.1.1-py3-none-any.whl
Fortify SCA 代码规则库-支持Java, 静态代码扫描 Fortify在线规则库网址,符合代码安全的编码参考 Fortify SCA Java
使用Spring Framework 设计和开发 SCA 组件,第 1 部分.pdf.pdf 使用Spring Framework 设计和开发 SCA 组件,第 1 部分.pdf.pdf
它通过内置的五大主要分析引擎:数据流、语义、结构、控制流、配置流等对应用软件的源代码进行静态的分析,分析的过程中与它特有的软件安全漏洞规则集进行全面地匹配、查找,从而将源代码中存在的安全漏洞扫描出来,...
术语缩写:SCA:ServiceComponentArchitectureWPS:WebSphereProcessServerWSIF:WebServiceInvocationFrameworkWID:WebSphereIntegrationDeveloperSDO:...使用服务组件的客户端可以选择使用WSDL接口或Java接口
datasheet_sca3300-d01.pdf
uscany-sca-1.2-incubating-updatesite.zip Eclipse uscany-sca-1.2-incubating-updatesite.zip Eclipse
1752通过IO模拟SPI控制SCA100T-D02进行角度转换,内有详细的程序说明。管脚1752: SCK 2.0> MISO 2.1< MOSI 2.2> CS 2.3>
本人的SCA学习笔记,里面有例子和分析,例子具有实战价值。
apache-tuscany-sca-1.6.zip
SCA 学习-装配规范,值得收藏的东东,欢迎下载
SCA100T中文资料 特征 Features • Dual axis inclination measurement (X and Y) • Measuring ranges ±30° SCA100T-D01 and± 90° SCA100T-D02 • 0.0025° resolution (10 Hz BW, 模拟输出) • Sensing ...
Kc版权所有1985-2 061 Microsoft Gorp :Documents and settings anming >sourceanalyzer --he lp Fortify Source Code Analyze4..日.回153 Copyright (c>2003-2006 Fortify Software Usage Bu⊥1d Java: ...