[jboss-cvs] JBossAS SVN: r73482 - projects/docs/trunk/AS_4/Server_Configuration_Guide/zh-CN.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sun May 18 22:22:51 EDT 2008


Author: xhuang at jboss.com
Date: 2008-05-18 22:22:51 -0400 (Sun, 18 May 2008)
New Revision: 73482

Modified:
   projects/docs/trunk/AS_4/Server_Configuration_Guide/zh-CN/Clustering_Guide_EJBs.po
Log:
update

Modified: projects/docs/trunk/AS_4/Server_Configuration_Guide/zh-CN/Clustering_Guide_EJBs.po
===================================================================
--- projects/docs/trunk/AS_4/Server_Configuration_Guide/zh-CN/Clustering_Guide_EJBs.po	2008-05-18 16:29:06 UTC (rev 73481)
+++ projects/docs/trunk/AS_4/Server_Configuration_Guide/zh-CN/Clustering_Guide_EJBs.po	2008-05-19 02:22:51 UTC (rev 73482)
@@ -9,7 +9,7 @@
 "Project-Id-Version: Clustering_Guide_EJBs\n"
 "Report-Msgid-Bugs-To: http://bugs.kde.org\n"
 "POT-Creation-Date: 2007-12-09 23:23+0000\n"
-"PO-Revision-Date: 2008-03-03 12:21+1000\n"
+"PO-Revision-Date: 2008-05-19 12:22+1000\n"
 "Last-Translator: Xi HUANG <xhuang at redhat.com>\n"
 "Language-Team:  <en at li.org>\n"
 "MIME-Version: 1.0\n"
@@ -25,7 +25,7 @@
 
 #. Tag: para
 #: Clustering_Guide_EJBs.xml:6
-#, fuzzy, no-c-format
+#, no-c-format
 msgid ""
 "Session EJBs provide remote invocation services. They are clustered based on "
 "the client-side interceptor architecture. The client application for a "
@@ -38,10 +38,10 @@
 msgstr ""
 "Session EJBs 提供远程的调用服务。它们按照客户端拦截器架构(client-side "
 "interceptor architecture)组成群集系统。群集的 session bean 的客户应用程序和"
-"非群集的版本是一模一样的,除了对启用 HA-JNDI 查找的 <literal>java.naming."
+"非群集的版本是一模一样的,除了对启用 HA-JNDI 查找(请参考前面章节)的 <literal>java.naming."
 "provier.url</literal> 系统属性的少许改动。对于客户端来说,不需要任何的源码改"
 "动或重新编译。现在,让我们看看怎么分别在 EJB 2.x 和 EJB 3.0 服务器应用程序里"
-"配置群集的 session beans。"
+"配置群集的 session bean。"
 
 #. Tag: title
 #: Clustering_Guide_EJBs.xml:13
@@ -114,20 +114,20 @@
 
 #. Tag: para
 #: Clustering_Guide_EJBs.xml:21
-#, fuzzy, no-c-format
+#, no-c-format
 msgid ""
 "The <literal>&lt;clustered&gt;True&lt;/clustered&gt;</literal> element is "
 "really just an alias for the <literal>&lt;configuration-name&gt;Clustered "
 "Stateless SessionBean&lt;/configuration-name&gt;</literal> element in the "
 "conf/standard-jboss.xml file."
 msgstr ""
-"<literal>&lt;clustered&gt;True&lt;/clustered&gt;</literal> 元素实际上是 "
+"<literal>&lt;clustered&gt;True&lt;/clustered&gt;</literal> 元素实际上是 conf/standard-jboss.xml 文件里的 "
 "<literal>&lt;configuration-name&gt;Clustered Stateless SessionBean&lt;/"
 "configuration-name&gt;</literal> 元素的一个别名。"
 
 #. Tag: para
 #: Clustering_Guide_EJBs.xml:26
-#, fuzzy, no-c-format
+#, no-c-format
 msgid ""
 "In the bean configuration, only the &lt;clustered&gt; element is mandatory. "
 "It indicates that the bean needs to support clustering features. The &lt;"
@@ -135,10 +135,10 @@
 "attributes are indicated in the sample configuration above. Below is a "
 "description of the attributes in the &lt;cluster-config&gt; element.."
 msgstr ""
-"在 bean 配置里,只有 <literal>&lt;clustered&gt;</literal> 元素是强制的。它指"
-"出这个 bean 在群集里运行。<literal>&lt;cluster-config&gt;</literal> 元素是可"
-"选的,我们在上面的配置样本里指出了它的缺省值。下面是关于 <literal>&lt;"
-"cluster-config&gt;</literal> 元素里属性的描述。"
+"在 bean 配置里,只有 &lt;clustered&gt; 元素是强制的。它指"
+"出这个 bean 需要支持群集功能。&lt;cluster-config&gt; 元素是可"
+"选的,我们在上面的配置示例里指出了它的缺省值。下面是关于 &lt;"
+"cluster-config&gt; 元素里属性的描述。"
 
 #. Tag: para
 #: Clustering_Guide_EJBs.xml:29
@@ -309,7 +309,7 @@
 
 #. Tag: para
 #: Clustering_Guide_EJBs.xml:69
-#, fuzzy, no-c-format
+#, no-c-format
 msgid ""
 "The description of the remaining tags is identical to the one for stateless "
 "session bean. Actions on the clustered stateful session bean's home "
@@ -318,8 +318,8 @@
 "any more and will stay \"sticky\" to the first node in the list."
 msgstr ""
 "余下的标签的描述和 stateless session bean 的描述是一样的。群集的 stateful "
-"session bean 的主接口上的动作缺省是基于  round-robin 负载平衡策略的。一旦 "
-"bean 的 remote stub 对于客户可用时,调用将不会再进行负载平衡而\"粘"
+"session bean 的 home 接口上的动作缺省是基于 round-robin 负载平衡策略的。一旦 "
+"bean 的 remote stub 对于客户可用时,调用将不会再进行 round-robin 形式的负载平衡而\"粘"
 "\"(sticky)在列表里的第一个节点上。"
 
 #. Tag: title
@@ -371,7 +371,7 @@
 
 #. Tag: para
 #: Clustering_Guide_EJBs.xml:88
-#, fuzzy, no-c-format
+#, no-c-format
 msgid ""
 "The <literal>HASessionState</literal> service MBean is defined in the "
 "<code>all/deploy/cluster-service.xml</code> file."
@@ -381,7 +381,7 @@
 
 #. Tag: programlisting
 #: Clustering_Guide_EJBs.xml:90
-#, fuzzy, no-c-format
+#, no-c-format
 msgid ""
 "<![CDATA[ \n"
 "<mbean code=\"org.jboss.ha.hasessionstate.server.HASessionStateService\"\n"
@@ -401,22 +401,23 @@
 "<attribute name=\"BeanCleaningDelay\">0</attribute>\n"
 "</mbean>   ]]>"
 msgstr ""
-"&lt;mbean code=\"org.jboss.ha.hasessionstate.server.HASessionStateService\"\n"
-"      name=\"jboss:service=HASessionState\"&gt;\n"
-"    &lt;depends&gt;\n"
-"        jboss:service=${jboss.partition.name:DefaultPartition}\n"
-"    &lt;/depends&gt;\n"
-"    &lt;!-- Name of the partition to which the service is linked --&gt;\n"
-"    &lt;attribute name=\"PartitionName\"&gt;\n"
-"        ${jboss.partition.name:DefaultPartition}\n"
-"    &lt;/attribute&gt;\n"
-"    &lt;!-- JNDI name under which the service is bound --&gt;\n"
-"    &lt;attribute name=\"JndiName\"&gt;/HASessionState/Default&lt;/"
-"attribute&gt;\n"
-"    &lt;!-- Max delay before cleaning unreclaimed state.\n"
-"           Defaults to 30*60*1000 =&gt; 30 minutes --&gt;\n"
-"    &lt;attribute name=\"BeanCleaningDelay\"&gt;0&lt;/attribute&gt;\n"
-"&lt;/mbean&gt;"
+"<![CDATA[ \n"
+"<mbean code=\"org.jboss.ha.hasessionstate.server.HASessionStateService\"\n"
+"   name=\"jboss:service=HASessionState\">\n"
+"    \n"
+"    <depends>jboss:service=Naming</depends> \n"
+"   <!-- We now inject the partition into the HAJNDI service instead \n"
+" of requiring that the partition name be passed --> \n"
+" <depends optional-attribute-name=\"ClusterPartition\" \n"
+"  proxy-type=\"attribute\">\n"
+"  jboss:service=${jboss.partition.name:DefaultPartition}\n"
+"  </depends>\n"
+"  <!-- JNDI name under which the service is bound -->\n"
+"  <attribute name=\"JndiName\">/HASessionState/Default</attribute>\n"
+"  <!-- Max delay before cleaning unreclaimed state.\n"
+"Defaults to 30*60*1000 => 30 minutes -->\n"
+"<attribute name=\"BeanCleaningDelay\">0</attribute>\n"
+"</mbean>   ]]>"
 
 #. Tag: para
 #: Clustering_Guide_EJBs.xml:92
@@ -428,14 +429,14 @@
 
 #. Tag: para
 #: Clustering_Guide_EJBs.xml:95
-#, fuzzy, no-c-format
+#, no-c-format
 msgid ""
 "<emphasis role=\"bold\">ClusterPartition</emphasis> is a required attribute "
 "to inject the HAPartition service that HA-JNDI uses for intra-cluster "
 "communication."
 msgstr ""
-"<emphasis role=\"bold\">PartitionName</emphasis> 是用来指定节点名称的可选属"
-"性。它的缺省值是 <literal>DefaultPartition</literal>。"
+"<emphasis role=\"bold\">ClusterPartition</emphasis> 是注入 HA-JNDI 用于群集内部通信的 HAPartition 服务的必需属"
+"性。"
 
 #. Tag: para
 #: Clustering_Guide_EJBs.xml:100
@@ -475,13 +476,13 @@
 
 #. Tag: title
 #: Clustering_Guide_EJBs.xml:117
-#, fuzzy, no-c-format
+#, no-c-format
 msgid "Handling Cluster Restart"
 msgstr "处理群集系统重启"
 
 #. Tag: para
 #: Clustering_Guide_EJBs.xml:118
-#, fuzzy, no-c-format
+#, no-c-format
 msgid ""
 "We have covered the HA smart client architecture in the section called "
 "“Client-side interceptor architecture”. The default HA smart proxy client "
@@ -491,15 +492,15 @@
 "from this. The proxy needs to look up a fresh set of targets out of JNDI/"
 "HAJNDI when the nodes are restarted."
 msgstr ""
-"我们已经在 <xref linkend=\"clustering-intro-arch-proxy\"/> 介绍了 HA smart "
+"我们已经在“客户端拦截器架构”章节介绍了 HA smart "
 "client architecture。缺省的 HA smart proxy client 只能在群集里一个节点故障时"
 "进行失效切换(failover)。如果整个群集都关闭了,代理(proxy)将失去所有群集里"
-"可用节点的信息。在这种情况下,代理没有什么办法来恢复系统。当节点重启时,需要"
-"在 JNDI/HAJNDI 之外查找代理。"
+"可用节点的信息。在这种情况下,代理没有什么办法来恢复系统。当节点重启时,代理需要"
+"在 JNDI/HAJNDI 之外查找新的目标节点。"
 
 #. Tag: para
 #: Clustering_Guide_EJBs.xml:121
-#, fuzzy, no-c-format
+#, no-c-format
 msgid ""
 "The 3.2.7+/4.0.2+ releases contain a RetryInterceptor that can be added to "
 "the proxy client side interceptor stack to allow for a transparent recovery "
@@ -515,7 +516,7 @@
 
 #. Tag: programlisting
 #: Clustering_Guide_EJBs.xml:124
-#, fuzzy, no-c-format
+#, no-c-format
 msgid ""
 "<![CDATA[ \n"
 " <jboss>\n"
@@ -578,74 +579,72 @@
 "          </proxy-factory-config>\n"
 " </invoker-proxy-binding> ]]>"
 msgstr ""
-"&lt;jboss&gt;\n"
-"    &lt;session&gt;\n"
-"        &lt;ejb-name&gt;nextgen_RetryInterceptorStatelessSession&lt;/ejb-"
-"name&gt;\n"
-"        &lt;invoker-bindings&gt;\n"
-"            &lt;invoker&gt;\n"
-"                &lt;invoker-proxy-binding-name&gt;\n"
-"                    clustered-retry-stateless-rmi-invoker\n"
-"                &lt;/invoker-proxy-binding-name&gt;\n"
-"                &lt;jndi-name&gt;\n"
-"                    nextgen_RetryInterceptorStatelessSession\n"
-"                &lt;/jndi-name&gt;\n"
-"            &lt;/invoker&gt;\n"
-"        &lt;/invoker-bindings&gt;\n"
-"        &lt;clustered&gt;true&lt;/clustered&gt;\n"
-"    &lt;/session&gt;\n"
-"\n"
-"    &lt;invoker-proxy-binding&gt;\n"
-"        &lt;name&gt;clustered-retry-stateless-rmi-invoker&lt;/name&gt;\n"
-"        &lt;invoker-mbean&gt;jboss:service=invoker,type=jrmpha&lt;/invoker-"
-"mbean&gt;\n"
-"        &lt;proxy-factory&gt;org.jboss.proxy.ejb.ProxyFactoryHA&lt;/proxy-"
-"factory&gt;\n"
-"        &lt;proxy-factory-config&gt;\n"
-"            &lt;client-interceptors&gt;\n"
-"                &lt;home&gt;\n"
-"                    &lt;interceptor&gt;\n"
-"                        org.jboss.proxy.ejb.HomeInterceptor\n"
-"                    &lt;/interceptor&gt;\n"
-"                    &lt;interceptor&gt;\n"
-"                        org.jboss.proxy.SecurityInterceptor\n"
-"                    &lt;/interceptor&gt;\n"
-"                    &lt;interceptor&gt;\n"
-"                        org.jboss.proxy.TransactionInterceptor\n"
-"                    &lt;/interceptor&gt;\n"
-"                    &lt;interceptor&gt;\n"
-"                        org.jboss.proxy.ejb.RetryInterceptor\n"
-"                    &lt;/interceptor&gt;\n"
-"                    &lt;interceptor&gt;\n"
-"                        org.jboss.invocation.InvokerInterceptor\n"
-"                    &lt;/interceptor&gt;\n"
-"                &lt;/home&gt;\n"
-"                &lt;bean&gt;\n"
-"                    &lt;interceptor&gt;\n"
-"                        org.jboss.proxy.ejb.StatelessSessionInterceptor\n"
-"                    &lt;/interceptor&gt;\n"
-"                    &lt;interceptor&gt;\n"
-"                        org.jboss.proxy.SecurityInterceptor\n"
-"                    &lt;/interceptor&gt;\n"
-"                    &lt;interceptor&gt;\n"
-"                        org.jboss.proxy.TransactionInterceptor\n"
-"                    &lt;/interceptor&gt;\n"
-"                    &lt;interceptor&gt;\n"
-"                        org.jboss.proxy.ejb.RetryInterceptor\n"
-"                    &lt;/interceptor&gt;\n"
-"                    &lt;interceptor&gt;\n"
-"                        org.jboss.invocation.InvokerInterceptor\n"
-"                    &lt;/interceptor&gt;\n"
-"                &lt;/bean&gt;\n"
-"            &lt;/client-interceptors&gt;\n"
-"        &lt;/proxy-factory-config&gt;\n"
-"    &lt;/invoker-proxy-binding&gt;"
+"<![CDATA[ \n"
+" <jboss>\n"
+" <session>\n"
+"         <ejb-name>nextgen_RetryInterceptorStatelessSession</ejb-name>\n"
+"         <invoker-bindings>\n"
+"         <invoker>\n"
+"         <invoker-proxy-binding-name>\n"
+"         clustered-retry-stateless-rmi-invoker\n"
+"         </invoker-proxy-binding-name>\n"
+"         <jndi-name>\n"
+"         nextgen_RetryInterceptorStatelessSession\n"
+"         </jndi-name>\n"
+"         </invoker>\n"
+"         </invoker-bindings>\n"
+"         <clustered>true</clustered>\n"
+" </session>\n"
+"  \n"
+" <invoker-proxy-binding>\n"
+"         <name>clustered-retry-stateless-rmi-invoker</name>\n"
+"         <invoker-mbean>jboss:service=invoker,type=jrmpha</invoker-mbean>\n"
+"         <proxy-factory>org.jboss.proxy.ejb.ProxyFactoryHA</proxy-factory>\n"
+"         <proxy-factory-config>\n"
+"         <client-interceptors>\n"
+"                 <home>\n"
+"                 <interceptor>\n"
+"                 org.jboss.proxy.ejb.HomeInterceptor\n"
+"                 </interceptor>\n"
+"                <interceptor>\n"
+"                org.jboss.proxy.SecurityInterceptor\n"
+"                </interceptor>\n"
+"                <interceptor>\n"
+"                  org.jboss.proxy.TransactionInterceptor\n"
+"                  </interceptor>\n"
+"                 <interceptor>\n"
+"                 org.jboss.proxy.ejb.RetryInterceptor\n"
+"                 </interceptor>\n"
+"                  <interceptor>\n"
+"                  org.jboss.invocation.InvokerInterceptor\n"
+"                  </interceptor>\n"
+"          </home>\n"
+"         <bean>\n"
+"                  <interceptor>\n"
+"                  org.jboss.proxy.ejb.StatelessSessionInterceptor\n"
+"                  </interceptor>\n"
+"                 <interceptor>\n"
+"                 org.jboss.proxy.SecurityInterceptor\n"
+"                 </interceptor>\n"
+"                 <interceptor>\n"
+"                org.jboss.proxy.TransactionInterceptor\n"
+"                </interceptor>\n"
+"                <interceptor>\n"
+"                org.jboss.proxy.ejb.RetryInterceptor\n"
+"                 </interceptor>\n"
+"                 <interceptor>\n"
+"                 org.jboss.invocation.InvokerInterceptor\n"
+"                </interceptor>\n"
+"        </bean>\n"
+"          </client-interceptors>\n"
+"          </proxy-factory-config>\n"
+" </invoker-proxy-binding> ]]>"
 
 #. Tag: title
 #: Clustering_Guide_EJBs.xml:128
 #, no-c-format
 msgid "JNDI Lookup Process"
-msgstr ""
+msgstr "JNDI 查找过程"
 
 #. Tag: para
 #: Clustering_Guide_EJBs.xml:129
@@ -657,7 +656,7 @@
 "configured properly to find your naming server. The RetryInterceptor will go "
 "through the following steps in attempting to determine the proper naming "
 "environment properties:"
-msgstr ""
+msgstr "要恢复 HA 代理,RetryInterceptor 将在 JNDI 里进行查找。这意味着它将在内部创建一个新的 InitialContext 并进行 JNDI 查找。但是,为了查找成功,InitialContext 需要正确地配置来找到命名服务器。RetryInterceptor 将进行下面的步骤来决定正确的命名环境属性:"
 
 #. Tag: para
 #: Clustering_Guide_EJBs.xml:133
@@ -668,7 +667,7 @@
 "to configuration has two downsides: first, it reduces portability by "
 "introducing JBoss-specific calls to the client code; and second, since a "
 "static field is used only a single configuration per JVM is possible."
-msgstr ""
+msgstr "它将检查自己的静态(static)retryEnv 字段。这个字段可以通过调用 RetryInterceptor.setRetryEnv(Properties) 的客户代码设置。这个配置方法有两个缺点:首先,由于引入了 JBoss 专有的对客户代码调用,它降低了可移植性;其次,既然使用了静态字段,那么就只可能对每个 JVM 进行逐一配置。"
 
 #. Tag: para
 #: Clustering_Guide_EJBs.xml:138
@@ -684,6 +683,10 @@
 "naming properties are stored in a ThreadLocal and thus are only visible to "
 "the thread that originally created an InitialContext."
 msgstr ""
+"如果这个 retryEnv 字段为空,它将检查任何通过 org.jboss.naming.NamingContextFactory 类绑定在 ThreadLocal 上环境属性。要把这个类用作命名上下文工厂,你需要在 jndi.properties 里设置 java.naming.factory.initial=org.jboss.naming."
+"NamingContextFactory。这个方法的优点是只需要简单地在 jndi."
+"properties 文件里对 org.jboss."
+"naming.NamingContextFactory 进行配置,而你的 Java 代码不受影响。其缺点是命名属性存储在 ThreadLocal 里,因此只对于原来创建 InitialContext 的线程可见。"
 
 #. Tag: para
 #: Clustering_Guide_EJBs.xml:143
@@ -696,12 +699,14 @@
 "section on “ClusteredJNDI Services” for more on multicast discovery of HA-"
 "JNDI."
 msgstr ""
+"如果这两个方法都不能产生一套命名环境属性,缺省的 InitialContext 将被使用。如果对命名服务器的连接没有成功,InitialContext 缺省将试图通过多点传送发现(multicast discovery)来找到 HA-JNDI 命名服务器。关于对 HA-"
+"JNDI 的多点传送发现,请参考“群集 JNDI 服务”章节。"
 
 #. Tag: title
 #: Clustering_Guide_EJBs.xml:152
 #, no-c-format
 msgid "SingleRetryInterceptor"
-msgstr ""
+msgstr "SingleRetryInterceptor"
 
 #. Tag: para
 #: Clustering_Guide_EJBs.xml:153
@@ -714,7 +719,7 @@
 "never return. For many client applications, this possibility is "
 "unacceptable. As a result, JBoss doesn't make the RetryInterceptor part of "
 "its default client interceptor stacks for clustered EJBs."
-msgstr ""
+msgstr "RetryInterceptor 可用在许多场合,但缺点是它将持续地在 JNDI 里重新查找 HA 代理直至成功。如果由于某个原因不能查找成功,这个过程将一直进行,因此触发 RetryInterceptor 的 EJB 调用将永远不能返回。对于许多客户端应用程序来说,这种情况是不能接受的。因此,对于群集的 EJB,JBoss 并不把 RetryInterceptor 作为缺省的客户端拦截器栈的一部分。"
 
 #. Tag: para
 #: Clustering_Guide_EJBs.xml:156
@@ -726,7 +731,7 @@
 "in JNDI. If this attempt fails, the EJB call will fail just as if no retry "
 "interceptor was used. Beginning with 4.0.4.CR2, the SingleRetryInterceptor "
 "is part of the default client interceptor stacks for clustered EJBs."
-msgstr ""
+msgstr "在 4.0.4.RC1 版本里引入了新的重试拦截器:org.jboss.proxy.ejb.SingleRetryInterceptor。这个版本和 RetryInterceptor 类似,但对 HA 代理的查找只进行一次尝试。如果这次尝试失败了,EJB 调用将马上返回,就好像没有使用重试拦截器一样。从 4.0.4.CR2 开始,对于群集 EJB,SingleRetryInterceptor 已作为缺省的客户端拦截器栈的一部分了。"
 
 #. Tag: para
 #: Clustering_Guide_EJBs.xml:159
@@ -735,7 +740,7 @@
 "The downside of the SingleRetryInterceptor is that if the retry attempt is "
 "made during a portion of a cluster restart where no servers are available, "
 "the retry will fail and no further attempts will be made."
-msgstr ""
+msgstr "SingleRetryInterceptor 的缺点是如果这次尝试发生在群集重启过程中,而此时没有可用的服务器,那么它会失败且不会进行进一步的尝试。"
 
 #. Tag: title
 #: Clustering_Guide_EJBs.xml:169
@@ -745,7 +750,7 @@
 
 #. Tag: para
 #: Clustering_Guide_EJBs.xml:170
-#, fuzzy, no-c-format
+#, no-c-format
 msgid ""
 "To cluster a stateless session bean in EJB 3.0, all you need to do is to "
 "annotate the bean class withe the <literal>@Clustered</literal> annotation. "
@@ -756,15 +761,15 @@
 "<literal>@Cluster</literal> annotation."
 msgstr ""
 "要在 EJB 3.0 内群集一个 stateless session bean,你所需要做的就是用 "
-"<literal>@Cluster</literal> 注解来注解(annotate)bean 类。你可以把负载平衡策"
+"<literal>@Clustered</literal> 注解来注解(annotate)bean 类。你可以把负载平衡策"
 "略(load balance policy)和群集分区名当作参数传入这个注解。缺省的负载平衡策略"
 "是 <literal>org.jboss.ha.framework.interfaces.RandomRobin</literal>,缺省的群"
-"集是 <literal>DefaultPartition</literal>。下面是 <literal>@Cluster</literal> "
+"集是 <literal>DefaultPartition</literal>。下面是 <literal>@Clustered</literal> "
 "注解的定义。"
 
 #. Tag: programlisting
 #: Clustering_Guide_EJBs.xml:176
-#, fuzzy, no-c-format
+#, no-c-format
 msgid ""
 "public @interface Clustered {\n"
 "   Class loadBalancePolicy() default LoadBalancePolicy.class;\n"
@@ -774,7 +779,8 @@
 msgstr ""
 "public @interface Clustered {\n"
 "   Class loadBalancePolicy() default LoadBalancePolicy.class;\n"
-"   String partition() default \"DefaultPartition\";\n"
+"   String partition() default  \"${jboss.partition.name:DefaultPartition}"
+"\";\n"
 "}"
 
 #. Tag: para
@@ -813,7 +819,7 @@
 msgid ""
 "The <literal>@Clustered</literal> annotation can also be omitted and the "
 "clustering configuration applied in jboss.xml:"
-msgstr ""
+msgstr "<literal>@Clustered</literal> 注解也可以被忽略而使用 jboss.xml 里的群集配置:"
 
 #. Tag: programlisting
 #: Clustering_Guide_EJBs.xml:182
@@ -835,16 +841,31 @@
 "         </enterprise-beans>\n"
 "</jboss>   ]]>"
 msgstr ""
+"<![CDATA[ \n"
+"<jboss>    \n"
+"         <enterprise-beans>\n"
+"         <session>\n"
+"                 <ejb-name>NonAnnotationStateful</ejb-name>\n"
+"                <clustered>true</clustered>\n"
+"                        <cluster-config>\n"
+"                        <partition-name>FooPartition</partition-name>\n"
+"                        <load-balance-policy>\n"
+"                        org.jboss.ha.framework.interfaces.RandomRobin\n"
+"                         </load-balance-policy>\n"
+"                 </cluster-config>\n"
+"         </session>    \n"
+"         </enterprise-beans>\n"
+"</jboss>   ]]>"
 
 #. Tag: title
 #: Clustering_Guide_EJBs.xml:187
-#, fuzzy, no-c-format
+#, no-c-format
 msgid "Stateful Session Beans in EJB 3.0"
-msgstr "EJB 3.0 里的 Stateful Session Bean"
+msgstr "EJB 3.0 里的 Stateful Session Bean "
 
 #. Tag: para
 #: Clustering_Guide_EJBs.xml:188
-#, fuzzy, no-c-format
+#, no-c-format
 msgid ""
 "To cluster stateful session beans in EJB 3.0, you need to tag the bean "
 "implementation class with the <literal>@Cluster</literal> annotation, just "
@@ -855,7 +876,8 @@
 msgstr ""
 "为了在 EJB 3.0 里群集 stateful session beans,你需要用 <literal>@Cluster</"
 "literal> 注解来标记 bean 实现类,就和我们之前对 EJB 3.0 stateless session "
-"bean 做的一样。"
+"bean 做的一样。@org.jboss."
+"ejb3.annotation.cache.tree.CacheConfig 注解也可以应用在 bean 上来指定缓存行为。下面是@CacheConfig 注解的定义:"
 
 #. Tag: programlisting
 #: Clustering_Guide_EJBs.xml:193
@@ -871,6 +893,15 @@
 "long removalTimeoutSeconds() default 0;\n"
 "} ]]>"
 msgstr ""
+"<![CDATA[ \n"
+"public @interface CacheConfig\n"
+"{\n"
+"String name() default \"jboss.cache:service=EJB3SFSBClusteredCache\";\n"
+"int maxSize() default 10000;\n"
+"long idleTimeoutSeconds() default 300;   \n"
+"boolean replicationIsPassivation() default true;   \n"
+"long removalTimeoutSeconds() default 0;\n"
+"} ]]>"
 
 #. Tag: para
 #: Clustering_Guide_EJBs.xml:196
@@ -878,7 +909,7 @@
 msgid ""
 "<literal>name</literal> specifies the object name of the JBoss Cache Mbean "
 "that should be used for caching the bean (see below for more on this Mbean)."
-msgstr ""
+msgstr "<literal>name</literal> 指定用来缓存这个 bean 的 JBoss Cache Mbean(更多信息请参考下面的内容)的对象名称。"
 
 #. Tag: para
 #: Clustering_Guide_EJBs.xml:198
@@ -887,7 +918,7 @@
 "<literal>maxSize</literal> specifies the maximum number of beans that can "
 "cached before the cache should start passivating beans, using an LRU "
 "algorithm."
-msgstr ""
+msgstr "<literal>maxSize</literal> 指定在缓存应该启动钝化 bean 之前的最大缓存数量,它使用 LRU 算法。"
 
 #. Tag: para
 #: Clustering_Guide_EJBs.xml:200
@@ -896,7 +927,7 @@
 "<literal>idleTimeoutSeconds</literal> specifies the max period of time a "
 "bean can go unused before the cache should passivate it (irregardless of "
 "whether maxSize beans are cached.)"
-msgstr ""
+msgstr "<literal>idleTimeoutSeconds</literal> 指定 bean 在缓存应该钝化它之前不被使用的最长时间(不管是否数量为 maxSize 的 bean 已经被缓存了)。"
 
 #. Tag: para
 #: Clustering_Guide_EJBs.xml:202
@@ -904,7 +935,7 @@
 msgid ""
 "<literal>removalTimeoutSeconds</literal> specifies the max period of time a "
 "bean can go unused before the cache should remove it altogether."
-msgstr ""
+msgstr "<literal>removalTimeoutSeconds</literal> 指定 bean 在缓存应该删除它之前不被使用的最长时间。"
 
 #. Tag: para
 #: Clustering_Guide_EJBs.xml:204
@@ -917,18 +948,21 @@
 "recovering from serialization is a common reason for implementing the "
 "callback methods."
 msgstr ""
+"<literal>replicationIsPassivation</literal> 指定缓存是否应该考虑对钝化的复制,并调用 bean 上的"
+" @PrePassivate 和 @PostActivate 回调方法。"
+"既然复制涉及对 bean 的序列化,实施回调方法的常见原因就是需要准备和恢复序列化,它缺省为 true。"
 
 #. Tag: para
 #: Clustering_Guide_EJBs.xml:209
-#, fuzzy, no-c-format
+#, no-c-format
 msgid ""
 "Here is an example of a clustered EJB 3.0 stateful session bean "
 "implementation."
-msgstr "这里是一个群集的 EJB 3.0 stateless session bean 实现的例子。"
+msgstr "这里是一个群集的 EJB 3.0 stateful session bean 实现的例子。"
 
 #. Tag: programlisting
 #: Clustering_Guide_EJBs.xml:216
-#, fuzzy, no-c-format
+#, no-c-format
 msgid ""
 "@Stateful\n"
 "@Clustered\n"
@@ -944,6 +978,7 @@
 msgstr ""
 "@Stateful\n"
 "@Clustered\n"
+"@CacheConfig(maxSize=5000,removalTimeoutSeconds=18000)\n"
 "public class MyBean implements MySessionInt {\n"
 "   \n"
 "   private int state = 0;\n"
@@ -959,7 +994,7 @@
 msgid ""
 "As with stateless beans, the @Clustered annotation can also be omitted and "
 "the clustering configuration applied in jboss.xml; see the example above."
-msgstr ""
+msgstr "和 stateless bean 一样,@Clustered 注解也可以被忽略并应用 jboss.xml 里的群集配置。请参看上面的示例。"
 
 #. Tag: para
 #: Clustering_Guide_EJBs.xml:221
@@ -971,16 +1006,19 @@
 "replicated. With EJB3, the mechanism is a little more formal; instead of "
 "just exposing a method with a known signature, an EJB3 SFSB must implement "
 "the org.jboss.ejb3.cache.Optimized interface:"
-msgstr ""
+msgstr "对于 EJB 2.0 里群集的 SFSB,JBoss 提供了这样一种机制:bean 实现可以开放某个方法,容器可以调用这个方法来检查接受请求后 bean 的状态是否为 dirty 并是否需要复制。在 EJB3 里,这个机制更为正式:不是开放带有已知签名的方法,而是 EJB3 SFSB 必须实现 org.jboss.ejb3.cache.Optimized 接口:"
 
 #. Tag: programlisting
 #: Clustering_Guide_EJBs.xml:224
-#, fuzzy, no-c-format
+#, no-c-format
 msgid ""
 "public interface Optimized {\n"
 "boolean isModified();\n"
 "}"
-msgstr "public boolean isModified ();"
+msgstr ""
+"public interface Optimized {\n"
+"boolean isModified();\n"
+"}"
 
 #. Tag: para
 #: Clustering_Guide_EJBs.xml:226
@@ -1091,10 +1129,100 @@
 "        </mbean>\n"
 "</server>]]>"
 msgstr ""
+"<![CDATA[ \n"
+"<server>\n"
+"        <mbean code=\"org.jboss..cache.TreeCache\"\n"
+"        name=\"jboss.cache:service=EJB3SFSBClusteredCache\">\n"
+"          \n"
+"                <attribute name=\"ClusterName\">\n"
+"                        ${jboss.partition.name:DefaultPartition}-SFSBCache\n"
+"                        </attribute>\n"
+"                        <attribute name=\"IsolationLevel\">REPEATABLE_READ</"
+"attribute>\n"
+"                        <attribute name=\"CacheMode\">REPL_ASYNC</"
+"attribute> \n"
+"                  \n"
+"                        <!-- We want to activate/inactivate regions as beans "
+"are deployed --> \n"
+"                         <attribute name=\"UseRegionBasedMarshalling\">true</"
+"attribute> \n"
+"                        <!-- Must match the value of "
+"\"useRegionBasedMarshalling\" --> \n"
+"                        <attribute name=\"InactiveOnStartup\">true</"
+"attribute>\n"
+"                          \n"
+"                        <attribute name=\"ClusterConfig\">\n"
+"                        ... ...\n"
+"                        </attribute> \n"
+"                          \n"
+"                        <!-- The max amount of time (in milliseconds) we "
+"wait until the \n"
+"                        initial state (ie. the contents of the cache) are "
+"retrieved from \n"
+"                        existing members.  --> \n"
+"                        <attribute name=\"InitialStateRetrievalTimeout"
+"\">17500</attribute>\n"
+"                          \n"
+"                        <!--  Number of milliseconds to wait until all "
+"responses for a\n"
+"                                synchronous call have been received.\n"
+"                                -->\n"
+"                        <attribute name=\"SyncReplTimeout\">17500</"
+"attribute>\n"
+"                          \n"
+"                        <!--  Max number of milliseconds to wait for a lock "
+"acquisition -->\n"
+"                        <attribute name=\"LockAcquisitionTimeout\">15000</"
+"attribute>\n"
+"                          \n"
+"                         <!--  Name of the eviction policy class. -->\n"
+"                        <attribute name=\"EvictionPolicyClass\">\n"
+"                                org.jboss.cache.eviction.LRUPolicy\n"
+"                        </attribute>\n"
+"                          \n"
+"                        <!--  Specific eviction policy configurations. This "
+"is LRU -->\n"
+"                        <attribute name=\"EvictionPolicyConfig\">\n"
+"                         <config>\n"
+"                                <attribute name=\"wakeUpIntervalSeconds\">5</"
+"attribute>\n"
+"                                 <name>statefulClustered</name> \n"
+"                                <!-- So default region would never timeout --"
+">\n"
+"                                <region name=\"/_default_\">\n"
+"                                <attribute name=\"maxNodes\">0</attribute>\n"
+"                                 <attribute name=\"timeToIdleSeconds\">0</"
+"attribute>\n"
+"                                </region>\n"
+"                        </config>\n"
+"                </attribute> \n"
+"                                          \n"
+"        <!-- Store passivated sessions to the file system --> \n"
+"         <attribute name=\"CacheLoaderConfiguration\"> \n"
+"        <config> \n"
+"          \n"
+"         <passivation>true</passivation> \n"
+"        <shared>false</shared> \n"
+"                                                          \n"
+"          <cacheloader> \n"
+"                 <class>org.jboss.cache.loader.FileCacheLoader</class> \n"
+"                <!-- Passivate to the server data dir --> \n"
+"                 <properties> \n"
+"                        location=${jboss.server.data.dir}${/}sfsb \n"
+"                </properties> \n"
+"                <async>false</async> \n"
+"                <fetchPersistentState>true</fetchPersistentState> \n"
+"                <ignoreModifications>false</ignoreModifications> \n"
+"                </cacheloader> \n"
+"                  \n"
+"                         </config> \n"
+"           </attribute>\n"
+"        </mbean>\n"
+"</server>]]>"
 
 #. Tag: para
 #: Clustering_Guide_EJBs.xml:235
-#, fuzzy, no-c-format
+#, no-c-format
 msgid ""
 "The configuration attributes in this MBean are essentially the same as the "
 "attributes in the standard JBoss Cache <literal>TreeCache</literal> MBean "
@@ -1102,10 +1230,9 @@
 "JGroups configurations in the <literal>ClusterConfig</literal> attribute "
 "(see more in <xref linkend=\"jbosscache-jgroups\"/>). Two noteworthy items:"
 msgstr ""
-"<literal>PassivationTreeCache</literal> MBean 里的配置属性基本上和在 <xref "
+"这个 MBean 里的配置属性基本上和在 <xref "
 "linkend=\"jbosscache.chapt\"/> 里讨论的标准 JBoss Cache <literal>TreeCache</"
-"literal> MBean 一样。我们再一次忽略了 <literal>ClusterConfig</literal> 属性"
-"(详情请参考 <xref linkend=\"jbosscache-jgroups\"/>)的 JGroups 配置。"
+"literal> MBean 一样。我们再一次忽略了 <literal>ClusterConfig</literal> 里(详情请参考 <xref linkend=\"jbosscache-jgroups\"/>)的 JGroups 配置。"
 
 #. Tag: para
 #: Clustering_Guide_EJBs.xml:240
@@ -1115,7 +1242,7 @@
 "the JBoss Cache eviction mechanism to manage SFSB passivation. When beans "
 "are deployed, the EJB container will programatically add eviction regions to "
 "the cache, one region per bean type."
-msgstr ""
+msgstr "我们通过配置使缓存支持 eviction。EJB3 SFSB 容器使用 JBoss Cache eviction 机制来管理 SFSB 钝化。当 bean 被部署时,EJB 容器将把 eviction region 添加到缓存里,每个 region 对应一个 bean 类型。"
 
 #. Tag: para
 #: Clustering_Guide_EJBs.xml:244
@@ -1132,5 +1259,5 @@
 "Each node in the cluster must have its own persistent store, otherwise as "
 "nodes independently passivate and activate clustered beans, they will "
 "corrupt each others data."
-msgstr ""
+msgstr "我们也配置 JBoss Cache CacheLoader,使其支持 SFSB 钝化。当 bean 从缓存里被逐出(evict)时,缓存加载器将其钝化到一个持久性存储里:这个例子是文件系统 $JBOSS_HOME/server/all/data/sfsb 目录。JBoss Cache 支持不同的 CacheLoader 实现来把数据存储到不同类型的存储里。详情请参考 JBoss Cache 文档。然而,如果你修改了 CacheLoaderConfiguration,请确保你没有使用共享存储(例如共享数据库里的单一模式)。群集里的每个节点都必须拥有自己的持久性存储,否则在节点独立地钝化和激活群集 bean 时,它们将毁坏各自的数据。"
 




More information about the jboss-cvs-commits mailing list