[jboss-cvs] JBossAS SVN: r78912 - projects/docs/enterprise/4.3/Cache/Cache_Pojo_Cache_Guide/zh-CN.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sun Sep 28 23:31:21 EDT 2008
Author: xhuang at jboss.com
Date: 2008-09-28 23:31:21 -0400 (Sun, 28 Sep 2008)
New Revision: 78912
Modified:
projects/docs/enterprise/4.3/Cache/Cache_Pojo_Cache_Guide/zh-CN/Configuration.po
projects/docs/enterprise/4.3/Cache/Cache_Pojo_Cache_Guide/zh-CN/Introduction.po
projects/docs/enterprise/4.3/Cache/Cache_Pojo_Cache_Guide/zh-CN/JBoss_Cache_Pojo_Cache_Guide.po
projects/docs/enterprise/4.3/Cache/Cache_Pojo_Cache_Guide/zh-CN/Jbossaop.po
Log:
update
Modified: projects/docs/enterprise/4.3/Cache/Cache_Pojo_Cache_Guide/zh-CN/Configuration.po
===================================================================
--- projects/docs/enterprise/4.3/Cache/Cache_Pojo_Cache_Guide/zh-CN/Configuration.po 2008-09-29 03:22:50 UTC (rev 78911)
+++ projects/docs/enterprise/4.3/Cache/Cache_Pojo_Cache_Guide/zh-CN/Configuration.po 2008-09-29 03:31:21 UTC (rev 78912)
@@ -1,24 +1,26 @@
+# translation of Configuration.po to
# Language /tmp/mike/JBEAP420/Cache translations for JBEAP package.
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
# Automatically generated, 2007.
#
msgid ""
msgstr ""
-"Project-Id-Version: JBEAP 420\n"
+"Project-Id-Version: Configuration\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:57+0000\n"
-"PO-Revision-Date: 2001-02-09 01:25+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
+"PO-Revision-Date: 2008-09-29 09:33+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"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
#: Configuration.xml:5
#, no-c-format
msgid "Configuration"
-msgstr ""
+msgstr "配置"
#. Tag: para
#: Configuration.xml:6
@@ -30,13 +32,13 @@
"JGroups stack, for example, are still the same. There are two differences, "
"however, when using the xml file--- configuring as a MBean service and "
"eviction policy."
-msgstr ""
+msgstr "既然 PojoCache 继承了 TreeCache,它的 XML 配置文件属性和后者几乎相同。例如,复制模式、事务管理者、逐出策略、缓存加载器和 JGroups 栈等属性都是相同的。然而,使用 XML 时也有两个不同的地方 - 配置为 MBean 服务时和逐出策略。"
#. Tag: title
#: Configuration.xml:9
#, no-c-format
msgid "PojoCache MBean service"
-msgstr ""
+msgstr "PojoCache MBean 服务"
#. Tag: para
#: Configuration.xml:10
@@ -49,12 +51,14 @@
"\"jboss.cache:service=PojoCache\"></programlisting> You can modify the "
"object service name to your liking, of course."
msgstr ""
+"PojoCache 也可以作为 MBean 服务部署在 JBoss 应用服务器里。然而,你将需要使用正确的类来进行初始化。例如,这是一个 XML 文件里关于 MBean 属性的代码片段:<programlisting><mbean code=\"org.jboss.cache.aop.PojoCache\" name="
+"\"jboss.cache:service=PojoCache\"></programlisting> 当然,你可以修改为你喜欢的对象服务名称。"
#. Tag: title
#: Configuration.xml:14
#, no-c-format
msgid "PojoCache eviction policy"
-msgstr ""
+msgstr "PojoCache 的逐出策略"
#. Tag: para
#: Configuration.xml:15
@@ -68,6 +72,9 @@
"world, a unit is a FQN node, while in the aop world, the concept of a unit "
"is an object (which can have multiple nodes and children nodes!)."
msgstr ""
+"PojoCache 也提供逐出策略 <literal>org.jboss.cache.aop."
+"eviction.AopLRUPolicy</literal>,它是 <literal>org.jboss."
+"cache.eviction.LRUPolicy</literal> 的子类(具有相同的配置参数)。我们需要一个不同的实现是因为 PojoCache 里的逐出和普通 TreeCache 有很大不同。在普通的缓存里,单元是一个 FQN 节点,但对于 AOP 来说,单元概念是一个对象(它可以有多个节点和子节点!)。"
#. Tag: para
#: Configuration.xml:18
@@ -81,6 +88,8 @@
"reference. So all operations will succeed but then a user has no way of "
"knowing that it is merely updating the in-memory reference!"
msgstr ""
+"此外,一旦用户获得了一个 POJO 引用,任何事情都将是透明的,例如,缓存的获取和更新操作。但如果某个对象被逐出,就意味着这个 POJO 没有 <literal>CacheInterceptor</"
+"literal>,其内容不会被缓存所拦截。相反,每个操作的将指向 in-memory 引用。所以,所有的操作都会成功,但用户却不会知道他只是更新了 in-memory 引用而已!"
#. Tag: para
#: Configuration.xml:21
@@ -94,3 +103,6 @@
"persistent all time unless a specific user-based <literal>removeObject</"
"literal> is called."
msgstr ""
+"为了弥补这个问题,我们目前要求逐出策略和缓存加载器联合使用来持久化数据。它可以是完全持久化或钝化(例如,只在逐出时持久化)。此时,如果节点不可用,它将从持久性存储里获取。其缺点是 POJO 不是临时的,例如,除非调用专门的基于用户的 <literal>removeObject</"
+"literal>,任何时候它都是持久的。"
+
Modified: projects/docs/enterprise/4.3/Cache/Cache_Pojo_Cache_Guide/zh-CN/Introduction.po
===================================================================
--- projects/docs/enterprise/4.3/Cache/Cache_Pojo_Cache_Guide/zh-CN/Introduction.po 2008-09-29 03:22:50 UTC (rev 78911)
+++ projects/docs/enterprise/4.3/Cache/Cache_Pojo_Cache_Guide/zh-CN/Introduction.po 2008-09-29 03:31:21 UTC (rev 78912)
@@ -9,7 +9,7 @@
"Project-Id-Version: Introduction\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:57+0000\n"
-"PO-Revision-Date: 2008-09-23 09:19+1000\n"
+"PO-Revision-Date: 2008-09-29 13:30+1000\n"
"Last-Translator: \n"
"Language-Team: <en at li.org>\n"
"MIME-Version: 1.0\n"
@@ -359,14 +359,13 @@
#. Tag: para
#: Introduction.xml:110
#, no-c-format
-#, fuzzy
msgid ""
"Support Collection classes (e.g., List, Set, and Map based objects) "
"automatically without declaring them as aop-enabled. That is, you can use "
"them either as a plain POJO or a sub-object to POJO without declaring them "
"as \"aspectized\". In addition, it supports runtime swapping of the proxy "
"reference as well."
-msgstr "支持集合类(如:了"
+msgstr "自动支持集合类(如:List、Set 和基于 Map 的对象)而无需声明为 aop-enabled。那就是说,你可以把它们作为普通 POJO 或者 POJO 的子对象使用,而无需声明为 \"aspectized\"。此外,它也支持运行时的代理引用交换。"
#. Tag: para
#: Introduction.xml:115
@@ -379,7 +378,7 @@
"declaration file (e.g., <literal>jboss-aop.xml</literal> ) or specifying a "
"JBossAop system classloader. A user can treat the pre-generated classes as "
"regular ones and use PojoCache in a non-intrusive way."
-msgstr ""
+msgstr "支持 POJO 的预编译。最新的 JBossAop 有预编译功能(称为 <literal>aopc</literal>,JBossAop 里所谓的编译时模式)且为 AOP 系统生成必需的字节码。通过预编译允许指定的 POJO,你不需要额外的声明文件(如 <literal>jboss-aop.xml</literal>)或指定 JBossAop 系统类加载器。允许可以把预生成类当作常规类并以非侵入(non-intrusive)的方式使用 PojoCache。"
#. Tag: para
#: Introduction.xml:118
@@ -388,13 +387,13 @@
"This provides easy integration to existing Java runtime programs, "
"eliminating the need for ad-hoc specification of a system class loader, for "
"example. Details will be provided later."
-msgstr ""
+msgstr "这提供了对现有 Java 运行程序的集成,例如,消除了对系统类加载器的 ad-hoc 规格的需要。我们在后面将进行详细介绍。"
#. Tag: para
#: Introduction.xml:123
#, no-c-format
msgid "POJO needs not implement the <code>Serializable</code> interface."
-msgstr ""
+msgstr "POJO 不需要实现 <code>Serializable</code> 接口。"
#. Tag: para
#: Introduction.xml:128
@@ -407,6 +406,8 @@
"literal> file declaration for POJOs, if annotation is preferred. The JDK5.0 "
"annotation will be supported in the next release."
msgstr ""
+"支持注解的使用。从 1.2.3 版本开始,PojoCache 也支持通过 JDK1.4 下的注解声明 POJO。JBossAop 提供一个注解编译器,用户可用它来预处理注解。因此,如果使用注解,你不需要 <literal>jboss-aop.xml</"
+"literal> 来声明 POJO。下一版本将会支持 JDK5.0 注解。"
#. Tag: para
#: Introduction.xml:133
@@ -416,7 +417,7 @@
"cache, the POJO object is mapped into the cache store behind the scene. "
"Client will have no need to manage any object relationship and cache "
"contents synchronization."
-msgstr ""
+msgstr "易于使用和透明。一旦声明 POJO 被缓存管理,POJO 对象将映射到后台缓存存储里。客户不需要管理任何对象关系和缓存内容同步。"
#. Tag: title
#: Introduction.xml:138
Modified: projects/docs/enterprise/4.3/Cache/Cache_Pojo_Cache_Guide/zh-CN/JBoss_Cache_Pojo_Cache_Guide.po
===================================================================
--- projects/docs/enterprise/4.3/Cache/Cache_Pojo_Cache_Guide/zh-CN/JBoss_Cache_Pojo_Cache_Guide.po 2008-09-29 03:22:50 UTC (rev 78911)
+++ projects/docs/enterprise/4.3/Cache/Cache_Pojo_Cache_Guide/zh-CN/JBoss_Cache_Pojo_Cache_Guide.po 2008-09-29 03:31:21 UTC (rev 78912)
@@ -1,3 +1,4 @@
+# translation of JBoss_Cache_Pojo_Cache_Guide.po to
# Language zh-CN translations for package.
# Automatically generated, 2008.
#
@@ -3,19 +4,20 @@
msgid ""
msgstr ""
-"Project-Id-Version: \n"
+"Project-Id-Version: JBoss_Cache_Pojo_Cache_Guide\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:57+0000\n"
-"PO-Revision-Date: 2008-09-21 04:57+0000\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
+"PO-Revision-Date: 2008-09-29 13:14+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"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
#: JBoss_Cache_Pojo_Cache_Guide.xml:6
#, no-c-format
msgid "Preface"
-msgstr ""
+msgstr "序言"
#. Tag: para
@@ -32,6 +34,8 @@
"functionality. JBossCache by itself is a 100% Java based library that "
"can be run either as a standalone program or inside an application server."
msgstr ""
+"PojoCache 是一个 in-memomy、事务性、复制性 POJO(plain old "
+"Java object)缓存系统,它允许允许透明地在 POJO 上操作而无需管理复制或持久化。PojoCache 是 JBossCache 的一个组件(把 PojoCache 作为内部的实现,取消了旧的 TreeCacheAop 实现),它是业界第一个提供 POJO 功能的产品。JBossCache 本身是一个 100% 基于 Java 的库,它可以作为独立程序或在应用服务器里运行。"
#. Tag: para
#: JBoss_Cache_Pojo_Cache_Guide.xml:10
@@ -41,7 +45,7 @@
"configuration, and examples for PojoCache. We assume the readers are "
"familiar with both JGroups and TreeCache usages. Since PojoCache uses "
"JBossAop framework, an introduction will also be given there."
-msgstr ""
+msgstr "本文档是一个解释架构、API、配置和例程的用户指南。我们预想读者既熟悉 JGroups 也了解 TreeCache 的用法。既然 PojoCache 使用了 JBossAop 框架,我们也会在这里进行简单介绍。"
#. Tag: para
#: JBoss_Cache_Pojo_Cache_Guide.xml:13
@@ -90,3 +94,4 @@
"Let's pretend to have an extremely long line that does not fit\n"
" This one is short"
msgstr ""
+
Modified: projects/docs/enterprise/4.3/Cache/Cache_Pojo_Cache_Guide/zh-CN/Jbossaop.po
===================================================================
--- projects/docs/enterprise/4.3/Cache/Cache_Pojo_Cache_Guide/zh-CN/Jbossaop.po 2008-09-29 03:22:50 UTC (rev 78911)
+++ projects/docs/enterprise/4.3/Cache/Cache_Pojo_Cache_Guide/zh-CN/Jbossaop.po 2008-09-29 03:31:21 UTC (rev 78912)
@@ -8,7 +8,7 @@
"Project-Id-Version: Jbossaop\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:57+0000\n"
-"PO-Revision-Date: 2008-09-26 11:47+1000\n"
+"PO-Revision-Date: 2008-09-29 13:07+1000\n"
"Last-Translator: \n"
"Language-Team: <en at li.org>\n"
"MIME-Version: 1.0\n"
@@ -20,7 +20,7 @@
#: Jbossaop.xml:5
#, no-c-format
msgid "Introduction to JBossAop"
-msgstr ""
+msgstr "JBossAop 简介"
#. Tag: para
#: Jbossaop.xml:6
@@ -30,13 +30,13 @@
"usage pertinent to PojoCache. Material in this chapter can be found in the "
"full JBossAop documentation. For more details, users are encouraged to visit "
"its doc page."
-msgstr ""
+msgstr "在本章里,我们将概述 JBossAop,特别是和 PojoCache 相关的用法。本章的内容都可以在 JBossAop 文档里找到。我们鼓励用户访问其文档页面来获得相关的细节。"
#. Tag: title
#: Jbossaop.xml:9
#, no-c-format
msgid "What is it?"
-msgstr ""
+msgstr "JBossAop 是什么?"
#. Tag: para
#: Jbossaop.xml:10
@@ -49,7 +49,7 @@
"layered design. AOP allows you to intercept any event in a Java program and "
"trigger functionality based on those events. Combined with JDK 5.0 "
"annotations, it allows you to extend the Java language with new syntax."
-msgstr ""
+msgstr "面向切面编程(Aspect-Oriented Programming,AOP)是一个新的模型,它允许你用传统面向对象方法不可能实现的方法组织应用程序和进行分层。切面(Aspect)允许你透明地把功能粘合在一起,从而实现更加层次化的设计。AOP 允许你在 Java 程序里拦截任何事件并触发基于这些事件的功能。如和 JDK 5.0 注解联合使用,它还允许你用新的语法扩展 Java 语言。"
#. Tag: para
#: Jbossaop.xml:13
@@ -60,7 +60,7 @@
"that looks and smells like it should have structure, but you can't find a "
"way to express this structure in code with traditional object-oriented "
"techniques."
-msgstr ""
+msgstr "切面(Aspect)是一个公共功能,它通常分布在方法、类、对象层次结构或者甚至是整个对象模型里。它是这样一种应该具有某种结构的行为,但你无法采用传统面相对象技术来表达这种结构。"
#. Tag: para
#: Jbossaop.xml:16
@@ -71,7 +71,7 @@
"it's a behavior that \"cuts\" across multiple points in your object models, "
"yet is distinctly different. As a development methodology, AOP recommends "
"that you abstract and encapsulate crosscutting concerns."
-msgstr ""
+msgstr "例如,metrics 一个商业逻辑里正交的常用切面。在 AOP 里,类似 metrics 的功能被称作横切要素(crosscutting concern),因为它是一种在对象模型里“切”出多个点的行为,而这些点各自不同。作为一种开发方法学,AOP 推荐将横切要素抽象化和封装。"
#. Tag: para
#: Jbossaop.xml:19
@@ -80,7 +80,7 @@
"For example, let's say you wanted to add code to an application to measure "
"the amount of time it would take to invoke a particular method. In plain "
"Java, the code would look something like the following."
-msgstr ""
+msgstr "例如,假设你想在应用程序里添加代码来测量调用某个方法所需的时间。在普通的 Java 里,代码将类似于:"
#. Tag: programlisting
#: Jbossaop.xml:22
@@ -130,7 +130,7 @@
"because it's dispersed throughout your entire code base. And this is just a "
"tiny example! In many cases, OOP may not always be the best way to add "
"metrics to a class."
-msgstr ""
+msgstr "虽然这段代码能用,但不容易启用/禁用;而且如果我们需要应用到所有方法时,代码量将很大。这种度量方法很难维护、扩充和扩展,因为它散步在整个代码里。这只是一个很小的例子!在很多情况下,OOP 未必是度量类的最佳途径。"
#. Tag: para
#: Jbossaop.xml:26
@@ -141,13 +141,13 @@
"\"around\" your code. For example, AOP provides you with programmatic "
"control to specify that you want calls to BankAccountDAO to go through a "
"metrics aspect before executing the actual body of that code."
-msgstr ""
+msgstr "面向切面编程给出了封装这种类型的行为功能的方法。它允许你在代码里添加行为,如度量。例如,在执行实际的代码主体之前,AOP 提供程序化控制来指定调用 BankAccountDAO 来进行度量。"
#. Tag: title
#: Jbossaop.xml:29
#, no-c-format
msgid "Creating Aspects in JBoss AOP"
-msgstr ""
+msgstr "在 JBoss AOP 创建切面"
#. Tag: para
#: Jbossaop.xml:30
@@ -157,7 +157,7 @@
"crosscutting concerns, and a programmatic construct -- a programming "
"language or a set of tags -- to specify how you want to apply those snippets "
"of code."
-msgstr ""
+msgstr "简而言之,所有的 AOP 框架都定义了两件事:实现横切要素的方法和程序化的结构 - 编程语言或一系列标签 - 来指定如何应用这些代码片段。"
#. Tag: para
#: Jbossaop.xml:33
@@ -165,7 +165,7 @@
msgid ""
"Let's take a look at how JBoss AOP, its cross-cutting concerns, and how you "
"can implement a metrics aspect in JBoss."
-msgstr ""
+msgstr "让我们来看看 JBoss AOP、它的横切要素,以及如何在 JBoss 里实现度量切面。"
#. Tag: para
#: Jbossaop.xml:36
@@ -176,12 +176,14 @@
"finally block in Listing One's BankAccountDAO.withdraw() method into "
"Metrics, an implementation of a JBoss AOP Interceptor class."
msgstr ""
+"在 JBoss AOP 度量切面的第一步是用 Java 类封装度量功能。Listing Two 从 Listing One 的 BankAccountDAO.withdraw() 方法里抽取了 try/"
+"finally 块至 Metrics 类里,Metrics 类是 JBoss AOP 拦截器类的实现。"
#. Tag: para
#: Jbossaop.xml:39
#, no-c-format
msgid "Listing Two: Implementing metrics in a JBoss AOP Interceptor"
-msgstr ""
+msgstr "Listing Two:在 JBoss AOP 拦截器里实现度量"
#. Tag: programlisting
#: Jbossaop.xml:42
@@ -236,7 +238,7 @@
"and encapsulates those parts into an Invocation object. The framework then "
"calls any aspects that sit between the calling code and the actual method "
"body."
-msgstr ""
+msgstr "在 JBoss AOP 里,Metrics 类包裹了 withdraw():当调用代码调用 withdraw() 时,AOP 框架将这个调用分解为多个部分,并封装为一个 Invocation 对象。然后,框架调用任何位于调用代码和实际的方法主体间的切面。"
#. Tag: para
#: Jbossaop.xml:46
@@ -247,7 +249,7 @@
"uses an enclosing try/finally block to perform the timings. Line 13 obtains "
"contextual information about the method call from the Invocation object, "
"while line 14 displays the method name and the calculated metrics."
-msgstr ""
+msgstr "当 AOP 框架将方法调用分解后,它将调用第 3 行的 Metric 的 invoke 方法。第 8 行包裹和委托给实际的方法并使用内嵌的 try/finally 块来执行定时操作。第 13 行从调用对象获取方法调用的上下文信息,而第 14 行显示了方法名和度量计算。"
#. Tag: para
#: Jbossaop.xml:49
@@ -256,13 +258,13 @@
"Having the metrics code within its own object allows us to easily expand and "
"capture additional measurements later on. Now that metrics are encapsulated "
"into an aspect, let's see how to apply it."
-msgstr ""
+msgstr "度量代码位于对象自身里允许我们可以轻易地在以后扩充和捕获其他的度量操作。现在度量操作已经被封装到一个切面里,让我们看看怎样应用它。"
#. Tag: title
#: Jbossaop.xml:52
#, no-c-format
msgid "Applying Aspects in JBoss AOP"
-msgstr ""
+msgstr "在 JBoss AOP 里应用切面"
#. Tag: para
#: Jbossaop.xml:53
@@ -274,7 +276,7 @@
"expression matches events/points within your application. For example, a "
"valid pointcut definition would be \"for all calls to the JDBC method "
"executeQuery(), call the aspect that verifies SQL syntax.\""
-msgstr ""
+msgstr "要应用切面,你要指定何时执行切面代码。这些执行点被称为切入点。常规表达式是切入点的一个类比。常规表达式匹配字符串,切入点匹配应用程序里的事件/点。例如,有效的切入点定义可以是“对于所有对 JDBC 方法 executeQuery() 调用,调用验证 SQL 语法的切面。”"
#. Tag: para
#: Jbossaop.xml:56
@@ -285,13 +287,13 @@
"languages akin to queries to specify pointcuts. Others use tags. JBoss AOP "
"uses both. Listing Three shows how to define a pointcut for the metrics "
"example."
-msgstr ""
+msgstr "入口点可以是对字段的访问、方法或构造函数调用。事件可以是抛出的异常。某些 AOP 实现使用查询语言来指定切入点,其他 AOP 使用标签。JBoss AOP 则使用这两者。Listing Three 显示了如何定义度量示例的切入点。"
#. Tag: para
#: Jbossaop.xml:59
#, no-c-format
msgid "Listing Three: Defining a pointcut in JBoss AOP"
-msgstr ""
+msgstr "Listing Three:定义 JBoss AOP 里的切入点"
#. Tag: programlisting
#: Jbossaop.xml:62
@@ -324,6 +326,8 @@
"applies the metrics aspect to all methods in all classes in the com.mc."
"billing package."
msgstr ""
+"Lines 1-3 定义了一个把度量切面应用到专有方法 BankAccountDAO.withdraw() 的切入点。Lines 4-6 定义了一个把度量切面应用到 com.mc."
+"billing 包里所有类的所有方法的切入点。"
#. Tag: para
#: Jbossaop.xml:66
@@ -331,7 +335,7 @@
msgid ""
"There is also an optional annotation mapping if you do not like XML. See "
"JBossAop Reference Guide for more information."
-msgstr ""
+msgstr "如果你不喜欢 XML,你也可以使用注解匹配。更多信息请参考《JBossAop 参考指南》。"
#. Tag: para
#: Jbossaop.xml:69
@@ -342,13 +346,13 @@
"aspects. You can attach your aspects to a specific Java class in your "
"application or you can use more complex compositional pointcuts to specify a "
"wide range of classes within one expression."
-msgstr ""
+msgstr "JBoss AOP 有大量的切入点表达式,你可以用它们在 Java 应用程序里定义不同的点/事件来应用切面。你也可以把切面附加到应用程序专有的 Java 类里,或者你可以在一个表达式里使用更复杂的组合切入点来指定大范围的类。"
#. Tag: title
#: Jbossaop.xml:72
#, no-c-format
msgid "Dynamic Aop"
-msgstr ""
+msgstr "动态 Aop"
#. Tag: para
#: Jbossaop.xml:73
@@ -360,6 +364,8 @@
"advice bindings at runtime. Getting an instance of <literal>org.jboss.aop."
"AspectManager.instance()</literal>, you can add your binding."
msgstr ""
+"你可以用 JBoss AOP 在运行时修改通知(advice)和拦截器绑定。如果给定切入点已经 instrument,你可以取消现有绑定的注册,并热部署新的绑定。JBoss AOP 也有一个在运行时添加通知绑定的运行时 API。获得一个 <literal>org.jboss.aop."
+"AspectManager.instance()</literal> 实例后,你可以添加自己的绑定。"
#. Tag: programlisting
#: Jbossaop.xml:76
@@ -370,6 +376,10 @@
"binding.addInterceptor(SimpleInterceptor.class);\n"
"AspectManager.instance().addBinding(binding);"
msgstr ""
+"AdviceBinding binding = new AdviceBinding(\"execution(POJO->new(..))\", "
+"null);\n"
+"binding.addInterceptor(SimpleInterceptor.class);\n"
+"AspectManager.instance().addBinding(binding);"
#. Tag: para
#: Jbossaop.xml:77
@@ -380,13 +390,13 @@
"the binding through the AspectManager. When the binding is added the "
"AspectManager will iterate through ever loaded class to see if the pointcut "
"expression matches any of the joinpoints within those classes."
-msgstr ""
+msgstr "首先,你分配一个传入切入点表达式的 <literal>AdviceBinding</literal>。然后你通过拦截器的类添加拦截器并通过 AspectManager 添加绑定。当这个绑定被添加后,AspectManager 将迭代每个加载的类来查看切入点表达式是否匹配这些类里的任何连接点(joinpoint)。"
#. Tag: title
#: Jbossaop.xml:80
#, no-c-format
msgid "Per Instance AOP"
-msgstr ""
+msgstr "对于每个 AOP 实例"
#. Tag: para
#: Jbossaop.xml:81
@@ -394,7 +404,7 @@
msgid ""
"Any class that is instrumented by JBoss AOP, is forced to implement the "
"<literal>org.jboss.aop.Advised</literal> interface."
-msgstr ""
+msgstr "JBoss AOP instrument 的任何类都必须实现 <literal>org.jboss.aop.Advised</literal> 接口。"
#. Tag: programlisting
#: Jbossaop.xml:84
@@ -429,7 +439,7 @@
"The InstanceAdvisor is the interesting interface here. InstanceAdvisor "
"allows you to insert Interceptors at the beginning or the end of the class's "
"advice chain."
-msgstr ""
+msgstr "这里的 InstanceAdvisor 是一个有趣的接口。InstanceAdvisor 允许你在类通知链的开头或结尾插入拦截器。"
#. Tag: programlisting
#: Jbossaop.xml:88
@@ -475,13 +485,13 @@
"the <literal>appendInterceptor()</literal> method to the object instance are "
"executed. You can also reference <literal>stack</literal>s and insert/append "
"full stacks into the pre/post chains."
-msgstr ""
+msgstr "所以,相同的 Java 调用栈里通常有 3 个连续执行的通知链。用给定对象实例的 <literal>insertInterceptor()</literal> 方法添加的拦截器首先被执行。然后,用常规 <literal>bind</literal> 绑定的通知/拦截器被执行。最后,用对象实例的 <literal>appendInterceptor()</literal> 方法添加的拦截器被执行。你也可以引用 <literal>stack</literal> 并在 pre/post 链里插入/附加完整的栈。"
#. Tag: title
#: Jbossaop.xml:92
#, no-c-format
msgid "Preparation"
-msgstr ""
+msgstr "Preparation"
#. Tag: para
#: Jbossaop.xml:93
@@ -491,12 +501,14 @@
"instrumented. You can force instrumentation with the <literal>prepare</"
"literal> functionality that declares in an xml file."
msgstr ""
+"除非特定的连接点已经 instrument,否则动态 AOP 不会被使用。你可以用 XML 文件里声明的 <literal>prepare</"
+"literal> 功能强制 instrument。"
#. Tag: title
#: Jbossaop.xml:96
#, no-c-format
msgid "Annotations"
-msgstr ""
+msgstr "注解"
#. Tag: para
#: Jbossaop.xml:97
@@ -504,7 +516,7 @@
msgid ""
"Annotations are only available in JDK 5.0, but using our annotation compiler "
"you can acheive similar functionality with JDK 1.4.2 as well."
-msgstr ""
+msgstr "注解只在 JDK 5.0 里可用,但使用我们的注解编译器,你也可以在 JDK 1.4.2 里实现类似的功能。"
#. Tag: para
#: Jbossaop.xml:100
@@ -525,6 +537,16 @@
"that '@interface' is replaced by 'interface'. i.e. the similar annotation "
"type is a normal Java interface:"
msgstr ""
+"注解必须映射注解类型,在 JDK 5.0 里它们这样被定义:<programlisting>\n"
+" package com.mypackage;\n"
+"\n"
+" public @interface MyAnnotation\n"
+" {\n"
+" String myString();\n"
+" int myInteger();\n"
+" }\n"
+" \n"
+"</programlisting> 注解编译器使用的注解类型和 JDK 1.4.2 里完全一样,重要区别是 '@interface' 被 'interface' 所代替了。也就是说,类似的注解类型是一个普通的 Java 接口:"
#. Tag: programlisting
#: Jbossaop.xml:102
@@ -538,6 +560,13 @@
" int myInteger();\n"
" }"
msgstr ""
+"package com.mypackage;\n"
+"\n"
+" public interface MyAnnotation\n"
+" {\n"
+" String myString();\n"
+" int myInteger();\n"
+" }"
#. Tag: para
#: Jbossaop.xml:104
@@ -545,19 +574,19 @@
msgid ""
"The syntax for using annotations in JDK 1.4.2 is almost exactly the same as "
"JDK 5.0 annotations except for these subtle differences:"
-msgstr ""
+msgstr "在 JDK 1.4.2 使用注解的语法和 JDK 5.0 注解几乎完全相同,除了这些细小的区别:"
#. Tag: para
#: Jbossaop.xml:107
#, no-c-format
msgid "they are embedded as doclet tags"
-msgstr ""
+msgstr "它们内嵌为 doclet 标签"
#. Tag: para
#: Jbossaop.xml:110
#, no-c-format
msgid "You use a double at sign, i.e. '@@'"
-msgstr ""
+msgstr "你使用双重标记,如 '@@'"
#. Tag: para
#: Jbossaop.xml:113
@@ -566,7 +595,7 @@
"You MUST have a space after the tag name otherwise you will get a "
"compilation error. (This is the quirkiness of the QDox doclet compiler used "
"to compile the annotations.')"
-msgstr ""
+msgstr "你必须在标签名后留一个空格,否则会遇到编译错误。(这是编译注解的 QDox doclet 编译器的问题)"
#. Tag: para
#: Jbossaop.xml:116
@@ -574,19 +603,19 @@
msgid ""
"You cannot import the annotation type, you must use the fully qualified name "
"of the interface."
-msgstr ""
+msgstr "你不能导入注解类型,你必须使用接口的全限定名。"
#. Tag: para
#: Jbossaop.xml:119
#, no-c-format
msgid "You cannot specify default values for an annotation's value"
-msgstr ""
+msgstr "你不能指定注解指定缺省值"
#. Tag: para
#: Jbossaop.xml:123
#, no-c-format
msgid "This example shows an annotated class in JDK 1.4.2:"
-msgstr ""
+msgstr "这个例子显示了 JDK 1.4.2 里一个使用注解的类:"
#. Tag: programlisting
#: Jbossaop.xml:124
More information about the jboss-cvs-commits
mailing list