[webbeans-commits] Webbeans SVN: r684 - doc/trunk/reference/zh-CN/modules.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Tue Dec 23 03:43:47 EST 2008


Author: alartin
Date: 2008-12-23 03:43:47 -0500 (Tue, 23 Dec 2008)
New Revision: 684

Modified:
   doc/trunk/reference/zh-CN/modules/intro.po
Log:


Modified: doc/trunk/reference/zh-CN/modules/intro.po
===================================================================
--- doc/trunk/reference/zh-CN/modules/intro.po	2008-12-22 22:19:45 UTC (rev 683)
+++ doc/trunk/reference/zh-CN/modules/intro.po	2008-12-23 08:43:47 UTC (rev 684)
@@ -3,11 +3,11 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: master.xml \n"
+"Project-Id-Version: master.xml\n"
 "Report-Msgid-Bugs-To: http://bugs.kde.org\n"
 "POT-Creation-Date: 2008-12-19 20:26+0000\n"
-"PO-Revision-Date: 2008-12-19 20:26+0000\n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2008-12-23 16:43+0800\n"
+"Last-Translator: Sean Wu <alartin at gmail.com>\n"
 "Language-Team: none\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -17,48 +17,31 @@
 #: intro.xml:4
 #, no-c-format
 msgid "Getting started with Web Beans"
-msgstr ""
+msgstr "Web Beans起步"
 
 #. Tag: para
 #: intro.xml:6
 #, no-c-format
-msgid ""
-"So you're already keen to get started writing your first Web Bean? Or "
-"perhaps you're skeptical, wondering what kinds of hoops the Web Beans "
-"specification will make you jump through! The good news is that you've "
-"probably already written and used hundreds, perhaps thousands of Web Beans. "
-"You might not even remember the first Web Bean you wrote."
-msgstr ""
+msgid "So you're already keen to get started writing your first Web Bean? Or perhaps you're skeptical, wondering what kinds of hoops the Web Beans specification will make you jump through! The good news is that you've probably already written and used hundreds, perhaps thousands of Web Beans. You might not even remember the first Web Bean you wrote."
+msgstr "你是否已经迫不及待想要开始编写你的第一个Web Bean了?或许,你仍旧抱有怀疑态度,想要知道Web Beans规范会给出什么样的圈套让你跳。好消息是你也许已经编写并且使用了好几百个或者好几千个Web Bean了。你也许甚至想不起来你写的第一个Web Bean了。"
 
 #. Tag: title
 #: intro.xml:13
 #, no-c-format
 msgid "Your first Web Bean"
-msgstr ""
+msgstr "你的第一个Web Bean"
 
 #. Tag: para
 #: intro.xml:15
 #, no-c-format
-msgid ""
-"With certain, very special exceptions, every Java class with a constructor "
-"that accepts no parameters is a Web Bean. That includes every JavaBean. "
-"Furthermore, every EJB 3-style session bean is a Web Bean. Sure, the "
-"JavaBeans and EJBs you've been writing every day have not been able to take "
-"advantage of the new services defined by the Web Beans specification, but "
-"you'll be able to use every one of them as Web Beans&#151;injecting them "
-"into other Web Beans, configuring them via the Web Beans XML configuration "
-"facility, even adding interceptors and decorators to them&#151;without "
-"touching your existing code."
-msgstr ""
+msgid "With certain, very special exceptions, every Java class with a constructor that accepts no parameters is a Web Bean. That includes every JavaBean. Furthermore, every EJB 3-style session bean is a Web Bean. Sure, the JavaBeans and EJBs you've been writing every day have not been able to take advantage of the new services defined by the Web Beans specification, but you'll be able to use every one of them as Web Beans&#151;injecting them into other Web Beans, configuring them via the Web Beans XML configuration facility, even adding interceptors and decorators to them&#151;without touching your existing code."
+msgstr "除非特殊情况,每个具有一个非参构造器的Java类都可以是一个Web Bean。这包括了每个JavaBean, 并且每个EJB3的会话Bean都是一个Web Bean。当然,你每天已经写过的JavaBean和EJB无法使用Web Beans规范定义的新服务,但是你能够通过Web Beans的XML配置将这些组件配置为Web Bean,然后将其注入到其他Web Bean中。你甚至可以不用修改已有代码就可以为其添加拦截器和装饰器。"
 
 #. Tag: para
 #: intro.xml:25
 #, no-c-format
-msgid ""
-"Suppose that we have two existing Java classes, that we've been using for "
-"years in various applications. The first class parses a string into a list "
-"of sentences:"
-msgstr ""
+msgid "Suppose that we have two existing Java classes, that we've been using for years in various applications. The first class parses a string into a list of sentences:"
+msgstr "假定我们有两个已经写好的Java类,我们已经在不同的应用中使用它们好多年了。第一个类将一个字符串解析为一个句子列表:"
 
 #. Tag: programlisting
 #: intro.xml:29
@@ -68,15 +51,15 @@
 "    public List<String> parse(String text) { ... }\n"
 "}]]>"
 msgstr ""
+"<![CDATA[public class SentenceParser {\n"
+"    public List<String> parse(String text) { ... }\n"
+"}]]>"
 
 #. Tag: para
 #: intro.xml:31
 #, no-c-format
-msgid ""
-"The second existing class is a stateless session bean front-end for an "
-"external system that is able to translate sentences from one language to "
-"another:"
-msgstr ""
+msgid "The second existing class is a stateless session bean front-end for an external system that is able to translate sentences from one language to another:"
+msgstr "第二个已有类是一个无状态的会话Bean,这个会话Bean作为一个外部系统的前端,能够将句子从一种语言翻译到另一个语言:"
 
 #. Tag: programlisting
 #: intro.xml:35
@@ -87,12 +70,16 @@
 "    public String translate(String sentence) { ... }\n"
 "}]]>"
 msgstr ""
+"<![CDATA[@Stateless\n"
+"public class SentenceTranslator implements Translator {\n"
+"    public String translate(String sentence) { ... }\n"
+"}]]>"
 
 #. Tag: para
 #: intro.xml:37
 #, no-c-format
 msgid "Where <literal>Translator</literal> is the local interface:"
-msgstr ""
+msgstr "<literal>Translator</literal>是本地接口:"
 
 #. Tag: programlisting
 #: intro.xml:39
@@ -103,14 +90,16 @@
 "    public String translate(String sentence);\n"
 "}]]>"
 msgstr ""
+"<![CDATA[@Local\n"
+"public interface Translator {\n"
+"    public String translate(String sentence);\n"
+"}]]>"
 
 #. Tag: para
 #: intro.xml:41
 #, no-c-format
-msgid ""
-"Unfortunately, we don't have a preexisting class that translates whole text "
-"documents. So let's write a Web Bean that does this job:"
-msgstr ""
+msgid "Unfortunately, we don't have a preexisting class that translates whole text documents. So let's write a Web Bean that does this job:"
+msgstr "不幸的是,我们没有Java类能够翻译整个文档。因此,让我们写一个Web Bean来做这个工作:"
 
 #. Tag: programlisting
 #: intro.xml:44
@@ -122,8 +111,7 @@
 "    private Translator sentenceTranslator;\n"
 "    \n"
 "    @Initializer\n"
-"    TextTranslator(SentenceParser sentenceParser, Translator "
-"sentenceTranslator) {\n"
+"    TextTranslator(SentenceParser sentenceParser, Translator sentenceTranslator) {\n"
 "        this.sentenceParser = sentenceParser;\n"
 "        this.sentenceTranslator = sentenceTranslator;\n"
 "    }\n"
@@ -138,14 +126,32 @@
 "    \n"
 "}]]>"
 msgstr ""
+"<![CDATA[public class TextTranslator {\n"
+"    \n"
+"    private SentenceParser sentenceParser;\n"
+"    private Translator sentenceTranslator;\n"
+"    \n"
+"    @Initializer\n"
+"    TextTranslator(SentenceParser sentenceParser, Translator sentenceTranslator) {\n"
+"        this.sentenceParser = sentenceParser;\n"
+"        this.sentenceTranslator = sentenceTranslator;\n"
+"    }\n"
+"    \n"
+"    public String translate(String text) {\n"
+"        StringBuilder sb = new StringBuilder();\n"
+"        for (String sentence: sentenceParser.parse(text)) {\n"
+"            sb.append(sentenceTranslator.translate(sentence));\n"
+"        }\n"
+"        return sb.toString();\n"
+"    }\n"
+"    \n"
+"}]]>"
 
 #. Tag: para
 #: intro.xml:46
 #, no-c-format
-msgid ""
-"We may obtain an instance of <literal>TextTranslator</literal> by injecting "
-"it into a Web Bean, Servlet or EJB:"
-msgstr ""
+msgid "We may obtain an instance of <literal>TextTranslator</literal> by injecting it into a Web Bean, Servlet or EJB:"
+msgstr "通过将其注入到一个Web Bean,Servlet或者EJB,我们能够获得一个 <literal>TextTranslator</literal>的实例:"
 
 #. Tag: programlisting
 #: intro.xml:49
@@ -156,323 +162,244 @@
 "    this.textTranslator = textTranslator;\n"
 "}]]>"
 msgstr ""
+"<![CDATA[@Initializer\n"
+"public setTextTranslator(TextTranslator textTranslator) {\n"
+"    this.textTranslator = textTranslator;\n"
+"}]]>"
 
 #. Tag: para
 #: intro.xml:51
 #, no-c-format
-msgid ""
-"Alternatively, we may obtain an instance by directly calling a method of the "
-"Web Bean manager:"
-msgstr ""
+msgid "Alternatively, we may obtain an instance by directly calling a method of the Web Bean manager:"
+msgstr "或者,我们可以直接调用Web Bean管理器的方法获得这个实例:"
 
 #. Tag: programlisting
 #: intro.xml:54
 #, no-c-format
-msgid ""
-"<![CDATA[TextTranslator tt = manager.getInstanceByType(TextTranslator."
-"class);]]>"
-msgstr ""
+msgid "<![CDATA[TextTranslator tt = manager.getInstanceByType(TextTranslator.class);]]>"
+msgstr "<![CDATA[TextTranslator tt = manager.getInstanceByType(TextTranslator.class);]]>"
 
 #. Tag: para
 #: intro.xml:56
 #, no-c-format
-msgid ""
-"But wait: <literal>TextTranslator</literal> does not have a constructor with "
-"no parameters! Is it still a Web Bean? Well, a class that does not have a "
-"constructor with no parameters can still be a Web Bean if it has a "
-"constructor annotated <literal>@Initializer</literal>."
-msgstr ""
+msgid "But wait: <literal>TextTranslator</literal> does not have a constructor with no parameters! Is it still a Web Bean? Well, a class that does not have a constructor with no parameters can still be a Web Bean if it has a constructor annotated <literal>@Initializer</literal>."
+msgstr "但是,等一下:<literal>TextTranslator</literal>并没有一个无参构造器!它仍然是一个Web Bean么?好吧,一个没有无参构造器的类依然能够成为一个Web Bean,只要你在它的一个构造器上使用<literal>@Initializer</literal>注释即可。"
 
 #. Tag: para
 #: intro.xml:61
 #, no-c-format
-msgid ""
-"As you've guessed, the <literal>@Initializer</literal> annotation has "
-"something to do with dependency injection! <literal>@Initializer</literal> "
-"may be applied to a constructor or method of a Web Bean, and tells the Web "
-"Bean manager to call that constructor or method when instantiating the Web "
-"Bean. The Web Bean manager will inject other Web Beans to the parameters of "
-"the constructor or method."
-msgstr ""
+msgid "As you've guessed, the <literal>@Initializer</literal> annotation has something to do with dependency injection! <literal>@Initializer</literal> may be applied to a constructor or method of a Web Bean, and tells the Web Bean manager to call that constructor or method when instantiating the Web Bean. The Web Bean manager will inject other Web Beans to the parameters of the constructor or method."
+msgstr "就像你猜到的一样, <literal>@Initializer</literal>注释和依赖注入有关! <literal>@Initializer</literal>可以应用到一个Web Bean的构造器或者方法上,它告诉Web Bean管理器在初始化一个Web Bean的时候去调用这个构造器或者方法。Web Beam管理器能够将其他的Web Bean注入到构造器或者方法的参数中。"
 
 #. Tag: para
 #: intro.xml:68
 #, no-c-format
-msgid ""
-"At system initialization time, the Web Bean manager must validate that "
-"exactly one Web Bean exists which satisfies each injection point. In our "
-"example, if no implementation of <literal>Translator</literal> "
-"available&#151;if the <literal>SentenceTranslator</literal> EJB was not "
-"deployed&#151;the Web Bean manager would throw an "
-"<literal>UnsatisfiedDependencyException</literal>. If more than one "
-"implementation of <literal>Translator</literal> was available, the Web Bean "
-"manager would throw an <literal>AmbiguousDependencyException</literal>."
-msgstr ""
+msgid "At system initialization time, the Web Bean manager must validate that exactly one Web Bean exists which satisfies each injection point. In our example, if no implementation of <literal>Translator</literal> available&#151;if the <literal>SentenceTranslator</literal> EJB was not deployed&#151;the Web Bean manager would throw an <literal>UnsatisfiedDependencyException</literal>. If more than one implementation of <literal>Translator</literal> was available, the Web Bean manager would throw an <literal>AmbiguousDependencyException</literal>."
+msgstr "在系统初始化的时候,Web Bean管理器必须验证只存在一个Web Bean能够满足每个注入点。在我们的例子中,如果没有<literal>Translator</literal>实现&#151;如果<literal>SentenceTranslator</literal> EJB没有被部署&#151;Web Bean管理器将会抛出一个<literal>UnsatisfiedDependencyException</literal>异常。如果多于一个<literal>Translator</literal>实现,Web Bean管理器将会抛出一个<literal>AmbiguousDependencyException</literal>异常。"
 
 #. Tag: title
 #: intro.xml:80
 #, no-c-format
 msgid "What is a Web Bean?"
-msgstr ""
+msgstr "什么是Web Bean?"
 
 #. Tag: para
 #: intro.xml:82
 #, no-c-format
 msgid "So what, <emphasis>exactly</emphasis>, is a Web Bean?"
-msgstr ""
+msgstr "那么, Web Bean<emphasis>究竟</emphasis>是什么?"
 
 #. Tag: para
 #: intro.xml:84
 #, no-c-format
-msgid ""
-"A Web Bean is an application class that contains business logic. A Web Bean "
-"may be called directly from Java code, or it may be invoked via Unified EL. "
-"A Web Bean may access transactional resources. Dependencies between Web "
-"Beans are managed automatically by the Web Bean manager. Most Web Beans are "
-"<emphasis>stateful</emphasis> and <emphasis>contextual</emphasis>. The "
-"lifecycle of a Web Bean is always managed by the Web Bean manager."
-msgstr ""
+msgid "A Web Bean is an application class that contains business logic. A Web Bean may be called directly from Java code, or it may be invoked via Unified EL. A Web Bean may access transactional resources. Dependencies between Web Beans are managed automatically by the Web Bean manager. Most Web Beans are <emphasis>stateful</emphasis> and <emphasis>contextual</emphasis>. The lifecycle of a Web Bean is always managed by the Web Bean manager."
+msgstr "一个Web Bean是一个包含业务逻辑的应用类。一个Web Bean能够从Java代码中直接调用,也可以通过统一表达语言调用。一个Web Bean可以访问事务性的资源。Web Bean之间的依赖通过Web Bean管理器自动管理。大部分Web Bean是具有 <emphasis>状态</emphasis>和<emphasis>上下文</emphasis>的。Web Bean的生命周期总是通过Web Bean管理器进行管理。"
 
 #. Tag: para
 #: intro.xml:91
 #, no-c-format
-msgid ""
-"Let's back up a second. What does it really mean to be \"contextual\"? Since "
-"Web Beans may be stateful, it matters <emphasis>which</emphasis> bean "
-"instance I have. Unlike a stateless component model (for example, stateless "
-"session beans) or a singleton component model (such as servlets, or "
-"singleton beans), different clients of a Web Bean see the Web Bean in "
-"different states. The client-visible state depends upon which instance of "
-"the Web Bean the client has a reference to."
-msgstr ""
+msgid "Let's back up a second. What does it really mean to be \"contextual\"? Since Web Beans may be stateful, it matters <emphasis>which</emphasis> bean instance I have. Unlike a stateless component model (for example, stateless session beans) or a singleton component model (such as servlets, or singleton beans), different clients of a Web Bean see the Web Bean in different states. The client-visible state depends upon which instance of the Web Bean the client has a reference to."
+msgstr "让我们后退一步。\"上下文\"究竟意味着什么?既然Web Beans可以是有状态的,那它关系到我到底拥有<emphasis>哪个</emphasis>Bean实例。和无状态组件模型(例如无状态的会话Bean)或者一个单例模型组件(例如Servlet或者单例Bean)不同,一个Web Bean的不同客户端看到的Web Bean的状态是不同的。客户端所见的状态取决于这个客户端拥有的是哪一个Web Bean实例的引用。"
 
 #. Tag: para
 #: intro.xml:98
 #, no-c-format
-msgid ""
-"However, like a stateless or singleton model, but <emphasis>unlike</"
-"emphasis> stateful session beans, the client does not control the lifecycle "
-"of the instance by explicitly creating and destroying it. Instead, the "
-"<emphasis>scope</emphasis> of the Web Bean determines:"
-msgstr ""
+msgid "However, like a stateless or singleton model, but <emphasis>unlike</emphasis> stateful session beans, the client does not control the lifecycle of the instance by explicitly creating and destroying it. Instead, the <emphasis>scope</emphasis> of the Web Bean determines:"
+msgstr "然而,Web Bean像无状态或者单例模型那样,却和有状态的会话Bean<emphasis>不同</emphasis>,客户端无法通过显式地创建或者销毁它来控制实例的生命周期。取而代之,Web Bean的<emphasis>范围</emphasis>决定了:"
 
 #. Tag: para
 #: intro.xml:105
 #, no-c-format
 msgid "the lifecycle of each instance of the Web Bean and"
-msgstr ""
+msgstr "每个Web Bean实例的生命周期,以及"
 
 #. Tag: para
 #: intro.xml:108
 #, no-c-format
-msgid ""
-"which clients share a reference to a particular instance of the Web Bean."
-msgstr ""
+msgid "which clients share a reference to a particular instance of the Web Bean."
+msgstr "哪些客户端共享Web Bean特定实例的一个引用。"
 
 #. Tag: para
 #: intro.xml:113
 #, no-c-format
-msgid ""
-"For a given thread in a Web Beans application, there may be an "
-"<emphasis>active context</emphasis> associated with the scope of the Web "
-"Bean. This context may be unique to the thread (for example, if the Web Bean "
-"is request scoped), or it may be shared with certain other threads (for "
-"example, if the Web Bean is session scoped) or even all other threads (if it "
-"is application scoped)."
-msgstr ""
+msgid "For a given thread in a Web Beans application, there may be an <emphasis>active context</emphasis> associated with the scope of the Web Bean. This context may be unique to the thread (for example, if the Web Bean is request scoped), or it may be shared with certain other threads (for example, if the Web Bean is session scoped) or even all other threads (if it is application scoped)."
+msgstr "给定一个Web Bean应用的线程,将可能有一个<emphasis>激活的上下文</emphasis>和Web Bean的范围关联。这个上下文可能对于该线程是唯一的(例如,如果这个Web Bean是请求范围的),或者这个上下文可能被某些其他线程共享(例如,如果这个Web Bean是会话范围的),这个上下文甚至可以被所有线程共享(例如,这个Web Bean是应用范围的)。"
 
 #. Tag: para
 #: intro.xml:119
 #, no-c-format
-msgid ""
-"Clients (for example, other Web Beans) executing in the same context will "
-"see the same instance of the Web Bean. But clients in a different context "
-"will see a different instance."
-msgstr ""
+msgid "Clients (for example, other Web Beans) executing in the same context will see the same instance of the Web Bean. But clients in a different context will see a different instance."
+msgstr "在同一个上下文中执行的客户端(例如,其他的Web Bean)看到的是同一个Web Bean的实例。但是不同的上下文中的客户端看到的是不同的实例。"
 
 #. Tag: para
 #: intro.xml:123
 #, no-c-format
-msgid ""
-"One great advantage of the contextual model is that it allows stateful Web "
-"Beans to be treated like services! The client need not concern itself with "
-"managing the lifecycle of the Web Bean it is using, <emphasis>nor does it "
-"even need to know what that lifecyle is.</emphasis> Web Beans interact by "
-"passing messages, and the Web Bean implementations define the lifecycle of "
-"their own state. The Web Beans are loosely coupled because:"
-msgstr ""
+msgid "One great advantage of the contextual model is that it allows stateful Web Beans to be treated like services! The client need not concern itself with managing the lifecycle of the Web Bean it is using, <emphasis>nor does it even need to know what that lifecyle is.</emphasis> Web Beans interact by passing messages, and the Web Bean implementations define the lifecycle of their own state. The Web Beans are loosely coupled because:"
+msgstr "具备上下文的模型带来的一个巨大优点是它允许有状态的Web Bean可以像服务一样使用!客户端不需要关注本身以及它使用的Web Bean的生命周期,<emphasis>甚至它根本不需要知道生命周期是什么</emphasis>。Web Bean通过传递消息来交互,Web Bean的实现定义了他们自己状态的生命周期。Web Bean是松耦合的,因为:"
 
 #. Tag: para
 #: intro.xml:132
 #, no-c-format
 msgid "they interact via well-defined public APIs"
-msgstr ""
+msgstr "它们通过定义良好的公共接口交互"
 
 #. Tag: para
 #: intro.xml:135
 #, no-c-format
 msgid "their lifecycles are completely decoupled"
-msgstr ""
+msgstr "它们的生命周期是完全解耦的"
 
 #. Tag: para
 #: intro.xml:139
 #, no-c-format
-msgid ""
-"We can replace one Web Bean with a different Web Bean that implements the "
-"same API and has a different lifecycle (a different scope) without affecting "
-"the other Web Bean implementation. In fact, Web Beans defines a "
-"sophisticated facility for overriding Web Bean implementations at deployment "
-"time, as we will see in <xref linkend=\"deploymenttypes\"/>."
-msgstr ""
+msgid "We can replace one Web Bean with a different Web Bean that implements the same API and has a different lifecycle (a different scope) without affecting the other Web Bean implementation. In fact, Web Beans defines a sophisticated facility for overriding Web Bean implementations at deployment time, as we will see in <xref linkend=\"deploymenttypes\"/>."
+msgstr "我们能够使用一个实现相同接口,具有不同生命周期(一个不同的范围)的Web Bean替换一个Web Bean而不会影响其他的Web Bean实现。实际上,Web Bean定义了一个复杂的机制能够在部署时覆盖Web Bean的实现,我们将在<xref linkend=\"deploymenttypes\"/>一章阐述。"
 
 #. Tag: para
 #: intro.xml:145
 #, no-c-format
-msgid ""
-"Note that not all clients of a Web Bean are Web Beans. Other objects such as "
-"Servlets or Message-Driven Beans&#151;which are by nature not injectable, "
-"contextual objects&#151;may also obtain references to Web Beans by injection."
-msgstr ""
+msgid "Note that not all clients of a Web Bean are Web Beans. Other objects such as Servlets or Message-Driven Beans&#151;which are by nature not injectable, contextual objects&#151;may also obtain references to Web Beans by injection."
+msgstr "需要注意的是并非所有的Web Bean的客户端都是Web Bean。其他对象诸如Servlet或者消息驱动Bean#151;天生不可注入的, 具备上下文的对象&#151;也可以通过注入获得Web Bean的引用。"
 
 #. Tag: para
 #: intro.xml:149
 #, no-c-format
 msgid "Enough hand-waving. More formally, according to the spec:"
-msgstr ""
+msgstr "讨论的够多了。我们看些更正式些的,依据规范:"
 
 #. Tag: para
 #: intro.xml:153
 #, no-c-format
 msgid "A Web Bean comprises:"
-msgstr ""
+msgstr "一个Web Bean包括:"
 
 #. Tag: para
 #: intro.xml:156
 #, no-c-format
 msgid "A (nonempty) set of API types"
-msgstr ""
+msgstr "一套(非空)API类型"
 
 #. Tag: para
 #: intro.xml:157
 #, no-c-format
 msgid "A (nonempty) set of binding annotation types"
-msgstr ""
+msgstr "一套(非空)绑定注释类型"
 
 #. Tag: para
 #: intro.xml:158
 #, no-c-format
 msgid "A scope"
-msgstr ""
+msgstr "一个范围"
 
 #. Tag: para
 #: intro.xml:159
 #, no-c-format
 msgid "A deployment type"
-msgstr ""
+msgstr "一个部署类型"
 
 #. Tag: para
 #: intro.xml:160
 #, no-c-format
 msgid "Optionally, a Web Bean name"
-msgstr ""
+msgstr "可选的,一个Web Bean的名字"
 
 #. Tag: para
 #: intro.xml:161
 #, no-c-format
 msgid "A set of interceptor binding types"
-msgstr ""
+msgstr "一套拦截器绑定类型"
 
 #. Tag: para
 #: intro.xml:162
 #, no-c-format
 msgid "A Web Bean implementation"
-msgstr ""
+msgstr "一个Web Bean实现"
 
 #. Tag: para
 #: intro.xml:167
 #, no-c-format
 msgid "Let's see what some of these terms mean, to the Web Bean developer."
-msgstr ""
+msgstr "让我们看看这些术语对于Web Bean的开发者都意味着什么。"
 
 #. Tag: title
 #: intro.xml:170
 #, no-c-format
 msgid "API types, binding types and dependency injection"
-msgstr ""
+msgstr "API类型,绑定类型和依赖注入"
 
 #. Tag: para
 #: intro.xml:172
 #, no-c-format
-msgid ""
-"Web Beans usually acquire references to other Web Beans via dependency "
-"injection. Any injected attribute specifies a \"contract\" that must be "
-"satisfied by the Web Bean to be injected. The contract is:"
-msgstr ""
+msgid "Web Beans usually acquire references to other Web Beans via dependency injection. Any injected attribute specifies a \"contract\" that must be satisfied by the Web Bean to be injected. The contract is:"
+msgstr "Web Bean通常通过依赖注入获得其他Web Bean的引用。任何注入的属性都要指定一个\"合约\",这个合约必须满足注入的Web Bean的要求。这个合约是:"
 
 #. Tag: para
 #: intro.xml:177
 #, no-c-format
 msgid "an API type, together with"
-msgstr ""
+msgstr "一个API类型,和"
 
 #. Tag: para
 #: intro.xml:178
 #, no-c-format
 msgid "a set of binding types."
-msgstr ""
+msgstr "一套绑定类型"
 
 #. Tag: para
 #: intro.xml:181
 #, no-c-format
-msgid ""
-"An API is a user-defined class or interface. (If the Web Bean is an EJB "
-"session bean, the API type is the <literal>@Local</literal> interface or "
-"bean-class local view). A binding type represents some client-visible "
-"semantic that is satisfied by some implementations of the API and not by "
-"others."
-msgstr ""
+msgid "An API is a user-defined class or interface. (If the Web Bean is an EJB session bean, the API type is the <literal>@Local</literal> interface or bean-class local view). A binding type represents some client-visible semantic that is satisfied by some implementations of the API and not by others."
+msgstr "一个API指的是用户定义的类或者接口。(如果Web Bean是一个EJB会话Bean,API类型是 <literal>@Local</literal> 接口或者Bean类的本地视图)。一个绑定类型表示某个客户端可见的语义,这个语义由API的某个实现而不是其他实现来满足。"
 
 #. Tag: para
 #: intro.xml:186
 #, no-c-format
-msgid ""
-"Binding types are represented by user-defined annotations that are "
-"themselves annotated <literal>@BindingType</literal>. For example, the "
-"following injection point has API type <literal>PaymentProcessor</literal> "
-"and binding type <literal>@CreditCard</literal>:"
-msgstr ""
+msgid "Binding types are represented by user-defined annotations that are themselves annotated <literal>@BindingType</literal>. For example, the following injection point has API type <literal>PaymentProcessor</literal> and binding type <literal>@CreditCard</literal>:"
+msgstr "绑定类型通过用户定义的注释来表现,这些注释自己需要通过<literal>@BindingType</literal>来注释。例如,下面的注入点有一个API类型 <literal>PaymentProcessor</literal>和绑定类型<literal>@CreditCard</literal>:"
 
 #. Tag: programlisting
 #: intro.xml:191
 #, no-c-format
 msgid "<![CDATA[@CreditCard PaymentProcessor paymentProcessor]]>"
-msgstr ""
+msgstr "<![CDATA[@CreditCard PaymentProcessor paymentProcessor]]>"
 
 #. Tag: para
 #: intro.xml:193
 #, no-c-format
-msgid ""
-"If no binding type is explicitly specified at an injection point, the "
-"default binding type <literal>@Current</literal> is assumed."
-msgstr ""
+msgid "If no binding type is explicitly specified at an injection point, the default binding type <literal>@Current</literal> is assumed."
+msgstr "如果在一个注入点没有显式的指定一个绑定类型,那么默认的绑定类型是<literal>@Current</literal>。"
 
 #. Tag: para
 #: intro.xml:196
 #, no-c-format
-msgid ""
-"For each injection point, the Web Bean manager searches for a Web Bean which "
-"satisfies the contract (implements the API, and has all the binding types), "
-"and injects that Web Bean."
-msgstr ""
+msgid "For each injection point, the Web Bean manager searches for a Web Bean which satisfies the contract (implements the API, and has all the binding types), and injects that Web Bean."
+msgstr "对于每个注入点,Web Bean管理器都会搜索满足合约的Web Bean(实现了API并且拥有所有的绑定类型),然后将这个Web Bean注入。"
 
 #. Tag: para
 #: intro.xml:200
 #, no-c-format
-msgid ""
-"The following Web Bean has the binding type <literal>@CreditCard</literal> "
-"and implements the API type <literal>PaymentProcessor</literal>. It could "
-"therefore be injected to the example injection point:"
-msgstr ""
+msgid "The following Web Bean has the binding type <literal>@CreditCard</literal> and implements the API type <literal>PaymentProcessor</literal>. It could therefore be injected to the example injection point:"
+msgstr "下面的Web Bean拥有一个绑定类型<literal>@CreditCard</literal>,并且实现了API类型<literal>PaymentProcessor</literal>。因此,这个Web Bean可以被注入到这个例子的注入点中:"
 
 #. Tag: programlisting
 #: intro.xml:204
@@ -482,62 +409,45 @@
 "public class CreditCardPaymentProcessor \n"
 "    implements PaymentProcessor { ... }]]>"
 msgstr ""
+"<![CDATA[@CreditCard\n"
+"public class CreditCardPaymentProcessor \n"
+"    implements PaymentProcessor { ... }]]>"
 
 #. Tag: para
 #: intro.xml:206
 #, no-c-format
-msgid ""
-"If a Web Bean does not explicitly specify a set of binding types, it has "
-"exactly one binding type: the default binding type <literal>@Current</"
-"literal>."
-msgstr ""
+msgid "If a Web Bean does not explicitly specify a set of binding types, it has exactly one binding type: the default binding type <literal>@Current</literal>."
+msgstr "如果一个Web Bean没有显式的指定一套绑定类型,它将只有一个绑定类型:默认的绑定类型<literal>@Current</literal>。"
 
 #. Tag: para
 #: intro.xml:209
 #, no-c-format
-msgid ""
-"Web Beans defines a sophisticated but intuitive <emphasis>resolution "
-"algorithm</emphasis> that helps the container decide what to do if there is "
-"more than one Web Bean that satisfies a particular contract. We'll get into "
-"the details in <xref linkend=\"injection\"/>."
-msgstr ""
+msgid "Web Beans defines a sophisticated but intuitive <emphasis>resolution algorithm</emphasis> that helps the container decide what to do if there is more than one Web Bean that satisfies a particular contract. We'll get into the details in <xref linkend=\"injection\"/>."
+msgstr "Web Bean定义了一个复杂但是很直观的<emphasis>解析算法</emphasis>来帮助容器确定如何处理多个Web Bean满足特定合约的情况。我们将在 <xref linkend=\"injection\"/>一章中详述。"
 
 #. Tag: title
 #: intro.xml:217
 #, no-c-format
 msgid "Deployment types"
-msgstr ""
+msgstr "部署类型"
 
 #. Tag: para
 #: intro.xml:219
 #, no-c-format
-msgid ""
-"<emphasis>Deployment types</emphasis> let us classify our Web Beans by "
-"deployment scenario. A deployment type is an annotation that represents a "
-"particular deployment scenario, for example <literal>@Mock</literal>, "
-"<literal>@Staging</literal> or <literal>@AustralianTaxLaw</literal>. We "
-"apply the annotation to Web Beans which should be deployed in that scenario. "
-"A deployment type allows a whole set of Web Beans to be conditionally "
-"deployed, with a just single line of configuration."
-msgstr ""
+msgid "<emphasis>Deployment types</emphasis> let us classify our Web Beans by deployment scenario. A deployment type is an annotation that represents a particular deployment scenario, for example <literal>@Mock</literal>, <literal>@Staging</literal> or <literal>@AustralianTaxLaw</literal>. We apply the annotation to Web Beans which should be deployed in that scenario. A deployment type allows a whole set of Web Beans to be conditionally deployed, with a just single line of configuration."
+msgstr "<emphasis>部署类型</emphasis>能够让我们根据部署场景来划分我们的Web Bean。一个部署类型是一个注释,这个注释代表了一种特定的部署场景,例如<literal>@Mock</literal>,<literal>@Staging</literal>或者<literal>@AustralianTaxLaw</literal>。我们通过这些注释来决定哪些Web Bean部署在哪些场景中。一个部署类型允许我们只使用一行配置就可以对一整套Web Bean进行条件化的部署。"
 
 #. Tag: para
 #: intro.xml:226
 #, no-c-format
-msgid ""
-"Many Web Beans just use the default deployment type <literal>@Production</"
-"literal>, in which case no deployment type need be explicitly specified. All "
-"three Web Bean in our example have the deployment type <literal>@Production</"
-"literal>."
-msgstr ""
+msgid "Many Web Beans just use the default deployment type <literal>@Production</literal>, in which case no deployment type need be explicitly specified. All three Web Bean in our example have the deployment type <literal>@Production</literal>."
+msgstr "很多Web Bean只使用默认的部署类型<literal>@Production</literal>。在这种情况下,不需要显式的指定部署类型。在我们的例子中的三个Web Bean都拥有部署类型<literal>@Production</literal>。"
 
 #. Tag: para
 #: intro.xml:230
 #, no-c-format
-msgid ""
-"In a testing environment, we might want to replace the "
-"<literal>SentenceTranslator</literal> Web Bean with a \"mock object\":"
-msgstr ""
+msgid "In a testing environment, we might want to replace the <literal>SentenceTranslator</literal> Web Bean with a \"mock object\":"
+msgstr "在一个测试环境中,我们有可能将<literal>SentenceTranslator</literal> Web Bean替换为一个\"模拟对象\":"
 
 #. Tag: programlisting
 #: intro.xml:233
@@ -550,48 +460,42 @@
 "    }\n"
 "}]]>"
 msgstr ""
+"<![CDATA[@Mock\n"
+"public class MockSentenceTranslator implements Translator {\n"
+"    public String translate(String sentence) {\n"
+"        return \"Lorem ipsum dolor sit amet\";\n"
+"    }\n"
+"}]]>"
 
 #. Tag: para
 #: intro.xml:236
 #, no-c-format
-msgid ""
-"We would enable the deployment type <literal>@Mock</literal> in our testing "
-"environment, to indicate that <literal>MockSentenceTranslator</literal> and "
-"any other Web Bean annotated <literal>@Mock</literal> should be used."
-msgstr ""
+msgid "We would enable the deployment type <literal>@Mock</literal> in our testing environment, to indicate that <literal>MockSentenceTranslator</literal> and any other Web Bean annotated <literal>@Mock</literal> should be used."
+msgstr "我们需要在测试环境中激活部署类型<literal>@Mock</literal>,这时应用会使用 <literal>MockSentenceTranslator</literal>或者其他拥有<literal>@Mock</literal>注释的Web Bean。"
 
 #. Tag: para
 #: intro.xml:240
 #, no-c-format
-msgid ""
-"We'll talk more about this unique and powerful feature in <xref linkend="
-"\"deploymenttypes\"/>."
-msgstr ""
+msgid "We'll talk more about this unique and powerful feature in <xref linkend=\"deploymenttypes\"/>."
+msgstr "我们将在<xref linkend=\"deploymenttypes\"/>一章中详述这个独特而强大的特性。"
 
 #. Tag: title
 #: intro.xml:246
 #, no-c-format
 msgid "Scope"
-msgstr ""
+msgstr "范围"
 
 #. Tag: para
 #: intro.xml:248
 #, no-c-format
-msgid ""
-"The <emphasis>scope</emphasis> defines the lifecycle and visibility of "
-"instances of the Web Bean. The Web Beans context model is extensible, "
-"accommodating arbitrary scopes. However, certain important scopes are built-"
-"in to the specification, and provided by the Web Bean manager. A scope is "
-"represented by an annotation type."
-msgstr ""
+msgid "The <emphasis>scope</emphasis> defines the lifecycle and visibility of instances of the Web Bean. The Web Beans context model is extensible, accommodating arbitrary scopes. However, certain important scopes are built-in to the specification, and provided by the Web Bean manager. A scope is represented by an annotation type."
+msgstr " <emphasis>范围</emphasis>定义了一个Web Bean实例的生命周期和可见度。Web Bean的上下文模型是可扩展的,可以适应任意范围。不过某些特定的重要的范围已经内置于规范中了,由Web Bean管理器提供这些范围。一个范围也是通过注释类型来表示的。"
 
 #. Tag: para
 #: intro.xml:254
 #, no-c-format
-msgid ""
-"For example, any web application may have <emphasis>session scoped</"
-"emphasis> Web Beans:"
-msgstr ""
+msgid "For example, any web application may have <emphasis>session scoped</emphasis> Web Beans:"
+msgstr "例如,任何一个Web应用都可能拥有 <emphasis>会话范围</emphasis>的Web Bean:"
 
 #. Tag: programlisting
 #: intro.xml:257
@@ -600,44 +504,38 @@
 "<![CDATA[@SessionScoped\n"
 "public class ShoppingCart { ... }]]>"
 msgstr ""
+"<![CDATA[@SessionScoped\n"
+"public class ShoppingCart { ... }]]>"
 
 #. Tag: para
 #: intro.xml:259
 #, no-c-format
-msgid ""
-"An instance of a session scoped Web Bean is bound to a user session and is "
-"shared by all requests that execute in the context of that session."
-msgstr ""
+msgid "An instance of a session scoped Web Bean is bound to a user session and is shared by all requests that execute in the context of that session."
+msgstr "一个会话范围的Web Bean实例将绑定到用户会话中,它被这个会话上下文中的所有请求共享。"
 
 #. Tag: para
 #: intro.xml:262
 #, no-c-format
-msgid ""
-"By default, Web Beans belong to a special scope called the "
-"<emphasis>dependent pseudo-scope</emphasis>. Web Beans with this scope are "
-"pure dependent objects of the object into which they are injected, and their "
-"lifecycle is bound to the lifecycle of that object."
-msgstr ""
+msgid "By default, Web Beans belong to a special scope called the <emphasis>dependent pseudo-scope</emphasis>. Web Beans with this scope are pure dependent objects of the object into which they are injected, and their lifecycle is bound to the lifecycle of that object."
+msgstr "默认情况下,Web Bean属于一个名为<emphasis>依赖伪范围</emphasis>的特殊范围。拥有这个范围的Web Bean的范围取决于其所注入的对象的范围,它的生命周期和所注入的对象的生命周期绑定在一起。"
 
 #. Tag: para
 #: intro.xml:267
 #, no-c-format
 msgid "We'll talk more about scopes in <xref linkend=\"scopescontexts\"/>."
-msgstr ""
+msgstr "我们将在<xref linkend=\"scopescontexts\"/>一章中详述范围。"
 
 #. Tag: title
 #: intro.xml:272
 #, no-c-format
 msgid "Web Bean names and Unified EL"
-msgstr ""
+msgstr "Web Bean的名字和统一表达式语言"
 
 #. Tag: para
 #: intro.xml:274
 #, no-c-format
-msgid ""
-"A Web Bean may have a <emphasis>name</emphasis>, allowing it to be used in "
-"Unified EL expressions. It's easy to specify the name of a Web Bean:"
-msgstr ""
+msgid "A Web Bean may have a <emphasis>name</emphasis>, allowing it to be used in Unified EL expressions. It's easy to specify the name of a Web Bean:"
+msgstr "一个Web Bean可能有一个<emphasis>名字</emphasis>,通过名字,Web Bean可以在统一表达式语言中使用。为Web Bean指定一个名字非常简单:"
 
 #. Tag: programlisting
 #: intro.xml:278
@@ -646,12 +544,14 @@
 "<![CDATA[@SessionScoped @Named(\"cart\")\n"
 "public class ShoppingCart { ... }]]>"
 msgstr ""
+"<![CDATA[@SessionScoped @Named(\"cart\")\n"
+"public class ShoppingCart { ... }]]>"
 
 #. Tag: para
 #: intro.xml:280
 #, no-c-format
 msgid "Now we can easily use the Web Bean in any JSF or JSP page:"
-msgstr ""
+msgstr "现在我们可以轻松地在任何JSF或者JSP页面中使用这个Web Bean:"
 
 #. Tag: programlisting
 #: intro.xml:282
@@ -661,13 +561,15 @@
 "    ....\n"
 "</h:dataTable>]]>"
 msgstr ""
+"<![CDATA[<h:dataTable value=\"#{cart.lineItems}\" var=\"item\">\n"
+"    ....\n"
+"</h:dataTable>]]>"
 
 #. Tag: para
 #: intro.xml:284
 #, no-c-format
-msgid ""
-"It's even easier to just let the name be defaulted by the Web Bean manager:"
-msgstr ""
+msgid "It's even easier to just let the name be defaulted by the Web Bean manager:"
+msgstr "甚至我们可以让Web Bean管理器来给Web Bean指定默认的名字:"
 
 #. Tag: programlisting
 #: intro.xml:287
@@ -676,38 +578,32 @@
 "<![CDATA[@SessionScoped @Named\n"
 "public class ShoppingCart { ... }]]>"
 msgstr ""
+"<![CDATA[@SessionScoped @Named\n"
+"public class ShoppingCart { ... }]]>"
 
 #. Tag: para
 #: intro.xml:289
 #, no-c-format
-msgid ""
-"In this case, the name defaults to <literal>shoppingCart</literal>&#151;the "
-"unqualified class name, with the first character changed to lowercase."
-msgstr ""
+msgid "In this case, the name defaults to <literal>shoppingCart</literal>&#151;the unqualified class name, with the first character changed to lowercase."
+msgstr "在这种情况下,Web Bean的名字默认为<literal>shoppingCart</literal>&#151;非完整的类名,首字母改为小写"
 
 #. Tag: title
 #: intro.xml:295
 #, no-c-format
 msgid "Interceptor binding types"
-msgstr ""
+msgstr "拦截器绑定类型"
 
 #. Tag: para
 #: intro.xml:297
 #, no-c-format
-msgid ""
-"Web Beans supports the interceptor functionality defined by EJB 3, not only "
-"for EJB beans, but also for plain Java classes. In addition, Web Beans "
-"provides a new approach to binding interceptors to EJB beans and other Web "
-"Beans."
-msgstr ""
+msgid "Web Beans supports the interceptor functionality defined by EJB 3, not only for EJB beans, but also for plain Java classes. In addition, Web Beans provides a new approach to binding interceptors to EJB beans and other Web Beans."
+msgstr "Web Bean支持EJB3定义的拦截器功能,Web Bean将其扩展,使得POJO也具备该功能。另外,Web Bean提供一个新的方式来将拦截器绑定到EJB Bean和其他Web Bean上。"
 
 #. Tag: para
 #: intro.xml:302
 #, no-c-format
-msgid ""
-"It remains possible to directly specify the interceptor class via use of the "
-"<literal>@Interceptors</literal> annotation:"
-msgstr ""
+msgid "It remains possible to directly specify the interceptor class via use of the <literal>@Interceptors</literal> annotation:"
+msgstr "可以通过<literal>@Interceptors</literal> 注释直接指定拦截器类:"
 
 #. Tag: programlisting
 #: intro.xml:305
@@ -717,14 +613,15 @@
 "@Interceptors(TransactionInterceptor.class)\n"
 "public class ShoppingCart { ... }]]>"
 msgstr ""
+"<![CDATA[@SessionScoped \n"
+"@Interceptors(TransactionInterceptor.class)\n"
+"public class ShoppingCart { ... }]]>"
 
 #. Tag: para
 #: intro.xml:307
 #, no-c-format
-msgid ""
-"However, it is more elegant, and better practice, to indirect the "
-"interceptor binding through an <emphasis>interceptor binding type</emphasis>:"
-msgstr ""
+msgid "However, it is more elegant, and better practice, to indirect the interceptor binding through an <emphasis>interceptor binding type</emphasis>:"
+msgstr "然而,更优雅的方式或者更佳的实践是通过<emphasis>拦截器绑定类型</emphasis>来间接地绑定拦截器:"
 
 #. Tag: programlisting
 #: intro.xml:311
@@ -733,124 +630,98 @@
 "<![CDATA[@SessionScoped @Transactional\n"
 "public class ShoppingCart { ... }]]>"
 msgstr ""
+"<![CDATA[@SessionScoped @Transactional\n"
+"public class ShoppingCart { ... }]]>"
 
 #. Tag: para
 #: intro.xml:313
 #, no-c-format
-msgid ""
-"We'll discuss Web Beans interceptors and decorators in <xref linkend="
-"\"interceptors\"/> and <xref linkend=\"decorators\"/>."
-msgstr ""
+msgid "We'll discuss Web Beans interceptors and decorators in <xref linkend=\"interceptors\"/> and <xref linkend=\"decorators\"/>."
+msgstr "我们将在<xref linkend=\"interceptors\"/>和<xref linkend=\"decorators\"/>两章分别讨论Web Bean拦截器和装饰器。"
 
 #. Tag: title
 #: intro.xml:321
 #, no-c-format
 msgid "What kinds of objects can be Web Beans?"
-msgstr ""
+msgstr "什么样的对象能够称为Web Bean?"
 
 #. Tag: para
 #: intro.xml:323
 #, no-c-format
-msgid ""
-"We've already seen that JavaBeans, EJBs and some other Java classes can be "
-"Web Beans. But exactly what kinds of objects are Web Beans?"
-msgstr ""
+msgid "We've already seen that JavaBeans, EJBs and some other Java classes can be Web Beans. But exactly what kinds of objects are Web Beans?"
+msgstr "我们已经看到,JavaBean, EJB和其他Java类都可以成为Web Bean。但是,确切地说,什么样的对象能够称为Web Bean?"
 
 #. Tag: title
 #: intro.xml:327
 #, no-c-format
 msgid "Simple Web Beans"
-msgstr ""
+msgstr "简单的Web Bean"
 
 #. Tag: para
 #: intro.xml:329
 #, no-c-format
-msgid ""
-"The Web Beans specification says that a concrete Java class is a "
-"<emphasis>simple</emphasis> Web Bean if:"
-msgstr ""
+msgid "The Web Beans specification says that a concrete Java class is a <emphasis>simple</emphasis> Web Bean if:"
+msgstr "Web Bean规范声称一个具体的Java类可以成为一个<emphasis>简单</emphasis>的Web Bean, 只要这个类:"
 
 #. Tag: para
 #: intro.xml:334
 #, no-c-format
-msgid ""
-"it is not an EE container-managed component, like an EJB, a Servlet or a JPA "
-"entity,"
-msgstr ""
+msgid "it is not an EE container-managed component, like an EJB, a Servlet or a JPA entity,"
+msgstr "它不是一个EE容器管理的组件,例如一个EJB,一个Servlet或者一个JPA实体,"
 
 #. Tag: para
 #: intro.xml:338
 #, no-c-format
 msgid "it is not a non-static static inner class,"
-msgstr ""
+msgstr "她不是一个非静态的静态内嵌类,"
 
 #. Tag: para
 #: intro.xml:341
 #, no-c-format
 msgid "it is not a parameterized type, and"
-msgstr ""
+msgstr "它不是一个参数化类型,并且"
 
 #. Tag: para
 #: intro.xml:344
 #, no-c-format
-msgid ""
-"it has a constructor with no parameters, or a constructor annotated "
-"<literal>@Initializer</literal>."
-msgstr ""
+msgid "it has a constructor with no parameters, or a constructor annotated <literal>@Initializer</literal>."
+msgstr "它拥有一个无参构造器,或者构造器具有<literal>@Initializer</literal>注释。"
 
 #. Tag: para
 #: intro.xml:349
 #, no-c-format
 msgid "Thus, almost every JavaBean is a simple Web Bean."
-msgstr ""
+msgstr "这样,几乎所有的JavaBean都可以是一个简单的Web Bean。"
 
 #. Tag: para
 #: intro.xml:351
 #, no-c-format
-msgid ""
-"Every interface implemented directly or indirectly by a simple Web Bean is "
-"an API type of the simple Web Bean. The class and its superclasses are also "
-"API types."
-msgstr ""
+msgid "Every interface implemented directly or indirectly by a simple Web Bean is an API type of the simple Web Bean. The class and its superclasses are also API types."
+msgstr "每个被简单Web Bean直接或者间接实现的接口都是这个简单Web Bean的一个API类型。这个类和它的超类也是API类型。"
 
 #. Tag: title
 #: intro.xml:358
 #, no-c-format
 msgid "Enterprise Web Beans"
-msgstr ""
+msgstr "企业级Web Bean"
 
 #. Tag: para
 #: intro.xml:360
 #, no-c-format
-msgid ""
-"The specification says that all EJB 3-style session and singleton beans are "
-"<emphasis>enterprise</emphasis> Web Beans. Message driven beans are not Web "
-"Beans&#151;since they are not intended to be injected into other "
-"objects&#151;but they can take advantage of most of the functionality of Web "
-"Beans, including dependency injection and interceptors."
-msgstr ""
+msgid "The specification says that all EJB 3-style session and singleton beans are <emphasis>enterprise</emphasis> Web Beans. Message driven beans are not Web Beans&#151;since they are not intended to be injected into other objects&#151;but they can take advantage of most of the functionality of Web Beans, including dependency injection and interceptors."
+msgstr "规范指出所有EJB3类型的会话Bean或者单例Bean都是<emphasis>企业级</emphasis>Web Bean。消息驱动Bean不是Web Beans&#151;因为它们不能被注入到其他对象中#151;但是它们可以使用大部分Web Bean的功能,包括依赖注入和拦截器。"
 
 #. Tag: para
 #: intro.xml:366
 #, no-c-format
-msgid ""
-"Every local interface of an enterprise Web Bean that does not have a "
-"wildcard type parameter or type variable, and every one of its "
-"superinterfaces, is an API type of the enterprise Web Bean. If the EJB bean "
-"has a bean class local view, the bean class, and every one of its "
-"superclasses, is also an API type."
-msgstr ""
+msgid "Every local interface of an enterprise Web Bean that does not have a wildcard type parameter or type variable, and every one of its superinterfaces, is an API type of the enterprise Web Bean. If the EJB bean has a bean class local view, the bean class, and every one of its superclasses, is also an API type."
+msgstr "一个企业级Web Bean的本地接口,只要没有一个通配类型参数或者类型变量,它都是这个企业级Web Bean的API类型,该接口的每个父接口也都是这个企业级Web Bean的API类型。如果EJB Bean有一个Bean类的本地视图,这个Bean类和它的每个父类也是一个API类型。"
 
 #. Tag: para
 #: intro.xml:372
 #, no-c-format
-msgid ""
-"Stateful session beans should declare a remove method with no parameters or "
-"a remove method annotated <literal>@Destructor</literal>. The Web Bean "
-"manager calls this method to destroy the stateful session bean instance at "
-"the end of its lifecycle. This method is called the <emphasis>destructor</"
-"emphasis> method of the enterprise Web Bean."
-msgstr ""
+msgid "Stateful session beans should declare a remove method with no parameters or a remove method annotated <literal>@Destructor</literal>. The Web Bean manager calls this method to destroy the stateful session bean instance at the end of its lifecycle. This method is called the <emphasis>destructor</emphasis> method of the enterprise Web Bean."
+msgstr "有状态的会话Bean应该声明一个无参的删除方法或者一个拥有<literal>@Destructor</literal>注释的删除方法。Web Bean管理器将在这个有状态会话Bean实例的生命周期结束时调用这个方法。这个方法被称为企业级Web Bean的<emphasis>销毁</emphasis>方法。"
 
 #. Tag: programlisting
 #: intro.xml:378
@@ -866,111 +737,93 @@
 "\n"
 "}]]>"
 msgstr ""
+"<![CDATA[@Stateful @SessionScoped\n"
+"public class ShoppingCart {\n"
+"\n"
+"    ...\n"
+"    \n"
+"    @Remove\n"
+"    public void destroy() {}\n"
+"\n"
+"}]]>"
 
 #. Tag: para
 #: intro.xml:380
 #, no-c-format
-msgid ""
-"So when should we use an enterprise Web Bean instead of a simple Web Bean? "
-"Well, whenever we need the advanced enterprise services offered by EJB, such "
-"as:"
-msgstr ""
+msgid "So when should we use an enterprise Web Bean instead of a simple Web Bean? Well, whenever we need the advanced enterprise services offered by EJB, such as:"
+msgstr "我们什么时候使用企业级Web Bean来替代简单Web Bean呢?当我们需要EJB提供的高级的企业服务的时候,例如:"
 
 #. Tag: para
 #: intro.xml:387
 #, no-c-format
 msgid "method-level transaction management and security,"
-msgstr ""
+msgstr "方法水平的事务管理和安全,"
 
 #. Tag: para
 #: intro.xml:390
 #, no-c-format
 msgid "concurrency management,"
-msgstr ""
+msgstr "并发管理"
 
 #. Tag: para
 #: intro.xml:393
 #, no-c-format
-msgid ""
-"instance-level passivation for stateful session beans and instance-pooling "
-"for stateless session beans,"
-msgstr ""
+msgid "instance-level passivation for stateful session beans and instance-pooling for stateless session beans,"
+msgstr "实例水平的有状态会话Bean的钝化和无状态会话Bean的实例池,"
 
 #. Tag: para
 #: intro.xml:397
 #, no-c-format
 msgid "remote and web service invocation, and"
-msgstr ""
+msgstr "远程或者Web服务调用,和"
 
 #. Tag: para
 #: intro.xml:400
 #, no-c-format
 msgid "timers and asynchronous methods,"
-msgstr ""
+msgstr "定时器以及异步方法,"
 
 #. Tag: para
 #: intro.xml:404
 #, no-c-format
-msgid ""
-"we should use an enterprise Web Bean. When we don't need any of these "
-"things, a simple Web Bean will serve just fine."
-msgstr ""
+msgid "we should use an enterprise Web Bean. When we don't need any of these things, a simple Web Bean will serve just fine."
+msgstr "在这中情况下,我们应该使用一个企业级Web Bean。当我们不需要这些服务的时候,一个简单Web Bean就足够了。"
 
 #. Tag: para
 #: intro.xml:407
 #, no-c-format
-msgid ""
-"Many Web Beans (including any session or application scoped Web Bean) are "
-"available for concurrent access. Therefore, the concurrency management "
-"provided by EJB 3.1 is especially useful. Most session and application "
-"scoped Web Beans should be EJBs."
-msgstr ""
+msgid "Many Web Beans (including any session or application scoped Web Bean) are available for concurrent access. Therefore, the concurrency management provided by EJB 3.1 is especially useful. Most session and application scoped Web Beans should be EJBs."
+msgstr "很多Web Bean(包括任何会话范围或者应用范围的Web Bean)都需要并发访问。因此,EJB3.1提供的并发管理相当有用。大部分会话范围和应用范围的Web Bean应该是EJB。"
 
 #. Tag: para
 #: intro.xml:412
 #, no-c-format
-msgid ""
-"Web Beans which hold references to heavy-weight resources, or hold a lot of "
-"internal state benefit from the advanced container-managed lifecycle defined "
-"by the EJB <literal>@Stateless</literal>/<literal>@Stateful</literal>/"
-"<literal>@Singleton</literal> model, with its support for passivation and "
-"instance pooling."
-msgstr ""
+msgid "Web Beans which hold references to heavy-weight resources, or hold a lot of internal state benefit from the advanced container-managed lifecycle defined by the EJB <literal>@Stateless</literal>/<literal>@Stateful</literal>/<literal>@Singleton</literal> model, with its support for passivation and instance pooling."
+msgstr "对于拥有重量级资源引用或者大量内部状态的Web Bean来说,它能够从高级的容器管理的生命周期获得好处。这些生命周期由EJB的 <literal>@Stateless</literal>/<literal>@Stateful</literal>/<literal>@Singleton</literal>模型定义,它支持钝化和实例池。"
 
 #. Tag: para
 #: intro.xml:417
 #, no-c-format
-msgid ""
-"Finally, it's usually obvious when method-level transaction management, "
-"method-level security, timers, remote methods or asynchronous methods are "
-"needed."
-msgstr ""
+msgid "Finally, it's usually obvious when method-level transaction management, method-level security, timers, remote methods or asynchronous methods are needed."
+msgstr "最后,什么情况下应该使用方法水平的事务管理,方法水平的安全,计时器,远程方法或者异步方法应该是显而易见的。"
 
 #. Tag: para
 #: intro.xml:420
 #, no-c-format
-msgid ""
-"It's usually easy to start with simple Web Bean, and then turn it into an "
-"EJB, just by adding an annotation: <literal>@Stateless</literal>, "
-"<literal>@Stateful</literal> or <literal>@Singleton</literal>."
-msgstr ""
+msgid "It's usually easy to start with simple Web Bean, and then turn it into an EJB, just by adding an annotation: <literal>@Stateless</literal>, <literal>@Stateful</literal> or <literal>@Singleton</literal>."
+msgstr "从简单Web Bean起步最容易,然后转换到EJB上,过程很简单,只须添加一个注释:<literal>@Stateless</literal>, <literal>@Stateful</literal> 或者 <literal>@Singleton</literal>。"
 
 #. Tag: title
 #: intro.xml:427
 #, no-c-format
 msgid "Producer methods"
-msgstr ""
+msgstr "生产者方法"
 
 #. Tag: para
 #: intro.xml:429
 #, no-c-format
-msgid ""
-"A <emphasis>producer method</emphasis> is a method that is called by the Web "
-"Bean manager to obtain an instance of the Web Bean when no instance exists "
-"in the current context. A producer method lets the application take full "
-"control of the instantiation process, instead of leaving instantiation to "
-"the Web Bean manager. For example:"
-msgstr ""
+msgid "A <emphasis>producer method</emphasis> is a method that is called by the Web Bean manager to obtain an instance of the Web Bean when no instance exists in the current context. A producer method lets the application take full control of the instantiation process, instead of leaving instantiation to the Web Bean manager. For example:"
+msgstr "一个<emphasis>生产者方法</emphasis>由Web Bean管理器在当前上下文中没有某个Web Bean实例的时候调用,用以获得该Web Bean的一个实例。一个生产者方法能够让应用完全控制实例化的过程,而不是将初始化交给Web Bean管理器处理。例如:"
 
 #. Tag: programlisting
 #: intro.xml:435
@@ -987,34 +840,40 @@
 "\n"
 "}]]>"
 msgstr ""
+"<![CDATA[@ApplicationScoped\n"
+"public class Generator {\n"
+"\n"
+"    private Random random = new Random( System.currentTimeMillis() );\n"
+"    \n"
+"    @Produces @Random int next() {\n"
+"        return random.nextInt(100);\n"
+"    }\n"
+"\n"
+"}]]>"
 
 #. Tag: para
 #: intro.xml:437
 #, no-c-format
-msgid ""
-"The result of a producer method is injected just like any other Web Bean."
-msgstr ""
+msgid "The result of a producer method is injected just like any other Web Bean."
+msgstr "一个生产者方法的输出或者返回值将被注入到注入点中,就像其他任何的Web Bean一样。"
 
 #. Tag: programlisting
 #: intro.xml:439
 #, no-c-format
 msgid "<![CDATA[@Random int randomNumber]]>"
-msgstr ""
+msgstr "<![CDATA[@Random int randomNumber]]>"
 
 #. Tag: para
 #: intro.xml:441
 #, no-c-format
-msgid ""
-"The method return type and all interfaces it extends/implements directly or "
-"indirectly are API types of the producer method. If the return type is a "
-"class, all superclasses are also API types."
-msgstr ""
+msgid "The method return type and all interfaces it extends/implements directly or indirectly are API types of the producer method. If the return type is a class, all superclasses are also API types."
+msgstr "方法返回的类型和它直接或者间接继承或者实现的所有接口都是这个生产者方法的API类型。如果返回的类型一个类,其所有的父类也是API类型。"
 
 #. Tag: para
 #: intro.xml:445
 #, no-c-format
 msgid "Some producer methods return objects that require explicit destruction:"
-msgstr ""
+msgstr "一些生产者方法返回的对象需要显式地销毁"
 
 #. Tag: programlisting
 #: intro.xml:447
@@ -1024,14 +883,15 @@
 "    return createConnection( user.getId(), user.getPassword() );\n"
 "}]]>"
 msgstr ""
+"<![CDATA[@Produces @RequestScoped Connection connect(User user) {\n"
+"    return createConnection( user.getId(), user.getPassword() );\n"
+"}]]>"
 
 #. Tag: para
 #: intro.xml:449
 #, no-c-format
-msgid ""
-"These producer methods may define matching <emphasis>disposal methods</"
-"emphasis>:"
-msgstr ""
+msgid "These producer methods may define matching <emphasis>disposal methods</emphasis>:"
+msgstr "这些生产者方法可以定义对应的<emphasis>清除方法</emphasis>:"
 
 #. Tag: programlisting
 #: intro.xml:451
@@ -1041,35 +901,31 @@
 "    connection.close();\n"
 "}]]>"
 msgstr ""
+"<![CDATA[void close(@Disposes Connection connection) {\n"
+"    connection.close();\n"
+"}]]>"
 
 #. Tag: para
 #: intro.xml:453
 #, no-c-format
-msgid ""
-"This disposal method is called automatically by the Web Bean manager at the "
-"end of the request."
-msgstr ""
+msgid "This disposal method is called automatically by the Web Bean manager at the end of the request."
+msgstr "这个清除方法将在请求结束的时候自动被Web Bean管理器调用。"
 
 #. Tag: para
 #: intro.xml:456
 #, no-c-format
-msgid ""
-"We'll talk much more about producer methods in <xref linkend="
-"\"producermethods\"/>."
-msgstr ""
+msgid "We'll talk much more about producer methods in <xref linkend=\"producermethods\"/>."
+msgstr "我们将在<xref linkend=\"producermethods\"/>一章中详述生产者方法。"
 
 #. Tag: title
 #: intro.xml:461
 #, no-c-format
 msgid "JMS endpoints"
-msgstr ""
+msgstr "JMS端点"
 
 #. Tag: para
 #: intro.xml:463
 #, no-c-format
-msgid ""
-"Finally, a JMS queue or topic can be a Web Bean. Web Beans relieves the "
-"developer from the tedium of managing the lifecycles of all the various JMS "
-"objects required to send messages to queues and topics. We'll discuss JMS "
-"endpoints in <xref linkend=\"jms\"/>."
-msgstr ""
+msgid "Finally, a JMS queue or topic can be a Web Bean. Web Beans relieves the developer from the tedium of managing the lifecycles of all the various JMS objects required to send messages to queues and topics. We'll discuss JMS endpoints in <xref linkend=\"jms\"/>."
+msgstr "最后,一个JMS的队列或者主题能够成为一个Web Bean。为了向队列或者主题发送消息,开发者不得不处理所有不同JMS对象的生命周期。Web Bean将开发者从这些冗长乏味的工作中解放出来。我们将在<xref linkend=\"jms\"/>一章中讨论JMS端点。"
+




More information about the weld-commits mailing list