[webbeans-commits] Webbeans SVN: r686 - doc/trunk/reference/zh-CN/modules.
by webbeans-commits@lists.jboss.org
Author: alartin
Date: 2008-12-23 04:08:27 -0500 (Tue, 23 Dec 2008)
New Revision: 686
Modified:
doc/trunk/reference/zh-CN/modules/part2.po
Log:
Modified: doc/trunk/reference/zh-CN/modules/part2.po
===================================================================
--- doc/trunk/reference/zh-CN/modules/part2.po 2008-12-23 08:53:46 UTC (rev 685)
+++ doc/trunk/reference/zh-CN/modules/part2.po 2008-12-23 09:08:27 UTC (rev 686)
@@ -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 17:08+0800\n"
+"Last-Translator: Sean Wu <alartin(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -16,87 +16,66 @@
#. Tag: para
#: part2.xml:5
#, no-c-format
-msgid ""
-"The first major theme of Web Beans is <emphasis>loose coupling</emphasis>. "
-"We've already seen three means of achieving loose coupling:"
-msgstr ""
+msgid "The first major theme of Web Beans is <emphasis>loose coupling</emphasis>. We've already seen three means of achieving loose coupling:"
+msgstr "Web Bean的首要宗旨就是<emphasis>松耦合</emphasis>。我们已经看到三种实现松耦合的方法:"
#. Tag: para
#: part2.xml:10
#, no-c-format
-msgid ""
-"<emphasis>deployment types</emphasis> enable deployment time polymorphism,"
-msgstr ""
+msgid "<emphasis>deployment types</emphasis> enable deployment time polymorphism,"
+msgstr "<emphasis>部署类型</emphasis>能够实现部署时多态性"
#. Tag: para
#: part2.xml:14
#, no-c-format
msgid "<emphasis>producer methods</emphasis> enable runtime polymorphism, and"
-msgstr ""
+msgstr "<emphasis>生产者方法</emphasis>能够实现运行时多态性,并且"
#. Tag: para
#: part2.xml:18
#, no-c-format
-msgid ""
-"<emphasis>contextual lifecycle management</emphasis> decouples Web Bean "
-"lifecycles."
-msgstr ""
+msgid "<emphasis>contextual lifecycle management</emphasis> decouples Web Bean lifecycles."
+msgstr "<emphasis>具备上下文的生命周期管理</emphasis>将Web Bean的生命周期解耦。"
#. Tag: para
#: part2.xml:23
#, no-c-format
-msgid ""
-"These techniques serve to enable loose coupling of client and server. The "
-"client is no longer tightly bound to an implementation of an API, nor is it "
-"required to manage the lifecycle of the server object. This approach lets "
-"<emphasis>stateful objects interact as if they were services</emphasis>."
-msgstr ""
+msgid "These techniques serve to enable loose coupling of client and server. The client is no longer tightly bound to an implementation of an API, nor is it required to manage the lifecycle of the server object. This approach lets <emphasis>stateful objects interact as if they were services</emphasis>."
+msgstr "这些技术都是为了将客户端和服务器端解耦。客户端不在和一个API的具体实现紧密绑定,也不需要管理服务器端对象的生命周期。这种方法<emphasis>能够让有状态的对象像服务一样交互</emphasis>。"
#. Tag: para
#: part2.xml:28
#, no-c-format
-msgid ""
-"Loose coupling makes a system more <emphasis>dynamic</emphasis>. The system "
-"can respond to change in a well-defined manner. In the past, frameworks that "
-"attempted to provide the facilities listed above invariably did it by "
-"sacrificing type safety. Web Beans is the first technology that achieves "
-"this level of loose coupling in a typesafe way."
-msgstr ""
+msgid "Loose coupling makes a system more <emphasis>dynamic</emphasis>. The system can respond to change in a well-defined manner. In the past, frameworks that attempted to provide the facilities listed above invariably did it by sacrificing type safety. Web Beans is the first technology that achieves this level of loose coupling in a typesafe way."
+msgstr "松耦合能够让系统更加<emphasis>动态</emphasis>。系统可以以定义良好的方式来相应变化。在过去,多数框架总是通过牺牲类型安全来提供上述功能。实现此种高度的松耦合,同时又能够保证类型安全,Web Beans是第一个实现这个目标的技术。"
#. Tag: para
#: part2.xml:34
#, no-c-format
-msgid ""
-"Web Beans provides three extra important facilities that further the goal of "
-"loose coupling:"
-msgstr ""
+msgid "Web Beans provides three extra important facilities that further the goal of loose coupling:"
+msgstr "Web Bean提供三种额外的功能来实现松耦合的目标:"
#. Tag: para
#: part2.xml:39
#, no-c-format
-msgid ""
-"<emphasis>interceptors</emphasis> decouple technical concerns from business "
-"logic,"
-msgstr ""
+msgid "<emphasis>interceptors</emphasis> decouple technical concerns from business logic,"
+msgstr "<emphasis>拦截器</emphasis>能够将技术关注点从业务逻辑中解耦。"
#. Tag: para
#: part2.xml:43
#, no-c-format
-msgid ""
-"<emphasis>decorators</emphasis> may be used to decouple some business "
-"concerns, and"
-msgstr ""
+msgid "<emphasis>decorators</emphasis> may be used to decouple some business concerns, and"
+msgstr "<emphasis>装饰器</emphasis>能够将一些业务关注点解耦,并且"
#. Tag: para
#: part2.xml:47
#, no-c-format
-msgid ""
-"<emphasis>event notifications</emphasis> decouple event producers from event "
-"consumers."
-msgstr ""
+msgid "<emphasis>event notifications</emphasis> decouple event producers from event consumers."
+msgstr "<emphasis>事件通知</emphasis>机制能将事件消费者和事件生产者解耦。"
#. Tag: para
#: part2.xml:52
#, no-c-format
msgid "Let's explore interceptors first."
-msgstr ""
+msgstr "让我们首先研究拦截器。"
+
16 years
[webbeans-commits] Webbeans SVN: r685 - doc/trunk/reference/zh-CN/modules.
by webbeans-commits@lists.jboss.org
Author: alartin
Date: 2008-12-23 03:53:46 -0500 (Tue, 23 Dec 2008)
New Revision: 685
Modified:
doc/trunk/reference/zh-CN/modules/next.po
Log:
Modified: doc/trunk/reference/zh-CN/modules/next.po
===================================================================
--- doc/trunk/reference/zh-CN/modules/next.po 2008-12-23 08:43:47 UTC (rev 684)
+++ doc/trunk/reference/zh-CN/modules/next.po 2008-12-23 08:53:46 UTC (rev 685)
@@ -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:53+0800\n"
+"Last-Translator: Sean Wu <alartin(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -17,33 +17,23 @@
#: next.xml:4
#, no-c-format
msgid "Next steps"
-msgstr ""
+msgstr "下一步"
#. Tag: para
#: next.xml:6
#, no-c-format
-msgid ""
-"Because Web Beans is so new, there's not yet a lot of information available "
-"online."
-msgstr ""
+msgid "Because Web Beans is so new, there's not yet a lot of information available online."
+msgstr "因为Web Bean是新生事物,所以网上可以获得的有关信息很少。"
#. Tag: para
#: next.xml:9
#, no-c-format
-msgid ""
-"Of course, the Web Beans specification is the best source of more "
-"information about Web Beans. The spec is about 100 pages long, only twice "
-"the length of this article, and almost as readable. But, of course, it "
-"covers many details that we've skipped over. The spec is available from "
-"<literal>http://jcp.org/en/jsr/detail?id=299</literal>."
-msgstr ""
+msgid "Of course, the Web Beans specification is the best source of more information about Web Beans. The spec is about 100 pages long, only twice the length of this article, and almost as readable. But, of course, it covers many details that we've skipped over. The spec is available from <literal>http://jcp.org/en/jsr/detail?id=299</literal>."
+msgstr "当然,Web Bean规范是有关Web Bean信息的最佳来源。这个规范大约有100页,只是这个文章的两倍长,并且可读性很好。它覆盖了我们这里跳过的很多细节。这个规范可以从<literal>http://jcp.org/en/jsr/detail?id=299</literal>下载。"
#. Tag: para
#: next.xml:15
#, no-c-format
-msgid ""
-"The Web Beans Reference implementation is being developed at <literal>http://"
-"seamframework.org/WebBeans</literal>. The RI development team and the Web "
-"Beans spec lead blog at <literal>http://in.relation.to</literal>. This "
-"article is substantially based upon a series of blog entries published there."
-msgstr ""
+msgid "The Web Beans Reference implementation is being developed at <literal>http://seamframework.org/WebBeans</literal>. The RI development team and the Web Beans spec lead blog at <literal>http://in.relation.to</literal>. This article is substantially based upon a series of blog entries published there."
+msgstr "Web Bean参考实现正在<literal>http://seamframework.org/WebBeans</literal>项目中开发。参考实现的开发团队和Web Bean规范领导的博客位于<literal>http://in.relation.to</literal>。本篇文章的撰写完全基于先前发表在那里的一系列博客文章。"
+
16 years
[webbeans-commits] Webbeans SVN: r684 - doc/trunk/reference/zh-CN/modules.
by webbeans-commits@lists.jboss.org
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(a)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—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 ""
+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 ""
+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—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 ""
+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
#, 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—which are by nature not injectable, "
-"contextual objects—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—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
#, 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>—the "
-"unqualified class name, with the first character changed to lowercase."
-msgstr ""
+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
#, 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—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 ""
+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 ""
+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端点。"
+
16 years
[webbeans-commits] Webbeans SVN: r683 - doc/trunk/reference/it-IT/modules.
by webbeans-commits@lists.jboss.org
Author: nico.ben
Date: 2008-12-22 17:19:45 -0500 (Mon, 22 Dec 2008)
New Revision: 683
Modified:
doc/trunk/reference/it-IT/modules/intro.po
Log:
WBRI-69: Italian translation for Web Beans
Modified: doc/trunk/reference/it-IT/modules/intro.po
===================================================================
--- doc/trunk/reference/it-IT/modules/intro.po 2008-12-22 11:52:19 UTC (rev 682)
+++ doc/trunk/reference/it-IT/modules/intro.po 2008-12-22 22:19:45 UTC (rev 683)
@@ -6,7 +6,7 @@
"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-22 07:07+0100\n"
+"PO-Revision-Date: 2008-12-22 23:19+0100\n"
"Last-Translator: Nicola Benaglia <nico.benaz(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
@@ -184,19 +184,19 @@
#: 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 ""
+msgstr "Ma <literal>TextTranslator</literal> non ha un costruttore con nessun parametro! E' ancora un Web Bean? Una classe che non ha un costruttore senza parametri può essere un Web Bean se il suo costruttore è annotato con <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 ""
+msgstr "Come hai indovinato, l'annotazione <literal>@Initializer</literal> ha qualcosaa che fare conla dependency injection! <literal>@Initializer</literal> può essere applicato ad un costruttore od un metodo di un Web Bean, e dice al manager Web Bean di chiamare quel costruttore o metodo quando si istanzia il Web Bean. Il manager Web Bean inietterà altri Web Bean nei parametri del costruttore o del metodo."
#. 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—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 ""
+msgstr "In fase di inizializzazione del sistema, il manager Web Bean deve convalidare che esattamente un solo Web Bean esista e soddisfi ciascun punto di iniezione. Nell'esempio, se nessuna implementazione di <literal>Translator</literal> fosse disponibile—se l'EJB <literal>SentenceTranslator</literal> non è stato deplyato—il manager Web Bean lancerebbe una <literal>UnsatisfiedDependencyException</literal>. Se più di un'implementazione di <literal>Translator</literal> fosse disponibile, il manager Web Bean lancerebbe una <literal>AmbiguousDependencyException</literal>."
#. Tag: title
#: intro.xml:80
@@ -214,13 +214,13 @@
#: 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 ""
+msgstr "Un Web Bean è una classe di applicazione che contiene della logica di business. Può essere chiamato direttamente da codice Java, o può essere invocato via Unified EL. Un Web Bean può accedere a risorse transazionali. Le dipendenze tra Web Beans sono gestite automaticamente dal manager Web Bean. La maggior parte dei Web Beans sono <emphasis>stateful</emphasis> e <emphasis>contestuali</emphasis>. Il ciclo di vita di un Web Bean è sempre gestito da un manager 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 ""
+msgstr "Torniamo indietro un attimo. Cosa significa veramente essere \"contestuale\"? Poiché Web Beans può essere stateful, è importante <emphasis>quale</emphasis> istanza di bean si ha. Diversamente da un modello a componenti stateless (per esempio, i session bean stateless) o un modello a componenti singleton (come i servlet o i bean singleton) i client di un Web Bean vedono il Web Bean in stati differenti. Lo stato del client visibile dipende dall'istanza del Web Bean alla quale il client ha il riferimento."
#. Tag: para
#: intro.xml:98
@@ -916,7 +916,7 @@
#: intro.xml:456
#, no-c-format
msgid "We'll talk much more about producer methods in <xref linkend=\"producermethods\"/>."
-msgstr ""
+msgstr "Si parlerà in maggior dettaglio dei metodi produttori in <xref linkend=\"producermethods\"/>."
#. Tag: title
#: intro.xml:461
16 years
[webbeans-commits] Webbeans SVN: r681 - in doc/tags: webbeans-reference-guide-1.0.0.ALPHA1 and 1 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-12-22 06:52:13 -0500 (Mon, 22 Dec 2008)
New Revision: 681
Added:
doc/tags/webbeans-reference-guide-1.0.0.ALPHA1/
doc/tags/webbeans-reference-guide-1.0.0.ALPHA1/en/modules/ri.xml
doc/tags/webbeans-reference-guide-1.0.0.ALPHA1/pom.xml
Removed:
doc/tags/webbeans-reference-guide-1.0.0.ALPHA1/en/modules/ri.xml
doc/tags/webbeans-reference-guide-1.0.0.ALPHA1/pom.xml
Log:
[maven-release-plugin] copy for tag webbeans-reference-guide-1.0.0.ALPHA1
Copied: doc/tags/webbeans-reference-guide-1.0.0.ALPHA1 (from rev 650, doc/trunk/reference)
Deleted: doc/tags/webbeans-reference-guide-1.0.0.ALPHA1/en/modules/ri.xml
===================================================================
--- doc/trunk/reference/en/modules/ri.xml 2008-12-21 05:46:06 UTC (rev 650)
+++ doc/tags/webbeans-reference-guide-1.0.0.ALPHA1/en/modules/ri.xml 2008-12-22 11:52:13 UTC (rev 681)
@@ -1,744 +0,0 @@
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ ]>
-
-<chapter id="ri">
- <title>The Web Beans Reference Implementation</title>
-
- <para>
- The Web Beans Reference Implementation is being developed at
- <ulink url="http://seamframework.org/WebBeans">the Seam project</ulink>.
- You can download the latest developer release of Web Beans from the
- <ulink url="http://seamframework.org/Download">the downloads page</ulink>.
- </para>
-
- <para>
- The Web Beans RI comes with a two deployable example applications,
- <literal>webbeans-numberguess</literal> (a war example, containing only
- simple beans) and <literal>webbeans-translator</literal> (an ear example,
- containing enterprise beans). To run the examples you'll need the following:
- </para>
-
- <itemizedlist>
- <listitem>
- <para>the latest release of the Web Beans RI,</para>
- </listitem>
- <listitem>
- <para>JBoss AS 5.0.0.GA, and</para>
- </listitem>
- <listitem>
- <para>Ant 1.7.0.</para>
- </listitem>
- </itemizedlist>
-
- <para>
- Currently, the Web Beans RI only runs on JBoss Application Server 5.
- You'll need to download JBoss AS 5.0.0.GA from
- <ulink url="http://www.jboss.org/jbossas/downloads/">jboss.org</ulink>,
- and unzip it. For example:
- </para>
-
- <programlisting><![CDATA[$ cd /Applications
-$ unzip ~/jboss-5.0.0.GA.zip]]></programlisting>
-
- <para>
- Next, download the Web Beans RI from
- <ulink url="http://seamframework.org/Download">seamframework.org</ulink>,
- and unzip it. For example
- </para>
-
- <programlisting><![CDATA[$ cd ~/
-$ unzip ~/webbeans-1.0.0.ALPHA1.zip]]></programlisting>
-
-
- <para>
- Next, we need to tell Web Beans where JBoss is located. Edit
- <literal>jboss-as/build.properties</literal> and set the
- <literal>jboss.home</literal> property. For example:
- </para>
-
- <programlisting>jboss.home=/Applications/jboss-5.0.0.GA</programlisting>
-
- <para>
- As Web Beans is a new piece of software, you need to update JBoss AS to
- run the Web Beans RI. Future versions of JBoss AS will include these
- updates, and this step won't be necessary.
- </para>
-
- <note>
- <para>
- Currently, two updates are needed. Firstly, a new deployer,
- <literal>webbeans.deployer</literal> is added. This adds supports for
- Web Bean archives to JBoss AS, and allows the Web Beans RI to query the
- EJB3 container and discover which EJBs are installed in your
- application. Secondly, an update to JBoss EJB3 is needed.
- </para>
- </note>
-
- <para>
- To install the update, you'll need Ant 1.7.0 installed, and the
- <literal>ANT_HOME</literal> environment variable set. For example:
- </para>
-
- <programlisting>$ unzip apache-ant-1.7.0.zip
-$ export ANT_HOME=~/apache-ant-1.7.0</programlisting>
-
- <para>
- Then, you can install the update. The update script will use Maven to
- download the Web Beans and EJB3 automatically.
- </para>
-
- <programlisting>$ cd webbeans-1.0.0.ALPHA1/jboss-as
-$ ant update</programlisting>
-
- <para>
- Now, you're ready to deploy your first example!
- </para>
-
- <tip>
- <para>
- The build scripts for the examples offer a number of targets, these
- are:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>ant restart</literal> - deploy the example in exploded
- format
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>ant explode</literal> - update an exploded example, without
- restarting the deployment
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>ant deploy</literal> - deploy the example in compressed jar format
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>ant undeploy</literal> - remove the example from the server
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>ant clean</literal> - clean the example
- </para>
- </listitem>
- </itemizedlist>
- </tip>
-
- <para>
- To deploy the numberguess example:
- </para>
-
- <programlisting>$ cd examples/numberguess
-ant deploy</programlisting>
-
- <para>
- Wait for the application to deploy, and enjoy hours of fun at
- <ulink url="http://localhost:8080/webbeans-numberguess" />!
- </para>
-
- <para>
- The Web Beans RI includes a second simple example that will translate your text
- into Latin. The numberguess example is a war example, and uses only simple
- beans; the translator example is an ear example, and includes enterprise
- beans, packaged in an EJB module. To try it out:
- </para>
-
- <programlisting>$ cd examples/translator
-ant deploy</programlisting>
-
- <para>
- Wait for the application to deploy, and visit
- <ulink url="http://localhost:8080/webbeans-translator" />!
- </para>
-
- <section>
- <title>The numberguess example</title>
-
- <para>
- In the numberguess application you get given 10 attempts to guess a
- number between 1 and 100. After each attempt, you will be told whether
- you are too high, or too low.
- </para>
-
- <para>
- The numberguess example is comprised of a number of Web Beans,
- configuration files, and Facelet JSF pages, packaged as a war. Let's
- start with the configuration files.
- </para>
-
- <para>
- All the configuration files for this example are located in
- <literal>WEB-INF/</literal>, which is stored in
- <literal>WebContent</literal> in the source tree. First, we have
- <literal>faces-config.xml</literal>, in which we tell JSF to use
- Facelets:
- </para>
-
- <programlisting role="XML"><![CDATA[<?xml version='1.0' encoding='UTF-8'?>
-<faces-config version="1.2"
- xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
-
- <application>
- <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
- </application>
-
-</faces-config>]]></programlisting>
-
- <para>
- There is an empty <literal>web-beans.xml</literal> file, which marks
- this application as a Web Beans application.
- </para>
-
- <para>
- Finally there is <literal>web.xml</literal>:
- </para>
-
- <programlistingco>
- <areaspec>
- <area id="faces.servlet" coords="12" />
- <area id="faces.servlet.mapping" coords="18" />
- <area id="faces.default.suffix" coords="23" />
- <area id="session.timeout" coords="28" />
- <area id="webbeans.listener" coords="32" />
- </areaspec>
- <programlisting role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
-
-<web-app version="2.5"
- xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
-
- <display-name>Web Beans Numbergues example</display-name>
-
- <!-- JSF -->
-
- <servlet>
- <servlet-name>Faces Servlet</servlet-name>
- <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
- <url-pattern>*.jsf</url-pattern>
- </servlet-mapping>
-
- <context-param>
- <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
- <param-value>.xhtml</param-value>
- </context-param>
-
- <session-config>
- <session-timeout>10</session-timeout>
- </session-config>
-
- <listener>
- <listener-class>org.jboss.webbeans.servlet.WebBeansListener</listener-class>
- </listener>
-
-</web-app>]]></programlisting>
- <calloutlist>
- <callout arearefs="faces.servlet">
- <para>
- Enable and load the JSF servlet
- </para>
- </callout>
- <callout arearefs="faces.servlet.mapping">
- <para>
- Configure requests to <literal>.jsf</literal> pages to be
- handled by JSF
- </para>
- </callout>
- <callout arearefs="faces.default.suffix">
- <para>
- Tell JSF that we will be giving our source files (facelets) an
- extension of <literal>.jsf</literal>
- </para>
- </callout>
- <callout arearefs="session.timeout">
- <para>
- Configure a session timeout of 10 minutes
- </para>
- </callout>
- <callout arearefs="webbeans.listener">
- <para>
- Configure the Web Beans listener, so that Web Beans services
- can be used in the servlet request
- </para>
- </callout>
- </calloutlist>
- </programlistingco>
-
- <note>
- <para>
- The only configuration required by the Web Beans RI in
- <literal>web.xml</literal> is to add the Web Beans listener.
- </para>
- <para>
- Whilst this demo is a JSF demo, you can use the Web Beans RI with
- any Servlet based web framework; just configure the Web Beans
- listener.
- </para>
- </note>
-
- <para>
- Let's take a look at the Facelet view:
- </para>
-
- <programlistingco>
- <areaspec>
- <area id="template" coords="8" />
- <area id="messages" coords="12" />
- <area id="instructions" coords="19" />
- <area id="guess" coords="25" />
- <area id="validator" coords="29" />
- <area id="submit" coords="32" />
- </areaspec>
- <programlisting role="XML"><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:s="http://jboss.com/products/seam/taglib">
-
- <ui:composition template="template.xhtml">
- <ui:define name="content">
- <h1>Guess a number...</h1>
- <h:form id="NumberGuessMain">
- <div style="color: red">
- <h:messages id="messages" globalOnly="false"/>
- <h:outputText id="Higher" value="Higher!" rendered="#{game.number gt game.guess}"/>
- <h:outputText id="Lower" value="Lower!" rendered="#{game.number lt game.guess}"/>
- </div>
-
- <div>
- I'm thinking of a number between #{game.smallest} and #{game.biggest}.
- You have #{game.remainingGuesses} guesses.
- </div>
-
- <div>
- Your guess:
- <h:inputText id="inputGuess"
- value="#{game.guess}"
- required="true"
- size="3">
- <f:validateLongRange maximum="#{game.biggest}"
- minimum="#{game.smallest}"/>
- </h:inputText>
- <h:commandButton id="GuessButton"
- value="Guess"
- action="#{game.check}"/>
- </div>
-
- </h:form>
- </ui:define>
- </ui:composition>
-</html>]]></programlisting>
- <calloutlist>
- <callout arearefs="template">
- <para>
- Facelets is a templating language for JSF, here we are
- wrapping our page in a template which defines the header.
- </para>
- </callout>
- <callout arearefs="messages">
- <para>
- There are a number of messages which can be sent to the user,
- "Higher!", "Lower!" and "Correct!"
- </para>
- </callout>
- <callout arearefs="instructions">
- <para>
- As the user guesses, the range of numbers they can guess gets
- smaller - this sentance changes to make sure they know what
- range to guess in.
- </para>
- </callout>
- <callout arearefs="guess">
- <para>
- This input field is bound to a Web Bean, using the value
- expression.
- </para>
- </callout>
- <callout arearefs="validator">
- <para>
- A range validator is used to make sure the user doesn't
- accidentally input a number outside of the range in which they
- can guess - if the validator wasn't here, the user might use
- up a guess on an out of range number.
- </para>
- </callout>
- <callout arearefs="submit">
- <para>
- And, of course, there must be a way for the user to send their
- guess to the server. Here we bind to an action method on the
- Web Bean.
- </para>
- </callout>
- </calloutlist>
- </programlistingco>
-
- <para>
- The example exists of 4 classes, the first two of which are binding
- types. First, there is the <literal>@Random</literal> binding type,
- used for injecting a random number:
- </para>
-
- <programlisting role="JAVA"><![CDATA[@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@BindingType
-public @interface Random {}]]></programlisting>
-
- <para>
- There is also the <literal>@MaxNumber</literal> binding type, used for
- injecting the maximum number that can be injected:
- </para>
-
- <programlisting role="JAVA"><![CDATA[@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@BindingType
-public @interface MaxNumber {}
-]]></programlisting>
-
- <para>
- The <literal>Generator</literal> class is responsible for creating the
- random number, via a producer method. It also exposes the maximum
- possible number via a producer method:
- </para>
-
- <programlisting role="JAVA"><![CDATA[@ApplicationScoped
-public class Generator {
-
- private java.util.Random random = new java.util.Random( System.currentTimeMillis() );
-
- private int maxNumber = 100;
-
- java.util.Random getRandom()
- {
- return random;
- }
-
- @Produces @Random int next() {
- return getRandom().nextInt(maxNumber);
- }
-
- @Produces @MaxNumber int getMaxNumber()
- {
- return maxNumber;
- }
-
-}]]></programlisting>
-
- <para>
- You'll notice that the <literal>Generator</literal> is application
- scoped; therefore we don't get a different random each time.
- </para>
-
- <para>
- The final Web Bean in the application is the session scoped
- <literal>Game</literal>. By making <literal>Game</literal> session
- scoped, you can only play the game once per browser session. You could
- easily add a reset button - a good exercise for the reader :-)
- </para>
-
- <para>
- You'll also note that we've used the <literal>@Named</literal>
- annotation, so that we can use the bean through EL in the JSF page.
- Finally, we've used constructor injection to initialize the game with
- a random number. And of course, we need to tell the player when they've
- won, so we give feedback with a <literal>FacesMessage</literal>.
- </para>
-
- <programlisting role="JAVA"><![CDATA[@Named
-@SessionScoped
-public class Game {
- private int number;
-
- private int guess;
- private int smallest;
- private int biggest;
- private int remainingGuesses;
-
- public Game() {}
-
- @Initializer
- Game(@Random int number, @MaxNumber int maxNumber) {
- this.number = number;
- this.smallest = 1;
- this.biggest = maxNumber;
- this.remainingGuesses = 10;
- }
-
- // Getters and setters for fields
-
- public String check() {
- if (guess>number) {
- biggest = guess - 1;
- }
- if (guess<number) {
- smallest = guess + 1;
- }
- if (guess == number) {
- FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Correct!"));
- }
- remainingGuesses--;
- return null;
- }
-
-}]]></programlisting>
- </section>
-
- <section>
- <title>The translator example</title>
-
- <para>
- The translator example will take any sentences you enter, and translate
- them to Latin.
- </para>
-
- <para>
- The translator example is built as an ear, and contains EJBs and
- enterprise beans. As a result, it's structure is more complex than
- the numberguess example.
- </para>
-
- <note>
- <para>
- EJB 3.1 and Jave EE 6 allow you to package EJBs in a war, which will
- make this structure much simpler!
- </para>
- </note>
-
- <para>
- First, let's take a look at the ear aggregator, which is located in
- <literal>webbeans-translator-ear</literal> module. Maven automatically
- generates the <literal>application.xml</literal> and
- <literal>jboss-app.xml</literal> for us:
- </para>
-
- <programlisting role="XML"><![CDATA[<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-ear-plugin</artifactId>
- <configuration>
- <modules>
- <webModule>
- <groupId>org.jboss.webbeans.examples.translator</groupId>
- <artifactId>webbeans-translator-war</artifactId>
- <contextRoot>/webbeans-translator</contextRoot>
- </webModule>
- </modules>
- <jboss>
- <loader-repository>webbeans.jboss.org:loader=webbeans-translator</loader-repository>
- </jboss>
- </configuration>
-</plugin>]]></programlisting>
-
- <para>
- We're doing a couple of things here - firstly we set the context path,
- which gives us a nice url
- (<ulink url="http://localhost:8080/webbeans-translator">http://localhost:8080/webbeans-translator</ulink>)
- and we also enable class loader isolation for JBoss AS.
- </para>
-
- <tip>
- <para>
- If you aren't using Maven to generate these files, you would need
- <literal>META-INF/jboss-app.xml</literal>:
- </para>
-
- <programlisting role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE jboss-app
- PUBLIC "-//JBoss//DTD J2EE Application 4.2//EN"
- "http://www.jboss.org/j2ee/dtd/jboss-app_4_2.dtd">
-<jboss-app>
- <loader-repository>webbeans.jboss.org:loader=webbeans-translator</loader-repository>
-</jboss-app>]]></programlisting>
-
- <para>
- and <literal>META-INF/application.xml</literal>:
- </para>
-
- <programlisting role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
-<application xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
- version="5">
- <display-name>webbeans-translator-ear</display-name>
- <description>Ear Example for the reference implementation of JSR 299: Web Beans</description>
-
- <module>
- <web>
- <web-uri>webbeans-translator.war</web-uri>
- <context-root>/webbeans-translator</context-root>
- </web>
- </module>
- <module>
- <ejb>webbeans-translator.jar</ejb>
- </module>
-</application>]]></programlisting>
- </tip>
-
- <para>
- Next, lets look at the war. Just as in the numberguess example, we have
- a <literal>faces-config.xml</literal> (to enabled Facelets) and a
- <literal>web.xml</literal> (to enable JSF and attach Web Beans services
- to the servlet container) in <literal>WebContent/WEB-INF</literal>.
- </para>
-
- <para>
- More intersting is the facelet used to translate text. Just as in
- the numberguess example we have a template, which surrounds the form
- (ommitted here for brevity):
- </para>
-
- <programlisting role="XML"><![CDATA[<h:form id="NumberGuessMain">
-
- <table>
- <tr align="center" style="font-weight: bold" >
- <td>
- Your text
- </td>
- <td>
- Translation
- </td>
- </tr>
- <tr>
- <td>
- <h:inputTextarea id="text" value="#{translator.text}" required="true" rows="5" cols="80" />
- </td>
- <td>
- <h:outputText value="#{translator.translatedText}" />
- </td>
- </tr>
- </table>
- <div>
- <h:commandButton id="button" value="Translate" action="#{translator.translate}"/>
- </div>
-
-</h:form>]]></programlisting>
-
- <para>
- The user can enter some text in the lefthand textarea, and hit the
- translate button to see the result to the right.
- </para>
-
- <para>
- Finally, let's look at the ejb module,
- <literal>webbeans-translator-ejb</literal>.
- There are two configuration files in
- <literal>src/main/resources/META-INF</literal>, an empty
- <literal>web-beans.xml</literal>, used to mark the archive as
- containing Web Beans, and <literal>ejb-jar.xml</literal>. Web Beans
- provides injection and initializtion services for all EJBs, and uses
- <literal>ejb-jar.xml</literal> to enable this, you'll need this in any
- EJB project which uses Web Beans:
- </para>
-
- <programlisting role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
-<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
- version="3.0">
-
- <interceptors>
- <interceptor>
- <interceptor-class>org.jboss.webbeans.ejb.SessionBeanInterceptor</interceptor-class>
- </interceptor>
- </interceptors>
-
- <assembly-descriptor>
- <interceptor-binding>
- <ejb-name>*</ejb-name>
- <interceptor-class>org.jboss.webbeans.ejb.SessionBeanInterceptor</interceptor-class>
- </interceptor-binding>
- </assembly-descriptor>
-
-</ejb-jar>]]></programlisting>
-
- <para>
- We've saved the most interesting bit to last, the code! The project has
- two simple beans, <literal>SentanceParser</literal> and
- <literal>TextTranslator</literal> and two enterprise beans,
- <literal>TanslatorControllerBean</literal> and
- <literal>SentenceTranslator</literal>. You should be getting quite
- familiar with what a Web Bean looks like by now, so we'll just
- highlight the most interesting bits here.
- </para>
-
- <para>
- Both <literal>SentanceParser</literal> and
- <literal>TextTranslator</literal> are dependent beans, and
- <literal>TextTranslator</literal> uses constructor initialization:
- </para>
-
- <programlisting role="JAVA"><![CDATA[public class TextTranslator {
- private SentenceParser sentenceParser;
- private Translator sentenceTranslator;
-
- @Initializer
- TextTranslator(SentenceParser sentenceParser, Translator sentenceTranslator)
- {
- this.sentenceParser = sentenceParser;
- this.sentenceTranslator = sentenceTranslator;]]></programlisting>
-
- <para>
- <literal>TextTranslator</literal> is a stateless bean (with a local
- business interface), where the magic happens - of course, we couldn't
- develop a full translator, but we gave it a good go!
- </para>
-
- <para>
- Finally, there is UI orientated controller, that collects the text from
- the user, and dispatches it to the translator. This is a request
- scoped, named, stateful session bean, which injects the translator.
- </para>
-
- <programlisting role="JAVA"><![CDATA[@Stateful
-@RequestScoped
-@Named("translator")
-public class TranslatorControllerBean implements TranslatorController
-{
-
- @Current TextTranslator translator;]]></programlisting>
-
- <para>
- The bean also has getters and setters for all the fields on the page.
- </para>
-
- <para>
- As this is a stateful session bean, we have to have a remove method:
- </para>
-
- <programlisting role="JAVA"><![CDATA[ @Remove
- public void remove()
- {
-
- }]]></programlisting>
-
- <para>
- The Web Beans manager will call the remove method for you when the bean
- is destroyed; in this case at the end of the request.
- </para>
- </section>
-
- <para>
- That concludes our short tour of the Web Beans RI examples. For more on
- the RI, or to help out, please visit
- <ulink url="http://www.seamframework.org/WebBeans/Development">http://www.seamframework.org/WebBeans/Development</ulink>.
- </para>
-
- <para>
- We need help in all areas - bug fixing, writing new features, writing
- examples and translating this reference guide.
- </para>
-
-</chapter>
\ No newline at end of file
Copied: doc/tags/webbeans-reference-guide-1.0.0.ALPHA1/en/modules/ri.xml (from rev 679, doc/trunk/reference/en/modules/ri.xml)
===================================================================
--- doc/tags/webbeans-reference-guide-1.0.0.ALPHA1/en/modules/ri.xml (rev 0)
+++ doc/tags/webbeans-reference-guide-1.0.0.ALPHA1/en/modules/ri.xml 2008-12-22 11:52:13 UTC (rev 681)
@@ -0,0 +1,744 @@
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ ]>
+
+<chapter id="ri">
+ <title>The Web Beans Reference Implementation</title>
+
+ <para>
+ The Web Beans Reference Implementation is being developed at
+ <ulink url="http://seamframework.org/WebBeans">the Seam project</ulink>.
+ You can download the latest developer release of Web Beans from the
+ <ulink url="http://seamframework.org/Download">the downloads page</ulink>.
+ </para>
+
+ <para>
+ The Web Beans RI comes with a two deployable example applications:
+ <literal>webbeans-numberguess</literal>, a war example, containing only
+ simple beans, and <literal>webbeans-translator</literal> an ear example,
+ containing enterprise beans. To run the examples you'll need the following:
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>the latest release of the Web Beans RI,</para>
+ </listitem>
+ <listitem>
+ <para>JBoss AS 5.0.0.GA, and</para>
+ </listitem>
+ <listitem>
+ <para>Ant 1.7.0.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>
+ Currently, the Web Beans RI only runs on JBoss Application Server 5.
+ You'll need to download JBoss AS 5.0.0.GA from
+ <ulink url="http://www.jboss.org/jbossas/downloads/">jboss.org</ulink>,
+ and unzip it. For example:
+ </para>
+
+ <programlisting><![CDATA[$ cd /Applications
+$ unzip ~/jboss-5.0.0.GA.zip]]></programlisting>
+
+ <para>
+ Next, download the Web Beans RI from
+ <ulink url="http://seamframework.org/Download">seamframework.org</ulink>,
+ and unzip it. For example
+ </para>
+
+ <programlisting><![CDATA[$ cd ~/
+$ unzip ~/webbeans-1.0.0.ALPHA1.zip]]></programlisting>
+
+
+ <para>
+ Next, we need to tell Web Beans where JBoss is located. Edit
+ <literal>jboss-as/build.properties</literal> and set the
+ <literal>jboss.home</literal> property. For example:
+ </para>
+
+ <programlisting>jboss.home=/Applications/jboss-5.0.0.GA</programlisting>
+
+ <para>
+ As Web Beans is a new piece of software, you need to update JBoss AS to
+ run the Web Beans RI. Future versions of JBoss AS will include these
+ updates, and this step won't be necessary.
+ </para>
+
+ <note>
+ <para>
+ Currently, two updates are needed. Firstly, a new deployer,
+ <literal>webbeans.deployer</literal> is added. This adds supports for
+ Web Bean archives to JBoss AS, and allows the Web Beans RI to query the
+ EJB3 container and discover which EJBs are installed in your
+ application. Secondly, an update to JBoss EJB3 is needed.
+ </para>
+ </note>
+
+ <para>
+ To install the update, you'll need Ant 1.7.0 installed, and the
+ <literal>ANT_HOME</literal> environment variable set. For example:
+ </para>
+
+ <programlisting>$ unzip apache-ant-1.7.0.zip
+$ export ANT_HOME=~/apache-ant-1.7.0</programlisting>
+
+ <para>
+ Then, you can install the update. The update script will use Maven to
+ download the Web Beans and EJB3 automatically.
+ </para>
+
+ <programlisting>$ cd webbeans-1.0.0.ALPHA1/jboss-as
+$ ant update</programlisting>
+
+ <para>
+ Now, you're ready to deploy your first example!
+ </para>
+
+ <tip>
+ <para>
+ The build scripts for the examples offer a number of targets, these
+ are:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>ant restart</literal> - deploy the example in exploded
+ format
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>ant explode</literal> - update an exploded example, without
+ restarting the deployment
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>ant deploy</literal> - deploy the example in compressed jar format
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>ant undeploy</literal> - remove the example from the server
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>ant clean</literal> - clean the example
+ </para>
+ </listitem>
+ </itemizedlist>
+ </tip>
+
+ <para>
+ To deploy the numberguess example:
+ </para>
+
+ <programlisting>$ cd examples/numberguess
+ant deploy</programlisting>
+
+ <para>
+ Wait for the application to deploy, and enjoy hours of fun at
+ <ulink url="http://localhost:8080/webbeans-numberguess" />!
+ </para>
+
+ <para>
+ The Web Beans RI includes a second simple example that will translate your text
+ into Latin. The numberguess example is a war example, and uses only simple
+ beans; the translator example is an ear example, and includes enterprise
+ beans, packaged in an EJB module. To try it out:
+ </para>
+
+ <programlisting>$ cd examples/translator
+ant deploy</programlisting>
+
+ <para>
+ Wait for the application to deploy, and visit
+ <ulink url="http://localhost:8080/webbeans-translator" />!
+ </para>
+
+ <section>
+ <title>The numberguess example</title>
+
+ <para>
+ In the numberguess application you get given 10 attempts to guess a
+ number between 1 and 100. After each attempt, you will be told whether
+ you are too high, or too low.
+ </para>
+
+ <para>
+ The numberguess example is comprised of a number of Web Beans,
+ configuration files, and Facelet JSF pages, packaged as a war. Let's
+ start with the configuration files.
+ </para>
+
+ <para>
+ All the configuration files for this example are located in
+ <literal>WEB-INF/</literal>, which is stored in
+ <literal>WebContent</literal> in the source tree. First, we have
+ <literal>faces-config.xml</literal>, in which we tell JSF to use
+ Facelets:
+ </para>
+
+ <programlisting role="XML"><![CDATA[<?xml version='1.0' encoding='UTF-8'?>
+<faces-config version="1.2"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+
+ <application>
+ <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
+ </application>
+
+</faces-config>]]></programlisting>
+
+ <para>
+ There is an empty <literal>web-beans.xml</literal> file, which marks
+ this application as a Web Beans application.
+ </para>
+
+ <para>
+ Finally there is <literal>web.xml</literal>:
+ </para>
+
+ <programlistingco>
+ <areaspec>
+ <area id="faces.servlet" coords="12" />
+ <area id="faces.servlet.mapping" coords="18" />
+ <area id="faces.default.suffix" coords="23" />
+ <area id="session.timeout" coords="28" />
+ <area id="webbeans.listener" coords="32" />
+ </areaspec>
+ <programlisting><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.5"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <display-name>Web Beans Numbergues example</display-name>
+
+ <!-- JSF -->
+
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+
+ <session-config>
+ <session-timeout>10</session-timeout>
+ </session-config>
+
+ <listener>
+ <listener-class>org.jboss.webbeans.servlet.WebBeansListener</listener-class>
+ </listener>
+
+</web-app>]]></programlisting>
+ <calloutlist>
+ <callout arearefs="faces.servlet">
+ <para>
+ Enable and load the JSF servlet
+ </para>
+ </callout>
+ <callout arearefs="faces.servlet.mapping">
+ <para>
+ Configure requests to <literal>.jsf</literal> pages to be
+ handled by JSF
+ </para>
+ </callout>
+ <callout arearefs="faces.default.suffix">
+ <para>
+ Tell JSF that we will be giving our source files (facelets) an
+ extension of <literal>.jsf</literal>
+ </para>
+ </callout>
+ <callout arearefs="session.timeout">
+ <para>
+ Configure a session timeout of 10 minutes
+ </para>
+ </callout>
+ <callout arearefs="webbeans.listener">
+ <para>
+ Configure the Web Beans listener, so that Web Beans services
+ can be used in the servlet request
+ </para>
+ </callout>
+ </calloutlist>
+ </programlistingco>
+
+ <note>
+ <para>
+ The only configuration required by the Web Beans RI in
+ <literal>web.xml</literal> is to add the Web Beans listener.
+ </para>
+ <para>
+ Whilst this demo is a JSF demo, you can use the Web Beans RI with
+ any Servlet based web framework; just configure the Web Beans
+ listener.
+ </para>
+ </note>
+
+ <para>
+ Let's take a look at the Facelet view:
+ </para>
+
+ <programlistingco>
+ <areaspec>
+ <area id="template" coords="8" />
+ <area id="messages" coords="12" />
+ <area id="instructions" coords="19" />
+ <area id="guess" coords="25" />
+ <area id="validator" coords="29" />
+ <area id="submit" coords="32" />
+ </areaspec>
+ <programlisting><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <ui:composition template="template.xhtml">
+ <ui:define name="content">
+ <h1>Guess a number...</h1>
+ <h:form id="NumberGuessMain">
+ <div style="color: red">
+ <h:messages id="messages" globalOnly="false"/>
+ <h:outputText id="Higher" value="Higher!" rendered="#{game.number gt game.guess}"/>
+ <h:outputText id="Lower" value="Lower!" rendered="#{game.number lt game.guess}"/>
+ </div>
+
+ <div>
+ I'm thinking of a number between #{game.smallest} and #{game.biggest}.
+ You have #{game.remainingGuesses} guesses.
+ </div>
+
+ <div>
+ Your guess:
+ <h:inputText id="inputGuess"
+ value="#{game.guess}"
+ required="true"
+ size="3">
+ <f:validateLongRange maximum="#{game.biggest}"
+ minimum="#{game.smallest}"/>
+ </h:inputText>
+ <h:commandButton id="GuessButton"
+ value="Guess"
+ action="#{game.check}"/>
+ </div>
+
+ </h:form>
+ </ui:define>
+ </ui:composition>
+</html>]]></programlisting>
+ <calloutlist>
+ <callout arearefs="template">
+ <para>
+ Facelets is a templating language for JSF, here we are
+ wrapping our page in a template which defines the header.
+ </para>
+ </callout>
+ <callout arearefs="messages">
+ <para>
+ There are a number of messages which can be sent to the user,
+ "Higher!", "Lower!" and "Correct!"
+ </para>
+ </callout>
+ <callout arearefs="instructions">
+ <para>
+ As the user guesses, the range of numbers they can guess gets
+ smaller - this sentance changes to make sure they know what
+ range to guess in.
+ </para>
+ </callout>
+ <callout arearefs="guess">
+ <para>
+ This input field is bound to a Web Bean, using the value
+ expression.
+ </para>
+ </callout>
+ <callout arearefs="validator">
+ <para>
+ A range validator is used to make sure the user doesn't
+ accidentally input a number outside of the range in which they
+ can guess - if the validator wasn't here, the user might use
+ up a guess on an out of range number.
+ </para>
+ </callout>
+ <callout arearefs="submit">
+ <para>
+ And, of course, there must be a way for the user to send their
+ guess to the server. Here we bind to an action method on the
+ Web Bean.
+ </para>
+ </callout>
+ </calloutlist>
+ </programlistingco>
+
+ <para>
+ The example exists of 4 classes, the first two of which are binding
+ types. First, there is the <literal>@Random</literal> binding type,
+ used for injecting a random number:
+ </para>
+
+ <programlisting role="JAVA"><![CDATA[@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+public @interface Random {}]]></programlisting>
+
+ <para>
+ There is also the <literal>@MaxNumber</literal> binding type, used for
+ injecting the maximum number that can be injected:
+ </para>
+
+ <programlisting role="JAVA"><![CDATA[@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+public @interface MaxNumber {}
+]]></programlisting>
+
+ <para>
+ The <literal>Generator</literal> class is responsible for creating the
+ random number, via a producer method. It also exposes the maximum
+ possible number via a producer method:
+ </para>
+
+ <programlisting role="JAVA"><![CDATA[@ApplicationScoped
+public class Generator {
+
+ private java.util.Random random = new java.util.Random( System.currentTimeMillis() );
+
+ private int maxNumber = 100;
+
+ java.util.Random getRandom()
+ {
+ return random;
+ }
+
+ @Produces @Random int next() {
+ return getRandom().nextInt(maxNumber);
+ }
+
+ @Produces @MaxNumber int getMaxNumber()
+ {
+ return maxNumber;
+ }
+
+}]]></programlisting>
+
+ <para>
+ You'll notice that the <literal>Generator</literal> is application
+ scoped; therefore we don't get a different random each time.
+ </para>
+
+ <para>
+ The final Web Bean in the application is the session scoped
+ <literal>Game</literal>. By making <literal>Game</literal> session
+ scoped, you can only play the game once per browser session. You could
+ easily add a reset button - a good exercise for the reader :-)
+ </para>
+
+ <para>
+ You'll also note that we've used the <literal>@Named</literal>
+ annotation, so that we can use the bean through EL in the JSF page.
+ Finally, we've used constructor injection to initialize the game with
+ a random number. And of course, we need to tell the player when they've
+ won, so we give feedback with a <literal>FacesMessage</literal>.
+ </para>
+
+ <programlisting role="JAVA"><![CDATA[@Named
+@SessionScoped
+public class Game {
+ private int number;
+
+ private int guess;
+ private int smallest;
+ private int biggest;
+ private int remainingGuesses;
+
+ public Game() {}
+
+ @Initializer
+ Game(@Random int number, @MaxNumber int maxNumber) {
+ this.number = number;
+ this.smallest = 1;
+ this.biggest = maxNumber;
+ this.remainingGuesses = 10;
+ }
+
+ // Getters and setters for fields
+
+ public String check() {
+ if (guess>number) {
+ biggest = guess - 1;
+ }
+ if (guess<number) {
+ smallest = guess + 1;
+ }
+ if (guess == number) {
+ FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Correct!"));
+ }
+ remainingGuesses--;
+ return null;
+ }
+
+}]]></programlisting>
+ </section>
+
+ <section>
+ <title>The translator example</title>
+
+ <para>
+ The translator example will take any sentences you enter, and translate
+ them to Latin.
+ </para>
+
+ <para>
+ The translator example is built as an ear, and contains EJBs and
+ enterprise beans. As a result, it's structure is more complex than
+ the numberguess example.
+ </para>
+
+ <note>
+ <para>
+ EJB 3.1 and Jave EE 6 allow you to package EJBs in a war, which will
+ make this structure much simpler!
+ </para>
+ </note>
+
+ <para>
+ First, let's take a look at the ear aggregator, which is located in
+ <literal>webbeans-translator-ear</literal> module. Maven automatically
+ generates the <literal>application.xml</literal> and
+ <literal>jboss-app.xml</literal> for us:
+ </para>
+
+ <programlisting role="XML"><![CDATA[<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-ear-plugin</artifactId>
+ <configuration>
+ <modules>
+ <webModule>
+ <groupId>org.jboss.webbeans.examples.translator</groupId>
+ <artifactId>webbeans-translator-war</artifactId>
+ <contextRoot>/webbeans-translator</contextRoot>
+ </webModule>
+ </modules>
+ <jboss>
+ <loader-repository>webbeans.jboss.org:loader=webbeans-translator</loader-repository>
+ </jboss>
+ </configuration>
+</plugin>]]></programlisting>
+
+ <para>
+ We're doing a couple of things here - firstly we set the context path,
+ which gives us a nice url
+ (<ulink url="http://localhost:8080/webbeans-translator">http://localhost:8080/webbeans-translator</ulink>)
+ and we also enable class loader isolation for JBoss AS.
+ </para>
+
+ <tip>
+ <para>
+ If you aren't using Maven to generate these files, you would need
+ <literal>META-INF/jboss-app.xml</literal>:
+ </para>
+
+ <programlisting role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE jboss-app
+ PUBLIC "-//JBoss//DTD J2EE Application 4.2//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-app_4_2.dtd">
+<jboss-app>
+ <loader-repository>webbeans.jboss.org:loader=webbeans-translator</loader-repository>
+</jboss-app>]]></programlisting>
+
+ <para>
+ and <literal>META-INF/application.xml</literal>:
+ </para>
+
+ <programlisting role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+<application xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
+ version="5">
+ <display-name>webbeans-translator-ear</display-name>
+ <description>Ear Example for the reference implementation of JSR 299: Web Beans</description>
+
+ <module>
+ <web>
+ <web-uri>webbeans-translator.war</web-uri>
+ <context-root>/webbeans-translator</context-root>
+ </web>
+ </module>
+ <module>
+ <ejb>webbeans-translator.jar</ejb>
+ </module>
+</application>]]></programlisting>
+ </tip>
+
+ <para>
+ Next, lets look at the war. Just as in the numberguess example, we have
+ a <literal>faces-config.xml</literal> (to enabled Facelets) and a
+ <literal>web.xml</literal> (to enable JSF and attach Web Beans services
+ to the servlet container) in <literal>WebContent/WEB-INF</literal>.
+ </para>
+
+ <para>
+ More intersting is the facelet used to translate text. Just as in
+ the numberguess example we have a template, which surrounds the form
+ (ommitted here for brevity):
+ </para>
+
+ <programlisting role="XML"><![CDATA[<h:form id="NumberGuessMain">
+
+ <table>
+ <tr align="center" style="font-weight: bold" >
+ <td>
+ Your text
+ </td>
+ <td>
+ Translation
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <h:inputTextarea id="text" value="#{translator.text}" required="true" rows="5" cols="80" />
+ </td>
+ <td>
+ <h:outputText value="#{translator.translatedText}" />
+ </td>
+ </tr>
+ </table>
+ <div>
+ <h:commandButton id="button" value="Translate" action="#{translator.translate}"/>
+ </div>
+
+</h:form>]]></programlisting>
+
+ <para>
+ The user can enter some text in the lefthand textarea, and hit the
+ translate button to see the result to the right.
+ </para>
+
+ <para>
+ Finally, let's look at the ejb module,
+ <literal>webbeans-translator-ejb</literal>.
+ There are two configuration files in
+ <literal>src/main/resources/META-INF</literal>, an empty
+ <literal>web-beans.xml</literal>, used to mark the archive as
+ containing Web Beans, and <literal>ejb-jar.xml</literal>. Web Beans
+ provides injection and initializtion services for all EJBs, and uses
+ <literal>ejb-jar.xml</literal> to enable this, you'll need this in any
+ EJB project which uses Web Beans:
+ </para>
+
+ <programlisting role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
+ version="3.0">
+
+ <interceptors>
+ <interceptor>
+ <interceptor-class>org.jboss.webbeans.ejb.SessionBeanInterceptor</interceptor-class>
+ </interceptor>
+ </interceptors>
+
+ <assembly-descriptor>
+ <interceptor-binding>
+ <ejb-name>*</ejb-name>
+ <interceptor-class>org.jboss.webbeans.ejb.SessionBeanInterceptor</interceptor-class>
+ </interceptor-binding>
+ </assembly-descriptor>
+
+</ejb-jar>]]></programlisting>
+
+ <para>
+ We've saved the most interesting bit to last, the code! The project has
+ two simple beans, <literal>SentanceParser</literal> and
+ <literal>TextTranslator</literal> and two enterprise beans,
+ <literal>TanslatorControllerBean</literal> and
+ <literal>SentenceTranslator</literal>. You should be getting quite
+ familiar with what a Web Bean looks like by now, so we'll just
+ highlight the most interesting bits here.
+ </para>
+
+ <para>
+ Both <literal>SentanceParser</literal> and
+ <literal>TextTranslator</literal> are dependent beans, and
+ <literal>TextTranslator</literal> uses constructor initialization:
+ </para>
+
+ <programlisting role="JAVA"><![CDATA[public class TextTranslator {
+ private SentenceParser sentenceParser;
+ private Translator sentenceTranslator;
+
+ @Initializer
+ TextTranslator(SentenceParser sentenceParser, Translator sentenceTranslator)
+ {
+ this.sentenceParser = sentenceParser;
+ this.sentenceTranslator = sentenceTranslator;]]></programlisting>
+
+ <para>
+ <literal>TextTranslator</literal> is a stateless bean (with a local
+ business interface), where the magic happens - of course, we couldn't
+ develop a full translator, but we gave it a good go!
+ </para>
+
+ <para>
+ Finally, there is UI orientated controller, that collects the text from
+ the user, and dispatches it to the translator. This is a request
+ scoped, named, stateful session bean, which injects the translator.
+ </para>
+
+ <programlisting role="JAVA"><![CDATA[@Stateful
+@RequestScoped
+@Named("translator")
+public class TranslatorControllerBean implements TranslatorController
+{
+
+ @Current TextTranslator translator;]]></programlisting>
+
+ <para>
+ The bean also has getters and setters for all the fields on the page.
+ </para>
+
+ <para>
+ As this is a stateful session bean, we have to have a remove method:
+ </para>
+
+ <programlisting role="JAVA"><![CDATA[ @Remove
+ public void remove()
+ {
+
+ }]]></programlisting>
+
+ <para>
+ The Web Beans manager will call the remove method for you when the bean
+ is destroyed; in this case at the end of the request.
+ </para>
+ </section>
+
+ <para>
+ That concludes our short tour of the Web Beans RI examples. For more on
+ the RI, or to help out, please visit
+ <ulink url="http://www.seamframework.org/WebBeans/Development">http://www.seamframework.org/WebBeans/Development</ulink>.
+ </para>
+
+ <para>
+ We need help in all areas - bug fixing, writing new features, writing
+ examples and translating this reference guide.
+ </para>
+
+</chapter>
\ No newline at end of file
Deleted: doc/tags/webbeans-reference-guide-1.0.0.ALPHA1/pom.xml
===================================================================
--- doc/trunk/reference/pom.xml 2008-12-21 05:46:06 UTC (rev 650)
+++ doc/tags/webbeans-reference-guide-1.0.0.ALPHA1/pom.xml 2008-12-22 11:52:13 UTC (rev 681)
@@ -1,169 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>org.jboss.webbeans.reference-guide</groupId>
- <artifactId>webbeans-reference-guide</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- <packaging>jdocbook</packaging>
- <name>Web Beans Reference Guide</name>
-
- <pluginRepositories>
- <pluginRepository>
- <id>repository.jboss.org</id>
- <name>JBoss Repository</name>
- <url>http://repository.jboss.org/maven2</url>
- </pluginRepository>
- </pluginRepositories>
- <repositories>
- <repository>
- <id>repository.jboss.org</id>
- <name>JBoss Repository</name>
- <url>http://repository.jboss.org/maven2</url>
- </repository>
- </repositories>
-
- <build>
- <defaultGoal>process-classes</defaultGoal>
- <plugins>
- <plugin>
- <groupId>org.jboss.maven.plugins</groupId>
- <artifactId>maven-jdocbook-plugin</artifactId>
-
- <extensions>true</extensions>
- <dependencies>
- <dependency>
- <groupId>org.jboss.webbeans</groupId>
- <artifactId>webbeans-docbook-xslt</artifactId>
- <version>1.1.1.BETA2</version>
- <exclusions>
- <exclusion>
- <groupId>org.eclipse.wst.css</groupId>
- <artifactId>core</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.eclipse.wst.sse</groupId>
- <artifactId>core</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.jboss.seam</groupId>
- <artifactId>seam-jdocbook-style</artifactId>
- <version>1.1.0.GA</version>
- <type>jdocbook-style</type>
- </dependency>
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jbossorg-jdocbook-style</artifactId>
- <version>1.1.0</version>
- <type>jdocbook-style</type>
- </dependency>
- </dependencies>
- <configuration>
- <sourceDirectory>${pom.basedir}</sourceDirectory>
- <sourceDocumentName>master.xml</sourceDocumentName>
- <masterTranslation>en</masterTranslation>
- <translations>
- <translation>it-IT</translation>
- </translations>
- <imageResource>
- <directory>${pom.basedir}/en</directory>
- <includes>
- <include>images/*.png</include>
- </includes>
- </imageResource>
- <formats>
- <format>
- <formatName>pdf</formatName>
- <stylesheetResource>
- classpath:/xslt/org/jboss/webbeans/pdf.xsl
- </stylesheetResource>
- <finalName>webbeans_reference.pdf</finalName>
- </format>
- <format>
- <formatName>html</formatName>
- <stylesheetResource>
- classpath:/xslt/org/jboss/webbeans/xhtml.xsl
- </stylesheetResource>
- <finalName>index.html</finalName>
- </format>
- <format>
- <formatName>html_single</formatName>
- <stylesheetResource>
- classpath:/xslt/org/jboss/webbeans/xhtml-single.xsl
- </stylesheetResource>
- <finalName>index.html</finalName>
- </format>
- </formats>
- <options>
- <xincludeSupported>true</xincludeSupported>
- <xmlTransformerType>saxon</xmlTransformerType>
- <!-- needed for uri-resolvers; can be ommitted if using 'current' uri scheme -->
- <!-- could also locate the docbook dependency and inspect its version... -->
- <docbookVersion>1.72.0</docbookVersion>
- <localeSeparator>-</localeSeparator>
- </options>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <phase>process-classes</phase>
- <configuration>
- <tasks>
- <copy file="${basedir}/target/docbook/publish/en/pdf/webbeans_reference.pdf" todir="${basedir}" />
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <version>2.0</version>
- </plugin>
- <plugin>
- <groupId>org.jboss.maven.plugins</groupId>
- <artifactId>maven-jdocbook-plugin</artifactId>
- <version>2.1.1</version>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
-
- <profiles>
- <profile>
- <activation>
- <property>
- <name>build.translations</name>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.jboss.maven.plugins</groupId>
- <artifactId>maven-jdocbook-plugin</artifactId>
- <executions>
- <execution>
- <phase>process-resources</phase>
- <goals>
- <goal>translate</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-</project>
Copied: doc/tags/webbeans-reference-guide-1.0.0.ALPHA1/pom.xml (from rev 680, doc/trunk/reference/pom.xml)
===================================================================
--- doc/tags/webbeans-reference-guide-1.0.0.ALPHA1/pom.xml (rev 0)
+++ doc/tags/webbeans-reference-guide-1.0.0.ALPHA1/pom.xml 2008-12-22 11:52:13 UTC (rev 681)
@@ -0,0 +1,205 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.jboss.webbeans.reference-guide</groupId>
+ <artifactId>webbeans-reference-guide</artifactId>
+ <version>1.0.0.ALPHA1</version>
+ <packaging>jdocbook</packaging>
+ <name>Web Beans Reference Guide</name>
+
+ <pluginRepositories>
+ <pluginRepository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <url>http://repository.jboss.org/maven2</url>
+ </pluginRepository>
+ </pluginRepositories>
+ <repositories>
+ <repository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <url>http://repository.jboss.org/maven2</url>
+ </repository>
+ </repositories>
+
+ <build>
+ <defaultGoal>process-classes</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jdocbook-plugin</artifactId>
+
+ <extensions>true</extensions>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.webbeans</groupId>
+ <artifactId>webbeans-docbook-xslt</artifactId>
+ <version>1.1.1.BETA2</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.eclipse.wst.css</groupId>
+ <artifactId>core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.eclipse.wst.sse</groupId>
+ <artifactId>core</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>seam-jdocbook-style</artifactId>
+ <version>1.1.0.GA</version>
+ <type>jdocbook-style</type>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jbossorg-jdocbook-style</artifactId>
+ <version>1.1.0</version>
+ <type>jdocbook-style</type>
+ </dependency>
+ </dependencies>
+ <configuration>
+ <sourceDirectory>${pom.basedir}</sourceDirectory>
+ <sourceDocumentName>master.xml</sourceDocumentName>
+ <masterTranslation>en</masterTranslation>
+ <translations>
+ <translation>it-IT</translation>
+ </translations>
+ <imageResource>
+ <directory>${pom.basedir}/en</directory>
+ <includes>
+ <include>images/*.png</include>
+ </includes>
+ </imageResource>
+ <formats>
+ <format>
+ <formatName>pdf</formatName>
+ <stylesheetResource>
+ classpath:/xslt/org/jboss/webbeans/pdf.xsl
+ </stylesheetResource>
+ <finalName>webbeans_reference.pdf</finalName>
+ </format>
+ <format>
+ <formatName>html</formatName>
+ <stylesheetResource>
+ classpath:/xslt/org/jboss/webbeans/xhtml.xsl
+ </stylesheetResource>
+ <finalName>index.html</finalName>
+ </format>
+ <format>
+ <formatName>html_single</formatName>
+ <stylesheetResource>
+ classpath:/xslt/org/jboss/webbeans/xhtml-single.xsl
+ </stylesheetResource>
+ <finalName>index.html</finalName>
+ </format>
+ </formats>
+ <options>
+ <xincludeSupported>true</xincludeSupported>
+ <xmlTransformerType>saxon</xmlTransformerType>
+ <!-- needed for uri-resolvers; can be ommitted if using 'current' uri scheme -->
+ <!-- could also locate the docbook dependency and inspect its version... -->
+ <docbookVersion>1.72.0</docbookVersion>
+ <localeSeparator>-</localeSeparator>
+ </options>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>process-classes</phase>
+ <configuration>
+ <tasks>
+ <copy file="${basedir}/target/docbook/publish/en/pdf/webbeans_reference.pdf" todir="${basedir}" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.0</version>
+ </plugin>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jdocbook-plugin</artifactId>
+ <version>2.1.1</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <profiles>
+ <profile>
+ <activation>
+ <property>
+ <name>build.translations</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jdocbook-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>translate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+ <ciManagement>
+ <system>Hudson</system>
+ <url />
+
+ </ciManagement>
+
+ <issueManagement>
+ <system>JIRA</system>
+ <url>http://jira.jboss.org/browse/WBRI</url>
+ </issueManagement>
+
+ <inceptionYear>2008</inceptionYear>
+
+ <scm>
+
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/webbeans/doc/tags/webbeans-referen...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/webbeans/doc/tags/webbeans-reference-...</developerConnection>
+ <url>http://fisheye.jboss.org/browse/WebBeans/doc/tags/webbeans-reference-guid...</url>
+ </scm>
+
+ <distributionManagement>
+ <repository>
+ <!-- Copy the dist to the local checkout of the JBoss maven2 repo ${maven.repository.root} -->
+
+ <!-- It is anticipated that ${maven.repository.root} be set in user's settings.xml -->
+ <!-- todo : replace this with direct svn access once the svnkit providers are available -->
+ <id>repository.jboss.org</id>
+ <url>file://${maven.repository.root}</url>
+ </repository>
+ <snapshotRepository>
+ <id>snapshots.jboss.org</id>
+
+ <name>JBoss Snapshot Repository</name>
+ <url>dav:https://snapshots.jboss.org/maven2</url>
+ </snapshotRepository>
+ </distributionManagement>
+
+</project>
\ No newline at end of file
16 years
[webbeans-commits] Webbeans SVN: r679 - doc/trunk/reference/en/modules.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-12-22 06:47:32 -0500 (Mon, 22 Dec 2008)
New Revision: 679
Modified:
doc/trunk/reference/en/modules/ri.xml
Log:
fix programlisting
Modified: doc/trunk/reference/en/modules/ri.xml
===================================================================
--- doc/trunk/reference/en/modules/ri.xml 2008-12-22 11:46:58 UTC (rev 678)
+++ doc/trunk/reference/en/modules/ri.xml 2008-12-22 11:47:32 UTC (rev 679)
@@ -11,10 +11,10 @@
</para>
<para>
- The Web Beans RI comes with a two deployable example applications,
- <literal>webbeans-numberguess</literal> (a war example, containing only
- simple beans) and <literal>webbeans-translator</literal> (an ear example,
- containing enterprise beans). To run the examples you'll need the following:
+ The Web Beans RI comes with a two deployable example applications:
+ <literal>webbeans-numberguess</literal>, a war example, containing only
+ simple beans, and <literal>webbeans-translator</literal> an ear example,
+ containing enterprise beans. To run the examples you'll need the following:
</para>
<itemizedlist>
@@ -208,7 +208,7 @@
<area id="session.timeout" coords="28" />
<area id="webbeans.listener" coords="32" />
</areaspec>
- <programlisting role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+ <programlisting><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
@@ -301,7 +301,7 @@
<area id="validator" coords="29" />
<area id="submit" coords="32" />
</areaspec>
- <programlisting role="XML"><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ <programlisting><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
16 years
[webbeans-commits] Webbeans SVN: r678 - doc/trunk/reference.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-12-22 06:46:58 -0500 (Mon, 22 Dec 2008)
New Revision: 678
Modified:
doc/trunk/reference/pom.xml
Log:
metadata
Modified: doc/trunk/reference/pom.xml
===================================================================
--- doc/trunk/reference/pom.xml 2008-12-22 11:39:56 UTC (rev 677)
+++ doc/trunk/reference/pom.xml 2008-12-22 11:46:58 UTC (rev 678)
@@ -166,4 +166,42 @@
</build>
</profile>
</profiles>
+
+ <ciManagement>
+ <system>Hudson</system>
+ <url />
+
+ </ciManagement>
+
+ <issueManagement>
+ <system>JIRA</system>
+ <url>http://jira.jboss.org/browse/WBRI</url>
+ </issueManagement>
+
+ <inceptionYear>2008</inceptionYear>
+
+ <scm>
+
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/webbeans/doc</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/webbeans/doc</developerConnection>
+ <url>http://fisheye.jboss.org/browse/WebBeans/doc</url>
+ </scm>
+
+ <distributionManagement>
+ <repository>
+ <!-- Copy the dist to the local checkout of the JBoss maven2 repo ${maven.repository.root} -->
+
+ <!-- It is anticipated that ${maven.repository.root} be set in user's settings.xml -->
+ <!-- todo : replace this with direct svn access once the svnkit providers are available -->
+ <id>repository.jboss.org</id>
+ <url>file://${maven.repository.root}</url>
+ </repository>
+ <snapshotRepository>
+ <id>snapshots.jboss.org</id>
+
+ <name>JBoss Snapshot Repository</name>
+ <url>dav:https://snapshots.jboss.org/maven2</url>
+ </snapshotRepository>
+ </distributionManagement>
+
</project>
16 years
[webbeans-commits] Webbeans SVN: r677 - in ri/trunk: webbeans-api and 2 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-12-22 06:39:56 -0500 (Mon, 22 Dec 2008)
New Revision: 677
Modified:
ri/trunk/pom.xml
ri/trunk/webbeans-api/pom.xml
ri/trunk/webbeans-ri-spi/pom.xml
ri/trunk/webbeans-ri/pom.xml
Log:
[maven-release-plugin] prepare for next development iteration
Modified: ri/trunk/pom.xml
===================================================================
--- ri/trunk/pom.xml 2008-12-22 11:39:21 UTC (rev 676)
+++ ri/trunk/pom.xml 2008-12-22 11:39:56 UTC (rev 677)
@@ -3,7 +3,7 @@
<groupId>org.jboss.webbeans</groupId>
<artifactId>parent</artifactId>
<packaging>pom</packaging>
- <version>1.0.0.ALPHA1</version>
+ <version>1.0.0-SNAPSHOT</version>
<name>Web Beans</name>
<url>http://www.seamframework.org/WebBeans</url>
@@ -327,9 +327,9 @@
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/webbeans/ri/tags/1.0.0.ALPHA1</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/webbeans/ri/tags/1.0.0.ALPHA1</developerConnection>
- <url>http://fisheye.jboss.org/browse/WebBeans/ri/tags/1.0.0.ALPHA1</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/webbeans/ri</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/webbeans/ri</developerConnection>
+ <url>http://fisheye.jboss.org/browse/WebBeans/ri</url>
</scm>
<distributionManagement>
Modified: ri/trunk/webbeans-api/pom.xml
===================================================================
--- ri/trunk/webbeans-api/pom.xml 2008-12-22 11:39:21 UTC (rev 676)
+++ ri/trunk/webbeans-api/pom.xml 2008-12-22 11:39:56 UTC (rev 677)
@@ -4,7 +4,7 @@
<parent>
<groupId>org.jboss.webbeans</groupId>
<artifactId>parent</artifactId>
- <version>1.0.0.ALPHA1</version>
+ <version>1.0.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.webbeans</groupId>
Modified: ri/trunk/webbeans-ri/pom.xml
===================================================================
--- ri/trunk/webbeans-ri/pom.xml 2008-12-22 11:39:21 UTC (rev 676)
+++ ri/trunk/webbeans-ri/pom.xml 2008-12-22 11:39:56 UTC (rev 677)
@@ -2,7 +2,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>org.jboss.webbeans</groupId>
- <version>1.0.0.ALPHA1</version>
+ <version>1.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.webbeans</groupId>
Modified: ri/trunk/webbeans-ri-spi/pom.xml
===================================================================
--- ri/trunk/webbeans-ri-spi/pom.xml 2008-12-22 11:39:21 UTC (rev 676)
+++ ri/trunk/webbeans-ri-spi/pom.xml 2008-12-22 11:39:56 UTC (rev 677)
@@ -2,7 +2,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>org.jboss.webbeans</groupId>
- <version>1.0.0.ALPHA1</version>
+ <version>1.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.webbeans</groupId>
16 years