﻿<?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 />port="8008" minProcessors="5" maxProcessors="75"<br />enableLookups="true"<br />acceptCount="10" debug="0"/&gt;<br />****** </p><p><br />application name与你在tomcat中部署的应用名一致，url path指定访问这个应用的url。例如上面的例子可以通过<a href="http://localhost/examples/">http://localhost/examples/</a>来访问tomcat中的examples应用。 </p><p>(五)：中文问题<br />一般jsp的乱码问题可以通过在jsp中加入来解决，至于servlet的乱码在可以使用servlet2.3中提供的HttpServeletRequest.setCharacterEncoding函数。更详细的中文问题请见JSP/Servlet 中的汉字编码问题。 </p><p>四：综述<br />tomcat作为一个servlet(jsp也被编译为servlet执行)容器，其应用前景是非常好的，如果与jboss结合起来，则可以实现sun的j2ee规范(用jboss作ejb服务器)。jboss的官方网站也提供集成了tomcat3.2*的jboss以供下载。另外一个开源的应用服务器(enhydra) 也是基于tomcat的，其提供了更友好的管理界面，部署应用程序也更简单，功能也更强大。</p><img src ="http://www.blogjava.net/liaojiyong/aggbug/47965.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-05-25 09:59 <a href="http://www.blogjava.net/liaojiyong/archive/2006/05/25/47965.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/47967.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/47967.html</guid><wfw:comment>http://www.blogjava.net/liaojiyong/comments/47967.html</wfw:comment><comments>http://www.blogjava.net/liaojiyong/archive/2006/05/25/47967.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/liaojiyong/comments/commentRss/47967.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/liaojiyong/services/trackbacks/47967.html</trackback:ping><description><![CDATA[
		<b>Tag</b>： <a href="http://tag.bokee.com/SearchTag.b?span=1&amp;wd=Tomcat" target="_blank"><font color="#002c99">Tomcat</font></a>                                           
<p></p><p>Tomcat中文手册 </p><p><br />本文档提供关于Tomcat的基础信息.主要内容如下:<br />Tomcat二进制版本安装<br />与Tomcat相关的脚本的主要内容<br />与server.xml相关的主要内容,Tomcat的主要配置文件<br />如何设置Tomcat与宿主web服务器一起工作的说明<br />如何应用Tomcat配置一个现实中的web站点<br />希望此文档足以使新用户可以开始使用Tomcat.如找不到某方面的内容请(按以下顺序)<br />查找Tomcat faq<br />查找Tomcat包清单<br />向Tomcat用户邮件列表发出问题<br />如此疑问的答案不存在,我们鼓励把对疑问的解答放入Tomcat faq或此文档.如对此文档有意见或建议,请发送到Tomcat的邮件列表.</p><p>Getting Started<br />Tomcat是一个带有jsp环境的servlet容器.servlet容器是一个根据用户的行为可以管理和激活servlet的运行时的shell.<br />粗略地可以将servlet容器分为如下几类:</p><p>独立的servlet容器<br />内置有web服务器的一部分.指当使用基于Java的web服务器的情形,例如servlet容器是JavaWebServer的一个部分. 独立的servlet容器是Tomcat的默认模式.<br />大多数的web服务器并非基于Java,因此,我们可以得出如下两种容器的模式.</p><p><br />进程内的servlet容器<br />servlet容器作为web服务器的插件和Java容器的实现.Web服务器插件在内部地址空间打开一个JVM(java virtual machine)使Java容器得以在内部运行.如有某个需要调用servlet的请求,,插件将取得对此请求的控制并将他传递(使用JNI)给Java容器.进程内容器对于多线程,单进程的服务器非常合适并且提供很好的运行速度,但伸缩性有所不足.</p><p><br />进程外的servlet容器<br />servlet容器运行于web服务器之外的地址空间且作为web服务器的插件和Java容器的实现的结合.web服务器插件和Java容器 JVM使用IPC机制(通常是TCP/IP)进行通讯.当一个调用servlet的请求到达时,插件将取得对此请求的控制并将其传递(使用IPC等)给Java容器,进程外容器的反应时间或进程外容器引擎不如进程内容器,但进程外容器引擎在许多其他可比的范围内更好(伸缩性,稳定性等).<br />Tomcat既可作为独立的容器(主要是用于开发与调试)又可作为对现有服务器的附加(当前支持Apache,IIS和Netscape服务器).即任何时候配置Tomcat你都必须决定如何应用他,如选择第二或第三种模式,你还需要安装一个web服务器接口.<br />Tomcat与Jserv有何区别?Tomcat是Jserv吗?<br />这是个常见的误解.Jserv是Servlet API2.0兼容并与Apache一起使用的容器.Tomcat是一个完全重写的并与Servlet API2.2和JSP1.1兼容的容器.<br />Tomcat使用了一些为Jserv而写的代码,特别是Jserv的Apache接口,但这是唯一的相同之处.<br />怎样安装Tomcat的二进制版本?<br />非常简单,只需:<br />下载 zip/tar.gz 任何压缩文件,从<a href="http://jakarta.apche.org/download/binindex.html"><font color="#002c99">http://jakarta.apche.org/download/binindex.html</font></a>处.<br />解压缩此文件到某目录(如:foo).将会生成一子目录,名为”tomcat”.<br />转换到”tomcat”目录设置一新的环境变量(TOMCAT_HOME)指向你安装的tomcat的目录<br />WIN32平台,键入:<br />“set TOMCAT_HOME=foo\tomcat”<br />Unix平台:<br />如是bash/sh环境, 键入:”TOMCAT_HOME=foo/tomcat;export TOMCAT_HOME”<br />如是tcsh环境, 键入:”setenv TOMCAT_HOME foo/tomcat”<br />设置环境变量JAVA_HOME指向你JDK的目录,然后添加JAVA解释器到你的PATH环境变量.<br />好了!现在可以运行TOMCAT并作为一个独立的Servlet容器(模式一)<br />启动与关闭Tomcat<br />使用”bin”目录中的脚本启动与关闭Tomcat.<br />启动:<br />uinx:bin/startup.sh<br />win32:bin\startup<br />关闭:<br />unix:bin/shutdown.sh<br />win32:bin\shutdown<br />Tomcat目录结构<br />假设你已将Tomcat解压,你已得到下列目录结构:<br />目录名--描述 <br />bin <br />包含启动/关闭脚本 <br />conf <br />包含不同的配置文件,<br />包括 server.xml(Tomcat的主要配置文件)和为不同的Tomcat配置的web应用设置缺省值的文件web.xml<br />doc<br />包含各种Tomcat文档 <br />lib <br />包含Tomcat使用的jar文件.unix平台此目录下的任何文件都被加到Tomcat的classpath中 <br />logs <br />Tomcat摆放日志文件的地方 <br />src <br />ServletAPI源文件.先别高兴,这些只有些必须在Servlet容器内实现的空接口和抽象类 <br />webapps <br />包含web项目示例 <br />此外你可以Tomcat会创建如下目录:<br />work<br />Tomcat自动生成,放置Tomcat运行时的临时文件(如编译后的JSP文件).如在Tomcat运行时删除此目录.JSP页面将不能运行.<br />classes<br />你可以创建此目录来添加一些附加的类到类路径中.任何你加到此目录中的类都可在Tomcat的类路径中找到自身.<br />Tomcat的脚本<br />Tomcat是一个Java程序,因此在设置好几个环境变量后即可用命令行的方式运行.然而设置Tomcat使用的每个环境变量和如下的命令行参数乏味且易错.因此,Tomcat开发组提供了一些脚本使启动和关闭Tomcat变得轻松.<br />注意:这些脚本仅仅是个便利的方法去启动和关闭Tomcat.你可修改他们来定制CLASSPATH,环境变量如PATH,LD_LIBRARY_PATH,等等,只要是生成一个正确的命令行即可.<br />这些脚本是什么呢?下表列出对一般用户最重要的脚本.<br />tomcat <br />主脚本.设置合适的环境变量,包括CLASSPATH,TOMCAT_HOME和JAVA_HOME和用适合的命令行参数启动Tomcat </p><p>startup </p><p>在后台启动Tomcat.”tomcat start”命令的替换方式 </p><p>shutdown </p><p>关闭Tomcat.”tomcat stop”命令的替换方式 </p><p><br />对用户最重要的脚本是tomcat(tomcat.bat/tomcat.sh).其他Tomcat相关的脚本作为一个简单的面向单任务的指向Tomcat脚本(设置不同的命令行参数等)的入口.</p><p><br />仔细考察tomcat.bat/tomcat.sh,它按以下步骤运行:</p><p>在Unix下的步骤：</p><p>如未指定,推测 TOMCAT_HOME</p><p>如未指定,推测 JAVA_HOME</p><p>设置CLASS_PATH包含:</p><p>1.${TOMCAT_HOME}/classes目录(如果存在)</p><p>2.${TOMCAT_HOME}/lib的一切内容</p><p>3.${JAVA_HOME}/lib/tools.jar(此jar文件包含工具javac,我们需要javac处理jsp文件.</p><p><br />运行带有设定Java环境变量的命令行参数的java命令,调入tomcat.home,和org.apache.tomcat.startup.Tomcat 作为启始类.同时也传递命令行参数到org.apache.tomcat.startup.Tomcat ,例如:</p><p><br />执行start/stop/run 等的操作</p><p>此Tomcat进程使用指向server.xml的路径,</p><p>例如server.xml放置于etc/server_1.xml并且用户意图在后台启动apache,键 入如下命令行:</p><p>bin/tomcat.sh start –f /etc/server_1.xml</p><p>在Win32下的步骤：(略)</p><p><br />由此可见,win32版的tomcat.bat与Unix版的几乎一致.尤其在它不推测TOMCAT_HOME和JAVA_HOME的值,并且不将所有的jar文件放入类路径中.</p><p><br />Tomcat的配置文件</p><p>Tomcat的配置基于两个配置文件:</p><p>1.server.xml - Tomcat的全局配置文件</p><p>2.web.xml - 在Tomcat中配置不同的关系环境</p><p><br />这一部分将讲述如何使用这些文件.我们不会包含web.xml的内部机制,这些内部机制深入到了Servlet API的细节,因此,我们将讨论涵盖servler.xml内容及web.xml在Tomcat关系环境中的用法.</p><p><br />server.xml</p><p>server.xml是Tomcat的主配置文件.完成两个目标:</p><p>1 提供Tomcat组件的初始配置.</p><p>2 说明Tomcat的结构,含义,使得Tomcat通过实例化组件完成起动及构建自身, 如在server.xml所指定的</p><p>下表描述server.xml种的重要元素:</p><p>Jakarta-Tomcat 简明中文版用户指南第二部分 <br />　 </p><p>元素及其描述 </p><p>Server<br />server.xml文件中最重要的元素.Server定义了一个Tomcat服务器.一般你不用对他担心太多.Server元素能包含Logger和ContextManager元素类型</p><p>Logger<br />此元素定义一个Logger对象,每个Logger都有一个名字去标识,也有一个纪录Logger的输出和冗余级别(描述此日志级别)和包含日志文件的路径.通常有servlet的Logger(ServletContext.log()处),JSP和Tomcat运行时的Logger.</p><p>ContextManager<br />ContextManager说明一套ContextInterceptor, RequestInterceptor , Context和他们的Connectors的配置及结构.ContextManager有几个随同提供的特性:<br />1. 用来纪录调试信息的调试级别 <br />2. webapps/,conf/,logs/和所有已定义的环境的基本位置.用来使Tomcat可以在TOMCAT_HOME外的其他目录启动. <br />3. 工作目录的名字</p><p>ContextInterceptor&amp;RequestInterceptor<br />这些侦听器(interceptors)侦听具体发生在ContextManager中的事件.例如,ContextInterceptor侦听Tomcat的启动及终止事件,RequestInterceptor监视在它服务过程中用户请求需要通过的不同阶段.Tomcat的管理员不必知道太多关于侦听器的知识;另外,开发者应该知道这是如何在Tomcat中实现一个”全局”型的操作(例如安全性及每个请求日志)</p><p>Connector<br />Connector表示一个到用户的联接,不管是通过web服务器或直接到用户浏览器(在一个独立配置中).Connector负责管理Tomcat的工作线程和 读/写 连接到不同用户的端口的 请求/响应.Connector的配置包含如下信息:</p><p>1.句柄类</p><p>2.句柄监听的TCP/IP端口</p><p>3.句柄服务器端口的TCP/IP的backlog.</p><p>稍后我们将在此文档中描述如何配置Connector.</p><p>Context<br />每个Context提供一个指向你放置你Web项目的Tomcat的下属目录。每个Context包含如下配置：</p><p>1. Context放置的路径,可以是与ContextManager主目录相关的路径.</p><p>2.纪录调试信息的调试级别</p><p>3.可重载的标志.开发Servlet时,重载更改后的Servlet,这是一个非常便利的特性,你可以调试或用Tomcat测试新代码而不用停止或重新启动Tomcat.要打开重载,把reloadable设为真即可.这虽花费时间但可检测所发生的变化;更重要的事,鉴于,在一个装载类对象装入一个新的servlet时,类装载触发器可能会掷出一些错误.为避免这些问题,你可以设置可重载为假,这将停止重载功能.</p><p><br />　 </p><p>从另一个目录中启动Tomcat</p><p>作为缺省值将使用TOMCAT_HOME/conf/server.xml作为配置文件.缺省配置将使用TOMCT_HOME作为关系环境的基础.</p><p>使用 “-f/你的/目录/server.xml”选项你可改变这种情况,使用另一个服务器配置文件和设置关系环境管理器的目录属性你需要在主目录内设置以下几个文件:</p><p>? 一个 webapps/目录(如果你已生成) – 所有war文件奖杯界压倒此目录而且所有子目录将作为关系环境添加.</p><p>? conf/目录 - 你可保存一个特殊的web.xml文件和其他配置文件</p><p>? logs/ - 所有日志文件将代替TOMCAT_HOME/logs/纪录到此目录中</p><p>? work/ - 关系环境的工作目录</p><p>如server.xml中的ContextManager.home属性有关联,将关联到到当前工作目录.</p><p>web。xml</p><p>关于web。xml和web项目结构（包括目录服务及配置）的详细描述可在Servlet API Spec的第9，10，14章中找到。</p><p>然而有一个与Tomcat有关的小“特性“与web.xml有关。Tomcat可以让用户通过将缺省的web.xml放入conf目录中来定义所有关系环境的web.xml的缺省值.建立一个新的关系环境时,Tomcat使用缺省的web.xml文件作为基本设置和应用项目特定的web.xml(放在应用项目的WEB-INF/web.xml文件)来覆盖这些缺省值.</p><p>设置Tomcat与Apache Web 服务器</p><p>服务器</p><p>到现在为止,我们未讨论作为服务器扩展的Tomcat,只讨论了作为独立运行的服务器.但有一些问题需要说明:</p><p>1. 当处理静态页面时,Tomcat不如Apache迅速.</p><p>2. Tomcat不象Apache一样可配置.</p><p>3. Tomcat不象Apache一样强壮.</p><p>4. 有很多网站已在某一特定web server上投入了很长时间,例如,使用CGI脚本/Server API模组/perl/php…我们不能假设这些遗留下来的东西都会被丢弃.</p><p>基于以上原因,一个现实的网站建议使用一个Web服务器,如Apache,为网站的静态页面请求提供服务,并使用Tomcat作为一个Servlet/JSP插件.</p><p>我们不准备深入的讨论每个不同的配置,我们将:</p><p>1. 涵盖Web服务器的基本行为</p><p>2. 解释需要何种配置</p><p>3. 在Apache上的实例</p><p><br />Web 服务器操作</p><p><br />简单说来，web服务器总是等待来自客户端的HTTP请求。当请求到达时，服务器会提供一切必要的内容来满足此请求。加入一个Servlet容器某种程度上会改变此行为。但服务器仍需处理如下因素：</p><p>载入servlet容器接口库并初始化（处理请求之前）。</p><p>当收到一个请求时，检查是否属于某Servlet，如是，则接口库接收此请求并处理。</p><p>另一方面，接口库需要知道他将服务某种请求，通常是基于请求的URL的某种模式和将此请求导向何处。</p><p>当用户想要设置使用虚拟主机的配置时，事情会变得更加复杂，或者想多个开发者在一个服务器上进行开发但使用不同的Servlet容器的JVMs。以下我们将讨论这两个问题。</p><p><br />必需进行的配置</p><p><br />应该考虑的是最明显的配置是servlet URL具有对servlet容器中的servlet具有表示的责任。很明显，你必须知道传递什么到Servlet容器。我们仍需提供附加的配置项目到web-server或servlet-container的结合体中.</p><p>l 考虑到Tomcat进程是否可取得，我们仍需提供配置和Tomcat正在监听的TCP/IP 主机名/端口号。</p><p>l 需要告知web服务器接口库的位置（因此我们可以在起始时装入）</p><p>l 需要设置接口内部信息如将日志记录在何处和如何纪录，等等。</p><p>所有此类信息必须出现在web服务器配置里或被接口使用的私有配置文件中。下面将讲述如何在Apache中如何实现这些配置。</p><p><br />Apache上的实现</p><p>这一部分演示如何配置Apache与Tomcat一起工作；并试图解释深入到可能会用到的配置规范。在jserv 安装页上可找到其他信息。</p><img src ="http://www.blogjava.net/liaojiyong/aggbug/47967.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-05-25 09:59 <a href="http://www.blogjava.net/liaojiyong/archive/2006/05/25/47967.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>