﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-&lt;font color="red"&gt;JRen&lt;/font&gt;&lt;font color="lightgreen"&gt;大鹏一曰同风起，扶摇直上九万里&lt;/font&gt;-随笔分类-AppServer</title><link>http://www.blogjava.net/liaojiyong/category/11506.html</link><description /><language>zh-cn</language><lastBuildDate>Tue, 18 Dec 2007 07:59:29 GMT</lastBuildDate><pubDate>Tue, 18 Dec 2007 07:59:29 GMT</pubDate><ttl>60</ttl><item><title>Tomcat常用调优技巧(转)</title><link>http://www.blogjava.net/liaojiyong/archive/2007/12/16/168053.html</link><dc:creator>liaojiyong</dc:creator><author>liaojiyong</author><pubDate>Sun, 16 Dec 2007 03:38:00 GMT</pubDate><guid>http://www.blogjava.net/liaojiyong/archive/2007/12/16/168053.html</guid><wfw:comment>http://www.blogjava.net/liaojiyong/comments/168053.html</wfw:comment><comments>http://www.blogjava.net/liaojiyong/archive/2007/12/16/168053.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/liaojiyong/comments/commentRss/168053.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/liaojiyong/services/trackbacks/168053.html</trackback:ping><description><![CDATA[本文是就Tomcat 4为基础向大家介绍WEB容器调优的，因为许多朋友安装好之后就开始正式上线，很少有人以用户现场为基础对服务器进行调优。如果并发量小，系统可能不会出问题，但是并发量大时，系统反应速度迅速下降，由于不了解原因，因此大家还拼命在自己的应用中寻找问题，从而浪费了宝贵的现场时间。但是Tomcat如何调优呢？<br />
&nbsp;&nbsp;&nbsp; 其实真正的WEB容器调优是需要许多方面的知识的，你必须了解网络＋硬件＋OS＋JVM＋WEB容器，但是这篇文章无法讲解那么多，而应用服务器本身也有些调优的基本原则，下文就会给予介绍。<br />
&nbsp;&nbsp;&nbsp; 先在Tomcat安装目录中找到conf子目录，然后再打开web.xml文件，搜索附件A中的内容，可能会有些不同。不同的地方就是需要修改的部分。<br />
&nbsp;&nbsp;&nbsp; 1. 屏蔽DNS查询。<br />
&nbsp;&nbsp;&nbsp; Web应用程序可以通过Web容器提供的getRemoteHost()方法获得访问Web应用客户的IP地址和名称，但是这样会消耗Web容器的资源，并且还需要通过IP地址和DNS服务器反查用户的名字，因此当系统上线时，可以将这个属性关闭，从而减少资源消耗，那么Web应用也就只能记录下IP地址了。修改的属性是enableLoopups="false"<br />
&nbsp;&nbsp;&nbsp; 2. 调整线程数。<br />
&nbsp;&nbsp;&nbsp; Tomcat通过线程池来为用户访问提供响应，对于上线的系统初步估计用户并发数量后，然后调整线程池容量。例如：用户并发数量大约在100左右。那么可以设置minProcessors="100" maxProcessors="100"，将最大和最小设置为一样后，线程池不会再释放空闲的线程，使用户访问突然增加的时候，不需要再消耗系统资源去创建新的线程。<br />
&nbsp;&nbsp;&nbsp; 3. 调整最大连接数<br />
&nbsp;&nbsp;&nbsp; 这个其实最复杂，即使用户并发量大，但是系统反应速度快的话，可以把这个值不用设置太高，高了系统需要消耗大量的资源去切换线程，但是如果设置太低也会造成应用无法满足用户并发需要。因此设置这个最好能够结合整个系统的跟踪与调优，使系统达到最好的平稳状态。一般设置为maxProcessors的1.5倍就可以了。<br />
&nbsp;&nbsp;&nbsp; 4. 调整网络超时。<br />
&nbsp;&nbsp;&nbsp; 主要是HTTP协议也有个连接过程，客户端连接到服务器上后，多长时间没有得到处理就会被释放。如果服务器处理速度较慢，但是希望每个用户都能得到有效处理，或者网络环境不好，需要保证用户不会因为超时会断，也可以把时间加长。但是一般设置成connectionTimeout="30000"就可以了。太长对系统来说价值不大，反而会浪费系统资源在无谓的长连接上。<br />
&nbsp;&nbsp;&nbsp; 附件A。<br />
&nbsp;&nbsp;&nbsp; 在tomcat配置文件server.xml中的&lt;Connector ... /&gt;配置中，和连接数相关的参数有：<br />
&nbsp;&nbsp;&nbsp; minProcessors：最小空闲连接线程数，用于提高系统处理性能，默认值为10<br />
&nbsp;&nbsp;&nbsp; maxProcessors：最大连接线程数，即：并发处理的最大请求数，默认值为75<br />
&nbsp;&nbsp;&nbsp; acceptCount：允许的最大连接数，应大于等于maxProcessors，默认值为100<br />
&nbsp;&nbsp;&nbsp; enableLookups：是否反查域名，取值为：true或false。为了提高处理能力，应设置为false<br />
&nbsp;&nbsp;&nbsp; connectionTimeout：网络连接超时，单位：毫秒。设置为0表示永不超时，这样设置有隐患的。通常可设置为20000毫秒。&nbsp;&nbsp;&nbsp; &lt;Connector<br />
&nbsp;&nbsp;&nbsp; className="org.apache.coyote.tomcat4.CoyoteConnector"<br />
&nbsp;&nbsp;&nbsp; port="8080" minProcessors="5" maxProcessors="75"<br />
&nbsp;&nbsp;&nbsp; enableLookups="true" redirectPort="8443"<br />
&nbsp;&nbsp;&nbsp; acceptCount="10" debug="0" connectionTimeout="20000"<br />
&nbsp;&nbsp;&nbsp; useURIValidationHack="false"<br />
/&gt;<font style="background-color: #cce8cf">Tomcat常用调优技巧.txt</font>
<img src ="http://www.blogjava.net/liaojiyong/aggbug/168053.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/liaojiyong/" target="_blank">liaojiyong</a> 2007-12-16 11:38 <a href="http://www.blogjava.net/liaojiyong/archive/2007/12/16/168053.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>tomcat5.5.9连接池的配置(转)</title><link>http://www.blogjava.net/liaojiyong/archive/2007/03/30/107403.html</link><dc:creator>liaojiyong</dc:creator><author>liaojiyong</author><pubDate>Fri, 30 Mar 2007 01:29:00 GMT</pubDate><guid>http://www.blogjava.net/liaojiyong/archive/2007/03/30/107403.html</guid><wfw:comment>http://www.blogjava.net/liaojiyong/comments/107403.html</wfw:comment><comments>http://www.blogjava.net/liaojiyong/archive/2007/03/30/107403.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/liaojiyong/comments/commentRss/107403.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/liaojiyong/services/trackbacks/107403.html</trackback:ping><description><![CDATA[
		<div>最近做个项目，需要在tomcat，weblogic中写连接池.weblogic还是老样子，照着图形界面配置就可以了．Tomcat我用的是5.5．9．虽说以前用tomcat4版本写过，可早就听说，５版本和４版本的差距很大．所以就提前做好了心里准备，先看了一个帮助文档，花了进一个小时的时间搞定，现在整理出来与大家分享．</div>
		<div>其实Tomcat5要比tomcat4简单多了，如果还是按tomcat4的套路来，呵呵，那恐怕那走很多弯路了．</div>
		<div>第一步：在tomcat5→<span>common→lib下加入你所连接数据库的驱动包．这里我用的mysql数据库．</span></div>
		<div>第二步：在tomcat5→<span>conf→Catalina→localhost配置一个xml文件．<span style="COLOR: red">这里一定要注意，必须和你的项目名称是一模一样的．我用的项目名为testTomcat.testTomcat.xml文件配置如下：</span></span></div>
		<div>
				<span style="FONT-SIZE: 9pt">    &lt;Resource name='jdbc/mysql' auth='Container' </span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt">              type='javax.sql.DataSource' driverClassName='com.mysql.jdbc.Driver' </span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt">             url='jdbc:mysql://127.0.0.1:3306/addressbooksample' </span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt">              username='root' password='' maxActive='20' maxIdle='10' </span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt">              maxWait='-1'/&gt; </span>
		</div>
		<div> </div>
		<div>
				<span style="FONT-SIZE: 9pt"> &lt;ResourceLink</span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt">    global="UserDatabase"</span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt">    name="users"</span>
		</div>
		<div style="TEXT-INDENT: 21pt">
				<span style="FONT-SIZE: 9pt">type="org.apache.catalina.UserDatabase"/&gt;</span>
		</div>
		<div style="TEXT-INDENT: 21pt">这里就和以前的<span>tomcat4版本不一样了，以前要在server.xml配置．而tomcat5版本直接在这里配置就可以了．</span></div>
		<div>第三步：在你项目的<span>web.xml配置如下：</span></div>
		<div>
				<span style="FONT-SIZE: 9pt"> &lt;resource-ref&gt;</span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt">    &lt;description&gt;mysql  for 192.1.1.156 &lt;/description&gt;</span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt">    &lt;res-ref-name&gt; jdbc/mysql &lt;/res-ref-name&gt;</span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt">    &lt;res-type&gt;javax.sql.DataSource&lt;/res-type&gt;</span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt">    &lt;res-auth&gt;Container&lt;/res-auth&gt;</span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt"> &lt;/resource-ref&gt;</span>
		</div>
		<div>
				<span style="COLOR: red">注意：这里的res-ref-name名字必须和testTomcat.xml文件中的一样．其实这一步省去也是可以的．但还是建议配置一下．</span>
		</div>
		<div>第四步：建一个<span>JSP页面来感受一下成功的喜悦吧．页面代码如下</span></div>
		<div style="TEXT-INDENT: 45pt">
				<span style="FONT-SIZE: 9pt">Context initCtx = new InitialContext();</span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt">           Context ctx = (Context) initCtx.lookup("java:comp/env");</span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt">          ds   =(javax.sql.DataSource) ctx.lookup(</span>
				<span style="FONT-SIZE: 9pt">＂jdbc/mysql＂);</span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt">          System.out.println("Init datasource OK @!");</span>
		</div>
		<div>
				<span style="COLOR: red">注意：别忘了引入相关的包哦．还要注意的是这里不能用主函数来测试．因为你主函是得到</span>tomcat的上下文的．</div>
		<div>在项目中应用如下：</div>
		<div>
				<span style="FONT-SIZE: 9pt">public class TomcatJDNI {</span>
		</div>
		<div> </div>
		<div>
				<span style="FONT-SIZE: 9pt">     public static String</span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt">     DATASOURCE_CONFIG_FILE="test.db";</span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt">         public static DataSource ds;</span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt">         </span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt">         static{</span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt">              try{</span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt">          ResourceBundle rb = ResourceBundle.getBundle(DATASOURCE_CONFIG_FILE);</span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt">          String dsName     = rb.getString("datasource_name");</span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt">               Context initCtx = new InitialContext();</span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt">              Context ctx = (Context) initCtx.lookup("java:comp/env");</span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt">          ds   =(javax.sql.DataSource) ctx.lookup(dsName);</span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt">          System.out.println("Init datasource OK @!");</span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt">     }catch(Exception e){</span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt">         System.out.println("can’t init datasource !");</span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt">     }</span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt">     }</span>
		</div>
		<div> </div>
		<div>
				<span style="FONT-SIZE: 9pt">     public static Connection getConnection() throws SQLException{</span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt">         return ds.getConnection();</span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt">     }</span>
		</div>
		<div>
				<span style="FONT-SIZE: 9pt">｝</span>
		</div>
		<div>这里的<span>test.db是一个db.properties文件．文件内容如下</span></div>
		<div>
				<span style="FONT-SIZE: 9pt">datasource_name= jdbc/mysql</span>
		</div>
		<div>这样扩展性比较好．连接其它的数据库，只需要改动此文件，无需重新编译．</div>
		<div>就到这里吧</div>
		<div>Good luck!</div>
		<br />
<img src ="http://www.blogjava.net/liaojiyong/aggbug/107403.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/liaojiyong/" target="_blank">liaojiyong</a> 2007-03-30 09:29 <a href="http://www.blogjava.net/liaojiyong/archive/2007/03/30/107403.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Hibernate 连Tomcat数据源配置 （转）</title><link>http://www.blogjava.net/liaojiyong/archive/2007/03/23/105712.html</link><dc:creator>liaojiyong</dc:creator><author>liaojiyong</author><pubDate>Fri, 23 Mar 2007 01:31:00 GMT</pubDate><guid>http://www.blogjava.net/liaojiyong/archive/2007/03/23/105712.html</guid><wfw:comment>http://www.blogjava.net/liaojiyong/comments/105712.html</wfw:comment><comments>http://www.blogjava.net/liaojiyong/archive/2007/03/23/105712.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/liaojiyong/comments/commentRss/105712.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/liaojiyong/services/trackbacks/105712.html</trackback:ping><description><![CDATA[
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US">1 </span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">参考</span>
				<span lang="EN-US">Tomcat</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">配置文件</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">配好</span>
				<span lang="EN-US">Tomcat</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">数据源</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US">2 </span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">修改</span>
				<span lang="EN-US">Hibernate </span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">配置文件</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
				<span lang="EN-US">
						<span style="mso-spacerun: yes">  </span>
				</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">&lt;?</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: #3f7f7f; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">xml </span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: #7f007f; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">version</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">=</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: #2a00ff; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">'1.0' </span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: #7f007f; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">encoding</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">=</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: #2a00ff; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">'UTF-8'</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">?&gt;</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
						<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /?>
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">&lt;!</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: #3f7f7f; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">DOCTYPE </span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">hibernate-configuration </span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">PUBLIC</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
						<span style="mso-spacerun: yes">          </span>
				</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">"-//Hibernate/Hibernate Configuration DTD 3.0//EN"<span style="mso-spacerun: yes">         </span></span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: #3f7f5f; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">&gt;</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: #3f5fbf; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">&lt;!-- Generated by MyEclipse Hibernate Tools.<span style="mso-spacerun: yes">                   </span>--&gt;</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">&lt;</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: #3f7f7f; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">hibernate-configuration</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">&gt;</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">&lt;</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: #3f7f7f; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">session-factory</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">&gt;</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
						<span style="mso-tab-count: 1">    </span>
				</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: fuchsia; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">&lt;property name="connection.useUnicode"&gt;true&lt;/property&gt;<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: fuchsia; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
						<span style="mso-tab-count: 1">    </span>&lt;property name="connection.characterEncoding"&gt;gb2312&lt;/property&gt;<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
						<span style="mso-spacerun: yes">   </span>&lt;!—</span>
				<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">只配这一句就可以了的</span>
				<span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
				</span>
				<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">用户名密码等等其他参数全部不用配了的</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">-- &gt;<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
						<span style="mso-tab-count: 1">    </span>
				</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">&lt;property name="connection.datasource"&gt;java:comp/env/jdbc/mysql&lt;/property&gt;<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
						<span style="mso-tab-count: 1">    </span>
				</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">&lt;</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: #3f7f7f; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">property </span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: #7f007f; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">name</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">=</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: #2a00ff; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">"dialect"</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">&gt;</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
						<span style="mso-tab-count: 2">       </span>org.hibernate.dialect.MySQLDialect</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
						<span style="mso-tab-count: 1">    </span>
				</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">&lt;/</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: #3f7f7f; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">property</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">&gt;</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
						<span style="mso-tab-count: 1">    </span>
				</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">&lt;</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: #3f7f7f; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">mapping </span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: #7f007f; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">resource</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">=</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: #2a00ff; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">"com/test/Hibernate/orm/User.hbm.xml" </span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">/&gt;</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">&lt;/</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: #3f7f7f; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">session-factory</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">&gt;</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">&lt;/</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: #3f7f7f; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">hibernate-configuration</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">&gt;<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US">3 </span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">测试用例</span>
		</p>
<img src ="http://www.blogjava.net/liaojiyong/aggbug/105712.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/liaojiyong/" target="_blank">liaojiyong</a> 2007-03-23 09:31 <a href="http://www.blogjava.net/liaojiyong/archive/2007/03/23/105712.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Tomcat 数据库连接池配置(各种版本) (转)</title><link>http://www.blogjava.net/liaojiyong/archive/2007/03/23/105710.html</link><dc:creator>liaojiyong</dc:creator><author>liaojiyong</author><pubDate>Fri, 23 Mar 2007 01:29:00 GMT</pubDate><guid>http://www.blogjava.net/liaojiyong/archive/2007/03/23/105710.html</guid><wfw:comment>http://www.blogjava.net/liaojiyong/comments/105710.html</wfw:comment><comments>http://www.blogjava.net/liaojiyong/archive/2007/03/23/105710.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/liaojiyong/comments/commentRss/105710.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/liaojiyong/services/trackbacks/105710.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: Tomcat 				数据库连接池配置								前言				:														  1  				准备				mysql				的				jdbc				驱动程序														  2  				安装				Tomcat 				默认全部装在				D:\Server\tomcat5...&nbsp;&nbsp;<a href='http://www.blogjava.net/liaojiyong/archive/2007/03/23/105710.html'>阅读全文</a><img src ="http://www.blogjava.net/liaojiyong/aggbug/105710.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/liaojiyong/" target="_blank">liaojiyong</a> 2007-03-23 09:29 <a href="http://www.blogjava.net/liaojiyong/archive/2007/03/23/105710.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>JBoss核心价值</title><link>http://www.blogjava.net/liaojiyong/archive/2006/06/30/55913.html</link><dc:creator>liaojiyong</dc:creator><author>liaojiyong</author><pubDate>Fri, 30 Jun 2006 03:45:00 GMT</pubDate><guid>http://www.blogjava.net/liaojiyong/archive/2006/06/30/55913.html</guid><wfw:comment>http://www.blogjava.net/liaojiyong/comments/55913.html</wfw:comment><comments>http://www.blogjava.net/liaojiyong/archive/2006/06/30/55913.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/liaojiyong/comments/commentRss/55913.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/liaojiyong/services/trackbacks/55913.html</trackback:ping><description><![CDATA[
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%; TEXT-ALIGN: center; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-outline-level: 1" align="center">
				<b>
						<span lang="EN-US" style="FONT-SIZE: 11pt; COLOR: #003c94; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 18.0pt">JBoss Core Values<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /?><o:p></o:p></span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%; TEXT-ALIGN: center; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-outline-level: 1" align="center">
				<b>
						<span style="FONT-SIZE: 11pt; COLOR: #003c94; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 18.0pt">
						</span>
				</b>
				<b>
						<span lang="EN-US" style="FONT-SIZE: 11pt; COLOR: #003c94; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 18.0pt">
								<o:p>
								</o:p>
						</span>
				</b> </p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-outline-level: 1">
				<b>
						<span style="FONT-SIZE: 9pt; COLOR: #003c94; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 18.0pt">原文地址</span>
				</b>
				<b>
						<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: #003c94; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 18.0pt">
								<a href="http://www.jboss.org/company/corevalues">http://www.jboss.org/company/corevalues</a>
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-outline-level: 2" align="left">
				<b>
						<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: #003c94; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">1. "Professional Open Source™"</span>
				</b>
				<b>
						<span style="FONT-SIZE: 9pt; COLOR: #003c94; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">专业开源</span>
				</b>
				<b>
						<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: #003c94; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<ul type="disc">
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; tab-stops: list 36.0pt; mso-list: l1 level1 lfo1">
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">We passionately believe in this collection of words, our invention, and the market category it defines. We are committed to making Open Source safe for enterprises. <o:p></o:p></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; tab-stops: list 36.0pt; mso-list: l1 level1 lfo1">
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">我们满怀热情的相信这个程序的集合体</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">,</span>
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">我们的创造和它所定义的市场范畴</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">.</span>
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">我们致力于开源企业级的安全性应用</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">.<o:p></o:p></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; tab-stops: list 36.0pt; mso-list: l1 level1 lfo1">
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">We were born out of the Open Source movement and believe professional open source is the way for <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /?><st1:place w:st="on"><st1:city w:st="on">OSS</st1:city></st1:place> to achieve its full potential. <o:p></o:p></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; tab-stops: list 36.0pt; mso-list: l1 level1 lfo1">
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">我们出生于开源运动并相信专业开源是</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">OSS</span>
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">达到它潜力及至的方法</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">.<o:p></o:p></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; tab-stops: list 36.0pt; mso-list: l1 level1 lfo1">
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">We believe in Free Software as a safe choice for developers, partners and end users alike. We use other licenses as needed. <o:p></o:p></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; tab-stops: list 36.0pt; mso-list: l1 level1 lfo1">
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">我们相信免费软件对于开发人员</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">,</span>
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">合作者和最终用户来说是一个安全的选择</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">.</span>
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">我们使用其他需要的认证机制</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">.<o:p></o:p></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; tab-stops: list 36.0pt; mso-list: l1 level1 lfo1">
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">We believe in for-profit open source as a way to fairly compensate talented individuals. <o:p></o:p></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; tab-stops: list 36.0pt; mso-list: l1 level1 lfo1">
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">我们相信有偿开源是一种对个人智力劳动付出的公平的补偿方式</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">
								<o:p>
								</o:p>
						</span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; tab-stops: list 36.0pt; mso-list: l1 level1 lfo1">
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">Our survival depends on delivering superior service to customers. We prove that Open Source and Professionalism do rhyme. <o:p></o:p></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; tab-stops: list 36.0pt; mso-list: l1 level1 lfo1">
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">我们的生存依赖于为用户提供高级的服务</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">.</span>
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">我们证明开源和专家主义可以和谐发展</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">.<o:p></o:p></span>
				</li>
		</ul>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-outline-level: 2" align="left">
				<b>
						<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: #003c94; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">2. Group trust and personal integrity </span>
				</b>
				<b>
						<span style="FONT-SIZE: 9pt; COLOR: #003c94; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">团队的信任和个人的价值完整</span>
				</b>
				<b>
						<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: #003c94; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<ul type="disc">
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; tab-stops: list 36.0pt; mso-list: l0 level1 lfo2">
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">We operate internally on the basis of mutual trust. Nobody in the company will knowingly deceive another member. <o:p></o:p></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; tab-stops: list 36.0pt; mso-list: l0 level1 lfo2">
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">我们内部的运作基于相互的信任</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">.</span>
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">在公司里没有人可以故意欺骗其他成员</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">.<o:p></o:p></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; tab-stops: list 36.0pt; mso-list: l0 level1 lfo2">
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">We are honest. <o:p></o:p></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; tab-stops: list 36.0pt; mso-list: l0 level1 lfo2">
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">我们都是正直的人</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">.<o:p></o:p></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; tab-stops: list 36.0pt; mso-list: l0 level1 lfo2">
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">We tell the truth among ourselves, to our clients, to our partners, to our investors, to our prospects. <o:p></o:p></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; tab-stops: list 36.0pt; mso-list: l0 level1 lfo2">
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">我们对我们的客户</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">,</span>
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">合作伙伴</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">,</span>
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">投资者</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">,</span>
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">前景在我们自身之间坦诚相告</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">.<o:p></o:p></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; tab-stops: list 36.0pt; mso-list: l0 level1 lfo2">
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">We are committed to profitability and sound finances. We are thrifty. <o:p></o:p></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; tab-stops: list 36.0pt; mso-list: l0 level1 lfo2">
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">我们致力于收益率和可靠的财务状况</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">.</span>
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">我们勤俭节约</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">.<o:p></o:p></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; tab-stops: list 36.0pt; mso-list: l0 level1 lfo2">
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">We place the needs of the federation of projects above individual ones. <o:p></o:p></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; tab-stops: list 36.0pt; mso-list: l0 level1 lfo2">
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">我们将项目中联盟的需要放在个人需要之上</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">.<o:p></o:p></span>
				</li>
		</ul>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-outline-level: 2" align="left">
				<b>
						<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: #003c94; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">3. Excellence and Ambition</span>
				</b>
				<b>
						<span style="FONT-SIZE: 9pt; COLOR: #003c94; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">优点和雄心</span>
				</b>
				<b>
						<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: #003c94; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<ul type="disc">
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; tab-stops: list 36.0pt; mso-list: l2 level1 lfo3">
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">We innovate at all cost in technology and business. We reward, empower and promote talent. <o:p></o:p></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; tab-stops: list 36.0pt; mso-list: l2 level1 lfo3">
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">我们在所有的技术和商业领域创新发展</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">.</span>
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">我们给予人才回报</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">,</span>
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">权利和发展</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">.<o:p></o:p></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; tab-stops: list 36.0pt; mso-list: l2 level1 lfo3">
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">We operate as a meritocracy. For developers street credentials must be earned. In business common sense must be proved. <o:p></o:p></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; tab-stops: list 36.0pt; mso-list: l2 level1 lfo3">
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">我们以实力主义来运作</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">.</span>
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">开发人员必须有街道的证明</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">.</span>
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">必须具备商业常识</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">.<o:p></o:p></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; tab-stops: list 36.0pt; mso-list: l2 level1 lfo3">
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">We don't underestimate our competition, we remain paranoid. <o:p></o:p></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; tab-stops: list 36.0pt; mso-list: l2 level1 lfo3">
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">我们不低估我们的竞争对手</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">,</span>
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">我们保持偏执</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">.<o:p></o:p></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; tab-stops: list 36.0pt; mso-list: l2 level1 lfo3">
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">Technology first. We base decisions first on technology, then business, then competition. <o:p></o:p></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; tab-stops: list 36.0pt; mso-list: l2 level1 lfo3">
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">技术第一</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">.</span>
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">我们决定的基础第一是技术</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">,</span>
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">再次是商业</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">,</span>
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">最后是竞争</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">.<o:p></o:p></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; tab-stops: list 36.0pt; mso-list: l2 level1 lfo3">
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">Our long term ambition is to make JBoss the defacto middleware platform for the industry. <o:p></o:p></span>
				</li>
				<li class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; tab-stops: list 36.0pt; mso-list: l2 level1 lfo3">
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">我们长期的雄心是使得</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">JBoss</span>
						<span style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">成为业界的既成事实上的中间件平台</span>
						<span lang="EN-US" style="FONT-SIZE: 8pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">.<o:p></o:p></span>
				</li>
		</ul>
<img src ="http://www.blogjava.net/liaojiyong/aggbug/55913.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/liaojiyong/" target="_blank">liaojiyong</a> 2006-06-30 11:45 <a href="http://www.blogjava.net/liaojiyong/archive/2006/06/30/55913.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>JBoss3.x和4.x下配SqlServer JDBC驱动（转）</title><link>http://www.blogjava.net/liaojiyong/archive/2006/06/30/55912.html</link><dc:creator>liaojiyong</dc:creator><author>liaojiyong</author><pubDate>Fri, 30 Jun 2006 03:40:00 GMT</pubDate><guid>http://www.blogjava.net/liaojiyong/archive/2006/06/30/55912.html</guid><wfw:comment>http://www.blogjava.net/liaojiyong/comments/55912.html</wfw:comment><comments>http://www.blogjava.net/liaojiyong/archive/2006/06/30/55912.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/liaojiyong/comments/commentRss/55912.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/liaojiyong/services/trackbacks/55912.html</trackback:ping><description><![CDATA[
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">
				</span> </p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US">
						<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /?>
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在为</span>
				<span lang="EN-US">JBoss</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">配置</span>
				<span lang="EN-US">Hibernate</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的时候发现的问题和心得</span>
				<span lang="EN-US">,</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">拿出来共享一下</span>
				<span lang="EN-US">.</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; tab-stops: list 18.0pt; mso-list: l0 level1 lfo1">
				<span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">1.<span style="FONT: 7pt 'Times New Roman'">       </span></span>
				</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">使用微软的</span>
				<span lang="EN-US">SQLSERVER2000</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">驱动</span>
				<span lang="EN-US">,</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">为三个文件</span>
				<span lang="EN-US">mssqlserver.jar ,msutil.jar</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</span>
				<span lang="EN-US"> mbase.jar,copy</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">至</span>
				<span lang="EN-US">server\default\lib</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下</span>
				<span lang="EN-US">.</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; tab-stops: list 18.0pt; mso-list: l0 level1 lfo1">
				<span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">2.<span style="FONT: 7pt 'Times New Roman'">       </span></span>
				</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">设置</span>
				<span lang="EN-US">mssql-ds.xml,</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">具体设置方法参见</span>
				<span lang="EN-US">jboss</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">说明文档</span>
				<span lang="EN-US">.</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我们可以在</span>
				<span lang="EN-US">\docs\examples\jca</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下找到默认的各种对应数据库配置文件模板</span>
				<span lang="EN-US">. mssql-ds.xml</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">为</span>
				<span lang="EN-US">:</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt">&lt;?xml version="1.0" encoding="UTF-8"?&gt;<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt">&lt;datasources&gt;<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<span style="mso-spacerun: yes">  </span>&lt;local-tx-datasource&gt;<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<span style="mso-spacerun: yes">    </span>&lt;jndi-name&gt;MSSQLDS&lt;/jndi-name&gt;<span style="mso-spacerun: yes">  </span>&lt;connection-url&gt;jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=MyDatabase&lt;/connection-url&gt;<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<span style="mso-spacerun: yes">    </span>&lt;driver-class&gt;com.microsoft.jdbc.sqlserver.SQLServerDriver&lt;/driver-class&gt;<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<span style="mso-spacerun: yes">    </span>&lt;user-name&gt;x&lt;/user-name&gt;<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<span style="mso-spacerun: yes">    </span>&lt;password&gt;y&lt;/password&gt;<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<span style="mso-spacerun: yes">      </span>&lt;!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) --&gt;<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<span style="mso-spacerun: yes">      </span>&lt;metadata&gt;<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<span style="mso-spacerun: yes">         </span>&lt;type-mapping&gt;MS SQLSERVER2000&lt;/type-mapping&gt;<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<span style="mso-spacerun: yes">      </span>&lt;/metadata&gt;<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<span style="mso-spacerun: yes">  </span>&lt;/local-tx-datasource&gt;<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt">&lt;/datasources&gt;<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">修改对应的属性</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">,</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一般修改</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">jndi-name ,onnection-url, user-name, password.<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">将修改好的</span>
				<span lang="EN-US">mssql-ds.xml</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">拷贝到</span>
				<span lang="EN-US">server\default\deploy</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">目录下并删除默认的</span>
				<span lang="EN-US">hsqldb-ds.xml</span>
				<span lang="EN-US" style="mso-bidi-font-size: 9.0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; tab-stops: list 18.0pt; mso-list: l0 level1 lfo1">
				<span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">3.<span style="FONT: 7pt 'Times New Roman'">       </span></span>
				</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">设置</span>
				<span lang="EN-US">server\default\conf</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">目录下</span>
				<span lang="EN-US">standardjws.xml</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</span>
				<span lang="EN-US"> standardjbosscmp-jdbc.xml</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中</span>
				<span lang="EN-US">Jndi name</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</span>
				<span lang="EN-US">type-mapping :</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt">
				<span lang="EN-US">standardjbosscmp-jdbc.xml</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中</span>
				<span lang="EN-US">:</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">修改</span>
				<span lang="EN-US">&lt;datasource&gt;java:/MSSQLDS&lt;/datasource&gt;</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">加入</span>
				<span lang="EN-US">&lt;datasource-mapping&gt;MS SQLSERVER2000&lt;/datasource-mapping&gt;</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt">
				<span lang="EN-US">standardjws.xml</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">修改</span>
				<span lang="EN-US">&lt;datasource&gt;java:/MSSQLDS&lt;/datasource&gt;</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US">
						<span style="mso-spacerun: yes">   </span>
						<span style="mso-tab-count: 2">         </span>&lt;type-mapping&gt;MS SQLSERVER2000&lt;/type-mapping&gt;</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; tab-stops: list 18.0pt; mso-list: l0 level1 lfo1">
				<span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">4.<span style="FONT: 7pt 'Times New Roman'">       </span></span>
				</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">配置</span>
				<span lang="EN-US">JMS:</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这里</span>
				<span lang="EN-US">JBoss3.x </span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</span>
				<span lang="EN-US"> 4.x</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">有些区别</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在</span>
				<span lang="EN-US">3.x</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中拷贝</span>
				<span lang="EN-US">mssql-jdbc2.xml</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">到</span>
				<span lang="EN-US">defult/deploy/jms/</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文件夹下</span>
				<span lang="EN-US">,</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">并删除默认的</span>
				<span lang="EN-US">hsqldb-jdbc2.xml</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在</span>
				<span lang="EN-US">4.x</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中拷贝</span>
				<span lang="EN-US">mssql-jdbc2-service.xml </span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">到</span>
				<span lang="EN-US">defult\deploy-hasingleton\jms </span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文件夹下并删除默认的</span>
				<span lang="EN-US">hsqldb-jdbc2-service.xml.</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt">
				<span lang="EN-US">mssql-jdbc2.xml</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</span>
				<span lang="EN-US">mssql-jdbc2-service.xml</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">均能在</span>
				<span lang="EN-US">docs\examples\jms</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中找到模板</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US">
						<span style="mso-tab-count: 1">       </span>
				</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如果没有这个设置</span>
				<span lang="EN-US">,</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">就会报关于</span>
				<span lang="EN-US">JMS_MESSAGES</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的异常</span>
				<span lang="EN-US">:</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span class="postbody2">
						<b>
								<span lang="EN-US" style="FONT-SIZE: 6pt; COLOR: brown; FONT-FAMILY: Verdana">org.<span id="highlight_tag" style="EE6600: "></span></span>
						</b>
				</span>
				<span class="postbody2">
						<b>
								<span lang="EN-US" style="FONT-SIZE: 6pt; BACKGROUND: yellow; COLOR: #ee6600; FONT-FAMILY: Verdana">jboss</span>
						</b>
				</span>
				<span class="postbody2">
						<b>
								<span lang="EN-US" style="FONT-SIZE: 6pt; COLOR: brown; FONT-FAMILY: Verdana">.mq.SpyJMSException: Could not resolve uncommited transactions. Message recovery may not be accurate; - nested throwable: (java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]SELECT permission denied on object 'JMS_MESSAGES', database 'test'.)</span>
						</b>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US">
						<o:p> </o:p>
				</span>
		</p>
<img src ="http://www.blogjava.net/liaojiyong/aggbug/55912.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/liaojiyong/" target="_blank">liaojiyong</a> 2006-06-30 11:40 <a href="http://www.blogjava.net/liaojiyong/archive/2006/06/30/55912.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>为Jboss4配置数据库（转）</title><link>http://www.blogjava.net/liaojiyong/archive/2006/06/30/55907.html</link><dc:creator>liaojiyong</dc:creator><author>liaojiyong</author><pubDate>Fri, 30 Jun 2006 03:37:00 GMT</pubDate><guid>http://www.blogjava.net/liaojiyong/archive/2006/06/30/55907.html</guid><wfw:comment>http://www.blogjava.net/liaojiyong/comments/55907.html</wfw:comment><comments>http://www.blogjava.net/liaojiyong/archive/2006/06/30/55907.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/liaojiyong/comments/commentRss/55907.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/liaojiyong/services/trackbacks/55907.html</trackback:ping><description><![CDATA[
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<font size="5">
						<span lang="EN-US">
								<span style="mso-tab-count: 1">       </span>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在使用</span>
						<span lang="EN-US">jboss4</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">配置数据库连接的基本操作步骤（不包括</span>
						<span lang="EN-US">XA</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">数据连接）：</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; tab-stops: list 18.0pt; mso-list: l0 level1 lfo1">
				<font size="5">
						<span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'">
								<span style="mso-list: Ignore">1．<span style="FONT: 7pt 'Times New Roman'">  </span></span>
						</span>
						<span lang="EN-US">Copy</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">数据库的</span>
						<span lang="EN-US">JDBC</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">驱动至部署文件夹中的</span>
						<span lang="EN-US">lib</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">目录下</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; tab-stops: list 18.0pt; mso-list: l0 level1 lfo1">
				<font size="5">
						<span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'">
								<span style="mso-list: Ignore">2．<span style="FONT: 7pt 'Times New Roman'">  </span></span>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">建立所需要连接的物理数据库表。</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; tab-stops: list 18.0pt; mso-list: l0 level1 lfo1">
				<font size="5">
						<span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'">
								<span style="mso-list: Ignore">3．<span style="FONT: 7pt 'Times New Roman'">  </span></span>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">建立数据库配置文件，配置数据库参数，文件以</span>
						<span lang="EN-US">-ds.xml</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">为结尾，如</span>
						<span lang="EN-US">mysql-ds.xml</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。配置文件具体方法参照</span>
						<span lang="EN-US">docs/example/jca</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下，有各种数据库的例程。在这里只介绍几个常用的配置。修改好的配置文件放在</span>
						<span lang="EN-US">web</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">应用部署目录下，如</span>
						<span lang="EN-US">web</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">应用为</span>
						<span lang="EN-US">all</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，则放在</span>
						<span lang="EN-US">$JBOSS4_HOME\server\all\deploy</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下。</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; tab-stops: list 18.0pt; mso-list: l0 level1 lfo1">
				<font size="5">
						<span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'">
								<span style="mso-list: Ignore">4．<span style="FONT: 7pt 'Times New Roman'">  </span></span>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">修变</span>
						<span lang="EN-US">jboss</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</span>
						<span lang="EN-US">CMP</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">配置文件</span>
						<span lang="EN-US">jbosscmp-jdbc.xml</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">参数。一般修改</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt">
				<span lang="EN-US">
						<font size="5">&lt;datasource&gt;java:/DefaultDS&lt;/datasource&gt;</font>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt">
				<span lang="EN-US">
						<font size="5">&lt;datasource-mapping&gt;mysql&lt;/datasource-mapping&gt;</font>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt">
				<font size="5">
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这两个参数，将</span>
						<span lang="EN-US">DefaultDS</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">换为你在</span>
						<span lang="EN-US">-ds.xml</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文件中的</span>
						<span lang="EN-US">&lt;jndi-name&gt;</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的值，将</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt">
				<font size="5">
						<span lang="EN-US">datasource-mapping</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">改为</span>
						<span lang="EN-US">-ds.xml</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文件中</span>
						<span lang="EN-US">&lt;type-mapping&gt;</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的值。</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; tab-stops: list 18.0pt; mso-list: l0 level1 lfo1">
				<font size="5">
						<span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'">
								<span style="mso-list: Ignore">5．<span style="FONT: 7pt 'Times New Roman'">  </span></span>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">启动</span>
						<span lang="EN-US">jboss</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，测试数据库连接</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US">
						<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /?>
						<o:p>
								<font size="5"> </font>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; tab-stops: list 21.0pt; mso-list: l2 level1 lfo2">
				<font size="5">
						<span lang="EN-US" style="mso-bidi-font-family: 宋体">
								<span style="mso-list: Ignore">一．</span>
						</span>
						<span lang="EN-US">MYSQL</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt">
				<font size="5">
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在</span>
						<span lang="EN-US">jboss4</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文档中默认的例程就是</span>
						<span lang="EN-US">myssql</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的例子。（见第八章</span>
						<span lang="EN-US">54</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">页）</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 39pt; TEXT-INDENT: -18pt; tab-stops: list 39.0pt; mso-list: l1 level1 lfo3">
				<font size="5">
						<span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'">
								<span style="mso-list: Ignore">1．<span style="FONT: 7pt 'Times New Roman'">  </span></span>
						</span>
						<span lang="EN-US">Mysql</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</span>
						<span lang="EN-US">JDBC</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">驱动</span>
						<span lang="EN-US">connector/j</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可以在</span>
						<span lang="EN-US">
								<a href="http://www.mysql.com/">
										<font color="#000080">http://www.mysql.com</font>
								</a>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下载得到</span>
						<span lang="EN-US">.</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 39pt">
				<font size="5">
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">现在最新的</span>
						<span lang="EN-US">mysql</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是</span>
						<span lang="EN-US">4.1, connector/j</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是</span>
						<span lang="EN-US">3.2</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。分别对应以下地址</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 39pt">
				<span lang="EN-US">
						<a href="http://dev.mysql.com/downloads/mysql/4.1.html">
								<font color="#000080" size="5">http://dev.mysql.com/downloads/mysql/4.1.html</font>
						</a>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 39pt">
				<span lang="EN-US">
						<a href="http://dev.mysql.com/downloads/connector/j/3.2.html">
								<font color="#000080" size="5">http://dev.mysql.com/downloads/connector/j/3.2.html</font>
						</a>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 39pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">
						<font size="5">下载的时候感觉韩国的几个站点速度是最快的</font>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 39pt">
				<font size="5">
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">（</span>
						<span lang="EN-US">btw</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">：台湾站点居然有青天白日旗，一定要跟</span>
						<span lang="EN-US">jboss</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">抗议一下）</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 39pt">
				<span lang="EN-US">
						<o:p>
								<font size="5"> </font>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 39pt; TEXT-INDENT: -18pt; tab-stops: list 39.0pt; mso-list: l1 level1 lfo3">
				<font size="5">
						<span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'">
								<span style="mso-list: Ignore">2．<span style="FONT: 7pt 'Times New Roman'">  </span></span>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在</span>
						<span lang="EN-US">mysql</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">客户端中建立一个数据库叫做</span>
						<span lang="EN-US">test</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: 21pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
				<span lang="EN-US" style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
						<font size="5">mysql&gt; CREATE DATABASE test;<o:p></o:p></font>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US">
						<o:p>
								<font size="5"> </font>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 39pt; TEXT-INDENT: -18pt; tab-stops: list 39.0pt; mso-list: l1 level1 lfo3">
				<font size="5">
						<span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'">
								<span style="mso-list: Ignore">3．<span style="FONT: 7pt 'Times New Roman'">  </span></span>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">建立一个</span>
						<span lang="EN-US">Mysql-ds.xml</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文件</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 39pt">
				<span lang="EN-US">
						<font size="5">&lt;datasources&gt; </font>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: 3pt">
				<span lang="EN-US">
						<font size="5">&lt;local-tx-datasource&gt; </font>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: 21pt">
				<span lang="EN-US">
						<font size="5">&lt;jndi-name&gt;DefaultDS&lt;/jndi-name&gt; </font>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: 21pt">
				<span lang="EN-US">
						<font size="5">&lt;connection-url&gt;jdbc:mysql://localhost:3306/test&lt;/connection-url&gt; </font>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: 21pt">
				<span lang="EN-US">
						<font size="5">&lt;driver-class&gt;com.mysql.jdbc.Driver&lt;/driver-class&gt; </font>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: 21pt">
				<span lang="EN-US">
						<font size="5">&lt;user-name&gt;username&lt;/user-name&gt; </font>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: 21pt">
				<span lang="EN-US">
						<font size="5">&lt;password&gt;password&lt;/password&gt; </font>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: 21pt">
				<span lang="EN-US">
						<font size="5">&lt;metadata&gt;</font>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: 21pt">
				<span lang="EN-US">
						<font size="5">
								<span style="mso-spacerun: yes">         </span>&lt;type-mapping&gt;mysql&lt;/type-mapping&gt;</font>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: 21pt">
				<span lang="EN-US">
						<font size="5">
								<span style="mso-spacerun: yes"> </span>&lt;/metadata&gt;</font>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 17.95pt; TEXT-INDENT: 26.25pt; mso-char-indent-count: 2.5; mso-para-margin-left: 1.71gd">
				<span lang="EN-US">
						<font size="5">&lt;/local-tx-datasource&gt;</font>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: 21pt">
				<span lang="EN-US">
						<font size="5">&lt;/datasources&gt;</font>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: 21pt">
				<font size="5">
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">也可以将</span>
						<span lang="EN-US">docs/example/jca</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下的</span>
						<span lang="EN-US">Mysql-ds.xml</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">拷贝过来修改。保存在</span>
						<span lang="EN-US">deploy</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下。并删除</span>
						<span lang="EN-US">jboss</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">默认的</span>
						<span lang="EN-US">hsqldb-ds.xml</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 39pt; TEXT-INDENT: -18pt; tab-stops: list 39.0pt; mso-list: l1 level1 lfo3">
				<font size="5">
						<span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'">
								<span style="mso-list: Ignore">4．<span style="FONT: 7pt 'Times New Roman'">  </span></span>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">打开</span>
						<span lang="EN-US">jbosscmp-jdbc.xml</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，将</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 22.5pt; mso-char-indent-count: 2.5; mso-para-margin-left: 2.0gd">
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<font size="5">&lt;datasource&gt;java:/DefaultDS&lt;/datasource&gt;<o:p></o:p></font>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<font size="5">
								<span style="mso-spacerun: yes"> </span>
								<span style="mso-spacerun: yes">     </span>&lt;!-- optional since 4.0 &lt;datasource-mapping&gt;Hypersonic SQL&lt;/datasource-mapping&gt; --&gt;<o:p></o:p></font>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt">
				<font size="5">
						<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">修改为</span>
						<span lang="EN-US" style="FONT-SIZE: 9pt">
								<o:p>
								</o:p>
						</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 22.5pt; mso-char-indent-count: 2.5; mso-para-margin-left: 2.0gd">
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<font size="5">&lt;datasource&gt;java:/DefaultDS&lt;/datasource&gt;<o:p></o:p></font>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt">
				<font size="5">
						<span lang="EN-US" style="FONT-SIZE: 9pt">
								<span style="mso-spacerun: yes">     </span>&lt;datasource-mapping&gt;</span>
						<span lang="EN-US">mysql</span>
						<span lang="EN-US" style="FONT-SIZE: 9pt">&lt;/datasource-mapping&gt; <o:p></o:p></span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 39pt; TEXT-INDENT: -18pt; tab-stops: list 39.0pt; mso-list: l1 level1 lfo3">
				<font size="5">
						<span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'">
								<span style="mso-list: Ignore">5．<span style="FONT: 7pt 'Times New Roman'">  </span></span>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">启动</span>
						<span lang="EN-US">jboss</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。如果自己的</span>
						<span lang="EN-US">web</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">应用为</span>
						<span lang="EN-US">all</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，则使用</span>
						<span lang="EN-US">run –c all</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; tab-stops: list 21.0pt; mso-list: l2 level1 lfo2">
				<font size="5">
						<span lang="EN-US" style="mso-bidi-font-family: 宋体">
								<span style="mso-list: Ignore">二．</span>
						</span>
						<span lang="EN-US">ORACLE</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt">
				<font size="5">
						<span lang="EN-US">Oracle</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的数据库驱动可以在</span>
						<span lang="EN-US">Oracle</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的安装目录下找到，</span>
						<span lang="EN-US">oracle\ora92\jdbc\lib</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下</span>
						<span lang="EN-US">ojdbc14.jar</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">或</span>
						<span lang="EN-US">ojdbc14_g.jar</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt">
				<font size="5">
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">建立</span>
						<span lang="EN-US">oracle-ds.xml</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，注意</span>
						<span lang="EN-US">Oracle</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</span>
						<span lang="EN-US">URL</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">为</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt">
				<span lang="EN-US">
						<font size="5">&lt;connection-url&gt;jdbc:oracle:thin:@youroraclehost:1521:yoursid&lt;/connection-url&gt;</font>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US">
						<o:p>
								<font size="5"> </font>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; tab-stops: list 21.0pt; mso-list: l2 level1 lfo2">
				<font size="5">
						<span lang="EN-US" style="mso-bidi-font-family: 宋体">
								<span style="mso-list: Ignore">三．</span>
						</span>
						<span lang="EN-US">SQLSERVER2000</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<font size="5">
						<span lang="EN-US">
								<span style="mso-spacerun: yes"> </span>
								<span style="mso-spacerun: yes">   </span>SQLSERVER2000</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的数据库驱动可以在</span>
						<span lang="EN-US">microsoft</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">网站找到，包括三个文件</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt">
				<font size="5">
						<span lang="EN-US">msbase.jar,mssqlserver.jar</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</span>
						<span lang="EN-US">msutil.jar</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，建立</span>
						<span lang="EN-US">mssql-ds.xml</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
						<span lang="EN-US">SQLSERVER2000</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</span>
						<span lang="EN-US">URL</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">为</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 22.5pt; mso-char-indent-count: 2.5">
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<font size="5">&lt;connection-url&gt;jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=MyDatabase&lt;/connection-url&gt;<o:p></o:p></font>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<font size="5">
								<span style="mso-spacerun: yes">    </span>
								<span style="mso-spacerun: yes"> </span>&lt;driver-class&gt;com.microsoft.jdbc.sqlserver.SQLServerDriver&lt;/driver-class&gt;<o:p></o:p></font>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<o:p>
								<font size="5"> </font>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt">
				<font size="5">
						<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如果使用</span>
						<span lang="EN-US" style="FONT-SIZE: 9pt">Weblogic</span>
						<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</span>
						<span lang="EN-US">SQLSERVER2000</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">驱动，则是在</span>
						<span lang="EN-US">bea\weblogic81\server\lib</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下的</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt">
				<font size="5">
						<span lang="EN-US">mssqlserver4v65.jar</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
						<span lang="EN-US">class</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">为</span>
						<span lang="EN-US">weblogic.jdbc.mssqlserver4.Driver</span>
				</font>
		</p>
<img src ="http://www.blogjava.net/liaojiyong/aggbug/55907.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/liaojiyong/" target="_blank">liaojiyong</a> 2006-06-30 11:37 <a href="http://www.blogjava.net/liaojiyong/archive/2006/06/30/55907.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>jboss配置 mysql数据库连接池 </title><link>http://www.blogjava.net/liaojiyong/archive/2006/06/15/52892.html</link><dc:creator>liaojiyong</dc:creator><author>liaojiyong</author><pubDate>Thu, 15 Jun 2006 00:47:00 GMT</pubDate><guid>http://www.blogjava.net/liaojiyong/archive/2006/06/15/52892.html</guid><wfw:comment>http://www.blogjava.net/liaojiyong/comments/52892.html</wfw:comment><comments>http://www.blogjava.net/liaojiyong/archive/2006/06/15/52892.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/liaojiyong/comments/commentRss/52892.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/liaojiyong/services/trackbacks/52892.html</trackback:ping><description><![CDATA[
		<div class="postTitle">我的jboss是3.2.7<br /><br />一、要在Jboss中使用MySQL的话首先要把MySQL的JDBC驱动放到CLASSPATH中。<br />二、再把/docs/examples/jca/mysql-ds.xml复制到/server/default/deploy目录<br /><br />下。修改mysql-ds.xml文件，其中是数据库主机名是数据库名。<br />我的mysql-ds.xml如下<br /><br />&lt;?xml version=<font color="#00bb00" size="2">"1.0"</font><font color="black" size="2"> encoding=</font><font color="#00bb00" size="2">"UTF-8"</font><font color="black" size="2">?&gt;<br />&lt;datasources&gt;<br />&lt;local-tx-datasource&gt;<br />&lt;jndi-name&gt;MySqlDS&lt;/jndi-name&gt;<br />&lt;connection-url&gt;jdbc:mysql:</font><font color="#0000aa" size="2"><i>//127.0.0.1:3306/jspdev&lt;/connection-url&gt;</i></font><font color="black" size="2"><br />&lt;driver-<font color="blue" size="2">class</font>&gt;org.gjt.mm.mysql.Driver&lt;/driver-<font color="blue" size="2">class</font>&gt;<br />&lt;user-name&gt;root&lt;/user-name&gt;<br />&lt;password&gt; &lt;/password&gt;<br />&lt;/local-tx-datasource&gt;<br />&lt;/datasources&gt;<br /><br />三、然后需要设置standardjaws.xml （注：\server\default\conf目录下）文件<br /><br />的和元素： <br /><br />&lt;jaws&gt;<br />&lt;datasource&gt;java:/MySqlDS&lt;/datasource&gt; <br />&lt;type-mapping&gt;mySql&lt;/type-mapping&gt; <br />.....<br />&lt;/jaws&gt; <br /><br /><br />四、同样也需要把jbosscmp-jdbc.xml文件 注: \server\default\conf目录下）<br /><br />的 和 元素设置为下面这样： <br /><br />&lt;jbosscmp-jdbc&gt; <br />&lt;defaults&gt; <br />&lt;datasource&gt;java:/MySqlDS&lt;/datasource&gt;<br />&lt;datasource-mapping&gt;mySql&lt;/datasource-mapping&gt;<br />&lt;/defaults&gt;<br />&lt;/jbosscmp-jdbc&gt; <br /><br />五、最后再修改login-config.xml（\server\default\conf目录下）文件来使用<br /><br />MySQL：<br /><br />&lt;application-policy name = </font><font color="#00bb00" size="2">"MySqlDbRealm"</font><font color="black" size="2">] <br />&lt;authentication&gt; <br />&lt;login-module code = <br /><br /></font><font color="#00bb00" size="2">"org.jboss.resource.security.ConfiguredIdentityLoginModule"</font><font color="black" size="2"> flag = <br /><br /></font><font color="#00bb00" size="2">"required"</font><font color="black" size="2">]<br />&lt;module-option name =</font><font color="#00bb00" size="2">"principal"</font><font color="black" size="2">]jspdev&lt;/module-option&gt;<br />&lt;module-option name =</font><font color="#00bb00" size="2">"userName"</font><font color="black" size="2">]root&lt;/module-option&gt; <br />&lt;module-option name =</font><font color="#00bb00" size="2">"password"</font><font color="black" size="2">] &lt;/module-option&gt; <br />&lt;module-option name=</font><font color="#00bb00" size="2">"managedConnectionFactoryName"</font><font color="black" size="2">] <br /><br />jboss.jca:service=LocalTxCM,name=MySqlDS <br />&lt;/module-option&gt;<br />&lt;/login-module&gt;<br />&lt;/authentication&gt; <br />&lt;/application-policy&gt;<br /><br />六、测试代码<br />//DatabaseConn.java<br /><br /></font><font color="#0000aa" size="2"><i>/*<br />* 创建日期 2005-3-30<br />*<br />* TODO 要更改此生成的文件的模板，请转至<br />* 窗口 － 首选项 － Java － 代码样式 － 代码模板<br />*/</i></font><font color="black" size="2"><br /><font color="blue" size="2">package</font> DataConn;<br /><br /></font><font color="#0000aa" size="2"><i>/**<br />* @author sun<br />*<br />* TODO 要更改此生成的类型注释的模板，请转至<br />* 窗口 － 首选项 － Java － 代码样式 － 代码模板<br />*/</i></font><font color="black" size="2"><br /><font color="blue" size="2">import</font> java.sql.*;<br /><font color="blue" size="2">import</font> javax.naming.*;<br /><font color="blue" size="2">import</font> javax.sql.DataSource;<br /></font><font color="#0000aa" size="2"><i>//一个用于查找数据源的工具类。</i></font><font color="black" size="2"><br /><font color="blue" size="2">public</font><font color="blue" size="2">class</font> DatabaseConn {<br /><font color="blue" size="2">public</font><font color="blue" size="2">static</font><font color="blue" size="2">synchronized</font><font color="red" size="2">Connection</font> get<font color="red" size="2">Connection</font>() <font color="red" size="2">throws</font><br /><br />Exception<br />{<br /><font color="blue" size="2">try</font><br />{<br />Context ctx = <font color="blue" size="2">new</font> InitialContext(); </font><font color="#0000aa" size="2"><i>//得到初始化上</i></font><font color="black" size="2"><br /><br />下文<br />Object obj = ctx.lookup(</font><font color="#00bb00" size="2">"java:/MySqlDS"</font><font color="black" size="2">);</font><font color="#0000aa" size="2"><i>//查找连接池</i></font><font color="black" size="2"><br />DataSource ds = (DataSource) obj;</font><font color="#0000aa" size="2"><i>//转换成DataSource</i></font><font color="black" size="2"><br /><font color="blue" size="2">return</font> ds.getConnection();<br />}<br /><font color="blue" size="2">catch</font>(<font color="red" size="2">SQLException</font> e)<br />{<br /><font color="blue" size="2">throw</font> e;<br />}<br /><font color="blue" size="2">catch</font>(NamingException e)<br />{<br /><font color="blue" size="2">throw</font> e;<br />}<br /><br />}<br /><br />}<br /><br />-------------------------------<br />//showdata.jsp<br /><br />&lt;%@ page contentType=</font><font color="#00bb00" size="2">"text/html; charset=gb2312"</font><font color="black" size="2"> %&gt;<br />&lt;%@ page <font color="blue" size="2">import</font>=</font><font color="#00bb00" size="2">"java.sql.*"</font><font color="black" size="2">%&gt; <br />&lt;%@ page <font color="blue" size="2">import</font>=</font><font color="#00bb00" size="2">"DataConn.*"</font><font color="black" size="2">%&gt;<br />&lt;% <br /><font color="red" size="2">Connection</font> conn = DatabaseConn.get<font color="red" size="2">Connection</font>();<br />Statement stmt=conn.createStatement();<br /><font color="red" size="2">ResultSet</font> rs=stmt.executeQuery(</font><font color="#00bb00" size="2">"select * from employee"</font><font color="black" size="2">);<br /><font color="blue" size="2">while</font>(rs.next())<br />{<br />out.println(rs.getInt(</font><font color="#00bb00" size="2">"id"</font><font color="black" size="2">));<br />out.println(rs.getString(</font><font color="#00bb00" size="2">"name"</font><font color="black" size="2">));<br />out.println(rs.getString(</font><font color="#00bb00" size="2">"salary"</font><font color="black" size="2">));<br />out.println(rs.getString(</font><font color="#00bb00" size="2">"department"</font><font color="black" size="2">));<br />out.println(rs.getInt(</font><font color="#00bb00" size="2">"age"</font><font color="black" size="2">)+</font><font color="#00bb00" size="2">"&lt;br&gt;"</font><font color="black" size="2">);<br />}<br />conn.close();<br />stmt.close();<br />rs.close();<br /><br />%&gt; <br /></font></div>
		<div class="postFoot">Jason   2005-03-30 14:24:21 评论:2   阅读:1495   引用:0 </div>
		<div id="cmt">
				<div class="postTitle">@2006-02-09 17:23:25  RE </div>
				<div class="postText">对于从非性能上考虑，有没有都一样！ </div>
				<div class="postTitle">jboss的连接数是怎么设的？email: raofei@gmail.com @2006-02-08 11:04:46  虫子 </div>
				<div class="postText">怎么没有看到最大连接数量呢，这个在tomcat里面是有的啊?谢谢！ </div>
		</div>
<img src ="http://www.blogjava.net/liaojiyong/aggbug/52892.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/liaojiyong/" target="_blank">liaojiyong</a> 2006-06-15 08:47 <a href="http://www.blogjava.net/liaojiyong/archive/2006/06/15/52892.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Tomcat全攻略</title><link>http://www.blogjava.net/liaojiyong/archive/2006/05/25/47965.html</link><dc:creator>liaojiyong</dc:creator><author>liaojiyong</author><pubDate>Thu, 25 May 2006 01:59:00 GMT</pubDate><guid>http://www.blogjava.net/liaojiyong/archive/2006/05/25/47965.html</guid><wfw:comment>http://www.blogjava.net/liaojiyong/comments/47965.html</wfw:comment><comments>http://www.blogjava.net/liaojiyong/archive/2006/05/25/47965.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/liaojiyong/comments/commentRss/47965.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/liaojiyong/services/trackbacks/47965.html</trackback:ping><description><![CDATA[
		<b>Tag</b>： <a href="http://tag.bokee.com/SearchTag.b?span=1&amp;wd=Tomcat" target="_blank">Tomcat</a>                                           
<p></p><p>Tomcat全攻略<br />一：简介<br />tomcat是jakarta项目中的一个重要的子项目，其被JavaWorld杂志的编辑选为2001年度最具创新的java产品(Most Innovative Java Product)，同时它又是sun公司官方推荐的servlet和jsp容器(具体可以见<a href="http://java.sun.com/products/jsp/tomcat/">http://java.sun.com/products/jsp/tomcat/</a>)，因此其越来越多的受到软件公司和开发人员的喜爱。servlet和jsp的最新规范都可以在tomcat的新版本中得到实现。 </p><p>二：安装及配置<br />tomcat最新版本为4.0.1，这个版本用了一个新的servlet容器Catalina，完整的实现了servlet2.3和jsp1.2规范。注意安装之前你的系统必须安装了jdk1.2以上版本。 </p><p>(一)：安装<br />1：windows平台<br />从tomcat网站下载jakarta-tomcat-4.0.1.exe，按照一般的windows程序安装步骤即可安装好tomcat,安装时它会自动寻找你的jdk和jre的位置。 </p><p>2：linux平台<br />下载jakarta-tomcat-4.0.1.tar.gz，将其解压到一个目录。 </p><p>(二)：配置<br />运行tomcat需要设置JAVA_HOME变量<br />set JAVA_HOME=c:/jdk (win98，在msdos方式下使用，或者放入autoexec.bat中)<br />export JAVA_HOME=/usr/local/jdk (linux下使用，放到/etc/bashrc或者/etc/profile中) </p><p>(三)：运行<br />设置完毕后就可以运行tomcat服务器了，进入tomcat的bin目录，win98下用startup启动tomcat，linux下用startup.sh，相应的关闭tomcat的命令为shutdown和shutdown.sh。<br />启动后可以在浏览器中输入<a href="http://localhost:8080/">http://localhost:8080/</a>测试，由于tomcat本身具有web服务器的功能，因此我们不必安装apache，当然其也可以与apache集成到一起，下面会介绍。<br />下面你可以测试其自带的jsp和servlet示例。 </p><p>三：应用 </p><p>(一):目录结构<br />tomcat的目录结构如下：<br />目录名: 简介<br />bin : 存放启动和关闭tomcat脚本<br />conf : 包含不同的配置文件,server.xml(Tomcat的主要配置文件)和web.xml<br />work : 存放jsp编译后产生的class文件<br />webapp: 存放应用程序示例，以后你要部署的应用程序也要放到此目录<br />logs : 存放日志文件<br />lib/japser/common : 这三个目录主要存放tomcat所需的jar文件 </p><p><br />(二)：server.xml配置简介<br />下面我们将讲述这个文件中的基本配置信息，更具体的配置信息见tomcat的文档<br />server:<br />port 指定一个端口，这个端口负责监听关闭tomcat的请求<br />shutdown 指定向端口发送的命令字符串<br />service:<br />name 指定service的名字<br />Connector (表示客户端和service之间的连接):<br />port 指定服务器端要创建的端口号，并在这个断口监听来自客户端的请求<br />minProcessors 服务器启动时创建的处理请求的线程数<br />maxProcessors 最大可以创建的处理请求的线程数<br />enableLookups 如果为true，则可以通过调用request.getRemoteHost()进行DNS查询来得到远程客户端的实际主机名，若为false则不进行DNS查询，而是返回其ip地址<br />redirectPort 指定服务器正在处理http请求时收到了一个SSL传输请求后重定向的端口号<br />acceptCount 指定当所有可以使用的处理请求的线程数都被使用时，可以放到处理队列中的请求数，超过这个数的请求将不予处理<br />connectionTimeout 指定超时的时间数(以毫秒为单位)<br />Engine (表示指定service中的请求处理机，接收和处理来自Connector的请求):<br />defaultHost 指定缺省的处理请求的主机名，它至少与其中的一个host元素的name属性值是一样的<br />Context (表示一个web应用程序，通常为WAR文件，关于WAR的具体信息见servlet规范):<br />docBase 应用程序的路径或者是WAR文件存放的路径<br />path 表示此web应用程序的url的前缀，这样请求的url为<a href="http://localhost:8080/path/">http://localhost:8080/path/</a>****<br />reloadable 这个属性非常重要，如果为true，则tomcat会自动检测应用程序的/WEB-INF/lib 和/WEB-INF/classes目录的变化，自动装载新的应用程序，我们可以在不重起tomcat的情况下改变应用程序<br />host (表示一个虚拟主机):<br />name 指定主机名<br />appBase 应用程序基本目录，即存放应用程序的目录<br />unpackWARs 如果为true，则tomcat会自动将WAR文件解压，否则不解压，直接从WAR文件中运行应用程序<br />Logger (表示日志，调试和错误信息):<br />className 指定logger使用的类名，此类必须实现org.apache.catalina.Logger 接口<br />prefix 指定log文件的前缀<br />suffix 指定log文件的后缀<br />timestamp 如果为true，则log文件名中要加入时间，如下例:localhost_log.2001-10-04.txt<br />Realm (表示存放用户名，密码及role的数据库):<br />className 指定Realm使用的类名，此类必须实现org.apache.catalina.Realm接口<br />Valve (功能与Logger差不多，其prefix和suffix属性解释和Logger 中的一样):<br />className 指定Valve使用的类名，如用org.apache.catalina.valves.AccessLogValve类可以记录应用程序的访问信息<br />directory 指定log文件存放的位置<br />pattern 有两个值，common方式记录远程主机名或ip地址，用户名，日期，第一行请求的字符串，HTTP响应代码，发送的字节数。combined方式比common方式记录的值更多 </p><p>注意：<br />1：经过我测试，我设置Context 的path="",reloadable=true，然后放一个WAR文件到webapps目录，结果tomcat不能检测出此文件(重起tomcat可以)，而把此文件解压，则tomcat会自动检测出这个新的应用程序。如果不能自动检测WAR文件，我们可以利用下面管理中讲的方法来部署应用程序。 </p><p>2：默认的server.xml中，Realm元素只设置了一个className属性，但此文件中也包含几个通过JDBC连接到数据库进行验证的示例(被注释掉了)，通过Realm元素我们可以实现容器安全管理(Container Managed Security)。 </p><p>3：还有一些元素我们没有介绍，如Parameter，loader，你可以通过tomcat的文档获取这些元素的信息。 </p><p>(三)：管理 </p><p>1：配置<br />在进行具体的管理之前，我们先给tomcat添加一个用户，使这个用户有权限来进行管理。<br />打开conf目录下的tomcat-users.xml文件，在相应的位置添加下面一行： </p><p>　 </p><p>注意：这一行的最后部分一定是/&gt;,tomcat的文档掉了/符号，如果没有/符号的话，tomcat重起时将无法访问应用程序。通过logs/catalina.out文件你可以看到这个错误的详细信息。 </p><p>然后重起tomcat，在浏览器中输入<a href="http://localhost:8080/manager/">http://localhost:8080/manager/</a>，会弹出对话框，输入上面的用户名和密码即可。 </p><p>2：应用程序列表<br />在浏览器中输入<a href="http://localhost:8080/manager/list">http://localhost:8080/manager/list</a>，浏览器将会显示如下的信息： </p><p>OK - Listed applications for virtual host localhost<br />/ex:running:1<br />/examples:running:1<br />/webdav:running:0<br />/tomcat-docs:running:0<br />/manager:running:0<br />/:running:0 </p><p>上面的信息分别为应用程序的路径，当前状态(running 或者stopped)，与这个程序相连的session数。 </p><p>3：重新装载应用程序<br />在浏览器中输入 <a href="http://localhost:8080/manager/reload?path=/examples">http://localhost:8080/manager/reload?path=/examples</a>，浏览器显示如下： </p><p>OK - Reloaded application at context path /examples </p><p>表示example应用程序装载成功，如果我们将server.xml的Context元素的reloadable属性设为true(见上面表格)，则没必要利用这种方式重新装载应用程序，因为tomcat会自动装载。 </p><p>4：显示session信息<br />在浏览器中输入<a href="http://localhost:8080/manager/sessions?path=/examples">http://localhost:8080/manager/sessions?path=/examples</a>，浏览器显示如下： </p><p>OK - Session information for application at context path /examples Default maximum session inactive interval 30 minutes </p><p>5：启动和关闭应用程序<br />在浏览器中输入<a href="http://localhost:8080/manager/start?path=/examples">http://localhost:8080/manager/start?path=/examples</a>和<a href="http://localhost:8080/manager/stop?path=/examples">http://localhost:8080/manager/stop?path=/examples</a>分别启动和关闭examples应用程序。 </p><p>6：部署及撤销部署<br />WAR有两种组织方式，一种是按一定的目录结构组织文件，一种是一个后缀为WAR的压缩包，因此它的部署方式也有两种：<br />(1)：在浏览器中输入：<a href="http://localhost:8080/manager/install?path=/examples&amp;war=file:/c:examples">http://localhost:8080/manager/install?path=/examples&amp;war=file:/c:examples</a><br />就会将按目录结构组织的WAR部署 </p><p>(2)：如果输入:http://localhost:8080/manager/install?path=/examples&amp;war=jar:file:/c:examples.war!/<br />就会将按压缩包组织的WAR部署，注意此url后半部分一定要有!/号。<br />部署后就可以用 <a href="http://localhost:8080/examples">http://localhost:8080/examples</a>访问了。 </p><p>在浏览器中输入：<a href="http://localhost:8080/manager/remove?path=/examples">http://localhost:8080/manager/remove?path=/examples</a> 就会撤销刚才部署的应用程序。 </p><p>(四)：与apache集成<br />虽然tomcat也可以作web服务器,但其处理静态html的速度比不上apache,且其作为web服务器的功能远不如apache,因此我们想把apache和tomcat集成起来。<br />我们以linux系统为例介绍.<br />从apache网站下载apache1.3.22源代码版本，然后使用如下命令配置安装apache： </p><p>mkdir /usr/local/apache<br />tar zxvf apache.1.32.tar.gz<br />cd apache.1.32<br />./configure --prefix=/usr/local/apache --enable-module=so<br />make<br />make install </p><p>注意configure命令指定目标安装目录，并且加入DSO(Dynamic Shared Object)支持，注意一定不要忘了这一个选项。 </p><p>然后下载webapp模块，将解压后mod_webapp.so文件放入apache的libexec目录，编辑apache的conf目录下的httpd.conf，在这个文件的最后加入下面三行： </p><p>LoadModule webapp_module libexec/mod_webapp.so<br />WebAppConnection warpConnection warp localhost:8008<br />WebAppDeploy examples warpConnection /examples/ </p><p>第一行是加入webapp模块，如果编译apache时不增加DSO支持，则无法使用LoadModule指令，第二行指定tomcat与apache的连接，第三行指定部署那个应用，这两个指令使用格式如下： </p><p>WebAppConnection [connection name] [provider] [host:port]<br />WebAppDeploy [application name] [connection name] [url path] </p><p>其中connection name指定连接名，provider只能是warp，port端口与你的tomcat的配置文件server.xml最后几行指定的要保持一致。文件如下： </p><p><br />po