[jboss-svn-commits] JBL Code SVN: r24061 - labs/jbosstm/enterprise/tags/EAP_4_3_0/Transactions_Failure_Recovery_Guide/zh-CN.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Nov 24 01:45:53 EST 2008


Author: xhuang at jboss.com
Date: 2008-11-24 01:45:52 -0500 (Mon, 24 Nov 2008)
New Revision: 24061

Modified:
   labs/jbosstm/enterprise/tags/EAP_4_3_0/Transactions_Failure_Recovery_Guide/zh-CN/Architecture_of_the_Recovery_Manager.po
Log:
update

Modified: labs/jbosstm/enterprise/tags/EAP_4_3_0/Transactions_Failure_Recovery_Guide/zh-CN/Architecture_of_the_Recovery_Manager.po
===================================================================
--- labs/jbosstm/enterprise/tags/EAP_4_3_0/Transactions_Failure_Recovery_Guide/zh-CN/Architecture_of_the_Recovery_Manager.po	2008-11-24 06:40:11 UTC (rev 24060)
+++ labs/jbosstm/enterprise/tags/EAP_4_3_0/Transactions_Failure_Recovery_Guide/zh-CN/Architecture_of_the_Recovery_Manager.po	2008-11-24 06:45:52 UTC (rev 24061)
@@ -8,8 +8,8 @@
 "Project-Id-Version: Architecture_of_the_Recovery_Manager\n"
 "Report-Msgid-Bugs-To: http://bugs.kde.org\n"
 "POT-Creation-Date: 2008-09-23 06:30+0000\n"
-"PO-Revision-Date: 2008-11-20 09:46+1000\n"
-"Last-Translator: Xi HUANG <xhuang at redhat.com>\n"
+"PO-Revision-Date: 2008-11-24 16:45+1000\n"
+"Last-Translator: \n"
 "Language-Team:  <en at li.org>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -168,7 +168,7 @@
 "Recovery Manager and used to create the appropriate Recovery Component able "
 "to receive recovery requests according to a particular transaction protocol. "
 "For instance the RecoveryCoordinator defined by the OTS protocol."
-msgstr ""
+msgstr "在加载后,所有的 <interfacename>RecoveryActivator</interfacename> 实例都提供了 <methodname>startRCservice</methodname> 方法,它被切换管理者调用并用来创建能够按照特定的事务协议接收切换请求合适的切换组件。例如 OTS 协议定义的 RecoveryCoordinator。"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:64
@@ -319,6 +319,9 @@
 "recovery.recoveryExtension1= com.arjuna.ats.internal.ts.arjuna.recovery."
 "AtomicActionRecoveryModule)."
 msgstr ""
+"RecoveryClassLoader:定期地加载切换管理者属性文件指定的切换模块。每个模块都作为切换扩展在属性文件里指定(例如,com.arjuna.ats.arjuna."
+"recovery.recoveryExtension1= com.arjuna.ats.internal.ts.arjuna.recovery."
+"AtomicActionRecoveryModule)。"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:136
@@ -327,7 +330,7 @@
 "By default, the recovery manager listens on the first available port on a "
 "given machine. If you wish to control the port number that it uses, you can "
 "specify this using the com.arjuna.ats.arjuna.recovery.recoveryPort attribute."
-msgstr ""
+msgstr "在缺省情况下,切换管理者侦听给定主机上的第一个可用端口。如果你希望控制它使用的端口号码,你可以使用 com.arjuna.ats.arjuna.recovery.recoveryPort 属性来进行指定。"
 
 #. Tag: title
 #: Architecture_of_the_Recovery_Manager.xml:141
@@ -345,6 +348,8 @@
 "arjuna.recovery.RecoveryManager. A RecoveryManager can be created in one of "
 "two modes, selected via the parameter to the manager method:"
 msgstr ""
+"在某些情况下,你可能需要把切换管理者嵌入到和事务服务相同的进程里。在这种情况下,你可以通过 com.arjuna.ats."
+"arjuna.recovery.RecoveryManager 的 manager 方法创建一个 RecoveryManager 实例。RecoveryManager 实例可以下列两种模式之一创建,这由 manager 方法的参数来决定:"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:148
@@ -353,7 +358,7 @@
 "INDIRECT_MANAGEMENT: the manager runs periodically but can also be "
 "instructed to run when desired via the scan operation or through the "
 "RecoveryDriver class to be described below."
-msgstr ""
+msgstr "INDIRECT_MANAGEMENT:管理者定期运行,但也可以在需要时通过 scan 操作或下面讨论的RecoveryDriver 类来驱动。"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:153
@@ -361,13 +366,13 @@
 msgid ""
 "DIRECT_MANAGEMENT: the manager does not run periodically and must be driven "
 "directly via the scan operation or RecoveryDriver."
-msgstr ""
+msgstr "DIRECT_MANAGEMENT:管理者不会定期运行,它必须直接通过 scan 操作或 RecoveryDriver 来驱动。"
 
 #. Tag: title
 #: Architecture_of_the_Recovery_Manager.xml:159
 #, no-c-format
 msgid "Managing recovery directly"
-msgstr ""
+msgstr "直接管理切换"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:160
@@ -376,13 +381,13 @@
 "As already mentioned, recovery typically happens at periodic intervals. If "
 "you require to drive recovery directly, then there are two options, "
 "depending upon how the RecoveryManager has been created."
-msgstr ""
+msgstr "如前所述,切换通常定期地发生。如果你需要直接驱动切换过程,你有两个选择,这取决于 RecoveryManager 的创建方式。"
 
 #. Tag: title
 #: Architecture_of_the_Recovery_Manager.xml:165
 #, no-c-format
 msgid "Seperate Recovery Manager"
-msgstr ""
+msgstr "独立的切换管理者"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:166
@@ -394,6 +399,8 @@
 "recovery.RecoveryDriver class to do likewise. There are two types of "
 "recovery scan available:"
 msgstr ""
+"你可以使用 com.arjuna.ats.arjuna.tools.RecoveryMonitor 程序来发送消息给 Recovery Manager,指引它执行切换,或者你可以创建 com.arjuna.ats.arjuna."
+"recovery.RecoveryDriver 类的实例来实现类似的功能。切换扫描有两种类型:"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:172
@@ -401,7 +408,7 @@
 msgid ""
 "ASYNC_SCAN: here a message is sent to the RecoveryManager to instruct it to "
 "perform recovery, but the response returns before recovery has completed."
-msgstr ""
+msgstr "ASYNC_SCAN:消息被发送给 RecoveryManager 来指引它执行切换,但在切换完成前返回响应。"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:177
@@ -409,13 +416,13 @@
 msgid ""
 "SYNC: here a message is sent to the RecoveryManager to instruct it to "
 "perform recovery, and the response occurs only when recovery has completed."
-msgstr ""
+msgstr "SYNC:消息被发送给 RecoveryManager 来指引其执行切换,只有切换完成时才返回响应。"
 
 #. Tag: title
 #: Architecture_of_the_Recovery_Manager.xml:183
 #, no-c-format
 msgid "In process Recovery Manager"
-msgstr ""
+msgstr "进程内切换管理者"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:184
@@ -425,7 +432,7 @@
 "returns only when recovery has completed. However, if you wish to have an "
 "asynchronous interaction pattern, then the RecoveryScan interface is "
 "provided:"
-msgstr ""
+msgstr "你可以调用 RecoveryManager 的 scan 操作。这个操作只有在切换完成时才返回。然而,如果希望使用异步交互模式,你可以使用 RecoveryScan 接口:"
 
 #. Tag: screen
 #: Architecture_of_the_Recovery_Manager.xml:188
@@ -436,6 +443,10 @@
 "        public void completed ();\n"
 "}"
 msgstr ""
+"public interface RecoveryScan\n"
+"{\n"
+"        public void completed ();\n"
+"}"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:189
@@ -444,13 +455,13 @@
 "An instance of an object supporting this interface can be passed to the scan "
 "operation and its completed method will be called when recovery finishes. "
 "The scan operation returns immediately, however."
-msgstr ""
+msgstr "支持这个接口的对象实例可以传递给 scan 操作,且它的 completed 方法在切换完成时将被调用。然而,scan 操作会立即返回。"
 
 #. Tag: title
 #: Architecture_of_the_Recovery_Manager.xml:195
 #, no-c-format
 msgid "Recovery Modules"
-msgstr ""
+msgstr "切换模块"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:196
@@ -463,6 +474,8 @@
 "<methodname>periodicWorkSecondPass</methodname> invoked by the Recovery "
 "Manager."
 msgstr ""
+"如前所述,每个切换模块的都被用来恢复不同类型的事务/资源,但每个资源模块必须实现下列的 RecoveryModule 接口,它定义了两个方法:切换管理者所调用的 <methodname>periodicWorkFirstPass</methodname> 和 "
+"<methodname>periodicWorkSecondPass</methodname>。"
 
 #. Tag: screen
 #: Architecture_of_the_Recovery_Manager.xml:199
@@ -484,12 +497,27 @@
 "        public void periodicWorkSecondPass ();\n"
 "}"
 msgstr ""
+"public interface RecoveryModule\n"
+"{\n"
+"        /**\n"
+"        * Called by the RecoveryManager at start up, and then\n"
+"        * PERIODIC_RECOVERY_PERIOD seconds after the completion, for all   \n"
+"        * RecoveryModules of the second pass\n"
+"        */\n"
+"        public void periodicWorkFirstPass ();\n"
+"        \n"
+"        /**\n"
+"        * Called by the RecoveryManager RECOVERY_BACKOFF_PERIOD seconds\n"
+"        * after the completion of the first pass\n"
+"        */\n"
+"        public void periodicWorkSecondPass ();\n"
+"}"
 
 #. Tag: title
 #: Architecture_of_the_Recovery_Manager.xml:201
 #, no-c-format
 msgid "JBossTS Recovery Module Classes"
-msgstr ""
+msgstr "JBossTS 切换模块类"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:202
@@ -499,37 +527,37 @@
 "recovery according to the nature of the participant and its position in a "
 "transactional tree. The provided classes (that all implements the "
 "<interfacename>RecoveryModule</interfacename> interface) are:"
-msgstr ""
+msgstr "JBossTS 提供了一系列按照参与者的性质和事务树里位置负责管理切换的模块。所提供的类(都实现了<interfacename>RecoveryModule</interfacename> 接口)是: "
 
 #. Tag: title
 #: Architecture_of_the_Recovery_Manager.xml:209
 #, no-c-format
 msgid "com.arjuna.ats.internal.arjuna.recovery.AtomicActionRecoveryModule"
-msgstr ""
+msgstr "com.arjuna.ats.internal.arjuna.recovery.AtomicActionRecoveryModule"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:210
 #, no-c-format
 msgid "Recovers AtomicAction transactions."
-msgstr ""
+msgstr "切换 AtomicAction 事务。"
 
 #. Tag: title
 #: Architecture_of_the_Recovery_Manager.xml:217
 #, no-c-format
 msgid "com.arjuna.ats.internal.txoj.recovery.TORecoveryModule"
-msgstr ""
+msgstr "com.arjuna.ats.internal.txoj.recovery.TORecoveryModule"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:218
 #, no-c-format
 msgid "Recovers Transactional Objects for Java."
-msgstr ""
+msgstr "切换 Transactional Objects for Java。"
 
 #. Tag: title
 #: Architecture_of_the_Recovery_Manager.xml:225
 #, no-c-format
 msgid "com.arjuna.ats.internal.jts.recovery.transactions.TransactionRecoveryModule"
-msgstr ""
+msgstr "com.arjuna.ats.internal.jts.recovery.transactions.TransactionRecoveryModule"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:226
@@ -537,7 +565,7 @@
 msgid ""
 "Recovers JTS Transactions. This is a generic class from which TopLevel and "
 "Server transaction recovery modules inherit, respectively"
-msgstr ""
+msgstr "切换 JTS 事务。这是顶层和服务器事务切换模块继承的通用类。"
 
 #. Tag: title
 #: Architecture_of_the_Recovery_Manager.xml:233
@@ -546,12 +574,14 @@
 "com.arjuna.ats.internal.jts.recovery.transactions."
 "TopLevelTransactionRecoveryModule"
 msgstr ""
+"com.arjuna.ats.internal.jts.recovery.transactions."
+"TopLevelTransactionRecoveryModule"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:234
 #, no-c-format
 msgid "Recovers JTS Toplevel Transactions."
-msgstr ""
+msgstr "切换 JTS 顶层事务。"
 
 #. Tag: title
 #: Architecture_of_the_Recovery_Manager.xml:241
@@ -560,12 +590,14 @@
 "com.arjuna.ats.internal.jts.recovery.transactions."
 "ServerTransactionRecoveryModule"
 msgstr ""
+"com.arjuna.ats.internal.jts.recovery.transactions."
+"ServerTransactionRecoveryModule"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:242
 #, no-c-format
 msgid "Recovers JTS Server Transactions."
-msgstr ""
+msgstr "切换 JTS 服务器事务。"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:248
@@ -574,19 +606,19 @@
 "To illustrate the behavior of a recovery module, the following pseudo code "
 "describes the basic algorithm used for Atomic Action transactions and "
 "Transactional Objects for java."
-msgstr ""
+msgstr "为了解释切换模块的行为,下面的伪代码描述了用于 Atomic Action 事务和 Transactional Objects for java 的基本算法。"
 
 #. Tag: title
 #: Architecture_of_the_Recovery_Manager.xml:252
 #, no-c-format
 msgid "AtomicAction pseudo code"
-msgstr ""
+msgstr "AtomicAction 伪代码"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:253
 #, no-c-format
 msgid "First Pass:"
-msgstr ""
+msgstr "第一阶段:"
 
 #. Tag: screen
 #: Architecture_of_the_Recovery_Manager.xml:257
@@ -599,13 +631,19 @@
 "        &lt; add the transaction to the vector of transactions. &gt;\n"
 "end while."
 msgstr ""
+"&lt; create a transaction vector for transaction Uids. &gt;\n"
+"&lt; read in all transactions for a transaction type AtomicAction. &gt;\n"
+"while &lt; there are transactions in the vector of transactions. &gt;\n"
+"do\n"
+"        &lt; add the transaction to the vector of transactions. &gt;\n"
+"end while."
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:258
 #: Architecture_of_the_Recovery_Manager.xml:267
 #, no-c-format
 msgid "Second Pass:"
-msgstr ""
+msgstr "第二阶段:"
 
 #. Tag: screen
 #: Architecture_of_the_Recovery_Manager.xml:261
@@ -625,6 +663,19 @@
 "        endif.\n"
 "end while."
 msgstr ""
+"while &lt; there are transactions in the transaction vector &gt;\n"
+"do\n"
+"        if &lt; the intention list for the transaction still exists &gt;\n"
+"        then\n"
+"                &lt; create new transaction cached item &gt;\n"
+"                &lt; obtain the status of the transaction &gt;\n"
+"                                        \n"
+"                if         &lt; the transaction is not in progress &gt;\n"
+"                then\n"
+"                        &lt; replay phase two of the commit protocol &gt;\n"
+"                endif.\n"
+"        endif.\n"
+"end while."
 
 #. Tag: title
 #: Architecture_of_the_Recovery_Manager.xml:263
@@ -654,6 +705,17 @@
 "        end if.\n"
 "end while."
 msgstr ""
+"&lt; Create a hash table for uncommitted transactional objects. &gt;\n"
+"&lt; Read in all transactional objects within the object store. &gt;\n"
+"while &lt; there are transactional objects &gt;\n"
+"do\n"
+"        if         &lt; the transactional object has an Uncommited status in "
+"the object store &gt;\n"
+"        then\n"
+"                &lt; add the transactional Object o the hash table for "
+"uncommitted transactional objects&gt;\n"
+"        end if.\n"
+"end while."
 
 #. Tag: screen
 #: Architecture_of_the_Recovery_Manager.xml:270
@@ -678,12 +740,30 @@
 "        endif.\n"
 "end while."
 msgstr ""
+"while &lt; there are transactions in the hash table for uncommitted "
+"transactional objects &gt;\n"
+"do\n"
+"        if &lt; the transaction is still in the Uncommitted state &gt;\n"
+"        then\n"
+"                if &lt; the transaction is not in the Transaction Cache "
+"&gt;\n"
+"                then\n"
+"                        &lt; check the status of the transaction with the "
+"original application process &gt;\n"
+"                        if &lt; the status is Rolled Back or the application "
+"process is inactive &gt;\n"
+"                                &lt; rollback the transaction by removing "
+"the Uncommitted status from the Object Store &gt;\n"
+"                        endif.\n"
+"                endif.\n"
+"        endif.\n"
+"end while."
 
 #. Tag: title
 #: Architecture_of_the_Recovery_Manager.xml:272
 #, no-c-format
 msgid "A Recovery Module for XA Resources"
-msgstr ""
+msgstr "用于 XA 资源的切换模块"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:273
@@ -693,7 +773,7 @@
 "Manager triggers a recovery process by calling a set of recovery modules "
 "that implements the two methods defined by the "
 "<interfacename>RecoveryModule</interfacename> interface."
-msgstr ""
+msgstr "为了管理切换,在前面的章节里我们已经看到了切换管理者通过调用一系列切换模块来触发切换过程,它实现了<interfacename>RecoveryModule</interfacename> 接口定义的两个方法。"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:277
@@ -707,6 +787,10 @@
 "<interfacename>XA</interfacename> resources (for example, databases) used in "
 "JTA."
 msgstr ""
+"为了启用通过 <interfacename>XA</"
+"interfacename> 接口控制的参与者的切换,我们提供一个名为 XARecoveryModule 的专门的切换模块。<package>com."
+"arjuna.ats.internal.jta.recovery.arjunacore</package> 和 <package>com."
+"arjuna.ats.internal.jta.recovery.jts</package> 里定义的 XARecoveryModule 处理 JTA 里使用的 <interfacename>XA</interfacename> 资源(如数据库)的切换。"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:281
@@ -716,7 +800,7 @@
 "distributed transactions) and a version layered on the JTS. Recovery for the "
 "former is straightforward. In the following discussion we shall implicitly "
 "consider on the JTS implementation."
-msgstr ""
+msgstr "JBossTS 支持两种 JTA 实现:纯本地版本(无分布式事务)和 JTS 分层版本。前者的切换是简单的。在后面的讨论里,我们只考虑 JTS 实现。"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:285
@@ -728,16 +812,19 @@
 "progressed far enough for a JTA Resource Record to be written in the "
 "ObjectStore, as illustrated in Figure 2."
 msgstr ""
+"它的行为由两个方面组成:<emphasis>transaction-initiated</"
+"emphasis> and <emphasis>resource-initiated</emphasis> 切换。如图 2 所解释的,当特定的事务分支足够详细,使得 JTA 资源纪录可写入对象库时,事务初始的切换是可能发生的。"
 
 #. Tag: caption
 #: Architecture_of_the_Recovery_Manager.xml:292
 #, no-c-format
 msgid "JTA/JDBC information stored in the ObjectStore"
-msgstr ""
+msgstr "存储在对象库里的 JTA/JDBC 信息"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:294
 #, no-c-format
+#, fuzzy
 msgid ""
 "A JTA Resource record contains the information needed to link the "
 "transaction, as known to the rest of JBossTS, to the database. Resource-"
@@ -748,6 +835,8 @@
 "in the JTA Resource record that allows the recreation in the RecoveryManager "
 "of the XAConnection/XAResource that was used in the original application."
 msgstr ""
+"JTA 资源记录包含将事务和 JBossTS 的其他部分(如数据库)链接所需的信息。Resource-"
+"initiated 的切换"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:298
@@ -765,6 +854,10 @@
 "property> should be alphanumeric and match the values of <property>com."
 "arjuna.ats.arjuna.xa.nodeIdentifier</property>."
 msgstr ""
+"当运行 XA 切换时,通知 JBossTS 切换的 XID 类型是有必要的。JBossTS 创建的每个 XID 都有一个唯一的节点标识符,JBossTS 将只切换符合指定节点标识符的事务和状态。要使用的节点标识符应该通过名称以 <property>com."
+"arjuna.ats.jta.xaRecoveryNode</property> 开始的属性提供给 JBossTS;它可以为多个值。“*”将使 JBossTS 切换(或可能回滚)所有的事务而不顾其节点标识符,你应该小心使用这种方式。<property>com.arjuna.ats.jta.xaRecoveryNode</"
+"property> 的内容应该是字母数字的且匹配 <property>com."
+"arjuna.ats.arjuna.xa.nodeIdentifier</property> 的值。"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:302
@@ -778,13 +871,13 @@
 "rollback on it as appropriate. The XAResource creation will use the same "
 "information, database name, username, password etc., as the original "
 "application."
-msgstr ""
+msgstr "Transaction-initiated 切换是自动的。XARecoveryModule 找到需要切换的 JTA Resource Record,然后使用正常的切换机制来找到所涉及的事务的状态(也就是说,它为事务分支调用 RecoveryCoordinator 的 replay_completio),合适时创建/重创建合适的 XAResource 并进行提交或回滚。XAResource 的创建将使用和原始程序相同的信息、数据库名称、用户名、密码等。"
 
 #. Tag: caption
 #: Architecture_of_the_Recovery_Manager.xml:309
 #, no-c-format
 msgid "Transaction-Initiated Recovery and XA Recovery"
-msgstr ""
+msgstr "Transaction-Initiated 切换和 XA 切换"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:311
@@ -800,12 +893,14 @@
 "dynamically loaded, as controlled by properties with names beginning "
 "<property>com.arjuna.ats.jta.recovery.XAResourceRecovery</property>."
 msgstr ""
+"对于 Resource-initiated 切换,我们得进行特殊配置,为切换管理者提供合适的信息来查询任何 JBossTS 应用程序访问的所有数据库(XADataSource)。如图例 4 中所示,对 XADataSource 的访问由实现了 <interfacename>com.arjuna.ats.jta.recovery."
+"XAResourceRecovery</interfacename> 接口的类来处理。实现了 XAResourceRecovery 接口的类的实例会被动态加载,这是通过名称以 <property>com.arjuna.ats.jta.recovery.XAResourceRecovery</property> 开始的属性来控制的。"
 
 #. Tag: caption
 #: Architecture_of_the_Recovery_Manager.xml:318
 #, no-c-format
 msgid "Resource-initiated recovery and XA Recovery"
-msgstr ""
+msgstr "Resource-initiated 切换和 XA 切换"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:321
@@ -815,7 +910,7 @@
 "deprecated in favor of <interfacename>XAResourceRecovery</interfacename>. "
 "Although the old interface still exists at the moment, users are encouraged "
 "to migrate to the new interface."
-msgstr ""
+msgstr "JBossTS 3.3 <interfacename>XAConnectionRecovery</interfacename> 已经被替换为 <interfacename>XAResourceRecovery</interfacename>。虽然旧的接口仍然存在,我们还是鼓励用户使用新的接口。"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:325
@@ -832,7 +927,7 @@
 "found by the intervening transaction-initiated recovery is assumed to belong "
 "to a transaction that was involved in a crash before any JTA ResourceRecord "
 "was written, and a rollback is issued for that transaction on the XAResource."
-msgstr ""
+msgstr "XARecoveryModule 将使用 XAResourceRecovery 实现来获取目标数据源的 XAResource。每次调用 periodicWorkSecondPass 时,切换模块将发出一个 XAResource.recover 请求 - 这将(如 XA 规格里说描述的)返回数据源已知的且处于可疑状态的事务标识符(XID)的列表。在成功地调用后(如 periodicWorkSecondPass-es),这个可疑 XID 列表将被接收。任何出现在这两个列表里的 XID,以及中介 transaction-initiated 切换没有找到 JTA ResourceRecord 的 XID,都被假设是属于涉及在 JTA ResourceRecord 被写入之前的崩溃的事务的。且在该 XAResource 上的事务将进行回滚。"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:328
@@ -843,7 +938,7 @@
 "about to create the corresponding JTA_ResourceRecord. The interval between "
 "the scans should allow time for the record to be written unless the "
 "application crashes (and if it does, rollback is the right answer)."
-msgstr ""
+msgstr "之所以使用这个双重扫描的机制,是因为在原始应用程序进程将要创建相应的 JTA_ResourceRecord 时,可能从数据源获得 XID。除非应用程序崩溃(如果崩溃将进行回滚),两个扫描的时间间隔应该允许记录写入。"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:331
@@ -859,7 +954,7 @@
 "class name: everything after the first semi-colon is passed as the value of "
 "the string. The use made of this string is determined by the "
 "<classname>XAResourceRecovery</classname> implementation class."
-msgstr ""
+msgstr "<classname>XAResourceRecovery</classname> 实现类可以被写入,它包含执行切换到某个数据源所需的所有信息。或者,单个类可以处理多个数据源。实现类的构造函数必须有一个空参数列表(因为是动态加载),但其接口包括一个 initialise 方法来以字符串传入进一步信息。这个字符串的内容将从提供类名的属性值里提取:第一个分号后面的内容都作为字符串的值来传递。<classname>XAResourceRecovery</classname> 实现类决定了这个字符串的使用方法。"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:334
@@ -870,17 +965,18 @@
 "chapter of the JTA Programming Guide. An implementation class is provided "
 "that supports resource-initiated recovery for any XADataSource. This class "
 "could be used as a template to build your own implementation class."
-msgstr ""
+msgstr "关于实现 <interfacename>XAResourceRecovery</interfacename> 接口的类的更多细节,请阅读《JTA 编程指南》的 JDBC 章节。我们提供了一个支持任何 XADataSource 的 resource-initiated 切换的实现类。这个类可以被用作构建自己的实现类的模板。"
 
 #. Tag: title
 #: Architecture_of_the_Recovery_Manager.xml:338
 #, no-c-format
 msgid "Writing a Recovery Module"
-msgstr ""
+msgstr "编写恢复模块"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:339
 #, no-c-format
+#, fuzzy
 msgid ""
 "In order to recover from failure, we have seen that the Recovery Manager "
 "contacts recovery modules by invoking periodically the methods "
@@ -893,12 +989,14 @@
 "following basic example illustrates the steps needed to build such recovery "
 "module"
 msgstr ""
+"为了在失效后进行切换,我们已经看到切换管理者通过定期调用 <methodname>periodicWorkFirstPass</methodname> 和 "
+"<methodname>periodicWorkSecondPass</methodname> 来联系切换模块。然后,每个切换模块都能够管理切换"
 
 #. Tag: title
 #: Architecture_of_the_Recovery_Manager.xml:342
 #, no-c-format
 msgid "A basic scenario"
-msgstr ""
+msgstr "基本模式"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:343
@@ -907,7 +1005,7 @@
 "This basic example does not aim to present a complete process to recover "
 "from failure, but mainly to illustrate the way to implement a recovery "
 "module."
-msgstr ""
+msgstr "这个基本示例不是为了解释失效切换的完整过程,它的目的是解释实现切换模块的途径。"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:345
@@ -916,25 +1014,25 @@
 "The application used here consists to create an atomic transaction, to "
 "register a participant within the created transaction and finally to "
 "terminate it either by commit or abort. A set of arguments are provided:"
-msgstr ""
+msgstr "这里使用的应用程序将创建原子事务、在该事务里注册参与者并最终通过提交或回滚终止它提供了一系列参数:"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:350
 #, no-c-format
 msgid "to decide to commit or abort the transaction,"
-msgstr ""
+msgstr "为了决定提交还是终止事务,"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:355
 #, no-c-format
 msgid "to decide generating a crash during the commitment process."
-msgstr ""
+msgstr "为了决定在提交过程中生成崩溃。"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:360
 #, no-c-format
 msgid "The code of the main class that control the application is given below"
-msgstr ""
+msgstr "主要的控制应用程序的类的代码如下"
 
 #. Tag: screen
 #: Architecture_of_the_Recovery_Manager.xml:363
@@ -981,12 +1079,52 @@
 "        protected static boolean _crash = false;\n"
 "}"
 msgstr ""
+"package com.arjuna.demo.recoverymodule;\n"
+"        \n"
+"import com.arjuna.ats.arjuna.AtomicAction;\n"
+"import com.arjuna.ats.arjuna.coordinator.*;\n"
+"        \n"
+"public class TestRecoveryModule\n"
+"{\n"
+"        public static void main(String args[])\n"
+"        {\n"
+"                try \n"
+"                {\n"
+"                        AtomicAction tx = new AtomicAction();\n"
+"                        tx.begin(); // Top level begin\n"
+"        \n"
+"                        // enlist the participant \n"
+"                        tx.add(SimpleRecord.create());\n"
+"        \n"
+"                        System.out.println(\"About to complete the "
+"transaction \");\n"
+"                        for (int i = 0; i &lt; args.length; i++)\n"
+"                        {\n"
+"                                if ((args[i].compareTo(\"-commit\") == 0))\n"
+"                                _commit = true;\n"
+"                                if ((args[i].compareTo(\"-rollback\") == "
+"0))\n"
+"                                _commit = false;\n"
+"                                if ((args[i].compareTo(\"-crash\") == 0))\n"
+"                                _crash = true;\n"
+"                        }\n"
+"                        if (_commit)\n"
+"                                tx.commit();  // Top level commit\n"
+"                        else \n"
+"                                tx.abort();  // Top level rollback\n"
+"                        } catch(Exception e) {\n"
+"                        e.printStackTrace();\n"
+"                }\n"
+"        }\n"
+"        protected static boolean _commit = true;\n"
+"        protected static boolean _crash = false;\n"
+"}"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:364
 #, no-c-format
 msgid "The registered participant has the following behavior:"
-msgstr ""
+msgstr "注册的参与者有下列的行为:"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:369
@@ -996,6 +1134,8 @@
 "prepared</emphasis>- on the disk such The message is written in a well known "
 "file."
 msgstr ""
+"在准备(prepare)阶段,它在磁盘上写入简单的信息 <emphasis>I’m "
+"prepared</emphasis>- 这条消息存储在知名的文件里。"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:374
@@ -1004,6 +1144,8 @@
 "During the commit phase, it writes another message - <emphasis>I’m "
 "committed</emphasis>- in the same file used during prepare."
 msgstr ""
+"在提交阶段,它在相同的文件里写入另外一条消息 - <emphasis>I’m "
+"committed</emphasis>。"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:379
@@ -1011,7 +1153,7 @@
 msgid ""
 "If it receives an abort message, it removes from the disk the file used for "
 "prepare if any."
-msgstr ""
+msgstr "如果它接受到关于取消(abort)的消息,它将把准备阶段使用的文件删除。"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:384
@@ -1019,7 +1161,7 @@
 msgid ""
 "If a crash has been decided for the test, then it crashes during the commit "
 "phase – the file remains with the message <emphasis>I’m prepared</emphasis>."
-msgstr ""
+msgstr "如果已经决定崩溃,然后它在提交阶段崩溃 - 该文件保留消息 <emphasis>I’m prepared</emphasis>。"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:389
@@ -1027,13 +1169,13 @@
 msgid ""
 "The main portion of the code illustrating such behavior is described "
 "hereafter."
-msgstr ""
+msgstr "后面描述了解释这种行为的代码的主要部分。"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:393
 #, no-c-format
 msgid "The location of the file given in variable filename can be changed"
-msgstr ""
+msgstr "你可以改变变量 filename 指定的文件位置"
 
 #. Tag: screen
 #: Architecture_of_the_Recovery_Manager.xml:397
@@ -1101,6 +1243,67 @@
 "        …\n"
 "}"
 msgstr ""
+"package com.arjuna.demo.recoverymodule;\n"
+"        \n"
+"import com.arjuna.ats.arjuna.coordinator.*;\n"
+"import java.io.File;\n"
+"        \n"
+"public class SimpleRecord extends AbstractRecord {\n"
+"        public String filename = \"c:/tmp/RecordState\";\n"
+"        public SimpleRecord() {\n"
+"                System.out.println(\"Creating new resource\");\n"
+"        }\n"
+"        \n"
+"        public static AbstractRecord create()\n"
+"        {\n"
+"                return new SimpleRecord() ;\n"
+"        }\n"
+"        \n"
+"        public int topLevelAbort()\n"
+"        {\n"
+"                try {\n"
+"                        File fd = new File(filename);\n"
+"                        if (fd.exists()){\n"
+"                                if (fd.delete())\n"
+"                                        System.out.println(\"File Deleted"
+"\");\n"
+"                        }\n"
+"        }\n"
+"        catch(Exception ex){…}\n"
+"                return TwoPhaseOutcome.FINISH_OK;\n"
+"        }\n"
+"        \n"
+"        public int topLevelCommit()\n"
+"        {\n"
+"                if (TestRecoveryModule._crash)\n"
+"                        System.exit(0);\n"
+"                try  {\n"
+"                        java.io.FileOutputStream file = new    \n"
+"                                java.io.FileOutputStream(filename);\n"
+"                        java.io.PrintStream pfile = new java.io.PrintStream"
+"(file);\n"
+"                        pfile.println(\"I'm Committed\");\n"
+"                        file.close();\n"
+"                }\n"
+"                catch (java.io.IOException ex) {...}\n"
+"                return TwoPhaseOutcome.FINISH_OK ;\n"
+"        }\n"
+"        \n"
+"        public int topLevelPrepare()\n"
+"        {\n"
+"                try {\n"
+"                        java.io.FileOutputStream file = new\n"
+"                                java.io.FileOutputStream(filename);\n"
+"                        java.io.PrintStream pfile = new java.io.PrintStream"
+"(file);\n"
+"                        pfile.println(\"I'm prepared\");\n"
+"                        file.close();\n"
+"                }\n"
+"                catch (java.io.IOException ex)  {...}\n"
+"                return  TwoPhaseOutcome.PREPARE_OK ;\n"
+"        }\n"
+"        …\n"
+"}"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:398
@@ -1110,7 +1313,7 @@
 "content of the file used to store the status of the participant, to "
 "determine that status and print a message indicating if a recovery action is "
 "needed or not."
-msgstr ""
+msgstr "应用程序里的切换模块(Recovery Module)的职责是读取粗存储参与者状态的文件的内容,以获知相关状态并打印指出是否需要切换动作的消息。"
 
 #. Tag: screen
 #: Architecture_of_the_Recovery_Manager.xml:401
@@ -1179,6 +1382,68 @@
 "        }\n"
 "}"
 msgstr ""
+"package com.arjuna.demo.recoverymodule;\n"
+"        \n"
+"import com.arjuna.ats.arjuna.recovery.RecoveryModule;\n"
+"        \n"
+"public class SimpleRecoveryModule implements RecoveryModule\n"
+"{\n"
+"        public String filename = \"c:/tmp/RecordState\";\n"
+"        public SimpleRecoveryModule ()\n"
+"        {\n"
+"                System.out.println(\"The SimpleRecoveryModule is loaded\");\n"
+"        };\n"
+"        \n"
+"        public void periodicWorkFirstPass ()\n"
+"        {\n"
+"                try\n"
+"                {\n"
+"                        java.io.FileInputStream file = new \n"
+"                                java.io.FileInputStream(filename);\n"
+"                        java.io.InputStreamReader input = new \n"
+"                                java.io.InputStreamReader(file);\n"
+"                        java.io.BufferedReader reader = new java.io."
+"BufferedReader(input);\n"
+"                        String stringState = reader.readLine();\n"
+"                        if (stringState.compareTo(\"I'm prepared\") == 0)\n"
+"                                System.out.println(\"The transaction is in "
+"the prepared state\");\n"
+"                        file.close();\n"
+"                }\n"
+"                catch (java.io.IOException ex)\n"
+"                { System.out.println(\"Nothing found on the Disk\"); }\n"
+"        }\n"
+"        \n"
+"        public void periodicWorkSecondPass ()\n"
+"        {\n"
+"                try\n"
+"                {\n"
+"                        java.io.FileInputStream file = new \n"
+"                                java.io.FileInputStream(filename);\n"
+"                        java.io.InputStreamReader input = new \n"
+"                                java.io.InputStreamReader(file);\n"
+"                        java.io.BufferedReader reader = new java.io."
+"BufferedReader(input);\n"
+"                        String stringState = reader.readLine();\n"
+"                        if (stringState.compareTo(\"I'm prepared\") == 0)\n"
+"                        {\n"
+"                                System.out.println(\"The record is still in "
+"the prepared state – Recovery is needed\");\n"
+"                        }\n"
+"                        else if (stringState.compareTo(\"I'm Committed\") == "
+"0)\n"
+"                        {\n"
+"                                System.out.println(\"The transaction has "
+"completed and committed\");     \n"
+"                        }\n"
+"                        file.close();\n"
+"                }\n"
+"                catch (java.io.IOException ex)\n"
+"                { System.out.println(\"Nothing found on the Disk - Either "
+"there was \n"
+"                        no transaction or it as been rolled back\"); }\n"
+"        }\n"
+"}"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:402
@@ -1188,7 +1453,7 @@
 "Recovery Manager. To do so, we just need to add an entry in the "
 "<filename>RecoveryManager-properties.xml</filename> by adding a new property "
 "as follow:"
-msgstr ""
+msgstr "现在应该部署切换模块以被切换管理者调用。为了实现这一点,我们只需要在 <filename>RecoveryManager-properties.xml</filename> 里添加一个新的属性:"
 
 #. Tag: screen
 #: Architecture_of_the_Recovery_Manager.xml:405
@@ -1199,6 +1464,10 @@
 "i&gt;\"\n"
 "        value=\"com.arjuna.demo.recoverymodule.SimpleRecoveryModule\"/&gt;"
 msgstr ""
+"&lt;property\n"
+"                 name=\"com.arjuna.ats.arjuna.recovery.recoveryExtension&lt;"
+"i&gt;\"\n"
+"        value=\"com.arjuna.demo.recoverymodule.SimpleRecoveryModule\"/&gt;"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:406
@@ -1207,7 +1476,7 @@
 "Where &lt;i&gt; represent the new occurrence number that follows the last "
 "that already exists in the file. Once started, the Recovery Manager will "
 "automatically load the added Recovery module."
-msgstr ""
+msgstr "这里的 &lt;i&gt; 代表新的 occurrence 号码,它紧随文件里现有的最后的号码。在启动后,切换管理者将自动加载切换模块。"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:410
@@ -1215,13 +1484,13 @@
 msgid ""
 "The source of the code can be retrieved under the trailmap directory of the "
 "JBossTS installation."
-msgstr ""
+msgstr "在 JBossTS 的 trailmap 目录下,你可以获得相关源代码。"
 
 #. Tag: title
 #: Architecture_of_the_Recovery_Manager.xml:415
 #, no-c-format
 msgid "Another scenario"
-msgstr ""
+msgstr "其他模式"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:416
@@ -1232,7 +1501,7 @@
 "describe how the build a recovery module. In case of the OTS protocol, let’s "
 "consider how a recovery module that manages recovery of OTS resources can be "
 "configured."
-msgstr ""
+msgstr "如我们所提及的,上面的基本程序并没有代表失效切换的完整过程,它只是描述了如何构建一个切换模块。在使用 OTS 协议的情况下,让我们来老虑如何配置管理 OTS 资源切换的切换模块。"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:420
@@ -1245,7 +1514,7 @@
 "appropriate decision either by roll backing or committing. Asking the "
 "RecoveryCoordinator object to determine the status consists to invoke the "
 "replay_completion operation on the RecoveryCoordinator."
-msgstr ""
+msgstr "要管理失效切换,OTS 规格已经定义了一个切换协议。处于可疑状态的事务参与者可以使用 RecoveryCoordinator 来决定事务状态。安装事务状态,参与者可以采用合适的措施,如回滚或提交。请求 RecoveryCoordinator 对象来决定状态包括调用 RecoveryCoordinator 上的 replay_completion 操作。"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:423
@@ -1258,6 +1527,9 @@
 "RecoveryCoordinator per resource means that it has been stored in addition "
 "to other information describing the resource."
 msgstr ""
+"对于处于可疑状态的每个 OTS 资源,调用哪个 RecoveyCoordinator 来决定资源被调用时事务的状态 - "
+"在资源注册过程中返回的是 RecoveryCoordinator。"
+"为每个资源获取这样的 RecoveryCoordinator 意味着资源和描述它的其他信息已经被存储。"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:426
@@ -1273,13 +1545,13 @@
 "operation that the status of the transaction. According to the returned "
 "status, an appropriate action would be taken (for instance, rollback the "
 "resource is the status is aborted or inactive)."
-msgstr ""
+msgstr "专用于 OTS 资源恢复的切换模块可以有下列的行为。当在第一阶段被切换管理者请求时,它从磁盘获取处于可疑状态的资源的列表。在第二个阶段,如果在第一阶段获取的资源仍然保留在磁盘上,它们将被考虑为切换备选者。因此,切换模块为每个备选者获取现关联的 RecoveryCoordinator 并调用 replay_completion 操作来获取事务状态,并按照返回的状态采取合适的行动(例如,回滚状态为 aborted 或 inactive 的资源)。"
 
 #. Tag: title
 #: Architecture_of_the_Recovery_Manager.xml:431
 #, no-c-format
 msgid "TransactionStatusConnectionManager"
-msgstr ""
+msgstr "TransactionStatusConnectionManager"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:432
@@ -1290,7 +1562,7 @@
 "TransactionStatusManager objects. It maintains a table of "
 "TransactionStatusConnector obects each of which connects to a "
 "TransactionStatusManager object in an Application Process."
-msgstr ""
+msgstr "切换模块使用 TransactionStatusConnectionManager 对象来获取事务状态并作为 TransactionStatusManager 对象的代理。它维护一个 TransactionStatusConnector 对象的表,其中每个对象都连接应用程序进程里的一个 TransactionStatusManager 对象。"
 
 #. Tag: para
 #: Architecture_of_the_Recovery_Manager.xml:435
@@ -1305,7 +1577,7 @@
 "object. The TransactionStatusConnector passes the transaction Uid/"
 "transaction type to the TransactionStatusManager in order to retrieve the "
 "transactions status."
-msgstr ""
+msgstr "getTransactionStatus 方法获取事务状态,它使用事务 UID 和事务类型(如果可用)作为参数。事务 UID 参数里的进程 UID 被用来定位对象库里的 TransactionStatusManagerItem 主机/端口对。TransactionStatusConnector 对象使用主机/端口对来建立到目标 TransactionStatusManager 对象的 TCP 连接。TransactionStatusConnector 把事务 UID/事务类型传递给 TransactionStatusManager 来获取事务状态。"
 
 #. Tag: title
 #: Architecture_of_the_Recovery_Manager.xml:440




More information about the jboss-svn-commits mailing list