<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>RocWing&#039;s Blog&#187; 整合</title>
	<atom:link href="http://www.rocwing.com/tag/%e6%95%b4%e5%90%88/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rocwing.com</link>
	<description>带着你现有的记忆和理解，去成为之前的自己。</description>
	<lastBuildDate>Fri, 03 Feb 2012 03:01:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>整合CXF和Spring</title>
		<link>http://www.rocwing.com/integrate-cxf-and-spring/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=integrate-cxf-and-spring</link>
		<comments>http://www.rocwing.com/integrate-cxf-and-spring/#comments</comments>
		<pubDate>Tue, 25 May 2010 01:18:05 +0000</pubDate>
		<dc:creator>rocwing</dc:creator>
				<category><![CDATA[SOA]]></category>
		<category><![CDATA[CXF]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[Sping]]></category>
		<category><![CDATA[整合]]></category>

		<guid isPermaLink="false">/?p=60001</guid>
		<description><![CDATA[以REST服务为例。]]></description>
			<content:encoded><![CDATA[<div><span style="font-size:medium;">以REST服务为例。</span></div>
<div><span style="font-size:medium;"><br /></span>
<p><span style="font-size:medium;">导入cxf和spring的支持库，载入spring配置文件和cxf的bean文件，cxf的bean文件可以命名为cxf-servlet.xml，以备生产环境使用，以下所列方式为测试使用，服务运行在开发环境中。</span></p>
<div></div>
<div><span style="background-color: rgb(204, 255, 255);">import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;</span></div>
<div></div>
<div><span style="background-color: rgb(204, 255, 255);">import org.springframework.context.support.ClassPathXmlApplicationContext;</span></div>
<div><span style="background-color: rgb(204, 255, 255);"><br /></span></div>
<div></div>
<div><span style="background-color: rgb(204, 255, 255);">ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(new String[]{&#8220;applicationContext.xml&#8221;,&#8221;cxf-servlet.xml&#8221;});</span></div>
<div></div>
<div></div>
<div><span style="font-size:medium;">在cxf-servlet.xml配置文件中设置资源类和Server。</span></div>
<div></div>
<div></div>
<div><span style="background-color: rgb(204, 255, 255);">&lt;jaxrs:server id=&#8221;test&#8221; address=&#8221;http://localhost:8080/test&#8221;&gt;</span></div>
<div><span style="background-color: rgb(204, 255, 255);">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&lt;jaxrs:serviceBeans&gt;</span></div>
<div><span style="background-color: rgb(204, 255, 255);">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;ref bean=&#8221;testResource&#8221; /&gt;</span></div>
<div><span style="background-color: rgb(204, 255, 255);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/jaxrs:serviceBeans&gt;</span></div>
<div><span style="background-color: rgb(204, 255, 255);">&lt;/jaxrs:server&gt;</span></div>
<div></div>
<div><span style="background-color: rgb(204, 255, 255);">&lt;bean id=&#8221;testtResource&#8221; class=&#8221;testResource&#8221;&gt; &lt;/bean&gt;</span></div>
<div></div>
<div></div>
<div><span style="font-size:medium;">从ApplicationContext中得到Server，然后创建，sleep这个线程。</span></div>
<div></div>
<div></div>
<div><span style="font-family:monospace;"><span style="background-color: rgb(204, 255, 255);">JAXRSServerFactoryBean sfb = (JAXRSServerFactoryBean)ctx.getBean(&#8220;test&#8221;);</span></span></div>
<div></div>
<div><span style="font-family:monospace;"><span style="background-color: rgb(204, 255, 255);">sfb.create();</span></span></div>
</div>
<div></div>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li><a href="http://www.rocwing.com/cxf-mtom-for-rest-style-attachments/" title="采用CXF中MTOM机制来实现REST方式的附件服务">采用CXF中MTOM机制来实现REST方式的附件服务</a> (4)</li><li><a href="http://www.rocwing.com/two-different-soa-pattern/" title="SOA架构的两种不同设计模式">SOA架构的两种不同设计模式</a> (0)</li><li><a href="http://www.rocwing.com/using-mule-to-receive-jms-message-and-send-webservice-request/" title="通过mule来接收jms消息并发送web service请求">通过mule来接收jms消息并发送web service请求</a> (0)</li><li><a href="http://www.rocwing.com/create-a-timing-web-service-message-chaining-using-wso2-esb/" title="用WSO2 ESB来实现定时web服务消息链功能">用WSO2 ESB来实现定时web服务消息链功能</a> (1)</li><li><a href="http://www.rocwing.com/file-system-monitor-for-java-3/?lang=en" title="File system monitor for Java">File system monitor for Java</a> (0)</li><li><a href="http://www.rocwing.com/file-system-monitor-for-java-2/" title="Java监控文件系统变化">Java监控文件系统变化</a> (0)</li><li><a href="http://www.rocwing.com/file-system-monitor-for-java/" title="Java监控文件系统变化">Java监控文件系统变化</a> (0)</li><li><a href="http://www.rocwing.com/bindings-for-another-class-name/" title="修改bindings.xml文件使JAXB从XML Schema生成自定义类名">修改bindings.xml文件使JAXB从XML Schema生成自定义类名</a> (0)</li><li><a href="http://www.rocwing.com/my-opinion-about-esb/" title="我眼中的ESB">我眼中的ESB</a> (1)</li><li><a href="http://www.rocwing.com/post-to-rest-using-php/" title="PHP向REST风格Web服务发送Post请求">PHP向REST风格Web服务发送Post请求</a> (0)</li></ul><hr />
<p><small>© rocwing for <a href="http://www.rocwing.com">RocWing&#039;s Blog</a>, 2010. |
<a href="http://www.rocwing.com/integrate-cxf-and-spring/">Permalink</a> |
<a href="http://www.rocwing.com/integrate-cxf-and-spring/#comments">来坐沙发吧！</a> |
Add to
<a href="http://del.icio.us/post?url=http://www.rocwing.com/integrate-cxf-and-spring/&title=整合CXF和Spring">del.icio.us</a>
<br/>
Post tags: <a href="http://www.rocwing.com/tag/cxf/" rel="tag">CXF</a>, <a href="http://www.rocwing.com/tag/rest/" rel="tag">REST</a>, <a href="http://www.rocwing.com/tag/soa/" rel="tag">SOA</a>, <a href="http://www.rocwing.com/tag/sping/" rel="tag">Sping</a>, <a href="http://www.rocwing.com/tag/%e6%95%b4%e5%90%88/" rel="tag">整合</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.rocwing.com/integrate-cxf-and-spring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SOA是用来解决什么问题的?</title>
		<link>http://www.rocwing.com/what-soa-for/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=what-soa-for</link>
		<comments>http://www.rocwing.com/what-soa-for/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 06:38:26 +0000</pubDate>
		<dc:creator>rocwing</dc:creator>
				<category><![CDATA[SOA]]></category>
		<category><![CDATA[RPC]]></category>
		<category><![CDATA[事件驱动]]></category>
		<category><![CDATA[分布式]]></category>
		<category><![CDATA[整合]]></category>
		<category><![CDATA[消息]]></category>

		<guid isPermaLink="false">/?p=39001</guid>
		<description><![CDATA[SOA的全称叫做 service-oriented architecture（面向服务的架构），不管称它为一种架构，还是一种方法，都是为了解决某一问题而提出的。 SOA是用来解决整合问题，而且是独立系统间的整合的问题。 首先不是分布式程序，分布式程序是客户/服务模式，或者是n层模式，这可以称作系统间的整合，可以采用RPC(Remote procedure call)远程方法调用的方式来实现。由于是系统内整合，开发人员对于系统比较了解，因此沿用了传统开发语言中的方法调用的模式，用方法来表达语义，这样做的好处是便于理解。 而独立系统间的整合，由于开发人员分属于不同的系统，这些系统可能属于不同的长商，这些厂商甚至可能处于竞争的地位，所以无法互相理解相互的数据结构和程序逻辑，这就需要不同于分布式程序的设计和开发模式。 SOA是与RPC相反的方式，通过消息来交互，松耦合的结构。 服务是消息的生产者或者消费者，而且消息最好以一种自描述、无状态的方式表现出来，程序的逻辑通过消息之间的流转来表达，属于事件驱动的模式。 相关文章整合CXF和Spring (0) © rocwing for RocWing&#039;s Blog, 2010. &#124; Permalink &#124; 来坐沙发吧！ &#124; Add to del.icio.us Post tags: RPC, 事件驱动,... <a class="meta-more" href="http://www.rocwing.com/what-soa-for/">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>SOA的全称叫做 service-oriented architecture（面向服务的架构），不管称它为一种架构，还是一种方法，都是为了解决某一问题而提出的。</p>
<p>SOA是用来解决整合问题，而且是独立系统间的整合的问题。</p>
<div></div>
<div></div>
<div>首先不是分布式程序，分布式程序是客户/服务模式，或者是n层模式，这可以称作系统间的整合，可以采用RPC(Remote procedure call)远程方法调用的方式来实现。由于是系统内整合，开发人员对于系统比较了解，因此沿用了传统开发语言中的方法调用的模式，用方法来表达语义，这样做的好处是便于理解。</div>
<div></div>
<div></div>
<div>而独立系统间的整合，由于开发人员分属于不同的系统，这些系统可能属于不同的长商，这些厂商甚至可能处于竞争的地位，所以无法互相理解相互的数据结构和程序逻辑，这就需要不同于分布式程序的设计和开发模式。</div>
<div></div>
<div></div>
<div>SOA是与RPC相反的方式，通过消息来交互，松耦合的结构。</div>
<div></div>
<div></div>
<div>服务是消息的生产者或者消费者，而且消息最好以一种自描述、无状态的方式表现出来，程序的逻辑通过消息之间的流转来表达，属于事件驱动的模式。</div>
<div></div>
<div></div>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li><a href="http://www.rocwing.com/integrate-cxf-and-spring/" title="整合CXF和Spring">整合CXF和Spring</a> (0)</li></ul><hr />
<p><small>© rocwing for <a href="http://www.rocwing.com">RocWing&#039;s Blog</a>, 2010. |
<a href="http://www.rocwing.com/what-soa-for/">Permalink</a> |
<a href="http://www.rocwing.com/what-soa-for/#comments">来坐沙发吧！</a> |
Add to
<a href="http://del.icio.us/post?url=http://www.rocwing.com/what-soa-for/&title=SOA是用来解决什么问题的?">del.icio.us</a>
<br/>
Post tags: <a href="http://www.rocwing.com/tag/rpc/" rel="tag">RPC</a>, <a href="http://www.rocwing.com/tag/%e4%ba%8b%e4%bb%b6%e9%a9%b1%e5%8a%a8/" rel="tag">事件驱动</a>, <a href="http://www.rocwing.com/tag/%e5%88%86%e5%b8%83%e5%bc%8f/" rel="tag">分布式</a>, <a href="http://www.rocwing.com/tag/%e6%95%b4%e5%90%88/" rel="tag">整合</a>, <a href="http://www.rocwing.com/tag/%e6%b6%88%e6%81%af/" rel="tag">消息</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.rocwing.com/what-soa-for/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)
Database Caching 97/152 queries in 0.029 seconds using disk
Object Caching 798/836 objects using disk
Content Delivery Network via Amazon Web Services: CloudFront: Amazon Web Services: S3: d18b0b6egle0lw.cloudfront.net

Served from: www.rocwing.com @ 2012-02-06 09:38:39 -->
