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

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Sun Nov 9 20:27:17 EST 2008


Author: xhuang at jboss.com
Date: 2008-11-09 20:27:16 -0500 (Sun, 09 Nov 2008)
New Revision: 23800

Modified:
   labs/jbosstm/enterprise/tags/EAP_4_3_0/Transactions_JTA_Programmers_Guide/zh-CN/The_Resource_Manager.po
Log:
update

Modified: labs/jbosstm/enterprise/tags/EAP_4_3_0/Transactions_JTA_Programmers_Guide/zh-CN/The_Resource_Manager.po
===================================================================
--- labs/jbosstm/enterprise/tags/EAP_4_3_0/Transactions_JTA_Programmers_Guide/zh-CN/The_Resource_Manager.po	2008-11-10 00:37:43 UTC (rev 23799)
+++ labs/jbosstm/enterprise/tags/EAP_4_3_0/Transactions_JTA_Programmers_Guide/zh-CN/The_Resource_Manager.po	2008-11-10 01:27:16 UTC (rev 23800)
@@ -8,8 +8,8 @@
 "Project-Id-Version: The_Resource_Manager\n"
 "Report-Msgid-Bugs-To: http://bugs.kde.org\n"
 "POT-Creation-Date: 2008-09-23 06:25+0000\n"
-"PO-Revision-Date: 2008-11-06 15:55+1000\n"
-"Last-Translator: Xi HUANG <xhuang at redhat.com>\n"
+"PO-Revision-Date: 2008-11-10 11:26+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"
@@ -68,7 +68,7 @@
 "in a top-level transaction. It uses the start method to associate the "
 "transaction with the resource, and it uses the end method to disassociate "
 "the transaction from the resource."
-msgstr ""
+msgstr "任何想在外部事务管理者控制事务的环境里使用的事务性资源适配器都可以支持 <interfacename>XAResource</interfacename> 接口,例如,数据库管理系统。应用程序可以通过多个数据库连接来访问数据。每个数据库连接都和作为底层资源管理者实例的代理对象的 <code>XAResource</code> 对象关联。事务管理者为每个参与顶层事务的资源管理者获取一个 <code>XAResource</code> 对象。它使用 start 方法来关联事务和资源,并使用 end 方法来把事务从资源里分离。"
 
 #. Tag: para
 #: The_Resource_Manager.xml:18
@@ -79,7 +79,7 @@
 "transaction commit time, these transactional resource managers are informed "
 "by the transaction manager to prepare, commit, or rollback the transaction "
 "according to the two-phase commit protocol."
-msgstr ""
+msgstr "资源管理者负责把事务和所有在 start 和 end 调用之间在其数据上执行的工作相关联。在事务提交的时候,事务管理者这些事务性资源管理者安装两阶段提交协议准备、提交或回滚事务。"
 
 #. Tag: para
 #: The_Resource_Manager.xml:21
@@ -199,6 +199,8 @@
 "is used within each transaction. Your resource will be driven last in the "
 "commit protocol: no invocation of prepare will occur."
 msgstr ""
+"为了使用 LRCO,你的 <interfacename>XAResource</interfacename> 实现必须继承 <interfacename>com.arjuna.ats.jta.resources."
+"LastResourceCommitOptimisation</interfacename> marker 接口(它没有提供任何方法)。当通过 Transaction.enlistResource 登记资源时,JBossTS 将确保该类型参与者只有一个实例在每个事务里使用。在提交协议里你的资源将最后被驱动:不会发生 prepare  调用。"
 
 #. Tag: para
 #: The_Resource_Manager.xml:69
@@ -212,6 +214,9 @@
 "before doing so you should read the Section on enlisting multiple one-phase "
 "aware resources."
 msgstr ""
+"在缺省情况下,登记多个 <classname>LastResourceCommitOptimisation</classname> 实例会失败且 <methodname>Transaction.enlistResource</"
+"methodname> 将返回 false。设置 <property>com."
+"arjuna.ats.jta.allowMultipleLastResources</property> 可以覆盖这种行为。然而,你应该先阅读关于登记多个一阶段资源的章节。"
 
 #. Tag: para
 #: The_Resource_Manager.xml:73
@@ -220,13 +225,13 @@
 "In order to utilize the LRCO in a distributed environment, it is necessary "
 "to disable interposition support. It is still possible to use implicit "
 "context propagation."
-msgstr ""
+msgstr "为了在分布式环境里使用 LRCO,我们有必要禁用 interposition 支持。使用隐性的上下文传递仍然是可能的。"
 
 #. Tag: title
 #: The_Resource_Manager.xml:77
 #, no-c-format
 msgid "Enlisting multiple one-phase aware resources"
-msgstr ""
+msgstr "登记多个一阶段资源"
 
 #. Tag: para
 #: The_Resource_Manager.xml:78
@@ -239,7 +244,7 @@
 "resource, it is still possible to achieve an atomic (all of nothing) outcome "
 "across resources by utilizing the Last Resource Commit Optimization, as "
 "explained earlier."
-msgstr ""
+msgstr "如 Transaction 核心文档里所讨论的,为了保证相同事务里的多个参与者(资源)的一致性(原子性),带有持久的事务日志的两阶段提交协议被使用。如之前所解释的,在处理单个的一阶段资源时,利用 Last Resource Commit Optimization 仍然可能实现跨资源的原子的结果。"
 
 #. Tag: para
 #: The_Resource_Manager.xml:82
@@ -255,13 +260,13 @@
 "resource states and without any way of undoing should subsequent resources "
 "make a different choice. This can result in data corruption or heuristic "
 "outcomes."
-msgstr ""
+msgstr "然而,有时候多个一阶段可能资源在相同事务里登记。例如,作为旧的 JMS 实现运行在相同事务里的旧的数据库。在这种情况下,实现跨资源的事务结果的原子性是不可能的,因为它们都没有进入 prepare(等待最后结果)状态;当事务协调者指示时,它们马上提交或回滚而不顾其他资源状态,且如果最后的资源作出不同选择时也不能取消操作。这会导致数据崩溃或启发式结果。"
 
 #. Tag: para
 #: The_Resource_Manager.xml:85
 #, no-c-format
 msgid "In these situations we recommend one of the following approaches:"
-msgstr ""
+msgstr "在这些情况下,我们推荐下列的方法之一:"
 
 #. Tag: para
 #: The_Resource_Manager.xml:90
@@ -269,13 +274,13 @@
 msgid ""
 "Wrap the resources in compensating transactions. See the Web Services "
 "transactions guides for further details."
-msgstr ""
+msgstr "在补充性事务里包裹资源。更多细节请参考《Web Services 事务指南》"
 
 #. Tag: para
 #: The_Resource_Manager.xml:95
 #, no-c-format
 msgid "Migrate the legacy implementations to two-phase aware equivalents."
-msgstr ""
+msgstr "把旧的实现移植到识别两阶段提交协议的资源。"
 
 #. Tag: para
 #: The_Resource_Manager.xml:100
@@ -286,6 +291,8 @@
 "transaction. In order to do this, see the section on the Last Resource "
 "Commit Optimization."
 msgstr ""
+"当这些选项都不可用时,JBossTS 支持在相同的事务里登记多个只识别一阶段提交的资源。相关实现方法请参考 Last Resource "
+"Commit Optimization 章节。"
 
 #. Tag: para
 #: The_Resource_Manager.xml:104
@@ -298,12 +305,16 @@
 "resources are enlisted within the transaction (“This is transactionally "
 "unsafe and should not be relied on.”)."
 msgstr ""
+"甚至当启用了这种支持时,JBossTS 仍然会在检测到启用了该选项时发出警告信息(\"You have chosen to enable "
+"multiple last resources in the transaction manager. This is transactionally "
+"unsafe and should not be relied upon.”)和在多个一阶段资源在事务里登记发出(“This is transactionally "
+"unsafe and should not be relied on.”)。"
 
 #. Tag: title
 #: The_Resource_Manager.xml:111
 #, no-c-format
 msgid "Opening a Resource Manager"
-msgstr ""
+msgstr "打开资源管理者"
 
 #. Tag: para
 #: The_Resource_Manager.xml:112
@@ -319,13 +330,13 @@
 "complete the transaction. The resource adapter is responsible for opening "
 "(initializing) the resource manager when the connection to the resource "
 "manager is established."
-msgstr ""
+msgstr "X/Open <interfacename>XA</interfacename> 接口要求事务管理者在任何 xa_ 调用前初始化资源管理者(xa_open)。JTA 要求资源管理者的初始化嵌入在代表资源管理者的资源适配器里。事务管理者不需要知道怎样初始化资源管理者;它只负责通知资源管理者什么时候启动和结束和事务相关的工作以及什么时候结束事务。资源适配器负责在建立到资源管理者的连接时打开(初始化)资源管理者。"
 
 #. Tag: title
 #: The_Resource_Manager.xml:118
 #, no-c-format
 msgid "Closing a Resource Manager"
-msgstr ""
+msgstr "关闭资源管理者"
 
 #. Tag: para
 #: The_Resource_Manager.xml:119
@@ -334,7 +345,7 @@
 "A resource manager is closed by the resource adapter as a result of "
 "destroying the transactional resource. A transaction resource at the "
 "resource adapter level is comprised of two separate objects:"
-msgstr ""
+msgstr "在资源适配器销毁了事务性资源后,资源管理者将被关闭。资源适配器级别的事务资源由两个独立的对象组成:"
 
 #. Tag: para
 #: The_Resource_Manager.xml:124
@@ -343,7 +354,7 @@
 "An <code>XAResource</code> object that allows the transaction manager to "
 "start and end the transaction association with the resource in use and to "
 "coordinate transaction completion process."
-msgstr ""
+msgstr "<code>XAResource</code> 对象允许事务管理者启动和结束事务和资源的关联并协调事务的完成。"
 
 #. Tag: para
 #: The_Resource_Manager.xml:129
@@ -351,7 +362,7 @@
 msgid ""
 "A connection object that allows the application to perform operations on the "
 "underlying resource (for example, JDBC operations on an RDBMS)."
-msgstr ""
+msgstr "connection 对象允许应用程序在底层资源(例如 RDBMS 上的 JDBC 操作)执行操作。"
 
 #. Tag: para
 #: The_Resource_Manager.xml:134
@@ -364,7 +375,7 @@
 "server about the close. The transaction manager should invoke the "
 "<methodname>XAResource.end</methodname> method to disassociate the "
 "transaction from that connection."
-msgstr ""
+msgstr "在启动后,资源管理者保持开启状态直到资源被显性地释放(关闭)。当应用程序调用连接的 close 方法,资源适配器使应用程序持有的 connection 对象引用失效并将关闭动作通知应用服务器。事务管理者应该调用 <methodname>XAResource.end</methodname> 方法来使事务和这个连接分离。"
 
 #. Tag: para
 #: The_Resource_Manager.xml:137
@@ -373,13 +384,13 @@
 "The close notification allows the application server to perform any "
 "necessary cleanup work and to mark the physical XA connection as free for "
 "reuse, if connection pooling is in place."
-msgstr ""
+msgstr "关于关闭的通知允许应用服务器执行必需的清理工作并把实际的 XA 连接标记为空闲且可重用(如果使用了连接池)。"
 
 #. Tag: title
 #: The_Resource_Manager.xml:143
 #, no-c-format
 msgid "Threads of control"
-msgstr ""
+msgstr "控制线程"
 
 #. Tag: para
 #: The_Resource_Manager.xml:144
@@ -397,7 +408,7 @@
 "context and the transaction context may be operated independent of thread "
 "context. This means that it is possible for different threads to be invoking "
 "the start and end methods."
-msgstr ""
+msgstr "X/Open <interfacename>XA</interfacename> 接口指定和事务关联相关的调用必须从相同的线程上下文中进行调用。这个控制线程的要求不适用于面向对象的基于组件的应用程序运行环境,此时应用程序线程在方法调用的时候动态地进行调遣。如果连接跨越多个方法调用,不同的线程可以使用相同的连接资源来访问资源管理器。不同的线程可以用相同的 <code>XAResource</code> 对象进行调用,这取决于应用服务器的实现。资源上下文和事务上下文可以不依赖于线程上下文进行操作。这意味着不同的线程有可能调用相同的 start 和 end 方法。"
 
 #. Tag: para
 #: The_Resource_Manager.xml:147
@@ -410,13 +421,13 @@
 "point of time. Thus the <interfacename>XAResource</interfacename> interface "
 "requires that the resource managers be able to support the two-phase commit "
 "protocol from any thread context."
-msgstr ""
+msgstr "如果应用服务器允许多个线程使用相同的 <code>XAResource</code> 对象以及和资源管理者相关联的连接,应用服务器要确保在任何时刻只有一个事务上下文和该资源相关联。因此,<interfacename>XAResource</interfacename> 接口要求资源管理者能够支持任何线程上下文中的两阶段提交协议。"
 
 #. Tag: title
 #: The_Resource_Manager.xml:153
 #, no-c-format
 msgid "Transaction association"
-msgstr ""
+msgstr "事务关联"
 
 #. Tag: para
 #: The_Resource_Manager.xml:154
@@ -432,6 +443,8 @@
 "an error for the start method to be invoked on a connection that is "
 "currently associated with a different transaction."
 msgstr ""
+"事务通过 start 方法和事务性资源现关联并通过 <methodname>end</"
+"methodname> 方法进行分离。资源适配器负责在内部维护资源连接对象和 <code>XAResource</code> 对象之间的关联。在任何时候,连接都和单一的事务关联,或者不和任何事务关联。因为 JTA 不支持嵌套的事务,对当前和不同事务关联的连接调用 start 方法会产生错误。"
 
 #. Tag: para
 #: The_Resource_Manager.xml:157
@@ -443,13 +456,13 @@
 "with a different transaction, the method end must be invoked for the "
 "previous transaction that was associated with the resource, and start must "
 "be invoked for the current transaction context."
-msgstr ""
+msgstr "只要对每个事务上下文正确地调用了 start 和 end 方法,使用相同的资源对多个事务上下文进行交错是可能的。每次资源和不同的事务一起使用时,对和资源关联的前一事务必须调用 end 方法,且必须对当前的事务上下文调用 start 方法。"
 
 #. Tag: title
 #: The_Resource_Manager.xml:163
 #, no-c-format
 msgid "Externally controlled connections"
-msgstr ""
+msgstr "外部控制的连接"
 
 #. Tag: para
 #: The_Resource_Manager.xml:164
@@ -465,6 +478,8 @@
 "code> object in use is associated with the transaction. This is done by "
 "invoking the <methodname>Transaction.enlistResource</methodname> method."
 msgstr ""
+"对于事务状态由应用服务器管理的事务性应用程序,它的资源也必须由应用服务器管理才能争取执行事务关联。如果某个应用程序和事务相关联,这个应用程序通过连接而没有使该连接的资源对象和全局事务关联执行事务性任务会产生错误。应用服务器必须确保使用的 <code>XAResource</"
+"code> 对象和事务相关联。这是通过 <methodname>Transaction.enlistResource</methodname> 方法完成的。"
 
 #. Tag: para
 #: The_Resource_Manager.xml:167
@@ -476,13 +491,13 @@
 "is enlisted with the application’s current transaction context. This implies "
 "that the application server manages the connection resource usage status "
 "across multiple method invocations."
-msgstr ""
+msgstr "如果服务器端的应用程序和多个客户端请求保持数据库连接,应用服务器必须确保在把客户端请求分发给相应线程前,资源应该在当前的事务上下文里登记。这暗示着应用服务器管理多个方法调用间的连接资源的使用状态。"
 
 #. Tag: title
 #: The_Resource_Manager.xml:173
 #, no-c-format
 msgid "Resource sharing"
-msgstr ""
+msgstr "资源共享"
 
 #. Tag: para
 #: The_Resource_Manager.xml:174
@@ -495,7 +510,7 @@
 "allowed to use any of the resource objects connected to the same resource "
 "manager instance. The resource object used for the two-phase commit protocol "
 "does not need to have been involved with the transaction being completed."
-msgstr ""
+msgstr "当相同的事务性资源被用来对多个事务进行交错时,应用服务器要确保在任何时刻只有一个事务在资源里进行登记。要初始化事务提交过程,事务管理者被允许使用和相同资源管理者实例连接的任何资源对象。用于两阶段提交协议的资源对象不需要和正完成的事务有关联。"
 
 #. Tag: para
 #: The_Resource_Manager.xml:177
@@ -512,7 +527,7 @@
 "other transactional resource connected to the same resource manager. The "
 "resource adapter needs to allow the commit process to be executed while the "
 "resource is currently associated with a different global transaction."
-msgstr ""
+msgstr "资源适配器必须能够处理为事务提交过程并发调用 <interfacename>XAResource</interfacename> 方法的多个线程。如下面的代码所示,假设我们有一个事务性资源 <code>r1</code>。全局事务 <code>xid1</code> 和 <code>r1</code> 一起被启动和结束。然后,另外一个全局事务 <code>xid2</code> 和 <code>r1</code> 相关联。同时,事务管理者可以用 <code>r1</code> 或者任何其他连接到相同资源管理者的事务性资源为 <code>xid1</code> 启动两阶段提交过程。当资源正和不同的全局事务相关联时,资源适配器需要允许提交过程的执行。"
 
 #. Tag: screen
 #: The_Resource_Manager.xml:180
@@ -533,12 +548,26 @@
 "..\n"
 "xares.commit(xid1, false);"
 msgstr ""
+"XAResource xares = r1.getXAResource();\n"
+"        \n"
+"xares.start(xid1); // associate xid1 to the connection\n"
+"        \n"
+"..\n"
+"xares.end(xid1); // disassociate xid1 to the connection\n"
+"..\n"
+"xares.start(xid2); // associate xid2 to the connection\n"
+"..\n"
+"// While the connection is associated with xid2,\n"
+"// the TM starts the commit process for xid1\n"
+"status = xares.prepare(xid1);\n"
+"..\n"
+"xares.commit(xid1, false);"
 
 #. Tag: title
 #: The_Resource_Manager.xml:184
 #, no-c-format
 msgid "Local and global transactions"
-msgstr ""
+msgstr "本地和全局事务"
 
 #. Tag: para
 #: The_Resource_Manager.xml:185
@@ -550,7 +579,7 @@
 "internally. The <interfacename>XAResource</interfacename> interface is not "
 "used for local transactions. When using the same connection to perform both "
 "local and global transactions, the following rules apply:"
-msgstr ""
+msgstr "资源适配器必须支持在相同的事务性连接里使用本地和全局事务。本地事务是资源管理者在内部启动和协调的事务。<interfacename>XAResource</interfacename> 接口不用于本地事务。当使用相同的连接来执行本地和全局事务时,将应用下列的规则:"
 
 #. Tag: para
 #: The_Resource_Manager.xml:190
@@ -558,7 +587,7 @@
 msgid ""
 "The local transaction must be committed (or rolled back) before starting a "
 "global transaction in the connection."
-msgstr ""
+msgstr "本地事务必须在启动连接里的全局事务前提交(或回滚)。"
 
 #. Tag: para
 #: The_Resource_Manager.xml:195
@@ -566,7 +595,7 @@
 msgid ""
 "The global transaction must be disassociated from the connection before any "
 "local transaction is started."
-msgstr ""
+msgstr "全局事务必须在启动任何本地事务前和连接进行分离。"
 
 #. Tag: title
 #: The_Resource_Manager.xml:203




More information about the jboss-svn-commits mailing list