[jboss-cvs] JBossAS SVN: r83793 - projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Feb 3 01:11:33 EST 2009
Author: xhuang at jboss.com
Date: 2009-02-03 01:11:29 -0500 (Tue, 03 Feb 2009)
New Revision: 83793
Modified:
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Intro.po
Log:
update
Modified: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Intro.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Intro.po 2009-02-03 05:01:20 UTC (rev 83792)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Intro.po 2009-02-03 06:11:29 UTC (rev 83793)
@@ -1,15 +1,16 @@
# translation of Clustering_Intro.po to
# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
# Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+#
# Automatically generated, 2007.
-#
+# Xi HUANG <xhuang at redhat.com>, 2009.
msgid ""
msgstr ""
"Project-Id-Version: Clustering_Intro\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-20 02:37+0000\n"
-"PO-Revision-Date: 2009-02-02 20:10+1000\n"
-"Last-Translator: Xi HUANG\n"
+"PO-Revision-Date: 2009-02-03 16:10+1000\n"
+"Last-Translator: Xi HUANG <xhuang at redhat.com>\n"
"Language-Team: <en at li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -34,12 +35,14 @@
"like <xref linkend=\"Quick_Tutorial_to_Setup_a_Clustered_Web_Application-"
"A_very_simple_web_cluster\"/>."
msgstr ""
+"Web 服务器群集将使用多个 JBoss AS 实例来服务于相同的 web 地址(如 http://www.jboss.com/)。这是 JBoss AS 部署的最常见的群集架构。在本教程里,我们讨论了 Web 群集的基本架构并给出了设立这种群集的逐步说明。<xref linkend=\"Quick_Tutorial_to_Setup_a_Clustered_Web_Application-"
+"A_very_simple_web_cluster\"/> 是一个很简单的 Web 群集。"
#. Tag: title
#: Clustering_Intro.xml:11
#, no-c-format
msgid "A very simple web cluster"
-msgstr ""
+msgstr "一个非常简单的 Web 群集"
#. Tag: para
#: Clustering_Intro.xml:18
@@ -54,13 +57,13 @@
"container, EJB container, persistence manager etc. Breaking the JBoss AS "
"stack to different physical servers would substantially complicate the "
"architecture but without much scalability benefit."
-msgstr ""
+msgstr "轻量级的 Web 服务器,也称为负载平衡系统,它从该 web 地址接收所有的 HTTP 请求并转发给群集里的 JBoss AS 节点。JBoss AS 节点处理请求并生成响应。所有的 JBoss AS 节点共享相同的数据库。请注意,每个节点都包含整个 JBoss AS 栈,如 web 服务器、Servlet 容器、EJB 容器、持久化管理者等等。把 JBoss AS 栈分布到不同的物理服务器上将遵循这种架构,但扩充性并没受益于太多。"
#. Tag: title
#: Clustering_Intro.xml:22
#, no-c-format
msgid "Setup the simple web cluster"
-msgstr ""
+msgstr "设立简单的 Web 群集"
#. Tag: para
#: Clustering_Intro.xml:23
@@ -75,6 +78,9 @@
"There is no information sharing between JBoss AS nodes, besides the "
"persistent data in the shared database."
msgstr ""
+"在 <xref linkend="
+"\"Quick_Tutorial_to_Setup_a_Clustered_Web_Application-"
+"A_very_simple_web_cluster\"/> 描述的简单群集里,每个 JBoss AS 节点都相互独立。负载平衡系统“记住”了用户会话并总是把请求从相同会话转发给相同的 JBoss AS 实例(也称为 Sticky Session)。所以,每个 JBoss AS 节点都保存自己的一套 HTTP 会话数据。除了共享数据库里的持久性数据以外,JBoss AS 节点间没有共享的信息。"
#. Tag: para
#: Clustering_Intro.xml:26
@@ -88,12 +94,14 @@
"problems in <xref linkend=\"Optional_improvements_to_the_simple_cluster-"
"Database_cache\"/>."
msgstr ""
+"假设负载平衡系统和共享数据库不是性能的瓶颈,该群集可以用 JBoss AS 节点线性地扩充。当然,简单性和可扩充性有其价值所在。这个简单构建的最明显的缺点是缺乏对失效切换和数据库缓存的支持。我们将在 <xref linkend=\"Optional_improvements_to_the_simple_cluster-"
+"Database_cache\"/> 里讨论相应的解决方案。"
#. Tag: title
#: Clustering_Intro.xml:30
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Setup the load balancer"
-msgstr "负载平衡系统"
+msgstr "设立负载平衡系统"
#. Tag: para
#: Clustering_Intro.xml:31
@@ -107,12 +115,16 @@
"Rename the downloaded file to mod_jk.so and copy it under APACHE_HOME/"
"modules/ directory."
msgstr ""
+"设立负载平衡系统的最简单的方法是使用 Apache web 服务器,它用 mod_jk 模块和 JBoss AS 进行交互。在安装了 Apache 之后,你应该从 <ulink "
+"url=\"http://www.apache.org/dist/jakarta/tomcat-connectors/jk/binaries/\"> "
+"http://www.apache.org/dist/jakarta/tomcat-connectors/jk/binaries/</ulink> 下载 mod_jk 1.2.x。把它重命名为 mod_jk.so 并复制到 APACHE_HOME/"
+"modules/ 目录下。"
#. Tag: title
#: Clustering_Intro.xml:35
#, no-c-format
msgid "Use mod_jk 1.2.x"
-msgstr ""
+msgstr "使用 mod_jk 1.2.x"
#. Tag: para
#: Clustering_Intro.xml:36
@@ -121,7 +133,7 @@
"We strongly advise you to use mod_jk 1.2.x, as both mod_jk and mod_jk2 are "
"deprecated, unsupported and no further developments are going on in the "
"community."
-msgstr ""
+msgstr "我们强烈建议你使用 mod_jk 1.2.x,因为 mod_jk 和 mod_jk2 都被取消且不再被支持,社区里也不会再进行相关开发了。"
#. Tag: para
#: Clustering_Intro.xml:41
@@ -134,7 +146,7 @@
"more efficiently than Tomcat. In addition, Apache provides modules for "
"access control, URL rewriting, CGI/PHP execution. So, we recommend fronting "
"JBoss AS with Apache mod_jk even if you have only one JBoss AS node."
-msgstr ""
+msgstr "除了负载平衡,JBoss AS 服务器使用 Apache mod_jk 还有其他好处。最重要的一点是 Apache 处理静态内容(如图像)比 Tomcat(JBoss AS 里内嵌的 servlet 服务器)快很多。Apache 处理 SSL 和 keep-alive 连接也比 Tomcat 更为高效。此外,Apache 为访问控制、URL 重写、 CGI/PHP 执行提供了对应的模块。所以,即使你只有一个 JBoss AS 节点,我们推荐在前面使用 Apache mod_jk。"
#. Tag: para
#: Clustering_Intro.xml:45
@@ -142,27 +154,27 @@
msgid ""
"To tell the Apache server to use mod_jk, you need to add the following line "
"to the APACHE_HOME/conf/httpd.conf file."
-msgstr ""
+msgstr "要使 Apache 服务器使用 mod_jk,你需要在 APACHE_HOME/conf/httpd.conf 文件里添加下面的一行。"
#. Tag: title
#: Clustering_Intro.xml:48
#, no-c-format
msgid "Add this to the httpd.conf file"
-msgstr ""
+msgstr "在 httpd.conf 文件里添加:"
#. Tag: programlisting
#: Clustering_Intro.xml:49
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"# Include mod_jk's specific configuration file\n"
"Include conf/mod_jk.conf"
msgstr ""
-"# Include mod_jk's specific configuration file \n"
-"Include conf/mod-jk.conf"
+"# Include mod_jk's specific configuration file\n"
+"Include conf/mod_jk.conf"
#. Tag: para
#: Clustering_Intro.xml:50
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Next, you should configure the interaction between Apache server and mod_jk "
"by creating the APACHE_HOME/conf/mod_jk.conf file as follows. The LoadModule "
@@ -176,7 +188,8 @@
"applications. If you only use mod_jk as a loadbalancer, you can also forward "
"all URLs (i.e., /*) to mod_jk."
msgstr ""
-"<literal>JkMount</literal> 指令告诉 Apache 应该把 URLs 转发给哪个 mod_jk 模块"
+"然后,你应该通过创建 APACHE_HOME/conf/mod_jk.conf 文件配置 Apache 服务器和 mod_jk 之间的交互。LoadModule 指令必须引用前面章节里下载的 mod_jk 库。"
+"</literal><literant</liter 指令告诉 Apache 应该把 URLs 转发给哪个 mod_jk 模块"
"(和 Servlet 容器)。在上面的文件里,所有基于 URL 路径 <literal>/application/"
"*</literal> 的请求都被发送到 mod_jk 负载平衡系统(load-balancer)。这样的"
"话,你能够使 Apache 直接处理静态内容 (或 PHP 内容)而只对 Java 应用程序使用"
@@ -185,13 +198,13 @@
#. Tag: title
#: Clustering_Intro.xml:53
-#, fuzzy, no-c-format
+#, no-c-format
msgid "The mod_jk.conf file"
-msgstr "context.xml 文件"
+msgstr "mod_jk.conf 文件"
#. Tag: programlisting
#: Clustering_Intro.xml:54
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"# Load mod_jk module\n"
"# Specify the filename of the mod_jk lib\n"
@@ -244,21 +257,12 @@
" \n"
"# Select the log format\n"
"JkLogStampFormat \"[%a %b %d %H:%M:%S %Y]\"\n"
-" \n"
-"# JkOptions indicates to send SSK KEY SIZE\n"
-"JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories\n"
-" \n"
+"\n"
"# JkRequestLogFormat\n"
"JkRequestLogFormat \"%w %V %T\"\n"
" \n"
"# Mount your applications\n"
"JkMount /application/* loadbalancer\n"
-" \n"
-"# You can use external file for mount points.\n"
-"# It will be checked for updates each 60 seconds.\n"
-"# The format of the file is: /url=worker\n"
-"# /examples/*=loadbalancer\n"
-"JkMountFile conf/uriworkermap.properties \n"
"\n"
"# Add shared memory.\n"
"# This directive is present with 1.2.10 and\n"
@@ -276,23 +280,22 @@
#. Tag: para
#: Clustering_Intro.xml:55
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Then, you need to configure mod_jk itself to load balance the JBoss AS "
"cluster. The workers file conf/workers.properties specifies the locations of "
"JBoss AS server nodes and how calls should be load-balanced across them. For "
"a two nodes setup, the file could look like the following."
msgstr ""
-"然后,你需要配置 mod_jk 的 workers 文件 <literal>conf/workers.properties</"
-"literal>。这个文件指定不同的 Servlet 容器的存放位置和怎样对它们之间的调用进行"
-"负载平衡。这个配置文件包含了一个全局设置部分以及针对每个目标 Servlet 容器的设"
-"置部分。对于两个节点的设立,这个文件如下所示:"
+"然后,你需要配置 mod_jk 来平衡 JBoss AS 群集的负载。<literal>conf/workers.properties</"
+"literal> 文件指定不同的 Servlet 容器的存放位置和怎样对它们之间的调用进行"
+"负载平衡。对于两节点群集的设立,这个文件可能类似于:"
#. Tag: title
#: Clustering_Intro.xml:58
-#, fuzzy, no-c-format
+#, no-c-format
msgid "The workers.properties file"
-msgstr "A sample jndi.properties file"
+msgstr "workers.properties 文件"
#. Tag: programlisting
#: Clustering_Intro.xml:59
@@ -379,12 +382,14 @@
"all workers previously defined in the same file, and then load-balancing "
"will happen over these workers."
msgstr ""
+"上面的文件配置了 mod_jk 来执行侦听端口 8009 的两个 JBoss AS 实例(node1 和 node2)间的 weighted round-robin 负载平衡策略。在 works.properties 文件里,每个节点都用 worker."
+"XXX 命名定义,这里的 XXX 代表了你为其中一个目标 JBoss AS 选取的任意名字。对于每个 worker,你必须给出主机名(或 IP 地址)以及 AJP13 连接器的端口号码(缺省为 8009)。lbfactor 属性是这个特殊 worker 的负载平衡因子。它用来定义节点对于其他节点的优先级(或权重)。数字越大,表示它将接收越多的 HTTP 请求。这个设置可以用来区分具有不同处理能力的服务器。cachesize 属性定义和 JBoss AS 节点关联的线程池的大小(也就是它将向该节点转发并发请求的数目)。请确保这个数字小于 AJP13 连接器所配置的线程数。conf/workers.properties 文件的最后一部分定义了 loadbalancer worker。worker.loadbalancer.balanced_workers 这一行必须列出同一文件里定义的所有 worker,这样负载平衡才会基于这些 worker 来运行。"
#. Tag: title
#: Clustering_Intro.xml:64
#, no-c-format
msgid "Sticky sessions"
-msgstr ""
+msgstr "Sticky session"
#. Tag: para
#: Clustering_Intro.xml:65
@@ -396,12 +401,14 @@
"is always served by the JBoss AS instance that has the correct session "
"state. Sticky session is required for our simple cluster setup."
msgstr ""
+"在 mod_jk 里,你总是会配置负载平衡系统使用 \"sticky "
+"sessions\"。这样,mod_jk 把相同 web 会话里的请求转发给相同的 JBoss AS 节点。sticky session 确保了总是具有正确会话状态的 JBoss AS 实例来为客户服务。我们这个简单的群集设立需要 Sticky session。"
#. Tag: title
#: Clustering_Intro.xml:72
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Configure JBoss AS nodes"
-msgstr "配置 JBoss"
+msgstr "配置 JBoss AS 节点"
#. Tag: para
#: Clustering_Intro.xml:73
@@ -413,13 +420,13 @@
"In this section, we cover two JBoss AS configuration options required for "
"the web cluster. One of them is universal for all nodes and the other is "
"unique for each node."
-msgstr ""
+msgstr "群集里的 JBoss AS 节点几乎是相同的。它们必须运行相同的 JBoss AS 版本、相同的应用程序以及具有除了少数群集相关的配置选项外的相同配置。在本节里,我们涵盖这个 Web 群集所需的两个 JBoss AS 配置选项。其中一个是对于所有节点通用的,而两外一个是每个节点所专有的。"
#. Tag: title
#: Clustering_Intro.xml:77
#, no-c-format
msgid "The clustering profile for JBoss AS"
-msgstr ""
+msgstr "JBoss AS 的群集配置"
#. Tag: para
#: Clustering_Intro.xml:78
@@ -429,7 +436,7 @@
"\"clustering\" profile of JBoss AS -- you can just use the default JBoss AS "
"profile since there is no communication (i.e., clustering) between JBoss AS "
"nodes."
-msgstr ""
+msgstr "对于这个简单的群集架构,你甚至不需要“群集”配置 - 既然 JBoss AS 节点间没有通信,你可以使用缺省的 JBoss AS 配置。"
#. Tag: para
#: Clustering_Intro.xml:82
@@ -443,6 +450,8 @@
"server configuration name). Locate the <attribute> element with a name "
"of UseJK, and set its value to true as follows."
msgstr ""
+"首先,我们必须配置所有的 JBoss AS 节点,为其服务的所有 HTTP 会话 ID 添加一个“标识符”。由此,负载平衡系统将根据请求的会话 ID 知道把每个请求转发给哪个 JBoss AS 节点。为了实现这一点,请编辑 JBOSS_HOME/server/all/deploy/"
+"jboss-web.deploy/META-INF/jboss-service.xml 文件(用自己的服务器配置名代替 all),找到名为 UseJK 的 <attribute> 元素,并设置为 true。"
#. Tag: title
#: Clustering_Intro.xml:85
@@ -450,7 +459,7 @@
msgid ""
"Configure jboss-service.xml to support JBoss AS node identity in HTTP "
"session IDs"
-msgstr ""
+msgstr "配置 jboss-service.xml,使其支持 HTTP 会话 ID 里的 JBoss AS 节点标识符。"
#. Tag: programlisting
#: Clustering_Intro.xml:86
@@ -460,7 +469,7 @@
#. Tag: para
#: Clustering_Intro.xml:87
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Second, you need to actually give an identity to each JBoss AS node. On each "
"clustered JBoss node, you need to name the node according to the name "
@@ -469,7 +478,7 @@
"all with your own server configuration name if necessary). Locate the <"
"Engine> element and add an attribute jvmRoute as follows."
msgstr ""
-"在每个群集节点上,我们得按 <literal>workers.properties</literal> 里指定的名字"
+"其次,我们需要为每个 JBoss AS 节点定义一个标识符。在每个群集节点上,我们得按 <literal>workers.properties</literal> 里指定的名字"
"来命名节点名。例如,在 JBoss 实例节点1上,编辑 <literal>JBOSS_HOME/server/"
"all/deploy/jbossweb-tomcat50.sar/server.xml</literal> 文件(有必要的话用你自"
"己的服务器名代替<literal>/all</literal>)。定位 <literal><Engine></"
@@ -479,19 +488,19 @@
#: Clustering_Intro.xml:90
#, no-c-format
msgid "Add node information to the server.xml file"
-msgstr ""
+msgstr "在 server.xml 文件里添加节点信息"
#. Tag: programlisting
#: Clustering_Intro.xml:91
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"<Engine name=\"jboss.web\" \n"
" defaultHost=\"localhost\" jvmRoute=\"node1\">\n"
"... ...\n"
"</Engine>"
msgstr ""
-"<Engine name=\"jboss.web\" defaultHost=\"localhost\" jvmRoute=\"node1"
-"\">\n"
+"<Engine name=\"jboss.web\" \n"
+" defaultHost=\"localhost\" jvmRoute=\"node1\">\n"
"... ...\n"
"</Engine>"
@@ -502,13 +511,13 @@
"Each JBoss AS instance appends its own jvmRoute value to its HTTP session "
"IDs so that mod_jk can route incoming requests. That's all you need on "
"the JBoss AS node."
-msgstr ""
+msgstr "每个 JBoss AS 实例都把自己的 jvmRoute 值附加在 HTTP 会话 ID 里,这样 mod_jk 就能够路由转入的请求。对于 JBoss AS 节点,这就是你需要做的全部事情了。"
#. Tag: title
#: Clustering_Intro.xml:98
#, no-c-format
msgid "Shared Database"
-msgstr ""
+msgstr "共享的数据库"
#. Tag: para
#: Clustering_Intro.xml:99
@@ -520,13 +529,13 @@
"server and then configure it as the DataSource for applications deployed on "
"all nodes. Please see <xref linkend=\"alternative_DBs\"/> for more "
"information on how to setup external databases as DataSources."
-msgstr ""
+msgstr "在缺省情况下,JBoss AS 使用一个内嵌的 HSQL 数据库来持久化数据。为了使 web 群集正常工作,你必须为所有服务器节点使用一个共享数据库。我们推荐你设立一个单独的 MySQL 数据库服务器并配置为部署在所有的节点上的应用程序的数据源。关于如何把外部书库设立为数据源的更多信息,请参考 <xref linkend=\"alternative_DBs\"/>。"
#. Tag: title
#: Clustering_Intro.xml:107
#, no-c-format
msgid "Optional improvements to the simple cluster"
-msgstr ""
+msgstr "对这个简单群集的可选的改进方法"
#. Tag: para
#: Clustering_Intro.xml:108
@@ -537,7 +546,7 @@
"This architecture is highly scalable but it does not provide crucial "
"clustering features such as failover and distributed caching. With some "
"simple optional steps, you can easily add those features to your cluster."
-msgstr ""
+msgstr "我们在上面讨论的简单的 web 群集只是一个负载平衡架构,它只共享数据库级别的信息。这个架构是高度可扩充的,但它没有提供关键的群集功能,如失效切换和分布式缓存。通过几个简单的可选步骤,你可以轻易地在群集里添加这些功能。"
#. Tag: para
#: Clustering_Intro.xml:111
@@ -546,13 +555,13 @@
"Please note that you need to install a clustering enabled JBoss AS profile "
"(i.e., the all or ejb3-cluster profiles) on all your server nodes for the "
"optional setups."
-msgstr ""
+msgstr "请注意,你需要在所有服务器节点上安装启用了群集的 JBoss AS 配置(如 all 或 ejb3-cluster 配置)。"
#. Tag: title
#: Clustering_Intro.xml:115
#, no-c-format
msgid "Failover support"
-msgstr ""
+msgstr "对失效切换的支持"
#. Tag: para
#: Clustering_Intro.xml:116
@@ -565,7 +574,7 @@
"node in the cluster to replicate its HTTP session data to other nodes in the "
"cluster, so that when the node crashes, there is another node node to pick "
"up all users it left off without any session loss."
-msgstr ""
+msgstr "如果其中一个服务器节点崩溃的话,这个简单的 Web 群集不支持失效切换。既然每个 JBoss AS 节点都保存自己的 HTTP 会话状态数据 - 当负载平衡系统把请求转发给其他节点时,崩溃的服务器上的用户将丢失这些会话。解决方案是每个节点把其 HTTP 会话数据复制到群集的其他节点上,这样如果该节点崩溃了,另外一个节点将接管它丢下的用户并不会丢失任何会话数据。"
#. Tag: para
#: Clustering_Intro.xml:119
@@ -575,7 +584,7 @@
"network, they automatically form a cluster. Therefore, all you need to do is "
"to enable HTTP session replication in your web application. That is by "
"adding a <distributable/> tag in your web.xml file."
-msgstr ""
+msgstr "当你在相同网络里启动多个启用了群集的 JBoss AS 实例时,它们将自动组成群集。因此,你所需的只是在你的 web 应用程序里启用 HTTP 会话复制。这是通过在 web.xml 文件里添加 <distributable/> 标签来实现的。"
#. Tag: programlisting
#: Clustering_Intro.xml:122
@@ -586,6 +595,10 @@
" <!-- ... -->\n"
"</web-app>"
msgstr ""
+"<web-app ...>\n"
+" <distributable/>\n"
+" <!-- ... -->\n"
+"</web-app>"
#. Tag: para
#: Clustering_Intro.xml:123
@@ -601,13 +614,13 @@
"solution, we need to setup buddy replication in the cluster so that each "
"node only replicates its HTTP session data to another \"buddy\" failover "
"node."
-msgstr ""
+msgstr "然而,失效切换是要付出代价的。既然需要额外的对象序列化(CPU 消耗)和服务器节点间的通信(网络消耗),群集不再可根据节点数目线性扩充。使用缺省的设置,每个节点上的 HTTP 会话都被复制到群集里所有其他节点上。群集不会使用缺省设置扩展至 8 到 10 个服务器。对于确实可扩充的失效切换解决方案来说,我们需要设立 buddy 复制来使每个节点只复制自己的 HTTP 会话数据大另外一个 \"buddy\" 切换节点上。"
#. Tag: title
#: Clustering_Intro.xml:129
#, no-c-format
msgid "Database cache"
-msgstr ""
+msgstr "数据库缓存"
#. Tag: para
#: Clustering_Intro.xml:130
@@ -622,7 +635,7 @@
"the database. If A and B are not correlated, there is no way for B to know "
"that object O already has an updated value in the database -- so users on "
"server B would continue to access the expired value of O and get errors."
-msgstr ""
+msgstr "对于提高 ORM 解决方案如 Hibernate 和 EJB 3.0 的性能来说,数据库缓存是非常有用的。它把被频繁访问的数据对象保存在应用服务器的内存里,由此减少了对数据库服务器的访问。然而,如何在所有服务器节点间保持同步是一个挑战。例如,数据对象 O 可能缓存在节点 A 和 B 上。现在,节点 A 更新了对象 O 并把改动冲刷回数据库。如果 A 和 B 不相关联,B 就不可能知道对象 O 已经更新了数据库 - 所以节点 B 上的用户将继续使用过期的对象 O,从而出现错误。"
#. Tag: para
#: Clustering_Intro.xml:133
@@ -634,6 +647,8 @@
"instantly as well. Here we give an example configuration for EJB 3.0 entity "
"bean, which is supported by Hibernate 3.2+."
msgstr ""
+"这里的解决方案是使用分布式数据库缓存。这个缓存由所有服务器节点所“共享”。所以,如果一个节点在缓存里添加/更新/删除了任何对象,所有其他的节点都将立即获得更新的缓存。我们在这里给出一个用于 EJB 3.0 entity "
+"bean 的配置示例,Hibernate 3.2 及更新版本支持它。"
#. Tag: para
#: Clustering_Intro.xml:136
@@ -645,10 +660,13 @@
"specify JBoss TreeCache as your database cache provider in your persistence."
"xml file."
msgstr ""
+"JBoss AS 的 ejb3-"
+"cluster 配置缺省支持分布式缓存。因为带有 HTTP 会话复制,你所需要做的是在应用程序里启用该功能。首先,你需要在 persistence."
+"xml 文件里把 JBoss TreeCache 指定为数据库缓存提供者。"
#. Tag: programlisting
#: Clustering_Intro.xml:139
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"<!-- Clustered cache with TreeCache -->\n"
"<property name=\"cache.provider_class\">\n"
@@ -662,17 +680,21 @@
"<!-- Clustered cache with TreeCache -->\n"
"<property name=\"cache.provider_class\">\n"
" org.jboss.ejb3.entity.TreeCacheProviderHook\n"
+"</property>\n"
+"\n"
+"<property name=\"treecache.mbean.object_name\">\n"
+" jboss.cache:service=EJB3EntityTreeCache\n"
"</property>"
#. Tag: para
#: Clustering_Intro.xml:140
#, no-c-format
msgid "The on each entity bean class you want to cache, add the @Cache annotation."
-msgstr ""
+msgstr "对于每个你要缓存的 entity bean 类上,添加 @Cache 注解。"
#. Tag: programlisting
#: Clustering_Intro.xml:143
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"@Entity \n"
"@Cache(usage=CacheConcurrencyStrategy.TRANSACTIONAL) \n"
@@ -681,8 +703,8 @@
"}"
msgstr ""
"@Entity \n"
-"@Cache(usage=CacheConcurrencyStrategy.TRANSACTIONAL) \n"
-"public class Customer implements Serializable { \n"
+"@Cache(usage=CacheConcurrencyStrategy.TRANSACTIONAL) \n"
+"public class Product implements Serializable { \n"
" // ... ... \n"
"}"
@@ -692,13 +714,13 @@
msgid ""
"That's it. Now the Product data objects are cached in the shared cache "
"across all JBoss AS server nodes in the cluster."
-msgstr ""
+msgstr "好了,现在 Product 对象已经缓存在群集里所有 JBoss AS 服务器节点的共享缓存里了。"
#. Tag: title
#: Clustering_Intro.xml:152
#, no-c-format
msgid "Basic optimization"
-msgstr ""
+msgstr "基本的优化"
#. Tag: para
#: Clustering_Intro.xml:153
@@ -707,7 +729,7 @@
"In this section, we will give a few optimization tips to improve the "
"performance of the cluster. Details of those optimization techniques will be "
"covered later in this book."
-msgstr ""
+msgstr "在本节里,我们将介绍一些优化要点来提高群集的性能。本书后面的章节将介绍这些优化技术的详情。"
#. Tag: para
#: Clustering_Intro.xml:156
@@ -719,7 +741,7 @@
"addition, to optimize thread performance in the load balancer, we highly "
"recommend you install the \"worker\" MPM for Apache on Unix / Linux servers "
"and the \"winnt\" MPM for Windows servers."
-msgstr ""
+msgstr "第一点是调整 JBoss AS 服务器节点和负载平衡系统里的连接池。其目标是使 Apache 的连接占 JBoss AS 节点所有连接的 80%。此外,为了优化负载平衡系统里的线程性能,我们强烈推荐安装 Apache 的 \"worker\" MPM(用于 Unix / Linux 服务器)或 \"winnt\" MPM(用于 Windows 服务器)。"
#. Tag: para
#: Clustering_Intro.xml:159
@@ -735,7 +757,7 @@
"the session size is large. However, setting the granularity level to FIELD "
"may not have a great benefit due to the AOP overhead associated with dirty "
"checking on fields."
-msgstr ""
+msgstr "其次,我们需要理解 HTTP 会话复制的代价是非常高的,它应该被尽量最小化。选择正确的复制触发器和颗粒度是一个重要的步骤。例如,把触发器设置为 SET 可能要求你编写更多的代码来把改动的数据放回会话里。但对于大部分时间只读的应用程序来说,它会极大地减少复制负荷。如果会话规模很大,把颗粒度级别设置为 ATTRIBUTE 将比 SESSION 更高效。然而,由于和字段脏检查关联的 AOP 开销过大,设置颗粒度为 FIELD 可能并没有太多好处。"
#. Tag: para
#: Clustering_Intro.xml:162
@@ -743,7 +765,7 @@
msgid ""
"In addition, as we discussed before, the default \"replicate-to-all-nodes\" "
"approach for HTTP session replication does scale for large clusters."
-msgstr ""
+msgstr "此外,如我们前面所讨论的,用于 HTTP 会话复制的缺省的 \"replicate-to-all-nodes\" 方法不能在大型群集里进行扩充。"
#. Tag: para
#: Clustering_Intro.xml:165
@@ -754,7 +776,7 @@
"replicated HTTP sessions are only used when a rare failover happens, it is "
"not essential for the failover node to always have the exact same state as "
"the primary node at real time."
-msgstr ""
+msgstr "从网络级别来说,确保你使用异步通信机制来复制 HTTP 会话是很重要的。既然被复制的 HTTP 会话只在发生失效切换时才被使用,切换节点和源节点实时地保持相同状态并没有必要。"
#. Tag: para
#: Clustering_Intro.xml:168
@@ -765,5 +787,5 @@
"network (i.e., 4 or less nodes) the node-to-node TCP/IP protocol would out "
"perform the broadcast-based UDP protocol. It is the opposite when the "
"cluster size grows larger."
-msgstr ""
+msgstr "为节点内通信选择底层的网络协议也影响性能,这也值得注意。通常来说,在一个小型网络里(4 个节点或更少),节点到节点的 TCP/IP 协议不会执行基于广播的 UDP 协议。而当群集扩大时则相反。"
More information about the jboss-cvs-commits
mailing list