[jboss-cvs] JBossAS SVN: r75197 - projects/docs/enterprise/4.3/Transactions/Programmers_Guide/zh-CN.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Jun 30 02:00:57 EDT 2008


Author: xhuang at jboss.com
Date: 2008-06-30 02:00:57 -0400 (Mon, 30 Jun 2008)
New Revision: 75197

Modified:
   projects/docs/enterprise/4.3/Transactions/Programmers_Guide/zh-CN/Chapter_03.po
   projects/docs/enterprise/4.3/Transactions/Programmers_Guide/zh-CN/Chapter_04.po
   projects/docs/enterprise/4.3/Transactions/Programmers_Guide/zh-CN/Chapter_05.po
   projects/docs/enterprise/4.3/Transactions/Programmers_Guide/zh-CN/Chapter_06.po
Log:
update

Modified: projects/docs/enterprise/4.3/Transactions/Programmers_Guide/zh-CN/Chapter_03.po
===================================================================
--- projects/docs/enterprise/4.3/Transactions/Programmers_Guide/zh-CN/Chapter_03.po	2008-06-30 05:36:15 UTC (rev 75196)
+++ projects/docs/enterprise/4.3/Transactions/Programmers_Guide/zh-CN/Chapter_03.po	2008-06-30 06:00:57 UTC (rev 75197)
@@ -1,29 +1,32 @@
+# translation of Chapter_03.po to
 # Language zh-CN translations for JBoss_TS_Programmers_Guide package.
+#
 # Automatically generated, 2008.
-#
+# Xi HUANG <xhuang at redhat.com>, 2008.
 msgid ""
 msgstr ""
-"Project-Id-Version: JBoss_TS_Programmers_Guide 1.0\n"
+"Project-Id-Version: Chapter_03\n"
 "Report-Msgid-Bugs-To: http://bugs.kde.org\n"
 "POT-Creation-Date: 2008-06-05 22:51+0000\n"
-"PO-Revision-Date: 2008-06-05 22:51+0000\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
+"PO-Revision-Date: 2008-06-30 15:53+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"
 "Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
 
 #. Tag: title
 #: Chapter_03.xml:6
 #, no-c-format
 msgid "General Transaction Issues"
-msgstr ""
+msgstr "一般的事务问题"
 
 #. Tag: title
 #: Chapter_03.xml:10
 #, no-c-format
 msgid "Advanced transaction issues with TxCore"
-msgstr ""
+msgstr "TxCore 的高级事务问题"
 
 #. Tag: para
 #: Chapter_03.xml:12
@@ -34,13 +37,13 @@
 "made atomic as required by the semantics of a particular operation. This "
 "chapter will describe some of the more subtle issues involved with using "
 "transactions in general and <emphasis>TxCore</emphasis> in particular."
-msgstr ""
+msgstr "应用程序和类开发人员都可以使用原子动作(事务)。因此整个操作(或部分操作)都可以根据特殊操作模式所需而成员原子的。本章将描述使用事务的一般问题以及 <emphasis>TxCore</emphasis> 专有的问题。"
 
 #. Tag: title
 #: Chapter_03.xml:15
 #, no-c-format
 msgid "Checking transactions"
-msgstr ""
+msgstr "检查事务"
 
 #. Tag: para
 #: Chapter_03.xml:17
@@ -63,6 +66,8 @@
 "instance of this class associated with it, and application programmers can "
 "provide their own implementations on a per transaction basis."
 msgstr ""
+"在多线程应用程序里,多个线程可能和某个事务相关联,也就是说,这些线程共享上下文。此外,有可能某个线程终止了一个事务,而该事务里还有其他的活动线程。在分布式环境里,保证事务终止时所有相关的线程都结束是很困难的。在缺省情况下,如果某个线程终止了一个事务而该事务里还有其他的活动线程,<emphasis>TxCore</emphasis> 将产生一个警告;然而,这仍将允许事务终止过程继续。也有其他的解决方法,例如,阻塞终止事务的线程,一直到所有其他线程都和事务上下文不再相关联。因此,<emphasis>TxCore</emphasis> 提供了 <classname>com.arjuna.ats.arjuna."
+"coordinator.CheckedAction</classname> 类,它允许覆盖线程/事务终止策略。每个事务都有这个类的一个实例与其相关联,应用程序开发人员可以为每个不同的事务提供自己的实现。"
 
 #. Tag: programlisting
 #: Chapter_03.xml:19
@@ -76,6 +81,13 @@
 "BasicList list);\n"
 "};"
 msgstr ""
+"public class CheckedAction\n"
+"{\n"
+"public CheckedAction ();\n"
+"\n"
+"public synchronized void check (boolean isCommit, Uid actUid,\n"
+"BasicList list);\n"
+"};"
 
 #. Tag: para
 #: Chapter_03.xml:21
@@ -571,3 +583,4 @@
 "emphasis>, or <literal>com.arjuna.ats.jts.defaultTimeout</literal> if using "
 "<emphasis>ArjunaJTS</emphasis>, to the required timeout value in seconds."
 msgstr ""
+

Modified: projects/docs/enterprise/4.3/Transactions/Programmers_Guide/zh-CN/Chapter_04.po
===================================================================
--- projects/docs/enterprise/4.3/Transactions/Programmers_Guide/zh-CN/Chapter_04.po	2008-06-30 05:36:15 UTC (rev 75196)
+++ projects/docs/enterprise/4.3/Transactions/Programmers_Guide/zh-CN/Chapter_04.po	2008-06-30 06:00:57 UTC (rev 75197)
@@ -1,35 +1,38 @@
+# translation of Chapter_04.po to
 # Language zh-CN translations for JBoss_TS_Programmers_Guide package.
+#
 # Automatically generated, 2008.
-#
+# Xi HUANG <xhuang at redhat.com>, 2008.
 msgid ""
 msgstr ""
-"Project-Id-Version: JBoss_TS_Programmers_Guide 1.0\n"
+"Project-Id-Version: Chapter_04\n"
 "Report-Msgid-Bugs-To: http://bugs.kde.org\n"
 "POT-Creation-Date: 2008-06-05 22:51+0000\n"
-"PO-Revision-Date: 2008-06-05 22:51+0000\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
+"PO-Revision-Date: 2008-06-30 15:42+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"
 "Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
 
 #. Tag: title
 #: Chapter_04.xml:6
 #, no-c-format
 msgid "Hints and tips"
-msgstr ""
+msgstr "提示和建议"
 
 #. Tag: title
 #: Chapter_04.xml:9
 #, no-c-format
 msgid "General"
-msgstr ""
+msgstr "一般建议"
 
 #. Tag: title
 #: Chapter_04.xml:12
 #, no-c-format
 msgid "Using transactions in constructors"
-msgstr ""
+msgstr "在构造函数里使用事务"
 
 #. Tag: para
 #: Chapter_04.xml:14
@@ -45,7 +48,7 @@
 "however, the constructor transaction commits but is nested because some "
 "other transaction started prior to object creation is running, then the "
 "state will be written only if all of the parent transactions commit."
-msgstr ""
+msgstr "在本手册的例子中,构造函数的实现里都使用了事务来创建新的持久性对象。我们是有意为之,因为这保证了对象状态正确传递到 Object Store 里。如之前提到的,有修改的持久性对象的状态只在顶层事务提交时才写入到 Object Store 里。因此,如果构造函数里的事务是顶层的且被提交,那么最近创建的对象都会被写入到 Object Store 里并马上可用。然而,如果构造函数里的事务提交了但却是嵌套的(因为在对象创建之前启动的某些其他事务仍在运行),那么相关状态只有在所有的父事务提交时才被写入。"
 
 #. Tag: para
 #: Chapter_04.xml:16
@@ -56,13 +59,13 @@
 "transaction is active when the object is created then its state will not be "
 "saved to the store until the next time the object is modified under the "
 "control of some transaction."
-msgstr ""
+msgstr "从另外一方面来说,如果构造函数没有使用事务,那么系统里的不一致性就可能增加。例如,如果在创建对象时没有活动的事务,它的状态将直到下次对象在某个事务里被修改时才会保存到 Object Store 里,。"
 
 #. Tag: para
 #: Chapter_04.xml:18
 #, no-c-format
 msgid "Consider this simple example:"
-msgstr ""
+msgstr "让我们看看这个简单的例子:"
 
 #. Tag: programlisting
 #: Chapter_04.xml:20
@@ -80,6 +83,17 @@
 "obj1\n"
 "A.commit(true);                                // obj2 saved but obj1 is not"
 msgstr ""
+"AtomicAction A = new AtomicAction();\n"
+"Object obj1;\n"
+"Object obj2;\n"
+"\n"
+"obj1 = new Object();                        // create new object\n"
+"obj2 = new Object(\"old\");                // existing object\n"
+"\n"
+"A.begin(0);\n"
+"obj2.remember(obj1.get_uid());        // obj2 now contains reference to "
+"obj1\n"
+"A.commit(true);                                // obj2 saved but obj1 is not"
 
 #. Tag: para
 #: Chapter_04.xml:22
@@ -99,12 +113,15 @@
 "been saved at the time it was constructed and this inconsistency could not "
 "arise."
 msgstr ""
+"这里是在顶层动作 A 的控制之外创建的两个对象。<literal>obj1</literal> 是一个新的对象;<literal>obj2</literal> 则是一现有的对象。当 <literal>obj2</"
+"literal> 的 remember 操作被调用时,它将被激活且记住 <literal>obj1</literal> 的 Uid。虽然这个提交 <literal>obj2</literal> 的持久状态的动作现在可以包含 <literal>obj1</"
+"literal> 的 UID,但 <literal>obj1</literal> 自己的状态还没有保存,因为它还没有被任何动作所操纵。实际上,除非之后它被应用程序的某个动作修改,它的状态永不会被保存。然而,如果构造函数已经使用了一个原子动作,<literal>obj1</literal> 的状态将在构建时自动保存且不会出现这样的不一致性。"
 
 #. Tag: title
 #: Chapter_04.xml:26
 #, no-c-format
 msgid "More on save_state and restore_state"
-msgstr ""
+msgstr "save_state 和 restore_state 的更多细节"
 
 #. Tag: para
 #: Chapter_04.xml:28
@@ -117,6 +134,8 @@
 "therefore, that all of the variables saved by save_state are correctly "
 "initialised."
 msgstr ""
+"<emphasis>TxCore</emphasis> 可能在对象的生存期间的任何时候调用用户定义的 <command>save_state</"
+"command> 操作,包括在执行对象的构造函数(尤其是使用原子动作时)的主体时。因此,正确初始化 save_state 保存的所有变量是很重要的。"
 
 #. Tag: para
 #: Chapter_04.xml:30
@@ -132,6 +151,9 @@
 "transaction. This might violate the atomicity properties of the transaction "
 "being committed (aborted) and is thus discouraged."
 msgstr ""
+"当编写 <command>save_state</"
+"command> 和 <command>restore_state</command> 操作时需要小心确保没有启动任何事务(在操作里显性地启动或通过使用其他操作隐形地启动)。这个限制是由于 <emphasis>TxCore</emphasis> 可能把 <command>restore_state</"
+"command> 作为其提交过程的一部分来调用,从而导致了在一个事务的提交或中止阶段试图执行另外一个原子事务。这可能违背了被提交(中止)的事务的原子属性,因此不应该使用。"
 
 #. Tag: para
 #: Chapter_04.xml:32
@@ -142,12 +164,14 @@
 "methods of user objects to call <command>super.save_state</command> and "
 "<command>super.restore_state</command>."
 msgstr ""
+"为了支持持久性对象的崩溃恢复(Crash Recovery),你有必要让用户对象的所有 <literal>save_state</literal> 和 <literal>restore_state</literal> 方法调用 <command>super.save_state</command> 和 "
+"<command>super.restore_state</command>。"
 
 #. Tag: title
 #: Chapter_04.xml:37
 #, no-c-format
 msgid "Packing Objects"
-msgstr ""
+msgstr "Packing Objects"
 
 #. Tag: para
 #: Chapter_04.xml:39
@@ -161,6 +185,8 @@
 "problems of aliasing. That is two different object references may in actual "
 "fact point at the same item. For example:"
 msgstr ""
+"所有的 Java 基本类型(int、long 等)都可以使用 <classname>Input/OutputObjectState</"
+"classname> 提供的 pack(和 unpack)保存到和从 <classname>Input/OutputObjectState</classname> 实例中恢复。然而,对象的打包和解包应该进行不同的处理。这是因为对象打包会带来额外的别名问题,也就是两个不同的对象引用可能实际上指向的是同一个对象。例如:"
 
 #. Tag: programlisting
 #: Chapter_04.xml:41
@@ -180,6 +206,19 @@
 "    s2 = s;\n"
 "}"
 msgstr ""
+"public class Test\n"
+"{\n"
+"    public Test (String s);\n"
+"    ...\n"
+"    private String s1;\n"
+"    private String s2;\n"
+"};\n"
+"\n"
+"public Test (String s)\n"
+"{\n"
+"    s1 = s;\n"
+"    s2 = s;\n"
+"}"
 
 #. Tag: para
 #: Chapter_04.xml:43
@@ -192,13 +231,13 @@
 "unpack the two strings into different areas of memory destroying the "
 "original aliasing information. The current version of TxCore will pack and "
 "unpack separate object references."
-msgstr ""
+msgstr "在这里,由于 s1 和 s2 都指向相同的字符串,<command>save_state</command> 实现可能会将其复制两次。从 <command>save_state</command> 的角度来说,这样的效率很低。然而,这会使 <command>restore_state</command> 出错,因为它会把两个字符串都解包到不同的内存区域而毁坏原始的别名信息。目前的 TxCore 版本将打包和解包不同的对象引用。"
 
 #. Tag: title
 #: Chapter_04.xml:49
 #, no-c-format
 msgid "Direct use of StateManager"
-msgstr ""
+msgstr "直接使用 StateManager"
 
 #. Tag: para
 #: Chapter_04.xml:51
@@ -211,7 +250,7 @@
 "intervention. However, if only access to <emphasis>TxCore</emphasis>'s "
 "persistence and recovery mechanisms is required, direct derivation of a user "
 "class from <classname>StateManager</classname> is possible."
-msgstr ""
+msgstr "本手册的所有例子中的用户类都源自 <classname>LockManager</classname>。其原因是两方面的。首先,也是最重要的一点,这是原子动作的串行性限制所要求的;其次,它减少了对程序员干涉的需要。然而,如果只要求对 <emphasis>TxCore</emphasis> 的访问的持久性和恢复机制,用户了也可以直接继承 <classname>StateManager</classname>。"
 
 #. Tag: para
 #: Chapter_04.xml:53
@@ -225,6 +264,8 @@
 "classname>'s constructors are effectively identical to those of "
 "<classname>LockManager</classname>."
 msgstr ""
+"直接继承 <classname>StateManager</classname> 的类必须显性地利用其状态管理机制(这些通常由 <classname>LockManager</classname> 来承担)。从程序员的角度来看,既然 <classname>StateManager</"
+"classname> 的构造函数和 <classname>LockManager</classname> 的构造函数实际上是相等的,这就合适地利用了操作的激活、取消激活和修改。"
 
 #. Tag: programlisting
 #: Chapter_04.xml:55
@@ -233,6 +274,8 @@
 "boolean activate ()\n"
 "boolean activate (String storeRoot)"
 msgstr ""
+"boolean activate ()\n"
+"boolean activate (String storeRoot)"
 
 #. Tag: para
 #: Chapter_04.xml:57
@@ -246,7 +289,7 @@
 "activated further calls are ignored. The parameter represents the root name "
 "of the object store to search for the object. A value of null means use the "
 "default store."
-msgstr ""
+msgstr "<command>Activate</command> 从 Object Store 里加载了一个对象。这个对象的 UID 必须已经通过构造函数设置且对象必须存在于 Object Store 里。如果成功地读取了这个对象,那么   <command>restore_state</command> 将被调用来在内存里构建它。<command>Activate</command> 是幂等的(idempotent),所以对象一旦被激活,后续的调用将被忽略。这里的参数代表用于搜索对象的 Object Store 的根名称。Null 值表示使用缺省的 Object Store。"
 
 #. Tag: programlisting
 #: Chapter_04.xml:59
@@ -255,6 +298,8 @@
 "boolean deactivate ()\n"
 "boolean deactivate (String storeRoot)"
 msgstr ""
+"boolean deactivate ()\n"
+"boolean deactivate (String storeRoot)"
 
 #. Tag: para
 #: Chapter_04.xml:61
@@ -265,13 +310,13 @@
 "Objects are only saved if they have been modified since they were activated. "
 "The parameter represents the root name of the object store into which the "
 "object should be saved. A value of null means use the default store."
-msgstr ""
+msgstr "它是激活的反操作。首先调用 <command>save_state</command> 来构建对象的压缩映像,然后将其保存在 Object Store 里。对象只有在激活后被修改过才能保存。这里的参数代表用于搜索对象的 Object Store 的根名称。Null 值表示使用缺省的 Object Store。"
 
 #. Tag: programlisting
 #: Chapter_04.xml:63
 #, no-c-format
 msgid "void modified ()"
-msgstr ""
+msgstr "void modified ()"
 
 #. Tag: para
 #: Chapter_04.xml:65
@@ -280,4 +325,5 @@
 "<emphasis>Must</emphasis> be called prior to modifying the object in memory. "
 "If it is not called the object will not be saved in the object store by "
 "deactivate."
-msgstr ""
+msgstr "<emphasis>必须</emphasis>在修改内存里的对象前被调用。如果它没有被调用,对象将不能通过 deactivate 保存在 Object Store 里。"
+

Modified: projects/docs/enterprise/4.3/Transactions/Programmers_Guide/zh-CN/Chapter_05.po
===================================================================
--- projects/docs/enterprise/4.3/Transactions/Programmers_Guide/zh-CN/Chapter_05.po	2008-06-30 05:36:15 UTC (rev 75196)
+++ projects/docs/enterprise/4.3/Transactions/Programmers_Guide/zh-CN/Chapter_05.po	2008-06-30 06:00:57 UTC (rev 75197)
@@ -1,29 +1,32 @@
+# translation of Chapter_05.po to
 # Language zh-CN translations for JBoss_TS_Programmers_Guide package.
+#
 # Automatically generated, 2008.
-#
+# Xi HUANG <xhuang at redhat.com>, 2008.
 msgid ""
 msgstr ""
-"Project-Id-Version: JBoss_TS_Programmers_Guide 1.0\n"
+"Project-Id-Version: Chapter_05\n"
 "Report-Msgid-Bugs-To: http://bugs.kde.org\n"
 "POT-Creation-Date: 2008-06-05 22:51+0000\n"
-"PO-Revision-Date: 2008-06-05 22:51+0000\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
+"PO-Revision-Date: 2008-06-30 14:27+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"
 "Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
 
 #. Tag: title
 #: Chapter_05.xml:6
 #, no-c-format
 msgid "Tools"
-msgstr ""
+msgstr "工具"
 
 #. Tag: title
 #: Chapter_05.xml:9
 #, no-c-format
 msgid "Introduction"
-msgstr ""
+msgstr "简介"
 
 #. Tag: para
 #: Chapter_05.xml:11
@@ -31,13 +34,13 @@
 msgid ""
 "This chapter explains how to start and use the tools framework and what "
 "tools are available."
-msgstr ""
+msgstr "本章介绍如何启动和使用工具框架以及可用的工具。"
 
 #. Tag: title
 #: Chapter_05.xml:16
 #, no-c-format
 msgid "Starting the Transaction Service tools"
-msgstr ""
+msgstr "启动事务服务工具"
 
 #. Tag: para
 #: Chapter_05.xml:18
@@ -45,13 +48,13 @@
 msgid ""
 "The way to start the transaction service tools differs on the operating "
 "system being used:"
-msgstr ""
+msgstr "启动事务服务工具的方法根据操作系统的不同而不同:"
 
 #. Tag: title
 #: Chapter_05.xml:21
 #, no-c-format
 msgid "Windows"
-msgstr ""
+msgstr "Windows"
 
 #. Tag: para
 #: Chapter_05.xml:23
@@ -59,19 +62,19 @@
 msgid ""
 "Double click on the ‘Start Tools’ link in the JBoss Transaction Service "
 "program group in the start menu."
-msgstr ""
+msgstr "在启动菜单的“JBoss Transaction Service”程序组里双击“Start Tools”链接。"
 
 #. Tag: title
 #: Chapter_05.xml:27
 #, no-c-format
 msgid "Unix"
-msgstr ""
+msgstr "Unix"
 
 #. Tag: para
 #: Chapter_05.xml:29
 #, no-c-format
 msgid "Start a bash shell and type:"
-msgstr ""
+msgstr "启动一个 bash shell 并输入:"
 
 #. Tag: programlisting
 #: Chapter_05.xml:34
@@ -80,6 +83,8 @@
 "cd &lt;JBossTS INSTALL DIRECTORY&gt;\n"
 "./run-tools.sh"
 msgstr ""
+"cd &lt;JBossTS INSTALL DIRECTORY&gt;\n"
+"./run-tools.sh"
 
 #. Tag: para
 #: Chapter_05.xml:36
@@ -90,18 +95,20 @@
 "Service</emphasis>. At the top of the window you will notice a menu bar. "
 "This menu bar has four items:"
 msgstr ""
+"之后“Tools”窗口将出现。这是 <emphasis>JBoss Transaction "
+"Service</emphasis> 所附带的所有工具的启动区。在窗口的顶部,你将看到一个菜单条。这个菜单条有 4 个选项:"
 
 #. Tag: title
 #: Chapter_05.xml:39
 #, no-c-format
 msgid "The <menuchoice><guimenu>File</guimenu></menuchoice> Menu"
-msgstr ""
+msgstr "<menuchoice><guimenu>File</guimenu></menuchoice> 菜单"
 
 #. Tag: term
 #: Chapter_05.xml:44
 #, no-c-format
 msgid "Open JMX Browser"
-msgstr ""
+msgstr "Open JMX Browser"
 
 #. Tag: para
 #: Chapter_05.xml:45
@@ -109,13 +116,13 @@
 msgid ""
 "This displays the JMX browser window (see ***Using the JMX Browser for more "
 "information on how to use the JMX browser)."
-msgstr ""
+msgstr "这将显示 JMX 浏览器窗口(关于使用 JMX 浏览器的更多信息,请参考《使用 JMX 浏览器》)。"
 
 #. Tag: term
 #: Chapter_05.xml:49
 #, no-c-format
 msgid "Open Object Store Browser"
-msgstr ""
+msgstr "Open Object Store Browser"
 
 #. Tag: para
 #: Chapter_05.xml:50
@@ -124,13 +131,13 @@
 "This displays the JBossTS Object Store browser window (see ***Using the "
 "Object Store Browser for more information on how to use the Object Store "
 "browser)."
-msgstr ""
+msgstr "这将显示 JBossTS Object Store 浏览器窗口(关于使用 Object Store 浏览器的更多信息,请参考《使用 Object Store 浏览器》)。"
 
 #. Tag: term
 #: Chapter_05.xml:54
 #, no-c-format
 msgid "Settings"
-msgstr ""
+msgstr "Settings"
 
 #. Tag: para
 #: Chapter_05.xml:55
@@ -138,13 +145,13 @@
 msgid ""
 "This option opens the settings dialog which lets you configure the different "
 "tools available."
-msgstr ""
+msgstr "这个选项将打开“Setting”对话框,你可以配置不同的可用工具。"
 
 #. Tag: term
 #: Chapter_05.xml:58
 #, no-c-format
 msgid "Exit"
-msgstr ""
+msgstr "Exit"
 
 #. Tag: para
 #: Chapter_05.xml:59
@@ -152,19 +159,19 @@
 msgid ""
 "This closes the tools window and exits the application, any unsaved/"
 "unconfirmed changes will be lost."
-msgstr ""
+msgstr "这将关闭“Tools”窗口并退出应用程序,任何未保存/确认的修改都会丢失。"
 
 #. Tag: title
 #: Chapter_05.xml:68
 #, no-c-format
 msgid "The <menuchoice><guimenu>Performance</guimenu></menuchoice> Menu"
-msgstr ""
+msgstr "<menuchoice><guimenu>Performance</guimenu></menuchoice> 菜单"
 
 #. Tag: term
 #: Chapter_05.xml:72
 #, no-c-format
 msgid "Open"
-msgstr ""
+msgstr "Open"
 
 #. Tag: para
 #: Chapter_05.xml:73
@@ -172,13 +179,13 @@
 msgid ""
 "This opens a performance window – see <xref linkend=\"Performance_Tool\"/> "
 "for more information on the performance tool."
-msgstr ""
+msgstr "这将打开“performance”窗口 - 关于性能工具的更多信息,请参考 <xref linkend=\"Performance_Tool\"/>。"
 
 #. Tag: term
 #: Chapter_05.xml:77
 #, no-c-format
 msgid "Close All"
-msgstr ""
+msgstr "Close All"
 
 #. Tag: para
 #: Chapter_05.xml:78
@@ -186,32 +193,31 @@
 msgid ""
 "this closes all of the currently open performance windows – see <xref "
 "linkend=\"Performance_Tool\"/> for more information on the performance tool."
-msgstr ""
+msgstr "这将关闭当前所有打开的“performance”窗口 - 关于性能工具的更多信息,请参考 <xref linkend=\"Performance_Tool\"/>。"
 
 #. Tag: title
 #: Chapter_05.xml:87
 #, no-c-format
 msgid "The <menuchoice><guimenu>Window</guimenu></menuchoice> Menu"
-msgstr ""
+msgstr "<menuchoice><guimenu>Window</guimenu></menuchoice> 菜单"
 
 #. Tag: term
 #: Chapter_05.xml:90
 #, no-c-format
 msgid "Cascade Windows"
-msgstr ""
+msgstr "Cascade Windows"
 
 #. Tag: para
 #: Chapter_05.xml:91
 #, no-c-format
-msgid ""
-"This arranges the windows in a diagonal line to you find a specific window."
-msgstr ""
+msgid "This arranges the windows in a diagonal line to you find a specific window."
+msgstr "这将把窗口按对角线排列,方便你查找所需的窗口。"
 
 #. Tag: term
 #: Chapter_05.xml:95
 #, no-c-format
 msgid "1. XXXXXXX"
-msgstr ""
+msgstr "1. XXXXXXX"
 
 #. Tag: para
 #: Chapter_05.xml:96
@@ -220,31 +226,31 @@
 "For each window currently visible an extra menu option will be available "
 "here. Selecting this menu option will bring the associated window to the "
 "front of the desktop."
-msgstr ""
+msgstr "对于当前每个可见的窗口,这里将出现一个额外的菜单选项。选择这个菜单选项将把相关联的窗口置于桌面上。"
 
 #. Tag: title
 #: Chapter_05.xml:104
 #, no-c-format
 msgid "The <menuchoice><guimenu>Help</guimenu></menuchoice> Menu"
-msgstr ""
+msgstr "<menuchoice><guimenu>Help</guimenu></menuchoice> 菜单"
 
 #. Tag: term
 #: Chapter_05.xml:107
 #, no-c-format
 msgid "About"
-msgstr ""
+msgstr "About"
 
 #. Tag: para
 #: Chapter_05.xml:108
 #, no-c-format
 msgid "This displays the about window containing the product information."
-msgstr ""
+msgstr "这会显示包含产品信息的“About”窗口。"
 
 #. Tag: title
 #: Chapter_05.xml:119
 #, no-c-format
 msgid "Using the Performance Tool"
-msgstr ""
+msgstr "使用性能工具"
 
 #. Tag: para
 #: Chapter_05.xml:121
@@ -255,6 +261,8 @@
 "JMX bean which means that the transaction service needs to be integrated "
 "into an Application Server to give any performance information."
 msgstr ""
+"性能工具可以用来显示事务服务的性能方面的信息。这些信息是通过 Performance "
+"JMX bean 收集的,这表示事务服务需要集成到应用服务器里来提供任何性能方面的信息。"
 
 #. Tag: para
 #: Chapter_05.xml:123
@@ -265,6 +273,8 @@
 "<menuchoice><guimenu>Performance</guimenu></menuchoice> &gt; "
 "<menuchoice><guimenuitem>Open</guimenuitem></menuchoice>"
 msgstr ""
+"性能信息通过 multi-series 图表显示。要查看这个图表,你只需简单地选择 <menuchoice><guimenu>Performance</guimenu></menuchoice> &gt; "
+"<menuchoice><guimenuitem>Open</guimenuitem></menuchoice> 打开一个“performance”窗口就可以了。"
 
 #. Tag: para
 #: Chapter_05.xml:125
@@ -272,37 +282,37 @@
 msgid ""
 "The window now on screen contains a multi-serise graph which can display the "
 "following information:"
-msgstr ""
+msgstr "现在屏幕上的窗口包含了一个 multi-series 图表,它显示下面的信息:"
 
 #. Tag: para
 #: Chapter_05.xml:130
 #, no-c-format
 msgid "Number of transactions."
-msgstr ""
+msgstr "事务的数量。"
 
 #. Tag: para
 #: Chapter_05.xml:135
 #, no-c-format
 msgid "Number of committed transactions."
-msgstr ""
+msgstr "提交的事务的数量。"
 
 #. Tag: para
 #: Chapter_05.xml:140
 #, no-c-format
 msgid "Number of aborted transactions."
-msgstr ""
+msgstr "中止的事务的数量。"
 
 #. Tag: para
 #: Chapter_05.xml:145
 #, no-c-format
 msgid "Number of nested transactions."
-msgstr ""
+msgstr "嵌套的事务的数量。"
 
 #. Tag: para
 #: Chapter_05.xml:150
 #, no-c-format
 msgid "Number of heuristics raised."
-msgstr ""
+msgstr "heuristics raised 事务的数量。"
 
 #. Tag: para
 #: Chapter_05.xml:155
@@ -310,7 +320,7 @@
 msgid ""
 "To turn these series on and off simply select the menu option from the "
 "series menu."
-msgstr ""
+msgstr "只要在 Series 菜单里选择不同的选项,你就可以启用或关闭相应的系列。"
 
 #. Tag: para
 #: Chapter_05.xml:158
@@ -319,7 +329,7 @@
 "When series are turned on they appear in the legend at the bottom of the "
 "graph. The colour next to the series name (for example, Transactions "
 "Created) is the colour of the line representing that data."
-msgstr ""
+msgstr "当某个系列被启用,它将显示在图表的底部的图例里。系列名称(例如所创建的事务)后面的颜色就是代表该类数据的线条的颜色。"
 
 #. Tag: para
 #: Chapter_05.xml:161
@@ -327,7 +337,7 @@
 msgid ""
 "The data shown is graphed against time. The Y-axis represents the number of "
 "transactions and the X-axis represents time."
-msgstr ""
+msgstr "图表里显示的数据是针对时间的。Y 轴代表事务的数量而 X 轴代表时间。"
 
 #. Tag: para
 #: Chapter_05.xml:164
@@ -339,13 +349,13 @@
 "file for importing the data into a spreadsheet application using the "
 "<menuchoice><guimenu>Save to .csv</guimenu></menuchoice> menu option from "
 "the <menuchoice><guimenu>Data</guimenu></menuchoice> menu."
-msgstr ""
+msgstr "在任何时候,数据抽样都可以用 <menuchoice><guimenu>Sampling</guimenu></menuchoice> 菜单来停止和重启,当前图表上可见的数据可以通过 <menuchoice><guimenu>Data</guimenu></menuchoice> 菜单里的 <menuchoice><guimenu>Save to .csv</guimenu></menuchoice> 菜单选项保存到一个可输出到电子表格程序里的 Comma Separate Values (CSV) 文件。"
 
 #. Tag: title
 #: Chapter_05.xml:169
 #, no-c-format
 msgid "Using the JMX Browser"
-msgstr ""
+msgstr "使用 JXM 浏览器"
 
 #. Tag: para
 #: Chapter_05.xml:170
@@ -356,6 +366,9 @@
 "Browser</guimenu></menuchoice> option. The JMX browser window will then be "
 "displayed."
 msgstr ""
+"要打开 JMX 浏览器窗口,你可以点击 <menuchoice><guimenu>File</"
+"guimenu></menuchoice> 菜单并选择 <menuchoice><guimenu>Open JMX "
+"Browser</guimenu></menuchoice> 选项。然后 JMX 浏览器窗口就会显示。"
 
 #. Tag: para
 #: Chapter_05.xml:173
@@ -367,43 +380,43 @@
 "about the currently selected MBean. To select an MBean just left-click it "
 "with the mouse and it will become highlighted. The information displayed in "
 "the details panel is as follows:"
-msgstr ""
+msgstr "这个窗口由两个主要部分组成:Details 面板和 MBean 面板。MBean 面板显示 MBean 服务所开放的 MBean。它们通过域名分组。Details 面板显示当前所选择的 MBean 的信息。要选择某个 MBean,只要用鼠标点击它使其高亮显示就可以了。Details 面板显示的信息如下:"
 
 #. Tag: para
 #: Chapter_05.xml:178
 #, no-c-format
 msgid "The total number of MBeans registered on this server."
-msgstr ""
+msgstr "在这个服务器里注册的 MBean 的数量。"
 
 #. Tag: para
 #: Chapter_05.xml:183
 #, no-c-format
 msgid "The number of constructors exposed by this MBean."
-msgstr ""
+msgstr "这个 MBean 开放的构造函数的数量。"
 
 #. Tag: para
 #: Chapter_05.xml:188
 #, no-c-format
 msgid "The number of attributes exposed by this MBean."
-msgstr ""
+msgstr "这个 MBean 开放的属性的数量。"
 
 #. Tag: para
 #: Chapter_05.xml:193
 #, no-c-format
 msgid "The number of operations exposed by this MBean."
-msgstr ""
+msgstr "这个 MBean 开放的操作的数量。"
 
 #. Tag: para
 #: Chapter_05.xml:198
 #, no-c-format
 msgid "The number of notifications exposed by this MBean."
-msgstr ""
+msgstr "这个 MBean 开放的通知的数量。"
 
 #. Tag: para
 #: Chapter_05.xml:203
 #, no-c-format
 msgid "A brief description of the MBean."
-msgstr ""
+msgstr "对这个 MBean 的简短描述。"
 
 #. Tag: para
 #: Chapter_05.xml:208
@@ -413,13 +426,13 @@
 "when clicked displays the attributes and operations exposed by this MBean. "
 "From there you can view readable attributes, alter writeable attributes and "
 "invoke operations."
-msgstr ""
+msgstr "这里也有一个 <menuchoice><guimenu>View</guimenu></menuchoice> 链接,点击它将显示这个 MBean 开放的属性和操作。在这里你可以查看可读的属性、修改可写的属性并调用操作。"
 
 #. Tag: title
 #: Chapter_05.xml:212
 #, no-c-format
 msgid "Using Attributes and Operations"
-msgstr ""
+msgstr "使用属性和操作"
 
 #. Tag: para
 #: Chapter_05.xml:213
@@ -435,7 +448,7 @@
 "a more suitable editing method. If the attribute type is a JMX object name "
 "then clicking this button will display the JMX attributes and operations for "
 "that object."
-msgstr ""
+msgstr "当点击 <menuchoice><guimenu>View</guimenu></menuchoice> 链接时,“View JMX Attributes and Operations”窗口将显示。在这里你可以查看所选择的 MBean 开放的所有可读属性。你也可以修改可写属性。如果某个属性是只读的,你将不能修改其属性值。要修改某个属性值,你只需双击当前值并输入新的值就可以了。如果启用了“<guibutton>...</guibutton>”按钮,你就可以点击它来查看更合适的编辑方法。如果这个属性的类型是 JMX 对象名,点击这个按钮将显示该对象的 JMX 属性和操作。"
 
 #. Tag: para
 #: Chapter_05.xml:216
@@ -445,7 +458,7 @@
 "refresh the attribute values. If an exception occurs while retrieving the "
 "value of an attribute the exception will be displayed in place of the "
 "attributes value."
-msgstr ""
+msgstr "在任何时候你都可以点击“<guibutton>Refresh</guibutton>”按钮来刷新属性值。在获取属性值时如果发生了异常,这个异常将被显示来替代属性值。"
 
 #. Tag: para
 #: Chapter_05.xml:219
@@ -460,20 +473,19 @@
 "specify JMX attribute values. Once you have specified a value for each of "
 "the parameters click the <guibutton>Invoke</guibutton> button to perform the "
 "invocation."
-msgstr ""
+msgstr "你也可以调用 MBean 的操作。MBean 开放的操作显示在属性列表下面。要调用某个操作,只要简单地从列表里选择它并点击“<guibutton>Invoke</guibutton>”按钮。如果这个操作要求输入参数,另外一个窗口将出现,你必须指定每个必需参数的值。你可以用和指定 JMX 属性值相同的方法来指定参数值。在指定了参数值后,你可以点击“<guibutton>Invoke</guibutton>”按钮来执行该操作。"
 
 #. Tag: para
 #: Chapter_05.xml:222
 #, no-c-format
-msgid ""
-"Once the method invocation has completed its return value will be displayed."
-msgstr ""
+msgid "Once the method invocation has completed its return value will be displayed."
+msgstr "方法调用完毕后,它的返回值将被显示。"
 
 #. Tag: title
 #: Chapter_05.xml:227
 #, no-c-format
 msgid "Using the Object Store Browser"
-msgstr ""
+msgstr "使用 Object Store 浏览器"
 
 #. Tag: para
 #: Chapter_05.xml:228
@@ -483,13 +495,13 @@
 "<menuchoice><guimenu>File</guimenu></menuchoice> menu and then click the "
 "<menuchoice><guimenu>Open Object Store Browser</guimenu></menuchoice> "
 "option. The Object Store browser window will then be displayed."
-msgstr ""
+msgstr "要打开 Object Store browser 窗口,你可以点击 <menuchoice><guimenu>File</guimenu></menuchoice> 菜单并选择 <menuchoice><guimenu>Open Object Store Browser</guimenu></menuchoice> 选项。然后 Object Store browser 窗口将出现。"
 
 #. Tag: para
 #: Chapter_05.xml:231
 #, no-c-format
 msgid "The object store browser window is split into four sections:"
-msgstr ""
+msgstr "object store browser 窗口分成 4 个部分:"
 
 #. Tag: para
 #: Chapter_05.xml:236
@@ -498,7 +510,7 @@
 "Object Store Roots - this is a pull down of the currently avaliable object "
 "store roots. Selecting an option from the list will repopulate the hierachy "
 "view with the contents of the selected root."
-msgstr ""
+msgstr "Object Store Roots - 这是当前可用 Object Store 根的列表。从这个列表里进行选择将重新构成所选根的内容的层次结构。"
 
 #. Tag: para
 #: Chapter_05.xml:241
@@ -507,7 +519,7 @@
 "Object Store Hierarchy – this is a tree which shows the current object store "
 "hierarchy. Selecting a node from this tree will display the objects stored "
 "in that location."
-msgstr ""
+msgstr "Object Store Hierarchy – 这是表示当前 Object Store 层次结构的树。从这个树里选择一个节点将显示它存储的对象。"
 
 #. Tag: para
 #: Chapter_05.xml:246
@@ -515,7 +527,7 @@
 msgid ""
 "Objects – this is a list of icons which represent the objects stored in the "
 "selected location."
-msgstr ""
+msgstr "Objects – 这是一个图标列表,它代表存储在所选位置的对象。"
 
 #. Tag: para
 #: Chapter_05.xml:251
@@ -524,13 +536,13 @@
 "Object Details – this shows information about the currently selected object "
 "(only if the object’s type is known to the state viewer repository see "
 "Writing an OSV for information on how to write a object state viewers)."
-msgstr ""
+msgstr "Object Details – 它显示当前所选的对象的信息(只有这个对象的类型为状态查看器库所知时才适用,请参考《Writing an OSV》里关于如何编写对象状态查看器里的信息)"
 
 #. Tag: title
 #: Chapter_05.xml:258
 #, no-c-format
 msgid "Object State Viewers (OSV)"
-msgstr ""
+msgstr "对象状态查看器(Object State Viewer,OSV)"
 
 #. Tag: para
 #: Chapter_05.xml:259
@@ -546,12 +558,14 @@
 "display information about object types you have defined. This subject is "
 "covered next."
 msgstr ""
+"当主窗口的 Objects 面板里的对象被选择时,用于该对象的已注册对象状态查看器(Object State Viewer,或 OSV)将被调用。OSV 的任务是通过用户界面使用户可以获得所选对象的信息。随标准工具一起发布的有用于原子动作的 OSV,它在不同的列表里(如 heuristic、failed、read-"
+"only等)显示抽象记录(Abstract Record)信息。你也可以编写自己的 OSV 来显示自定义的对象类型的信息。后面我们将涵盖这方面的内容。"
 
 #. Tag: title
 #: Chapter_05.xml:263
 #, no-c-format
 msgid "Writing an OSV"
-msgstr ""
+msgstr "编写 OSV"
 
 #. Tag: para
 #: Chapter_05.xml:264
@@ -561,13 +575,14 @@
 "Store browser to show the state of user defined abstract records. An OSV "
 "plug-in is simply a class which implements the interface:"
 msgstr ""
+"编写 OSV 插件允许你扩展 Object "
+"Store 浏览器的能力来显示用户自定义的抽象记录(Abstract Record)的状态。OSV 插件其实只是实现下面接口的类:"
 
 #. Tag: code
 #: Chapter_05.xml:269
 #, no-c-format
-msgid ""
-"com.arjuna.ats.tools.objectstorebrowser.stateviewers.StateViewerInterface"
-msgstr ""
+msgid "com.arjuna.ats.tools.objectstorebrowser.stateviewers.StateViewerInterface"
+msgstr "com.arjuna.ats.tools.objectstorebrowser.stateviewers.StateViewerInterface"
 
 #. Tag: para
 #: Chapter_05.xml:271
@@ -576,7 +591,7 @@
 "It must be packaged in a JAR within the plugins directory. This example "
 "shows how to create an OSV plugin for an abstract record subclass which "
 "looks as follows:"
-msgstr ""
+msgstr "它必须打包在 plugins 目录里的某个 JAR 里。这个例子展示了如何创建一个用于如下的抽象记录(Abstract Record)子类的 OSV 插件:"
 
 #. Tag: screen
 #: Chapter_05.xml:274
@@ -636,6 +651,59 @@
 "        }\n"
 "}"
 msgstr ""
+"public class SimpleRecord extends AbstractRecord\n"
+"{\n"
+"        private int _value = 0;\n"
+"        \n"
+"        .....\n"
+"        \n"
+"        public void increase()\n"
+"        {\n"
+"                _value++;\n"
+"        }\n"
+"        \n"
+"        public int get()\n"
+"        {\n"
+"                return _value;\n"
+"        }\n"
+"        \n"
+"        public String type()\n"
+"        {\n"
+"                return “/StateManager/AbstractRecord/SimpleRecord”;\n"
+"        }\n"
+"        \n"
+"        public boolean restore_state(InputObjectState os, int i)\n"
+"        {\n"
+"                boolean returnValue = true;\n"
+"        \n"
+"                try\n"
+"                {\n"
+"                        _value = os.unpackInt();\n"
+"                }\n"
+"                catch (java.io.IOException e)\n"
+"                {\n"
+"                        returnValue = false;\n"
+"                }\n"
+"        \n"
+"                return returnValue;\n"
+"        }\n"
+"        \n"
+"        public boolean save_state(OutputObjectState os, int i)\n"
+"        {\n"
+"                boolean returnValue = true;\n"
+"        \n"
+"                try\n"
+"                {\n"
+"                        os.packInt(_value);\n"
+"                }\n"
+"                catch (java.io.IOException e)\n"
+"                {\n"
+"                        returnValue = false;\n"
+"                }\n"
+"        \n"
+"                return returnValue;\n"
+"        }\n"
+"}"
 
 #. Tag: para
 #: Chapter_05.xml:275
@@ -646,6 +714,8 @@
 "into an instance of our abstract record and call <methodname>getValue()</"
 "methodname>. The following is the object store browser plug-in source code:"
 msgstr ""
+"当用 Object Store 浏览器查看这个抽象记录时,查看当前值是个不错的主意。我们可以把状态读入绝对记录的实例并调用 <methodname>getValue()</"
+"methodname>。下面是 Object Store 浏览器插件的源代码:"
 
 #. Tag: screen
 #: Chapter_05.xml:278
@@ -711,6 +781,65 @@
 "        }\n"
 "}"
 msgstr ""
+"public class SimpleRecordOSVPlugin implements StateViewerInterface\n"
+"{\n"
+"        /**\n"
+"        * A uid node of the type this viewer is registered against has been "
+"expanded.\n"
+"        * @param os\n"
+"        * @param type\n"
+"        * @param manipulator\n"
+"        * @param node\n"
+"        * @throws ObjectStoreException\n"
+"        */\n"
+"        public void uidNodeExpanded(ObjectStore os,\n"
+"        String type,\n"
+"        ObjectStoreBrowserTreeManipulationInterface \n"
+"        manipulator,\n"
+"        UidNode node,\n"
+"        StatePanel infoPanel)\n"
+"        throws ObjectStoreException\n"
+"        {\n"
+"                // Do nothing\n"
+"        }\n"
+"        \n"
+"        /**\n"
+"        * An entry has been selected of the type this viewer is registered "
+"against.\n"
+"        *\n"
+"        * @param os\n"
+"        * @param type\n"
+"        * @param uid\n"
+"        * @param entry\n"
+"        * @param statePanel\n"
+"        * @throws ObjectStoreException\n"
+"        */\n"
+"        public void entrySelected(ObjectStore os,\n"
+"        String type,\n"
+"        Uid uid,\n"
+"        ObjectStoreViewEntry entry,\n"
+"        StatePanel statePanel) \n"
+"        throws ObjectStoreException\n"
+"        {\n"
+"                SimpleRecord rec = new SimpleRecord();\n"
+"        \n"
+"                if ( rec.restore_state( os.read_committed(uid, type), "
+"ObjectType.ANDPERSISTENT ) )\n"
+"                {\n"
+"                        statePanel.setData( “Value”, rec.getValue() );\n"
+"                }\n"
+"        }\n"
+"        \n"
+"        /**\n"
+"        * Get the type this state viewer is intended to be registered "
+"against.\n"
+"        * @return\n"
+"        */\n"
+"        public String getType()\n"
+"        {\n"
+"                return “/StateManager/AbstractRecord/SimpleRecord”;\n"
+"        }\n"
+"}"
 
 #. Tag: para
 #: Chapter_05.xml:279
@@ -726,7 +855,7 @@
 "methods the StatePanel is used to display information regarding the state of "
 "the object. The state panel has the following methods that assist in display "
 "this information:"
-msgstr ""
+msgstr "当在 Object Store 层次结构树里展开代表给定类型的 UID(Unique Identification)时,<methodname>uidNodeExpanded</methodname> 方法将被调用。这个插件不要求这样,因为绝对记录并不在 Object Store 里直接可见,它只有通过某个原子动作里的列表才可见。当从代表给定类型的对象视图里选择一个条目时,<methodname>entrySelected</methodname> 方法将被调用。在这两个方法里,StatePanel 都被用来显示对象状态的信息。StatePanel 具有如下的有助这些信息显示的方法:"
 
 #. Tag: para
 #: Chapter_05.xml:284
@@ -734,7 +863,7 @@
 msgid ""
 "<methodname>setInfo(String info)</methodname>: This method can be used to "
 "show general information."
-msgstr ""
+msgstr "<methodname>setInfo(String info)</methodname>:这个方法可以用来显示一般信息。"
 
 #. Tag: para
 #: Chapter_05.xml:289
@@ -743,7 +872,7 @@
 "<methodname>setData(String name, String value)</methodname>: This method is "
 "used to put information into the table which is displayed by the object "
 "store browser tool."
-msgstr ""
+msgstr "<methodname>setData(String name, String value)</methodname>:这个方法用来把信息放入 Object Store 浏览器工具显示的表里。"
 
 #. Tag: para
 #: Chapter_05.xml:294
@@ -755,6 +884,8 @@
 "up to the plug-in developer to decide how to display this further "
 "information."
 msgstr ""
+"<methodname>enableDetailsButton(DetailsButtonListener listener)</"
+"methodname>:这个方法用来启用 Details 按钮。Listener 接口允许按钮被按下时通知插件。怎样显示进一步的信息可由插件开发人员来决定。"
 
 #. Tag: para
 #: Chapter_05.xml:299
@@ -763,7 +894,7 @@
 "In this example we read the state from the object store and use the value "
 "returned by getValue() to put an entry into the state panel table. The "
 "getType() method returns the type this plug-in is to be registered against."
-msgstr ""
+msgstr "在这个例子里,我们从 Object Store 里读取状态并使用 getValue() 返回的值来把一个条目放入 StatePanel 表。getType() 方法返回这个插件用来注册的类型。"
 
 #. Tag: para
 #: Chapter_05.xml:302
@@ -776,6 +907,8 @@
 "can be performed using an <ulink url=\"http://ant.apache.org\">Apache ANT</"
 "ulink> script, as follows:"
 msgstr ""
+"要把这个插件添加到 Object Store 浏览器里,我们有必要把它打包至一个 JAR 文件里,其名称前缀为 'osbv-'。这个 JAR 文件必须包含 manifest 文件里的某些信息,这样 Object Store 浏览器就知道哪些类是插件。所有这些都可以用 <ulink url=\"http://ant.apache.org\">Apache ANT</"
+"ulink> 脚本来执行,如:"
 
 #. Tag: screen
 #: Chapter_05.xml:305
@@ -791,6 +924,15 @@
 "        &lt;/manifest&gt;\n"
 "&lt;/jar&gt;"
 msgstr ""
+"&lt;jar jarfile=\"osbv-simplerecord.jar\"&gt;\n"
+"        &lt;fileset dir=\"build\" includes=\"*.class”/&gt;\n"
+"        &lt;manifest&gt;\n"
+"                &lt;section name=\"arjuna-tools-objectstorebrowser\"&gt;\n"
+"                        &lt;attribute name=\"plugin-classname-1\" value=\" "
+"SimpleRecordOSVPlugin \"/&gt;\n"
+"                &lt;/section&gt;\n"
+"        &lt;/manifest&gt;\n"
+"&lt;/jar&gt;"
 
 #. Tag: para
 #: Chapter_05.xml:306
@@ -800,3 +942,6 @@
 "file it just needs to be placed in the <emphasis>bin/tools/plugins</"
 "emphasis> directory."
 msgstr ""
+"用 manifest 文件里的正确信息创建了 JAR 文件后,我们需要把它放入 <emphasis>bin/tools/plugins</"
+"emphasis> 目录里。"
+

Modified: projects/docs/enterprise/4.3/Transactions/Programmers_Guide/zh-CN/Chapter_06.po
===================================================================
--- projects/docs/enterprise/4.3/Transactions/Programmers_Guide/zh-CN/Chapter_06.po	2008-06-30 05:36:15 UTC (rev 75196)
+++ projects/docs/enterprise/4.3/Transactions/Programmers_Guide/zh-CN/Chapter_06.po	2008-06-30 06:00:57 UTC (rev 75197)
@@ -8,7 +8,7 @@
 "Project-Id-Version: Chapter_06\n"
 "Report-Msgid-Bugs-To: http://bugs.kde.org\n"
 "POT-Creation-Date: 2008-06-05 22:51+0000\n"
-"PO-Revision-Date: 2008-06-26 15:42+1000\n"
+"PO-Revision-Date: 2008-06-30 10:58+1000\n"
 "Last-Translator: Xi HUANG <xhuang at redhat.com>\n"
 "Language-Team:  <en at li.org>\n"
 "MIME-Version: 1.0\n"
@@ -291,7 +291,7 @@
 "the object (in this case a <code>WRITE</code> lock must be acquired), then "
 "the main body of the constructor is executed. If this is successful the "
 "atomic action can be committed, otherwise it is aborted."
-msgstr ""
+msgstr "在新对象的构造函数里使用原子动作(atomic action)遵循了之前描述的准则,这也确保了当合适的顶层原子动作提交时(也可以是动作 A 或者 <code>TransactionalQueue</code> 构造时活动的某个封装的动作),对象的状态将被写入到 Object Store。在构造函数里使用原子动作很简单:动作首先必须被声明并调用 begin 操作;操作然后必须为对象设置合适的锁(在这个例子里需要 <code>WRITE</code> 锁),最后再执行构造函数的主体。如果这个过程成功完成的话,原子动作将被提交,否则会被中止。"
 
 #. Tag: para
 #: Chapter_06.xml:58
@@ -299,7 +299,7 @@
 msgid ""
 "The destructor of the queue class is only required to call the terminate "
 "operation of <methodname>LockManager</methodname>"
-msgstr ""
+msgstr "这个 Queue 类的构析函数只需要调用 <methodname>LockManager</methodname> 的 terminate 操作。"
 
 #. Tag: screen
 #: Chapter_06.xml:61
@@ -310,12 +310,16 @@
 "        super.terminate();\n"
 "}"
 msgstr ""
+"public void finalize ()\n"
+"{\n"
+"        super.terminate();\n"
+"}"
 
 #. Tag: title
 #: Chapter_06.xml:63
 #, no-c-format
 msgid "save_state, resotre_state and type"
-msgstr ""
+msgstr "save_state、resotre_state 和 type"
 
 #. Tag: para
 #: Chapter_06.xml:64
@@ -323,7 +327,7 @@
 msgid ""
 "The implementations of save_state and restore_state are relatively simple "
 "for this example:"
-msgstr ""
+msgstr "这个例子的 save_state 和 restore_state 的实现相对简单:"
 
 #. Tag: screen
 #: Chapter_06.xml:68
@@ -375,6 +379,51 @@
 "        }\n"
 "}"
 msgstr ""
+"public boolean save_state (OutputObjectState os, int ObjectType)\n"
+"{\n"
+"        if (!super.save_state(os, ObjectType))\n"
+"        return false;\n"
+"        \n"
+"        try\n"
+"        {\n"
+"                os.packInt(numberOfElements);\n"
+"        \n"
+"                if (numberOfElements &gt; 0)\n"
+"                {\n"
+"                        for (int i = 0; i &lt; numberOfElements; i++)\n"
+"                            os.packInt(elements[i]);\n"
+"                }\n"
+"                            \n"
+"                return true;\n"
+"        }\n"
+"        catch (IOException e)\n"
+"        {\n"
+"                return false;\n"
+"        }\n"
+"}\n"
+"\n"
+"public boolean restore_state (InputObjectState os, int ObjectType)\n"
+"{\n"
+"        if (!super.restore_state(os, ObjectType))\n"
+"                return false;\n"
+"                    \n"
+"        try\n"
+"        {\n"
+"                numberOfElements = os.unpackInt();\n"
+"                    \n"
+"                if (numberOfElements &gt; 0)\n"
+"                {\n"
+"                        for (int i = 0; i &lt; numberOfElements; i++)\n"
+"                                    elements[i] = os.unpackInt();\n"
+"                }\n"
+"                    \n"
+"                return true;\n"
+"        }\n"
+"        catch (IOException e)\n"
+"        {\n"
+"                return false;\n"
+"        }\n"
+"}"
 
 #. Tag: para
 #: Chapter_06.xml:69
@@ -383,6 +432,8 @@
 "Because the Queue class is derived from the <classname>LockManager</"
 "classname> class, the operation type should be:"
 msgstr ""
+"因为 Queue 类源自 <classname>LockManager</"
+"classname> 类,所以 type 操作应该为:"
 
 #. Tag: screen
 #: Chapter_06.xml:72
@@ -393,12 +444,16 @@
 "        return \"/StateManager/LockManager/TransactionalQueue\";\n"
 "}"
 msgstr ""
+"public String type ()\n"
+"{\n"
+"        return \"/StateManager/LockManager/TransactionalQueue\";\n"
+"}"
 
 #. Tag: title
 #: Chapter_06.xml:74
 #, no-c-format
 msgid "enqueue/dequeue operations"
-msgstr ""
+msgstr "enqueue/dequeue 操作"
 
 #. Tag: para
 #: Chapter_06.xml:75
@@ -407,7 +462,7 @@
 "If the operations of the queue class are to be coded as atomic actions, then "
 "the enqueue operation could have the structure given below (the dequeue "
 "operation would be similarly structured):"
-msgstr ""
+msgstr "如果把 Queue 类的操作编写为原子动作,enqueue 操作可以具有下面的结构(dequeue 操作的结构将很类似):"
 
 #. Tag: screen
 #: Chapter_06.xml:79
@@ -453,18 +508,57 @@
 "        }\n"
 "}"
 msgstr ""
+"public void enqueue (int v) throws OverFlow, UnderFlow, QueueError\n"
+"{\n"
+"        AtomicAction A = new AtomicAction();\n"
+"        boolean res = false;\n"
+"        \n"
+"        try\n"
+"        {\n"
+"                A.begin(0);\n"
+"        \n"
+"                if (setlock(new Lock(LockMode.WRITE), 0) == LockResult."
+"GRANTED)\n"
+"                {\n"
+"                        if (numberOfElements &lt; QUEUE_SIZE)\n"
+"                               {\n"
+"                                               elements[numberOfElements] = "
+"v;\n"
+"                                               numberOfElements++;\n"
+"                                               res = true;\n"
+"                               }\n"
+"                               else\n"
+"                               {\n"
+"                                               A.rollback();\n"
+"                                              throw new UnderFlow();\n"
+"                               }\n"
+"                }\n"
+"                               \n"
+"                if (res)\n"
+"                         A.commit(true);\n"
+"                else\n"
+"                {\n"
+"                         A.rollback();\n"
+"                                               throw new Conflict();\n"
+"                }\n"
+"        }\n"
+"        catch (Exception e1)\n"
+"        {\n"
+"                throw new QueueError();\n"
+"        }\n"
+"}"
 
 #. Tag: title
 #: Chapter_06.xml:81
 #, no-c-format
 msgid "queueSize"
-msgstr ""
+msgstr "queueSize"
 
 #. Tag: para
 #: Chapter_06.xml:82
 #, no-c-format
 msgid "The implementation of <methodname>queueSize</methodname> is shown below:"
-msgstr ""
+msgstr "下面是 <methodname>queueSize</methodname> 的实现:"
 
 #. Tag: screen
 #: Chapter_06.xml:84
@@ -500,12 +594,41 @@
 "        return size;\n"
 "}"
 msgstr ""
+"public int queueSize () throws QueueError, Conflict\n"
+"{\n"
+"        AtomicAction A = new AtomicAction();\n"
+"        int size = -1;\n"
+"        \n"
+"        try\n"
+"        {\n"
+"                A.begin(0);\n"
+"        \n"
+"                if (setlock(new Lock(LockMode.READ), 0) == LockResult."
+"GRANTED)\n"
+"                        size = numberOfElements;\n"
+"        \n"
+"                if (size != -1)\n"
+"                        A.commit(true);\n"
+"                else\n"
+"                {\n"
+"                        A.rollback();\n"
+"        \n"
+"                        throw new Conflict();\n"
+"                }\n"
+"        }\n"
+"        catch (Exception e1)\n"
+"        {\n"
+"                throw new QueueError();\n"
+"        }\n"
+"        \n"
+"        return size;\n"
+"}"
 
 #. Tag: title
 #: Chapter_06.xml:86
 #, no-c-format
 msgid "inspectValue/setValue operations"
-msgstr ""
+msgstr "inspectValue/setValue 操作"
 
 #. Tag: para
 #: Chapter_06.xml:87
@@ -513,7 +636,7 @@
 msgid ""
 "The implementation of <methodname>inspectValue</methodname> is shown below. "
 "<methodname>setValue</methodname> is similar, and not shown."
-msgstr ""
+msgstr "下面是 <methodname>inspectValue</methodname> 的实现。这里没有列出类似的 <methodname>setValue</methodname>。"
 
 #. Tag: screen
 #: Chapter_06.xml:91
@@ -571,12 +694,63 @@
 "        return val;\n"
 "}"
 msgstr ""
+"public int inspectValue (int index) throws UnderFlow,\n"
+"        OverFlow, Conflict, QueueError\n"
+"{\n"
+"        AtomicAction A = new AtomicAction();\n"
+"        boolean res = false;\n"
+"        int val = -1;\n"
+"        \n"
+"        try\n"
+"        {\n"
+"                A.begin();\n"
+"        \n"
+"                if (setlock(new Lock(LockMode.READ), 0) == LockResult."
+"GRANTED)\n"
+"                {\n"
+"                        if (index &lt; 0)\n"
+"                            {\n"
+"                                    A.rollback();\n"
+"                                    throw new UnderFlow();\n"
+"                            }\n"
+"                else\n"
+"                {\n"
+"                    // array is 0 - numberOfElements -1\n"
+"                    \n"
+"                    if (index &gt; numberOfElements -1)\n"
+"                {\n"
+"                        A.rollback();\n"
+"                        throw new OverFlow();\n"
+"                }\n"
+"                else\n"
+"                {\n"
+"                        val = elements[index];\n"
+"                        res = true;\n"
+"                }\n"
+"                }\n"
+"                }\n"
+"                \n"
+"                if (res)\n"
+"                        A.commit(true);\n"
+"                else\n"
+"                {\n"
+"                        A.rollback();\n"
+"                        throw new Conflict();\n"
+"                }\n"
+"        }\n"
+"        catch (Exception e1)\n"
+"        {\n"
+"                throw new QueueError();\n"
+"        }\n"
+"                \n"
+"        return val;\n"
+"}"
 
 #. Tag: title
 #: Chapter_06.xml:93
 #, no-c-format
 msgid "The client"
-msgstr ""
+msgstr "客户端"
 
 #. Tag: para
 #: Chapter_06.xml:94
@@ -586,7 +760,7 @@
 "representative portion. Before invoking operations on the object, the client "
 "must obviously first bind to it. In the local case this simply requires the "
 "client to create an instance of the object."
-msgstr ""
+msgstr "我们不会展示所有的客户端代码,我们将专注于具有代表性的部分。在调用对象的操作之前,显然客户端必须首先绑定该对象。在本地调用的情况下,这只需要客户端简单地创建该对象的实例就可以了。"
 
 #. Tag: screen
 #: Chapter_06.xml:98
@@ -596,6 +770,9 @@
 "{\n"
 "TransactionalQueue myQueue = new TransactionalQueue();"
 msgstr ""
+"public static void main (String[] args)\n"
+"{\n"
+"TransactionalQueue myQueue = new TransactionalQueue();"
 
 #. Tag: para
 #: Chapter_06.xml:99
@@ -603,7 +780,7 @@
 msgid ""
 "Before invoking one of the queue’s operations, the client starts a "
 "transaction. The <methodname>queueSize</methodname> operation is shown below:"
-msgstr ""
+msgstr "在调用队列的某个操作之前,客户端可以启动一个事务。下面是 <methodname>queueSize</methodname> 操作:"
 
 #. Tag: screen
 #: Chapter_06.xml:102
@@ -638,12 +815,40 @@
 "        System.err.println(“Caught unexpected exception!”);\n"
 "}"
 msgstr ""
+"AtomicAction A = new AtomicAction();\n"
+"int size = 0;\n"
+"        \n"
+"try\n"
+"{\n"
+"        A.begin(0);\n"
+"s\n"
+"        try\n"
+"        {\n"
+"                size = queue.queueSize();\n"
+"        }\n"
+"        catch (Exception e)\n"
+"        {\n"
+"        }\n"
+"        \n"
+"        if (size &gt;= 0)\n"
+"        {\n"
+"                A.commit(true);\n"
+"        \n"
+"                System.out.println(“Size of queue: “+size);\n"
+"        }\n"
+"        else\n"
+"                A.rollback();\n"
+"}\n"
+"catch (Exception e)\n"
+"{\n"
+"        System.err.println(“Caught unexpected exception!”);\n"
+"}"
 
 #. Tag: title
 #: Chapter_06.xml:104
 #, no-c-format
 msgid "Comments"
-msgstr ""
+msgstr "注释"
 
 #. Tag: para
 #: Chapter_06.xml:105
@@ -663,5 +868,5 @@
 "could be executed concurrently. For example, modifying the states of two "
 "different elements in the queue. In the next section we address some of "
 "these issues."
-msgstr ""
+msgstr "既然 Queue 对象是持久的,那么不管它所在的节点发生什么故障,它的状态都可以继续生存。这个状态由最后提交的顶层原子动作来产生。如果应用程序的目的是执行两个原子的 enqueue 操作,这可以通过把一个 enqueue 操作嵌套在另外一个里来实现。此外,这样的持久性对象上的并行操作将被序列化,因此防止了对象状态的不一致性。然而,既然 Queue 对象的元素并不是被独立地并行控制的,某些并行操作调用的组合将被串行地执行,而从逻辑上来将它们可以是并行运行的。例如修改队列里的两个不同元素的状态。在下一节,我们将解决其中的一些问题。"
 




More information about the jboss-cvs-commits mailing list