Author: alartin
Date: 2009-03-13 02:13:05 -0400 (Fri, 13 Mar 2009)
New Revision: 1954
Modified:
doc/trunk/reference/zh-CN/intro.po
Log:
Modified: doc/trunk/reference/zh-CN/intro.po
===================================================================
--- doc/trunk/reference/zh-CN/intro.po 2009-03-13 06:09:01 UTC (rev 1953)
+++ doc/trunk/reference/zh-CN/intro.po 2009-03-13 06:13:05 UTC (rev 1954)
@@ -6,7 +6,7 @@
"Project-Id-Version: master.xml\n"
"Report-Msgid-Bugs-To:
http://bugs.kde.org\n"
"POT-Creation-Date: 2009-02-07 18:51+0000\n"
-"PO-Revision-Date: 2009-02-03 15:24+0800\n"
+"PO-Revision-Date: 2009-03-13 14:09+0800\n"
"Last-Translator: Sean Wu <alartin(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
@@ -22,17 +22,8 @@
#. 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 ""
-"你是否已经迫不及待想要开始编写你的第一个Web Bean了?或许,你仍旧抱有怀疑态"
-"度,想要知道Web Beans规范会给出什么样的圈套让你跳。好消息是你也许已经编写并且"
-"使用了好几百个或者好几千个Web Bean了。你也许甚至想不起来你写的第一个Web Bean"
-"了。"
+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
@@ -43,33 +34,14 @@
#. Tag: para
#: intro.xml:15
#, fuzzy, 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 — injecting them
"
-"into other Web Beans, configuring them via the Web Beans XML configuration "
-"facility, even adding interceptors and decorators to them — 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中。你甚至可以不用修"
-"改已有代码就可以为其添加拦截器和装饰器。"
+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
— injecting them into other Web Beans, configuring them via the Web Beans XML
configuration facility, even adding interceptors and decorators to them — 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 ""
-"假定我们有两个已经写好的Java类,我们已经在不同的应用中使用它们好多年了。第一"
-"个类将一个字符串解析为一个句子列表:"
+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
@@ -86,13 +58,8 @@
#. 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 ""
-"第二个已有类是一个无状态的会话Bean,这个会话Bean作为一个外部系统的前端,能够"
-"将句子从一种语言翻译到另一个语言:"
+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
@@ -131,12 +98,8 @@
#. 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 ""
-"不幸的是,我们没有Java类能够翻译整个文档。因此,让我们写一个Web Bean来做这个"
-"工作:"
+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
@@ -148,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"
@@ -170,8 +132,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"
@@ -189,12 +150,8 @@
#. 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 ""
-"通过将其注入到一个Web Bean,Servlet或者EJB,我们能够获得一个 "
-"<literal>TextTranslator</literal>的实例:"
+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
@@ -213,69 +170,32 @@
#. 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:"
+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 ""
-"<![CDATA[TextTranslator tt = manager.getInstanceByType(TextTranslator."
-"class);]]>"
+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>(a)Initializer</literal>."
-msgstr ""
-"但是,等一下:<literal>TextTranslator</literal>并没有一个无参构造器!它仍然是"
-"一个Web Bean么?好吧,一个没有无参构造器的类依然能够成为一个Web Bean,只要你"
-"在它的一个构造器上使用<literal>@Initializer</literal>注释即可。"
+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>(a)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 ""
-"就像你猜到的一样, <literal>@Initializer</literal>注释和依赖注入有关! "
-"<literal>@Initializer</literal>可以应用到一个Web Bean的构造器或者方法上,它告"
-"诉Web Bean管理器在初始化一个Web Bean的时候去调用这个构造器或者方法。Web Beam"
-"管理器能够将其他的Web Bean注入到构造器或者方法的参数中。"
+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
#, fuzzy, 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 "
-"— if the <literal>SentenceTranslator</literal> EJB was not
deployed "
-"— 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>实现—如果"
-"<literal>SentenceTranslator</literal> EJB没有被部署—Web
Bean管理器将会抛"
-"出一个<literal>UnsatisfiedDependencyException</literal>异常。如果多于一个"
-"<literal>Translator</literal>实现,Web Bean管理器将会抛出一个"
-"<literal>AmbiguousDependencyException</literal>异常。"
+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 — if the
<literal>SentenceTranslator</literal> EJB was not deployed — 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>实现—如果<literal>SentenceTranslator</literal>
EJB没有被部署—Web
Bean管理器将会抛出一个<literal>UnsatisfiedDependencyException</literal>异常。如果多于一个<literal>Translator</literal>实现,Web
Bean管理器将会抛出一个<literal>AmbiguousDependencyException</literal>异常。"
#. Tag: title
#: intro.xml:80
@@ -292,50 +212,20 @@
#. 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 ""
-"一个Web Bean是一个包含业务逻辑的应用类。一个Web Bean能够从Java代码中直接调"
-"用,也可以通过统一表达语言调用。一个Web Bean可以访问事务性的资源。Web Bean之"
-"间的依赖通过Web Bean管理器自动管理。大部分Web Bean是具有 <emphasis>状态</"
-"emphasis>和<emphasis>上下文</emphasis>的。Web Bean的生命周期总是通过Web Bean"
-"管理器进行管理。"
+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 ""
-"让我们后退一步。\"上下文\"究竟意味着什么?既然Web Beans可以是有状态的,那它关"
-"系到我到底拥有<emphasis>哪个</emphasis>Bean实例。和无状态组件模型(例如无状态"
-"的会话Bean)或者一个单例模型组件(例如Servlet或者单例Bean)不同,一个Web Bean"
-"的不同客户端看到的Web Bean的状态是不同的。客户端所见的状态取决于这个客户端拥"
-"有的是哪一个Web Bean实例的引用。"
+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 ""
-"然而,Web Bean像无状态或者单例模型那样,却和有状态的会话Bean<emphasis>不同</"
-"emphasis>,客户端无法通过显式地创建或者销毁它来控制实例的生命周期。取而代之,"
-"Web Bean的<emphasis>范围</emphasis>决定了:"
+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
@@ -346,53 +236,26 @@
#. Tag: para
#: intro.xml:108
#, no-c-format
-msgid ""
-"which clients share a reference to a particular instance of the Web Bean."
+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 ""
-"给定一个Web Bean应用的线程,将可能有一个<emphasis>激活的上下文</emphasis>和"
-"Web Bean的范围关联。这个上下文可能对于该线程是唯一的(例如,如果这个Web Bean"
-"是请求范围的),或者这个上下文可能被某些其他线程共享(例如,如果这个Web Bean"
-"是会话范围的),这个上下文甚至可以被所有线程共享(例如,这个Web Bean是应用范"
-"围的)。"
+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 ""
-"在同一个上下文中执行的客户端(例如,其他的Web Bean)看到的是同一个Web Bean的"
-"实例。但是不同的上下文中的客户端看到的是不同的实例。"
+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 ""
-"具备上下文的模型带来的一个巨大优点是它允许有状态的Web Bean可以像服务一样使"
-"用!客户端不需要关注本身以及它使用的Web Bean的生命周期,<emphasis>甚至它根本"
-"不需要知道生命周期是什么</emphasis>。Web Bean通过传递消息来交互,Web Bean的实"
-"现定义了他们自己状态的生命周期。Web Bean是松耦合的,因为:"
+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
@@ -409,30 +272,14 @@
#. 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 ""
-"我们能够使用一个实现相同接口,具有不同生命周期(一个不同的范围)的Web Bean替"
-"换一个Web Bean而不会影响其他的Web Bean实现。实际上,Web Bean定义了一个复杂的"
-"机制能够在部署时覆盖Web Bean的实现,我们将在<xref linkend=\"deploymenttypes"
-"\"/>一章阐述。"
+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
#, fuzzy, 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 — which are by nature not injectable,
"
-"contextual objects — may also obtain references to Web Beans by "
-"injection."
-msgstr ""
-"需要注意的是并非所有的Web Bean的客户端都是Web Bean。其他对象诸如Servlet或者消"
-"息驱动Bean#151;天生不可注入的, 具备上下文的对象—也可以通过注入获得Web "
-"Bean的引用。"
+msgid "Note that not all clients of a Web Bean are Web Beans. Other objects such as
Servlets or Message-Driven Beans — which are by nature not injectable, contextual
objects — may also obtain references to Web Beans by injection."
+msgstr "需要注意的是并非所有的Web Bean的客户端都是Web Bean。其他对象诸如Servlet或者消息驱动Bean#151;天生不可注入的,
具备上下文的对象—也可以通过注入获得Web Bean的引用。"
#. Tag: para
#: intro.xml:149
@@ -503,13 +350,8 @@
#. 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 ""
-"Web Bean通常通过依赖注入获得其他Web Bean的引用。任何注入的属性都要指定一个"
-"\"合约\",这个合约必须满足注入的Web Bean的要求。这个合约是:"
+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
@@ -526,29 +368,14 @@
#. 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 ""
-"一个API指的是用户定义的类或者接口。(如果Web Bean是一个EJB会话Bean,API类型"
-"是 <literal>@Local</literal> 接口或者Bean类的本地视图)。一个绑定类型表示某个"
-"客户端可见的语义,这个语义由API的某个实现而不是其他实现来满足。"
+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 ""
-"绑定类型通过用户定义的注释来表现,这些注释自己需要通过<literal>@BindingType</"
-"literal>来注释。例如,下面的注入点有一个API类型 <literal>PaymentProcessor</"
-"literal>和绑定类型<literal>@CreditCard</literal>:"
+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
@@ -559,35 +386,20 @@
#. 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 ""
-"如果在一个注入点没有显式的指定一个绑定类型,那么默认的绑定类型是"
-"<literal>@Current</literal>。"
+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 ""
-"对于每个注入点,Web Bean管理器都会搜索满足合约的Web Bean(实现了API并且拥有所"
-"有的绑定类型),然后将这个Web Bean注入。"
+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 ""
-"下面的Web Bean拥有一个绑定类型<literal>@CreditCard</literal>,并且实现了API类"
-"型<literal>PaymentProcessor</literal>。因此,这个Web Bean可以被注入到这个例子"
-"的注入点中:"
+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
@@ -604,26 +416,14 @@
#. 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 ""
-"如果一个Web Bean没有显式的指定一套绑定类型,它将只有一个绑定类型:默认的绑定"
-"类型<literal>@Current</literal>。"
+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>(a)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 ""
-"Web Bean定义了一个复杂但是很直观的<emphasis>解析算法</emphasis>来帮助容器确定"
-"如何处理多个Web Bean满足特定合约的情况。我们将在 <xref linkend=\"injection\"/"
-">一章中详述。"
+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
@@ -634,43 +434,20 @@
#. 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 ""
-"<emphasis>部署类型</emphasis>能够让我们根据部署场景来划分我们的Web Bean。一个"
-"部署类型是一个注释,这个注释代表了一种特定的部署场景,例如<literal>@Mock</"
-"literal>,<literal>@Staging</literal>或者<literal>@AustralianTaxLaw</"
-"literal>。我们通过这些注释来决定哪些Web Bean部署在哪些场景中。一个部署类型允"
-"许我们只使用一行配置就可以对一整套Web Bean进行条件化的部署。"
+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 ""
-"很多Web Bean只使用默认的部署类型<literal>@Production</literal>。在这种情况"
-"下,不需要显式的指定部署类型。在我们的例子中的三个Web Bean都拥有部署类型"
-"<literal>@Production</literal>。"
+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>(a)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 ""
-"在一个测试环境中,我们有可能将<literal>SentenceTranslator</literal> Web Bean"
-"替换为一个\"模拟对象\":"
+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
@@ -693,23 +470,14 @@
#. 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 ""
-"我们需要在测试环境中激活部署类型<literal>@Mock</literal>,这时应用会使用 "
-"<literal>MockSentenceTranslator</literal>或者其他拥有<literal>@Mock</literal>"
-"注释的Web Bean。"
+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 ""
-"我们将在<xref linkend=\"deploymenttypes\"/>一章中详述这个独特而强大的特性。"
+msgid "We'll talk more about this unique and powerful feature in <xref
linkend=\"deploymenttypes\"/>."
+msgstr "我们将在<xref
linkend=\"deploymenttypes\"/>一章中详述这个独特而强大的特性。"
#. Tag: title
#: intro.xml:246
@@ -720,25 +488,14 @@
#. 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 ""
-" <emphasis>范围</emphasis>定义了一个Web Bean实例的生命周期和可见度。Web Bean"
-"的上下文模型是可扩展的,可以适应任意范围。不过某些特定的重要的范围已经内置于"
-"规范中了,由Web Bean管理器提供这些范围。一个范围也是通过注释类型来表示的。"
+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 ""
-"例如,任何一个Web应用都可能拥有 <emphasis>会话范围</emphasis>的Web Bean:"
+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
@@ -753,25 +510,14 @@
#. 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 ""
-"一个会话范围的Web Bean实例将绑定到用户会话中,它被这个会话上下文中的所有请求"
-"共享。"
+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 ""
-"默认情况下,Web Bean属于一个名为<emphasis>依赖伪范围</emphasis>的特殊范围。拥"
-"有这个范围的Web Bean的范围取决于其所注入的对象的范围,它的生命周期和所注入的"
-"对象的生命周期绑定在一起。"
+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
@@ -788,12 +534,8 @@
#. 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 ""
-"一个Web Bean可能有一个<emphasis>名字</emphasis>,通过名字,Web Bean可以在统一"
-"表达式语言中使用。为Web Bean指定一个名字非常简单:"
+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
@@ -826,8 +568,7 @@
#. 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:"
+msgid "It's even easier to just let the name be defaulted by the Web Bean
manager:"
msgstr "甚至我们可以让Web Bean管理器来给Web Bean指定默认的名字:"
#. Tag: programlisting
@@ -843,12 +584,8 @@
#. Tag: para
#: intro.xml:289
#, fuzzy, no-c-format
-msgid ""
-"In this case, the name defaults to <literal>shoppingCart</literal>
— "
-"the unqualified class name, with the first character changed to lowercase."
-msgstr ""
-"在这种情况下,Web
Bean的名字默认为<literal>shoppingCart</literal>—非完整"
-"的类名,首字母改为小写"
+msgid "In this case, the name defaults to
<literal>shoppingCart</literal> — the unqualified class name, with
the first character changed to lowercase."
+msgstr "在这种情况下,Web
Bean的名字默认为<literal>shoppingCart</literal>—非完整的类名,首字母改为小写"
#. Tag: title
#: intro.xml:295
@@ -859,21 +596,13 @@
#. 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 ""
-"Web Bean支持EJB3定义的拦截器功能,Web Bean将其扩展,使得POJO也具备该功能。另"
-"外,Web Bean提供一个新的方式来将拦截器绑定到EJB Bean和其他Web Bean上。"
+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:"
+msgid "It remains possible to directly specify the interceptor class via use of the
<literal>@Interceptors</literal> annotation:"
msgstr "可以通过<literal>@Interceptors</literal> 注释直接指定拦截器类:"
#. Tag: programlisting
@@ -891,12 +620,8 @@
#. 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 ""
-"然而,更优雅的方式或者更佳的实践是通过<emphasis>拦截器绑定类型</emphasis>来间"
-"接地绑定拦截器:"
+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
@@ -911,12 +636,8 @@
#. 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 ""
-"我们将在<xref linkend=\"interceptors\"/>和<xref
linkend=\"decorators\"/>两章"
-"分别讨论Web Bean拦截器和装饰器。"
+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
@@ -927,12 +648,8 @@
#. 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 ""
-"我们已经看到,JavaBean, EJB和其他Java类都可以成为Web Bean。但是,确切地说,什"
-"么样的对象能够称为Web Bean?"
+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
@@ -943,19 +660,13 @@
#. 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 ""
-"Web Bean规范声称一个具体的Java类可以成为一个<emphasis>简单</emphasis>的Web "
-"Bean, 只要这个类:"
+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,"
+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
@@ -973,11 +684,8 @@
#. Tag: para
#: intro.xml:344
#, no-c-format
-msgid ""
-"it has a constructor with no parameters, or a constructor annotated "
-"<literal>(a)Initializer</literal>."
-msgstr ""
-"它拥有一个无参构造器,或者构造器具有<literal>@Initializer</literal>注释。"
+msgid "it has a constructor with no parameters, or a constructor annotated
<literal>(a)Initializer</literal>."
+msgstr "它拥有一个无参构造器,或者构造器具有<literal>@Initializer</literal>注释。"
#. Tag: para
#: intro.xml:349
@@ -988,13 +696,8 @@
#. 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 ""
-"每个被简单Web Bean直接或者间接实现的接口都是这个简单Web Bean的一个API类型。这"
-"个类和它的超类也是API类型。"
+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
@@ -1005,46 +708,20 @@
#. Tag: para
#: intro.xml:360
#, fuzzy, 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 — since they are not intended to be injected into other objects
"
-"— 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;但是"
-"它们可以使用大部分Web Bean的功能,包括依赖注入和拦截器。"
+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 — since they are not intended to be injected into other objects —
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;但是它们可以使用大部分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 ""
-"一个企业级Web Bean的本地接口,只要没有一个通配类型参数或者类型变量,它都是这"
-"个企业级Web Bean的API类型,该接口的每个父接口也都是这个企业级Web Bean的API类"
-"型。如果EJB Bean有一个Bean类的本地视图,这个Bean类和它的每个父类也是一个API类"
-"型。"
+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 ""
-"有状态的会话Bean应该声明一个无参的删除方法或者一个拥有<literal>@Destructor</"
-"literal>注释的删除方法。Web Bean管理器将在这个有状态会话Bean实例的生命周期结"
-"束时调用这个方法。这个方法被称为企业级Web Bean的<emphasis>销毁</emphasis>方"
-"法。"
+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
@@ -1073,13 +750,8 @@
#. 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 ""
-"我们什么时候使用企业级Web Bean来替代简单Web Bean呢?当我们需要EJB提供的高级的"
-"企业服务的时候,例如:"
+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
@@ -1096,9 +768,7 @@
#. Tag: para
#: intro.xml:393
#, no-c-format
-msgid ""
-"instance-level passivation for stateful session beans and instance-pooling "
-"for stateless session beans,"
+msgid "instance-level passivation for stateful session beans and instance-pooling
for stateless session beans,"
msgstr "实例水平的有状态会话Bean的钝化和无状态会话Bean的实例池,"
#. Tag: para
@@ -1116,62 +786,32 @@
#. 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 ""
-"在这中情况下,我们应该使用一个企业级Web Bean。当我们不需要这些服务的时候,一"
-"个简单Web Bean就足够了。"
+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 ""
-"很多Web Bean(包括任何会话范围或者应用范围的Web Bean)都需要并发访问。因此,"
-"EJB3.1提供的并发管理相当有用。大部分会话范围和应用范围的Web Bean应该是EJB。"
+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 ""
-"对于拥有重量级资源引用或者大量内部状态的Web Bean来说,它能够从高级的容器管理"
-"的生命周期获得好处。这些生命周期由EJB的 <literal>@Stateless</literal>/"
-"<literal>@Stateful</literal>/<literal>@Singleton</literal>模型定义,它支持钝"
-"化和实例池。"
+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>(a)Singleton</literal>."
-msgstr ""
-"从简单Web Bean起步最容易,然后转换到EJB上,过程很简单,只须添加一个注释:"
-"<literal>@Stateless</literal>, <literal>@Stateful</literal>
或者 "
-"<literal>@Singleton</literal>。"
+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>(a)Singleton</literal>."
+msgstr "从简单Web
Bean起步最容易,然后转换到EJB上,过程很简单,只须添加一个注释:<literal>@Stateless</literal>,
<literal>@Stateful</literal> 或者
<literal>@Singleton</literal>。"
#. Tag: title
#: intro.xml:427
@@ -1182,16 +822,8 @@
#. 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 ""
-"一个<emphasis>生产者方法</emphasis>由Web Bean管理器在当前上下文中没有某个Web "
-"Bean实例的时候调用,用以获得该Web Bean的一个实例。一个生产者方法能够让应用完"
-"全控制实例化的过程,而不是将初始化交给Web Bean管理器处理。例如:"
+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
@@ -1222,11 +854,8 @@
#. Tag: para
#: intro.xml:437
#, no-c-format
-msgid ""
-"The result of a producer method is injected just like any other Web Bean."
-msgstr ""
-"一个生产者方法的输出或者返回值将被注入到注入点中,就像其他任何的Web Bean一"
-"样。"
+msgid "The result of a producer method is injected just like any other Web
Bean."
+msgstr "一个生产者方法的输出或者返回值将被注入到注入点中,就像其他任何的Web Bean一样。"
#. Tag: programlisting
#: intro.xml:439
@@ -1237,13 +866,8 @@
#. 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 ""
-"方法返回的类型和它直接或者间接继承或者实现的所有接口都是这个生产者方法的API类"
-"型。如果返回的类型一个类,其所有的父类也是API类型。"
+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
@@ -1266,9 +890,7 @@
#. Tag: para
#: intro.xml:449
#, no-c-format
-msgid ""
-"These producer methods may define matching <emphasis>disposal
methods</"
-"emphasis>:"
+msgid "These producer methods may define matching <emphasis>disposal
methods</emphasis>:"
msgstr "这些生产者方法可以定义对应的<emphasis>清除方法</emphasis>:"
#. Tag: programlisting
@@ -1286,17 +908,13 @@
#. 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."
+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\"/>."
+msgid "We'll talk much more about producer methods in <xref
linkend=\"producermethods\"/>."
msgstr "我们将在<xref linkend=\"producermethods\"/>一章中详述生产者方法。"
#. Tag: title
@@ -1308,12 +926,6 @@
#. 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 ""
-"最后,一个JMS的队列或者主题能够成为一个Web Bean。为了向队列或者主题发送消息,"
-"开发者不得不处理所有不同JMS对象的生命周期。Web Bean将开发者从这些冗长乏味的工"
-"作中解放出来。我们将在<xref linkend=\"jms\"/>一章中讨论JMS端点。"
+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端点。"
+