[webbeans-commits] Webbeans SVN: r805 - in doc/trunk/reference: ko-KR and 3 other directories.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Wed Jan 7 06:49:48 EST 2009


Author: pete.muir at jboss.org
Date: 2009-01-07 06:49:47 -0500 (Wed, 07 Jan 2009)
New Revision: 805

Added:
   doc/trunk/reference/ko-KR/
   doc/trunk/reference/ko-KR/Author_Group.po
   doc/trunk/reference/ko-KR/Book_Info.po
   doc/trunk/reference/ko-KR/decorators.po
   doc/trunk/reference/ko-KR/ee.po
   doc/trunk/reference/ko-KR/events.po
   doc/trunk/reference/ko-KR/example.po
   doc/trunk/reference/ko-KR/extend.po
   doc/trunk/reference/ko-KR/injection.po
   doc/trunk/reference/ko-KR/interceptors.po
   doc/trunk/reference/ko-KR/intro.po
   doc/trunk/reference/ko-KR/master.po
   doc/trunk/reference/ko-KR/next.po
   doc/trunk/reference/ko-KR/part1.po
   doc/trunk/reference/ko-KR/part2.po
   doc/trunk/reference/ko-KR/part3.po
   doc/trunk/reference/ko-KR/part4.po
   doc/trunk/reference/ko-KR/producermethods.po
   doc/trunk/reference/ko-KR/ri-spi.po
   doc/trunk/reference/ko-KR/ri.po
   doc/trunk/reference/ko-KR/scopescontexts.po
   doc/trunk/reference/ko-KR/specialization.po
   doc/trunk/reference/ko-KR/stereotypes.po
   doc/trunk/reference/ko-KR/xml.po
   doc/trunk/reference/pt-BR/
   doc/trunk/reference/pt-BR/Author_Group.po
   doc/trunk/reference/pt-BR/Book_Info.po
   doc/trunk/reference/pt-BR/decorators.po
   doc/trunk/reference/pt-BR/ee.po
   doc/trunk/reference/pt-BR/events.po
   doc/trunk/reference/pt-BR/example.po
   doc/trunk/reference/pt-BR/extend.po
   doc/trunk/reference/pt-BR/injection.po
   doc/trunk/reference/pt-BR/interceptors.po
   doc/trunk/reference/pt-BR/intro.po
   doc/trunk/reference/pt-BR/master.po
   doc/trunk/reference/pt-BR/next.po
   doc/trunk/reference/pt-BR/part1.po
   doc/trunk/reference/pt-BR/part2.po
   doc/trunk/reference/pt-BR/part3.po
   doc/trunk/reference/pt-BR/part4.po
   doc/trunk/reference/pt-BR/producermethods.po
   doc/trunk/reference/pt-BR/ri-spi.po
   doc/trunk/reference/pt-BR/ri.po
   doc/trunk/reference/pt-BR/scopescontexts.po
   doc/trunk/reference/pt-BR/specialization.po
   doc/trunk/reference/pt-BR/stereotypes.po
   doc/trunk/reference/pt-BR/xml.po
   doc/trunk/reference/zh-TW/
   doc/trunk/reference/zh-TW/Author_Group.po
   doc/trunk/reference/zh-TW/Book_Info.po
   doc/trunk/reference/zh-TW/decorators.po
   doc/trunk/reference/zh-TW/ee.po
   doc/trunk/reference/zh-TW/events.po
   doc/trunk/reference/zh-TW/example.po
   doc/trunk/reference/zh-TW/extend.po
   doc/trunk/reference/zh-TW/injection.po
   doc/trunk/reference/zh-TW/interceptors.po
   doc/trunk/reference/zh-TW/intro.po
   doc/trunk/reference/zh-TW/master.po
   doc/trunk/reference/zh-TW/next.po
   doc/trunk/reference/zh-TW/part1.po
   doc/trunk/reference/zh-TW/part2.po
   doc/trunk/reference/zh-TW/part3.po
   doc/trunk/reference/zh-TW/part4.po
   doc/trunk/reference/zh-TW/producermethods.po
   doc/trunk/reference/zh-TW/ri-spi.po
   doc/trunk/reference/zh-TW/ri.po
   doc/trunk/reference/zh-TW/scopescontexts.po
   doc/trunk/reference/zh-TW/specialization.po
   doc/trunk/reference/zh-TW/stereotypes.po
   doc/trunk/reference/zh-TW/xml.po
Modified:
   doc/trunk/reference/Makefile
   doc/trunk/reference/pot/messages.mo
Log:
add zh-TW pt-BR ko-KR

Modified: doc/trunk/reference/Makefile
===================================================================
--- doc/trunk/reference/Makefile	2009-01-07 11:39:56 UTC (rev 804)
+++ doc/trunk/reference/Makefile	2009-01-07 11:49:47 UTC (rev 805)
@@ -8,7 +8,7 @@
 BRAND		= JBoss
 
 TRANSLATIONS    = $(XML_LANG)
-OTHER_LANGS    = es-ES fr-FR it-IT ja-JP zh-CN
+OTHER_LANGS    = es-ES fr-FR it-IT ja-JP zh-CN ko-KR zh-TW pt-BR
 #TRANSLATIONS   = $(XML_LANG) $(OTHER_LANGS)
 
 COMMON_CONFIG  = /usr/share/publican

Added: doc/trunk/reference/ko-KR/Author_Group.po
===================================================================
--- doc/trunk/reference/ko-KR/Author_Group.po	                        (rev 0)
+++ doc/trunk/reference/ko-KR/Author_Group.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,60 @@
+# Language ko-KR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: author
+#: Author_Group.xml:4
+#, no-c-format
+msgid "<firstname>Gavin</firstname> <surname>King</surname>"
+msgstr ""
+
+#. Tag: affiliation
+#: Author_Group.xml:7
+#, no-c-format
+msgid ""
+"<jobtitle>Web Beans (JSR-299) specification lead</jobtitle> <orgname>Red Hat "
+"Middleware LLC</orgname>"
+msgstr ""
+
+#. Tag: author
+#: Author_Group.xml:12
+#, no-c-format
+msgid "<firstname>Pete</firstname> <surname>Muir</surname>"
+msgstr ""
+
+#. Tag: affiliation
+#: Author_Group.xml:15
+#, no-c-format
+msgid ""
+"<jobtitle>Web Beans (JSR-299) Reference Implementation lead </jobtitle> "
+"<orgname>Red Hat Middleware LLC</orgname>"
+msgstr ""
+
+#. Tag: othercredit
+#: Author_Group.xml:21
+#, no-c-format
+msgid "<firstname>Nicola</firstname> <surname>Benaglia</surname>"
+msgstr ""
+
+#. Tag: contrib
+#: Author_Group.xml:24 Author_Group.xml:29
+#, no-c-format
+msgid "Italian Translation"
+msgstr ""
+
+#. Tag: othercredit
+#: Author_Group.xml:26
+#, no-c-format
+msgid "<firstname>Francesco</firstname> <surname>Milesi</surname>"
+msgstr ""

Added: doc/trunk/reference/ko-KR/Book_Info.po
===================================================================
--- doc/trunk/reference/ko-KR/Book_Info.po	                        (rev 0)
+++ doc/trunk/reference/ko-KR/Book_Info.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,28 @@
+# Language ko-KR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: Book_Info.xml:4
+#, no-c-format
+msgid "Introduction to Web Beans"
+msgstr ""
+
+#. Tag: subtitle
+#: Book_Info.xml:5
+#, no-c-format
+msgid ""
+"The new Java standard for dependency injection and contextual state "
+"management"
+msgstr ""

Added: doc/trunk/reference/ko-KR/decorators.po
===================================================================
--- doc/trunk/reference/ko-KR/decorators.po	                        (rev 0)
+++ doc/trunk/reference/ko-KR/decorators.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,243 @@
+# Language ko-KR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: decorators.xml:4
+#, no-c-format
+msgid "Decorators"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:6
+#, no-c-format
+msgid ""
+"Interceptors are a powerful way to capture and separate concerns which are "
+"<emphasis>orthogonal</emphasis> to the type system. Any interceptor is able "
+"to intercept invocations of any Java type. This makes them perfect for "
+"solving technical concerns such as transaction management and security. "
+"However, by nature, interceptors are unaware of the actual semantics of the "
+"events they intercept. Thus, interceptors aren't an appropriate tool for "
+"separating business-related concerns."
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:14
+#, no-c-format
+msgid ""
+"The reverse is true of <emphasis>decorators</emphasis>. A decorator "
+"intercepts invocations only for a certain Java interface, and is therefore "
+"aware of all the semantics attached to that interface. This makes decorators "
+"a perfect tool for modeling some kinds of business concerns. It also means "
+"that a decorator doesn't have the generality of an interceptor. Decorators "
+"aren't able to solve technical concerns that cut across many disparate types."
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:22
+#, no-c-format
+msgid "Suppose we have an interface that represents accounts:"
+msgstr ""
+
+#. Tag: programlisting
+#: decorators.xml:24
+#, no-c-format
+msgid ""
+"<![CDATA[public interface Account {\n"
+"    public BigDecimal getBalance();\n"
+"    public User getOwner();\n"
+"    public void withdraw(BigDecimal amount);\n"
+"    public void deposit(BigDecimal amount);\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:26
+#, no-c-format
+msgid ""
+"Several different Web Beans in our system implement the <literal>Account</"
+"literal> interface. However, we have a common legal requirement that, for "
+"any kind of account, large transactions must be recorded by the system in a "
+"special log. This is a perfect job for a decorator."
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:32
+#, no-c-format
+msgid ""
+"A decorator is a simple Web Bean that implements the type it decorates and "
+"is annotated <literal>@Decorator</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: decorators.xml:35
+#, no-c-format
+msgid ""
+"<![CDATA[@Decorator\n"
+"public abstract class LargeTransactionDecorator \n"
+"        implements Account {\n"
+"    \n"
+"    @Decorates Account account;\n"
+"    \n"
+"    @PersistenceContext EntityManager em;\n"
+"    \n"
+"    public void withdraw(BigDecimal amount) {\n"
+"        account.withdraw(amount);\n"
+"        if ( amount.compareTo(LARGE_AMOUNT)>0 ) {\n"
+"            em.persist( new LoggedWithdrawl(amount) );\n"
+"        }\n"
+"    }\n"
+"    \n"
+"    public void deposit(BigDecimal amount);\n"
+"        account.deposit(amount);\n"
+"        if ( amount.compareTo(LARGE_AMOUNT)>0 ) {\n"
+"            em.persist( new LoggedDeposit(amount) );\n"
+"        }\n"
+"    }\n"
+"    \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:37
+#, no-c-format
+msgid ""
+"Unlike other simple Web Beans, a decorator may be an abstract class. If "
+"there's nothing special the decorator needs to do for a particular method of "
+"the decorated interface, you don't need to implement that method."
+msgstr ""
+
+#. Tag: title
+#: decorators.xml:43
+#, no-c-format
+msgid "Delegate attributes"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:45
+#, no-c-format
+msgid ""
+"All decorators have a <emphasis>delegate attribute</emphasis>. The type and "
+"binding types of the delegate attribute determine which Web Beans the "
+"decorator is bound to. The delegate attribute type must implement or extend "
+"all interfaces implemented by the decorator."
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:50
+#, no-c-format
+msgid ""
+"This delegate attribute specifies that the decorator is bound to all Web "
+"Beans that implement <literal>Account</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: decorators.xml:53
+#, no-c-format
+msgid "<![CDATA[@Decorates Account account;]]>"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:55
+#, no-c-format
+msgid ""
+"A delegate attribute may specify a binding annotation. Then the decorator "
+"will only be bound to Web Beans with the same binding."
+msgstr ""
+
+#. Tag: programlisting
+#: decorators.xml:58
+#, no-c-format
+msgid "<![CDATA[@Decorates @Foreign Account account;]]>"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:60
+#, no-c-format
+msgid "A decorator is bound to any Web Bean which:"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:64
+#, no-c-format
+msgid "has the type of the delegate attribute as an API type, and"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:67
+#, no-c-format
+msgid "has all binding types that are declared by the delegate attribute."
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:71
+#, no-c-format
+msgid ""
+"The decorator may invoke the delegate attribute, which has much the same "
+"effect as calling <literal>InvocationContext.proceed()</literal> from an "
+"interceptor."
+msgstr ""
+
+#. Tag: title
+#: decorators.xml:78
+#, no-c-format
+msgid "Enabling decorators"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:80
+#, no-c-format
+msgid ""
+"We need to <emphasis>enable</emphasis> our decorator in <literal>web-beans."
+"xml</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: decorators.xml:83
+#, no-c-format
+msgid ""
+"<![CDATA[<Decorators>\n"
+"    <myapp:LargeTransactionDecorator/>\n"
+"</Decorators>]]>"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:85
+#, no-c-format
+msgid ""
+"This declaration serves the same purpose for decorators that the "
+"<literal>&lt;Interceptors&gt;</literal> declaration serves for interceptors:"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:90
+#, no-c-format
+msgid ""
+"it enables us to specify a total ordering for all decorators in our system, "
+"ensuring deterministic behavior, and"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:94
+#, no-c-format
+msgid "it lets us enable or disable decorator classes at deployment time."
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:98
+#, no-c-format
+msgid ""
+"Interceptors for a method are called before decorators that apply to that "
+"method."
+msgstr ""

Added: doc/trunk/reference/ko-KR/ee.po
===================================================================
--- doc/trunk/reference/ko-KR/ee.po	                        (rev 0)
+++ doc/trunk/reference/ko-KR/ee.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,329 @@
+# Language ko-KR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: ee.xml:4
+#, no-c-format
+msgid "Java EE integration"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:6
+#, no-c-format
+msgid ""
+"Web Beans is fully integrated into the Java EE environment. Web Beans have "
+"access to Java EE resources and JPA persistence contexts. They may be used "
+"in Unified EL expressions in JSF and JSP pages. They may even be injected "
+"into some objects, such as Servlets and Message-Driven Beans, which are not "
+"Web Beans."
+msgstr ""
+
+#. Tag: title
+#: ee.xml:12
+#, no-c-format
+msgid "Injecting Java EE resources into a Web Bean"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:14
+#, no-c-format
+msgid ""
+"All simple and enterprise Web Beans may take advantage of Java EE dependency "
+"injection using <literal>@Resource</literal>, <literal>@EJB</literal> and "
+"<literal>@PersistenceContext</literal>. We've already seen a couple of "
+"examples of this, though we didn't pay much attention at the time:"
+msgstr ""
+
+#. Tag: programlisting
+#: ee.xml:19
+#, no-c-format
+msgid ""
+"<![CDATA[@Transactional @Interceptor\n"
+"public class TransactionInterceptor {\n"
+"\n"
+"    @Resource Transaction transaction;\n"
+"\n"
+"    @AroundInvoke public Object manageTransaction(InvocationContext ctx) "
+"{ ... }\n"
+"    \n"
+"}]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: ee.xml:21
+#, no-c-format
+msgid ""
+"<![CDATA[@SessionScoped\n"
+"public class Login {\n"
+"\n"
+"    @Current Credentials credentials;\n"
+"    @PersistenceContext EntityManager userDatabase;\n"
+"    \n"
+"    ...\n"
+"\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:23
+#, no-c-format
+msgid ""
+"The Java EE <literal>@PostConstruct</literal> and <literal>@PreDestroy</"
+"literal> callbacks are also supported for all simple and enterprise Web "
+"Beans. The <literal>@PostConstruct</literal> method is called after "
+"<emphasis>all</emphasis> injection has been performed."
+msgstr ""
+
+#. Tag: para
+#: ee.xml:28
+#, no-c-format
+msgid ""
+"There is one restriction to be aware of here: <literal>@PersistenceContext"
+"(type=EXTENDED)</literal> is not supported for simple Web Beans."
+msgstr ""
+
+#. Tag: title
+#: ee.xml:35
+#, no-c-format
+msgid "Calling a Web Bean from a Servlet"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:37
+#, no-c-format
+msgid ""
+"It's easy to use a Web Bean from a Servlet in Java EE 6. Simply inject the "
+"Web Bean using Web Beans field or initializer method injection."
+msgstr ""
+
+#. Tag: programlisting
+#: ee.xml:40
+#, no-c-format
+msgid ""
+"public class Login extends HttpServlet {\n"
+"\n"
+"    @Current Credentials credentials;\n"
+"    @Current Login login;\n"
+"\n"
+"    @Override\n"
+"    public void service(HttpServletRequest request, HttpServletResponse "
+"response)\n"
+"        throws ServletException, IOException {\n"
+"        credentials.setUsername( request.getAttribute(\"username\") ):\n"
+"        credentials.setPassword( request.getAttribute(\"password\") ):\n"
+"        login.login();\n"
+"        if ( login.isLoggedIn() ) {\n"
+"            response.sendRedirect(\"/home.jsp\");\n"
+"        }\n"
+"        else {\n"
+"            response.sendRedirect(\"/loginError.jsp\");\n"
+"        }\n"
+"    }\n"
+"            \n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:42
+#, no-c-format
+msgid ""
+"The Web Beans client proxy takes care of routing method invocations from the "
+"Servlet to the correct instances of <literal>Credentials</literal> and "
+"<literal>Login</literal> for the current request and HTTP session."
+msgstr ""
+
+#. Tag: title
+#: ee.xml:49
+#, no-c-format
+msgid "Calling a Web Bean from a Message-Driven Bean"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:51
+#, no-c-format
+msgid ""
+"Web Beans injection applies to all EJBs, even when they aren't under the "
+"control of the Web Bean manager (if they were obtained by direct JNDI "
+"lookup, or injection using <literal>@EJB</literal>, for example. In "
+"particular, you can use Web Beans injection in Message-Driven Beans, which "
+"are not considered Web Beans because you can't inject them."
+msgstr ""
+
+#. Tag: para
+#: ee.xml:57
+#, no-c-format
+msgid ""
+"You can even use Web Beans interceptor bindings for Message-Driven Beans."
+msgstr ""
+
+#. Tag: programlisting
+#: ee.xml:59
+#, no-c-format
+msgid ""
+"@Transactional @MessageDriven\n"
+"public class ProcessOrder implements MessageListener {\n"
+"\n"
+"    @Current Inventory inventory;\n"
+"    @PersistenceContext EntityManager em;\n"
+"\n"
+"    public void onMessage(Message message) {\n"
+"        ...\n"
+"    }\n"
+"            \n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:61
+#, no-c-format
+msgid ""
+"Thus, receiving messages is super-easy in a Web Beans environment. But "
+"beware that there is no session or conversation context available when a "
+"message is delivered to a Message-Driven Bean. Only <literal>@RequestScoped</"
+"literal> and <literal>@ApplicationScoped</literal> Web Beans are available."
+msgstr ""
+
+#. Tag: para
+#: ee.xml:66
+#, no-c-format
+msgid "It's also easy to send messages using Web Beans."
+msgstr ""
+
+#. Tag: title
+#: ee.xml:71
+#, no-c-format
+msgid "JMS endpoints"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:73
+#, no-c-format
+msgid ""
+"Sending messages using JMS can be quite complex, because of the number of "
+"different objects you need to deal with. For queues we have <literal>Queue</"
+"literal>, <literal>QueueConnectionFactory</literal>, "
+"<literal>QueueConnection</literal>, <literal>QueueSession</literal> and "
+"<literal>QueueSender</literal>. For topics we have <literal>Topic</literal>, "
+"<literal>TopicConnectionFactory</literal>, <literal>TopicConnection</"
+"literal>, <literal>TopicSession</literal> and <literal>TopicPublisher</"
+"literal>. Each of these objects has its own lifecycle and threading model "
+"that we need to worry about."
+msgstr ""
+
+#. Tag: para
+#: ee.xml:82
+#, no-c-format
+msgid ""
+"Web Beans takes care of all this for us. All we need to do is declare the "
+"queue or topic in <literal>web-beans.xml</literal>, specifying an associated "
+"binding type and connection factory."
+msgstr ""
+
+#. Tag: programlisting
+#: ee.xml:86
+#, no-c-format
+msgid ""
+"<![CDATA[<Queue>\n"
+"    <destination>java:comp/env/jms/OrderQueue</destination>\n"
+"    <connectionFactory>java:comp/env/jms/QueueConnectionFactory</"
+"connectionFactory>\n"
+"    <myapp:OrderProcessor/>    \n"
+"</Queue>]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: ee.xml:88
+#, no-c-format
+msgid ""
+"<![CDATA[<Topic>\n"
+"    <destination>java:comp/env/jms/StockPrices</destination>\n"
+"    <connectionFactory>java:comp/env/jms/TopicConnectionFactory</"
+"connectionFactory>\n"
+"    <myapp:StockPrices/>    \n"
+"</Topic>]]>"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:90
+#, no-c-format
+msgid ""
+"Now we can just inject the <literal>Queue</literal>, "
+"<literal>QueueConnection</literal>, <literal>QueueSession</literal> or "
+"<literal>QueueSender</literal> for a queue, or the <literal>Topic</literal>, "
+"<literal>TopicConnection</literal>, <literal>TopicSession</literal> or "
+"<literal>TopicPublisher</literal> for a topic."
+msgstr ""
+
+#. Tag: programlisting
+#: ee.xml:96
+#, no-c-format
+msgid ""
+"@OrderProcessor QueueSender orderSender;\n"
+"@OrderProcessor QueueSession orderSession;\n"
+"\n"
+"public void sendMessage() {\n"
+"    MapMessage msg = orderSession.createMapMessage();\n"
+"    ...\n"
+"    orderSender.send(msg);\n"
+"}"
+msgstr ""
+
+#. Tag: programlisting
+#: ee.xml:98
+#, no-c-format
+msgid ""
+"@StockPrices TopicPublisher pricePublisher;\n"
+"@StockPrices TopicSession priceSession;\n"
+"\n"
+"public void sendMessage(String price) {\n"
+"    pricePublisher.send( priceSession.createTextMessage(price) );\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:100
+#, no-c-format
+msgid ""
+"The lifecycle of the injected JMS objects is completely controlled by the "
+"Web Bean manager."
+msgstr ""
+
+#. Tag: title
+#: ee.xml:106
+#, no-c-format
+msgid "Packaging and deployment"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:108
+#, no-c-format
+msgid ""
+"Web Beans doesn't define any special deployment archive. You can package Web "
+"Beans in JARs, EJB-JARs or WARs&#151;any deployment location in the "
+"application classpath. However, each archive that contains Web Beans must "
+"include a file named <literal>web-beans.xml</literal> in the <literal>META-"
+"INF</literal> or <literal>WEB-INF</literal> directory. The file may be "
+"empty. Web Beans deployed in archives that do not have a <literal>web-beans."
+"xml</literal> file will not be available for use in the application."
+msgstr ""
+
+#. Tag: para
+#: ee.xml:116
+#, no-c-format
+msgid ""
+"For Java SE execution, Web Beans may be deployed in any location in which "
+"EJBs may be deployed for execution by the embeddable EJB Lite container. "
+"Again, each location must contain a <literal>web-beans.xml</literal> file."
+msgstr ""

Added: doc/trunk/reference/ko-KR/events.po
===================================================================
--- doc/trunk/reference/ko-KR/events.po	                        (rev 0)
+++ doc/trunk/reference/ko-KR/events.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,649 @@
+# Language ko-KR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: events.xml:4
+#, no-c-format
+msgid "Events"
+msgstr ""
+
+#. Tag: para
+#: events.xml:6
+#, no-c-format
+msgid ""
+"The Web Beans event notification facility allows Web Beans to interact in a "
+"totally decoupled manner. Event <emphasis>producers</emphasis> raise events "
+"that are then delivered to event <emphasis>observers</emphasis> by the Web "
+"Bean manager. This basic schema might sound like the familiar observer/"
+"observable pattern, but there are a couple of twists:"
+msgstr ""
+
+#. Tag: para
+#: events.xml:14
+#, no-c-format
+msgid ""
+"not only are event producers decoupled from observers; observers are "
+"completely decoupled from producers,"
+msgstr ""
+
+#. Tag: para
+#: events.xml:18
+#, no-c-format
+msgid ""
+"observers can specify a combination of \"selectors\" to narrow the set of "
+"event notifications they will receive, and"
+msgstr ""
+
+#. Tag: para
+#: events.xml:22
+#, no-c-format
+msgid ""
+"observers can be notified immediately, or can specify that delivery of the "
+"event should be delayed until the end of the current transaction"
+msgstr ""
+
+#. Tag: title
+#: events.xml:28
+#, no-c-format
+msgid "Event observers"
+msgstr ""
+
+#. Tag: para
+#: events.xml:30
+#, no-c-format
+msgid ""
+"An <emphasis>observer method</emphasis> is a method of a Web Bean with a "
+"parameter annotated <literal>@Observes</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:33
+#, no-c-format
+msgid ""
+"<![CDATA[public void onAnyDocumentEvent(@Observes Document document) "
+"{ ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:35
+#, no-c-format
+msgid ""
+"The annotated parameter is called the <emphasis>event parameter</emphasis>. "
+"The type of the event parameter is the observed <emphasis>event type</"
+"emphasis>. Observer methods may also specify \"selectors\", which are just "
+"instances of Web Beans binding types. When a binding type is used as an "
+"event selector, it is called an <emphasis>event binding type</emphasis>."
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:41
+#, no-c-format
+msgid ""
+"<![CDATA[@BindingType\n"
+"@Target({PARAMETER, FIELD})\n"
+"@Retention(RUNTIME)\n"
+"public @interface Updated { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:43
+#, no-c-format
+msgid ""
+"We specify the event bindings of the observer method by annotating the event "
+"parameter:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:46 events.xml:190
+#, no-c-format
+msgid ""
+"<![CDATA[public void afterDocumentUpdate(@Observes @Updated Document "
+"document) { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:48
+#, no-c-format
+msgid ""
+"An observer method need not specify any event bindings&#151;in this case it "
+"is interested in <emphasis>all</emphasis> events of a particular type. If it "
+"does specify event bindings, it is only interested in events which also have "
+"those event bindings."
+msgstr ""
+
+#. Tag: para
+#: events.xml:53
+#, no-c-format
+msgid ""
+"The observer method may have additional parameters, which are injected "
+"according to the usual Web Beans method parameter injection semantics:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:56
+#, no-c-format
+msgid ""
+"<![CDATA[public void afterDocumentUpdate(@Observes @Updated Document "
+"document, User user) { ... }]]>"
+msgstr ""
+
+#. Tag: title
+#: events.xml:61
+#, no-c-format
+msgid "Event producers"
+msgstr ""
+
+#. Tag: para
+#: events.xml:63
+#, no-c-format
+msgid ""
+"The event producer may obtain an <emphasis>event notifier</emphasis> object "
+"by injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:66
+#, no-c-format
+msgid "<![CDATA[@Observable Event<Document> documentEvent]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:68
+#, no-c-format
+msgid ""
+"The <literal>@Observable</literal> annotation implicitly defines a Web Bean "
+"with scope <literal>@Dependent</literal> and deployment type "
+"<literal>@Standard</literal>, with an implementation provided by the Web "
+"Bean manager."
+msgstr ""
+
+#. Tag: para
+#: events.xml:72
+#, no-c-format
+msgid ""
+"A producer raises events by calling the <literal>fire()</literal> method of "
+"the <literal>Event</literal> interface, passing an <emphasis>event object</"
+"emphasis>:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:75
+#, no-c-format
+msgid "<![CDATA[documentEvent.fire(document);]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:77
+#, no-c-format
+msgid ""
+"An event object may be an instance of any Java class that has no type "
+"variables or wildcard type parameters. The event will be delivered to every "
+"observer method that:"
+msgstr ""
+
+#. Tag: para
+#: events.xml:83 events.xml:107 events.xml:126
+#, no-c-format
+msgid "has an event parameter to which the event object is assignable, and"
+msgstr ""
+
+#. Tag: para
+#: events.xml:86
+#, no-c-format
+msgid "specifies no event bindings."
+msgstr ""
+
+#. Tag: para
+#: events.xml:90
+#, no-c-format
+msgid ""
+"The Web Bean manager simply calls all the observer methods, passing the "
+"event object as the value of the event parameter. If any observer method "
+"throws an exception, the Web Bean manager stops calling observer methods, "
+"and the exception is rethrown by the <literal>fire()</literal> method."
+msgstr ""
+
+#. Tag: para
+#: events.xml:95
+#, no-c-format
+msgid ""
+"To specify a \"selector\", the event producer may pass an instance of the "
+"event binding type to the <literal>fire()</literal> method:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:98
+#, no-c-format
+msgid ""
+"<![CDATA[documentEvent.fire( document, new AnnotationLiteral<Updated>()"
+"{} );]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:100
+#, no-c-format
+msgid ""
+"The helper class <literal>AnnotationLiteral</literal> makes it possible to "
+"instantiate binding types inline, since this is otherwise difficult to do in "
+"Java."
+msgstr ""
+
+#. Tag: para
+#: events.xml:103
+#, no-c-format
+msgid "The event will be delivered to every observer method that:"
+msgstr ""
+
+#. Tag: para
+#: events.xml:110
+#, no-c-format
+msgid ""
+"does not specify any event binding <emphasis>except</emphasis> for the event "
+"bindings passed to <literal>fire()</literal>."
+msgstr ""
+
+#. Tag: para
+#: events.xml:115
+#, no-c-format
+msgid ""
+"Alternatively, event bindings may be specified by annotating the event "
+"notifier injection point:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:118
+#, no-c-format
+msgid "<![CDATA[@Observable @Updated Event<Document> documentUpdatedEvent]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:120
+#, no-c-format
+msgid ""
+"Then every event fired via this instance of <literal>Event</literal> has the "
+"annotated event binding. The event will be delivered to every observer "
+"method that:"
+msgstr ""
+
+#. Tag: para
+#: events.xml:129
+#, no-c-format
+msgid ""
+"does not specify any event binding <emphasis>except</emphasis> for the event "
+"bindings passed to <literal>fire()</literal> or the annotated event bindings "
+"of the event notifier injection point."
+msgstr ""
+
+#. Tag: title
+#: events.xml:138
+#, no-c-format
+msgid "Registering observers dynamically"
+msgstr ""
+
+#. Tag: para
+#: events.xml:140
+#, no-c-format
+msgid ""
+"It's often useful to register an event observer dynamically. The application "
+"may implement the <literal>Observer</literal> interface and register an "
+"instance with an event notifier by calling the <literal>observe()</literal> "
+"method."
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:144
+#, no-c-format
+msgid ""
+"<![CDATA[documentEvent.observe( new Observer<Document>() { public void notify"
+"(Document doc) { ... } } );]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:146
+#, no-c-format
+msgid ""
+"Event binding types may be specified by the event notifier injection point "
+"or by passing event binding type instances to the <literal>observe()</"
+"literal> method:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:149
+#, no-c-format
+msgid ""
+"<![CDATA[documentEvent.observe( new Observer<Document>() { public void notify"
+"(Document doc) { ... } }, \n"
+"                                                new "
+"AnnotationLiteral<Updated>(){} );]]>"
+msgstr ""
+
+#. Tag: title
+#: events.xml:154
+#, no-c-format
+msgid "Event bindings with members"
+msgstr ""
+
+#. Tag: para
+#: events.xml:156
+#, no-c-format
+msgid "An event binding type may have annotation members:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:158
+#, no-c-format
+msgid ""
+"<![CDATA[@BindingType\n"
+"@Target({PARAMETER, FIELD})\n"
+"@Retention(RUNTIME)\n"
+"public @interface Role {\n"
+"    RoleType value();\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:160
+#, no-c-format
+msgid ""
+"The member value is used to narrow the messages delivered to the observer:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:162
+#, no-c-format
+msgid ""
+"<![CDATA[public void adminLoggedIn(@Observes @Role(ADMIN) LoggedIn event) "
+"{ ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:164
+#, no-c-format
+msgid ""
+"Event binding type members may be specified statically by the event "
+"producer, via annotations at the event notifier injection point:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:167
+#, no-c-format
+msgid "<![CDATA[@Observable @Role(ADMIN) Event<LoggedIn> LoggedInEvent;}}]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:169
+#, no-c-format
+msgid ""
+"Alternatively, the value of the event binding type member may be determined "
+"dynamically by the event producer. We start by writing an abstract subclass "
+"of <literal>AnnotationLiteral</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:172
+#, no-c-format
+msgid ""
+"<![CDATA[abstract class RoleBinding \n"
+"    extends AnnotationLiteral<Role> \n"
+"    implements Role {}]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:174
+#, no-c-format
+msgid ""
+"The event producer passes an instance of this class to <literal>fire()</"
+"literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:176
+#, no-c-format
+msgid ""
+"<![CDATA[documentEvent.fire( document, new RoleBinding() { public void value"
+"() { return user.getRole(); } } );]]>"
+msgstr ""
+
+#. Tag: title
+#: events.xml:181
+#, no-c-format
+msgid "Multiple event bindings"
+msgstr ""
+
+#. Tag: para
+#: events.xml:183
+#, no-c-format
+msgid "Event binding types may be combined, for example:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:185
+#, no-c-format
+msgid ""
+"<![CDATA[@Observable @Blog Event<Document> blogEvent;\n"
+"...\n"
+"if (document.isBlog()) blogEvent.fire(document, new "
+"AnnotationLiteral<Updated>(){});]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:187
+#, no-c-format
+msgid ""
+"When this event occurs, all of the following observer methods will be "
+"notified:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:189
+#, no-c-format
+msgid ""
+"<![CDATA[public void afterBlogUpdate(@Observes @Updated @Blog Document "
+"document) { ... }]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:191
+#, no-c-format
+msgid ""
+"<![CDATA[public void onAnyBlogEvent(@Observes @Blog Document document) "
+"{ ... }]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:192
+#, no-c-format
+msgid ""
+"<![CDATA[public void onAnyDocumentEvent(@Observes Document document) "
+"{ ... }}}]]>"
+msgstr ""
+
+#. Tag: title
+#: events.xml:197
+#, no-c-format
+msgid "Transactional observers"
+msgstr ""
+
+#. Tag: para
+#: events.xml:199
+#, no-c-format
+msgid ""
+"Transactional observers receive their event notifications during the before "
+"or after completion phase of the transaction in which the event was raised. "
+"For example, the following observer method needs to refresh a query result "
+"set that is cached in the application context, but only when transactions "
+"that update the <literal>Category</literal> tree succeed:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:205
+#, no-c-format
+msgid ""
+"<![CDATA[public void refreshCategoryTree(@AfterTransactionSuccess @Observes "
+"CategoryUpdateEvent event) { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:207
+#, no-c-format
+msgid "There are three kinds of transactional observers:"
+msgstr ""
+
+#. Tag: para
+#: events.xml:211
+#, no-c-format
+msgid ""
+"<literal>@AfterTransactionSuccess</literal> observers are called during the "
+"after completion phase of the transaction, but only if the transaction "
+"completes successfully"
+msgstr ""
+
+#. Tag: para
+#: events.xml:216
+#, no-c-format
+msgid ""
+"<literal>@AfterTransactionFailure</literal> observers are called during the "
+"after completion phase of the transaction, but only if the transaction fails "
+"to complete successfully"
+msgstr ""
+
+#. Tag: para
+#: events.xml:221
+#, no-c-format
+msgid ""
+"<literal>@AfterTransactionCompletion</literal> observers are called during "
+"the after completion phase of the transaction"
+msgstr ""
+
+#. Tag: para
+#: events.xml:225
+#, no-c-format
+msgid ""
+"<literal>@BeforeTransactionCompletion</literal> observers are called during "
+"the before completion phase of the transaction"
+msgstr ""
+
+#. Tag: para
+#: events.xml:230
+#, no-c-format
+msgid ""
+"Transactional observers are very important in a stateful object model like "
+"Web Beans, because state is often held for longer than a single atomic "
+"transaction."
+msgstr ""
+
+#. Tag: para
+#: events.xml:233
+#, no-c-format
+msgid ""
+"Imagine that we have cached a JPA query result set in the application scope:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:235
+#, no-c-format
+msgid ""
+"<![CDATA[@ApplicationScoped @Singleton\n"
+"public class Catalog {\n"
+"\n"
+"    @PersistenceContext EntityManager em;\n"
+"    \n"
+"    List<Product> products;\n"
+"\n"
+"    @Produces @Catalog \n"
+"    List<Product> getCatalog() {\n"
+"        if (products==null) {\n"
+"            products = em.createQuery(\"select p from Product p where p."
+"deleted = false\")\n"
+"                .getResultList();\n"
+"        }\n"
+"        return products;\n"
+"    }\n"
+"    \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:237
+#, no-c-format
+msgid ""
+"From time to time, a <literal>Product</literal> is created or deleted. When "
+"this occurs, we need to refresh the <literal>Product</literal> catalog. But "
+"we should wait until <emphasis>after</emphasis> the transaction completes "
+"successfully before performing this refresh!"
+msgstr ""
+
+#. Tag: para
+#: events.xml:242
+#, no-c-format
+msgid ""
+"The Web Bean that creates and deletes <literal>Product</literal>s could "
+"raise events, for example:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:245
+#, no-c-format
+msgid ""
+"<![CDATA[@Stateless\n"
+"public class ProductManager {\n"
+"\n"
+"    @PersistenceContext EntityManager em;\n"
+"    @Observable Event<Product> productEvent;\n"
+"\n"
+"    public void delete(Product product) {\n"
+"        em.delete(product);\n"
+"        productEvent.fire(product, new AnnotationLiteral<Deleted>(){});\n"
+"    }\n"
+"    \n"
+"    public void persist(Product product) {\n"
+"        em.persist(product);\n"
+"        productEvent.fire(product, new AnnotationLiteral<Created>(){});\n"
+"    }\n"
+"    \n"
+"    ...\n"
+"    \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:247
+#, no-c-format
+msgid ""
+"And now <literal>Catalog</literal> can observe the events after successful "
+"completion of the transaction:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:250
+#, no-c-format
+msgid ""
+"<![CDATA[@ApplicationScoped @Singleton\n"
+"public class Catalog {\n"
+"\n"
+"    ...\n"
+"    \n"
+"    void addProduct(@AfterTransactionSuccess @Observes @Created Product "
+"product) {\n"
+"        products.add(product);\n"
+"    }\n"
+"    \n"
+"    void addProduct(@AfterTransactionSuccess @Observes @Deleted Product "
+"product) {\n"
+"        products.remove(product);\n"
+"    }\n"
+"    \n"
+"}]]>"
+msgstr ""

Added: doc/trunk/reference/ko-KR/example.po
===================================================================
--- doc/trunk/reference/ko-KR/example.po	                        (rev 0)
+++ doc/trunk/reference/ko-KR/example.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,172 @@
+# Language ko-KR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: example.xml:4
+#, no-c-format
+msgid "JSF web application example"
+msgstr ""
+
+#. Tag: para
+#: example.xml:6
+#, no-c-format
+msgid ""
+"Let's illustrate these ideas with a full example. We're going to implement "
+"user login/logout for an application that uses JSF. First, we'll define a "
+"Web Bean to hold the username and password entered during login:"
+msgstr ""
+
+#. Tag: programlisting
+#: example.xml:11
+#, no-c-format
+msgid ""
+"<![CDATA[@Named @RequestScoped\n"
+"public class Credentials {\n"
+"        \n"
+"    private String username;\n"
+"    private String password;\n"
+"    \n"
+"    public String getUsername() { return username; }\n"
+"    public void setUsername(String username) { this.username = username; }\n"
+"    \n"
+"    public String getPassword() { return password; }\n"
+"    public void setPassword(String password) { this.password = password; }\n"
+"    \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: example.xml:13
+#, no-c-format
+msgid "This Web Bean is bound to the login prompt in the following JSF form:"
+msgstr ""
+
+#. Tag: programlisting
+#: example.xml:15
+#, no-c-format
+msgid ""
+"<![CDATA[<h:form>\n"
+"    <h:panelGrid columns=\"2\" rendered=\"#{!login.loggedIn}\">\n"
+"        <h:outputLabel for=\"username\">Username:</h:outputLabel>\n"
+"        <h:inputText id=\"username\" value=\"#{credentials.username}\"/>\n"
+"        <h:outputLabel for=\"password\">Password:</h:outputLabel>\n"
+"        <h:inputText id=\"password\" value=\"#{credentials.password}\"/>\n"
+"    </h:panelGrid>\n"
+"    <h:commandButton value=\"Login\" action=\"#{login.login}\" rendered=\"#{!"
+"login.loggedIn}\"/>\n"
+"    <h:commandButton value=\"Logout\" acion=\"#{login.logout}\" rendered=\"#"
+"{login.loggedIn}\"/>\n"
+"</h:form>]]>"
+msgstr ""
+
+#. Tag: para
+#: example.xml:17
+#, no-c-format
+msgid ""
+"The actual work is done by a session scoped Web Bean that maintains "
+"information about the currently logged-in user and exposes the "
+"<literal>User</literal> entity to other Web Beans:"
+msgstr ""
+
+#. Tag: programlisting
+#: example.xml:21
+#, no-c-format
+msgid ""
+"<![CDATA[@SessionScoped @Named\n"
+"public class Login {\n"
+"\n"
+"    @Current Credentials credentials;\n"
+"    @PersistenceContext EntityManager userDatabase;\n"
+"\n"
+"    private User user;\n"
+"    \n"
+"    public void login() {\n"
+"            \n"
+"        List<User> results = userDatabase.createQuery(\n"
+"           \"select u from User u where u.username=:username and u.password=:"
+"password\")\n"
+"           .setParameter(\"username\", credentials.getUsername())\n"
+"           .setParameter(\"password\", credentials.getPassword())\n"
+"           .getResultList();\n"
+"        \n"
+"        if ( !results.isEmpty() ) {\n"
+"           user = results.get(0);\n"
+"        }\n"
+"        \n"
+"    }\n"
+"    \n"
+"    public void logout() {\n"
+"        user = null;\n"
+"    }\n"
+"    \n"
+"    public boolean isLoggedIn() {\n"
+"       return user!=null;\n"
+"    }\n"
+"    \n"
+"    @Produces @LoggedIn User getCurrentUser() {\n"
+"        return user;\n"
+"    }\n"
+"\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: example.xml:23
+#, no-c-format
+msgid "Of course, <literal>@LoggedIn</literal> is a binding annotation:"
+msgstr ""
+
+#. Tag: programlisting
+#: example.xml:25
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target({TYPE, METHOD, FIELD})\n"
+"@BindingType\n"
+"public @interface LoggedIn {}]]>"
+msgstr ""
+
+#. Tag: para
+#: example.xml:27
+#, no-c-format
+msgid "Now, any other Web Bean can easily inject the current user:"
+msgstr ""
+
+#. Tag: programlisting
+#: example.xml:29
+#, no-c-format
+msgid ""
+"<![CDATA[public class DocumentEditor {\n"
+"\n"
+"    @Current Document document;\n"
+"    @LoggedIn User currentUser;\n"
+"    @PersistenceContext EntityManager docDatabase;\n"
+"    \n"
+"    public void save() {\n"
+"        document.setCreatedBy(currentUser);\n"
+"        docDatabase.persist(document);\n"
+"    }\n"
+"    \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: example.xml:31
+#, no-c-format
+msgid ""
+"Hopefully, this example gives a flavor of the Web Bean programming model. In "
+"the next chapter, we'll explore Web Beans dependency injection in greater "
+"depth."
+msgstr ""

Added: doc/trunk/reference/ko-KR/extend.po
===================================================================
--- doc/trunk/reference/ko-KR/extend.po	                        (rev 0)
+++ doc/trunk/reference/ko-KR/extend.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,252 @@
+# Language ko-KR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: extend.xml:4
+#, no-c-format
+msgid "Extending Web Beans"
+msgstr ""
+
+#. Tag: para
+#: extend.xml:6
+#, no-c-format
+msgid ""
+"Web Beans is intended to be a platform for frameworks, extensions and "
+"integration with other technologies. Therefore, Web Beans exposes a set of "
+"SPIs for the use of developers of portable extensions to Web Beans. For "
+"example, the following kinds of extensions were envisaged by the designers "
+"of Web Beans:"
+msgstr ""
+
+#. Tag: para
+#: extend.xml:14
+#, no-c-format
+msgid "integration with Business Process Management engines,"
+msgstr ""
+
+#. Tag: para
+#: extend.xml:17
+#, no-c-format
+msgid ""
+"integration with third-party frameworks such as Spring, Seam, GWT or Wicket, "
+"and"
+msgstr ""
+
+#. Tag: para
+#: extend.xml:21
+#, no-c-format
+msgid "new technology based upon the Web Beans programming model."
+msgstr ""
+
+#. Tag: para
+#: extend.xml:25
+#, no-c-format
+msgid ""
+"The nerve center for extending Web Beans is the <literal>Manager</literal> "
+"object."
+msgstr ""
+
+#. Tag: title
+#: extend.xml:29
+#, no-c-format
+msgid "The <literal>Manager</literal> object"
+msgstr ""
+
+#. Tag: para
+#: extend.xml:31
+#, no-c-format
+msgid ""
+"The <literal>Manager</literal> interface lets us register and obtain Web "
+"Beans, interceptors, decorators, observers and contexts programatically."
+msgstr ""
+
+#. Tag: programlisting
+#: extend.xml:34
+#, no-c-format
+msgid ""
+"<![CDATA[public interface Manager\n"
+"{\n"
+"\n"
+"   public <T> Set<Bean<T>> resolveByType(Class<T> type, Annotation... "
+"bindings);\n"
+"\n"
+"   public <T> Set<Bean<T>> resolveByType(TypeLiteral<T> apiType,\n"
+"         Annotation... bindings);\n"
+"\n"
+"   public <T> T getInstanceByType(Class<T> type, Annotation... bindings);\n"
+"\n"
+"   public <T> T getInstanceByType(TypeLiteral<T> type,\n"
+"         Annotation... bindings);\n"
+"\n"
+"   public Set<Bean<?>> resolveByName(String name);\n"
+"\n"
+"   public Object getInstanceByName(String name);\n"
+"\n"
+"   public <T> T getInstance(Bean<T> bean);\n"
+"\n"
+"   public void fireEvent(Object event, Annotation... bindings);\n"
+"\n"
+"   public Context getContext(Class<? extends Annotation> scopeType);\n"
+"\n"
+"   public Manager addContext(Context context);\n"
+"\n"
+"   public Manager addBean(Bean<?> bean);\n"
+"\n"
+"   public Manager addInterceptor(Interceptor interceptor);\n"
+"\n"
+"   public Manager addDecorator(Decorator decorator);\n"
+"\n"
+"   public <T> Manager addObserver(Observer<T> observer, Class<T> eventType,\n"
+"         Annotation... bindings);\n"
+"\n"
+"   public <T> Manager addObserver(Observer<T> observer, TypeLiteral<T> "
+"eventType,\n"
+"         Annotation... bindings);\n"
+"\n"
+"   public <T> Manager removeObserver(Observer<T> observer, Class<T> "
+"eventType,\n"
+"         Annotation... bindings);\n"
+"\n"
+"   public <T> Manager removeObserver(Observer<T> observer,\n"
+"         TypeLiteral<T> eventType, Annotation... bindings);\n"
+"\n"
+"   public <T> Set<Observer<T>> resolveObservers(T event, Annotation... "
+"bindings);\n"
+"\n"
+"   public List<Interceptor> resolveInterceptors(InterceptionType type,\n"
+"         Annotation... interceptorBindings);\n"
+"\n"
+"   public List<Decorator> resolveDecorators(Set<Class<?>> types,\n"
+"         Annotation... bindings);\n"
+"\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: extend.xml:36
+#, no-c-format
+msgid "We can obtain an instance of <literal>Manager</literal> via injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: extend.xml:38
+#, no-c-format
+msgid "@Current Manager manager"
+msgstr ""
+
+#. Tag: title
+#: extend.xml:43
+#, no-c-format
+msgid "The <literal>Bean</literal> class"
+msgstr ""
+
+#. Tag: para
+#: extend.xml:45
+#, no-c-format
+msgid ""
+"Instances of the abstract class <literal>Bean</literal> represent Web Beans. "
+"There is an instance of <literal>Bean</literal> registered with the "
+"<literal>Manager</literal> object for every Web Bean in the application."
+msgstr ""
+
+#. Tag: programlisting
+#: extend.xml:50
+#, no-c-format
+msgid ""
+"public abstract class Bean&lt;T&gt; {\n"
+"    \n"
+"    private final Manager manager;\n"
+"    \n"
+"    protected Bean(Manager manager) {\n"
+"        this.manager=manager;\n"
+"    }\n"
+"    \n"
+"    protected Manager getManager() {\n"
+"        return manager;\n"
+"    }\n"
+"    \n"
+"    public abstract Set&lt;Class&gt; getTypes();\n"
+"    public abstract Set&lt;Annotation&gt; getBindingTypes();\n"
+"    public abstract Class&lt;? extends Annotation&gt; getScopeType();\n"
+"    public abstract Class&lt;? extends Annotation&gt; getDeploymentType(); \n"
+"    public abstract String getName();\n"
+"    \n"
+"    public abstract boolean isSerializable();\n"
+"    public abstract boolean isNullable();\n"
+"\n"
+"    public abstract T create();\n"
+"    public abstract void destroy(T instance);\n"
+"    \n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: extend.xml:52
+#, no-c-format
+msgid ""
+"It's possible to extend the <literal>Bean</literal> class and register "
+"instances by calling <literal>Manager.addBean()</literal> to provide support "
+"for new kinds of Web Beans, beyond those defined by the Web Beans "
+"specification (simple and enterprise Web Beans, producer methods and JMS "
+"endpoints). For example, we could use the <literal>Bean</literal> class to "
+"allow objects managed by another framework to be injected into Web Beans."
+msgstr ""
+
+#. Tag: para
+#: extend.xml:60
+#, no-c-format
+msgid ""
+"There are two subclasses of <literal>Bean</literal> defined by the Web Beans "
+"specification: <literal>Interceptor</literal> and <literal>Decorator</"
+"literal>."
+msgstr ""
+
+#. Tag: title
+#: extend.xml:67
+#, no-c-format
+msgid "The <literal>Context</literal> interface"
+msgstr ""
+
+#. Tag: para
+#: extend.xml:69
+#, no-c-format
+msgid ""
+"The <literal>Context</literal> interface supports addition of new scopes to "
+"Web Beans, or extension of the built-in scopes to new environments."
+msgstr ""
+
+#. Tag: programlisting
+#: extend.xml:72
+#, no-c-format
+msgid ""
+"public interface Context {\n"
+"    \n"
+"    public Class&lt;? extends Annotation&gt; getScopeType();\n"
+"    \n"
+"    public &lt;T&gt; T get(Bean&lt;T&gt; bean, boolean create);\n"
+"    \n"
+"    boolean isActive();\n"
+"    \n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: extend.xml:74
+#, no-c-format
+msgid ""
+"For example, we might implement <literal>Context</literal> to add a business "
+"process scope to Web Beans, or to add support for the conversation scope to "
+"an application that uses Wicket."
+msgstr ""

Added: doc/trunk/reference/ko-KR/injection.po
===================================================================
--- doc/trunk/reference/ko-KR/injection.po	                        (rev 0)
+++ doc/trunk/reference/ko-KR/injection.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,1226 @@
+# Language ko-KR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: injection.xml:4
+#, no-c-format
+msgid "Dependency injection"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:6
+#, no-c-format
+msgid "Web Beans supports three primary mechanisms for dependency injection:"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:8
+#, no-c-format
+msgid "Constructor parameter injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:10
+#, no-c-format
+msgid ""
+"<![CDATA[public class Checkout {\n"
+"        \n"
+"    private final ShoppingCart cart;\n"
+"    \n"
+"    @Initializer\n"
+"    public Checkout(ShoppingCart cart) {\n"
+"        this.cart = cart;\n"
+"    }\n"
+"\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:12
+#, no-c-format
+msgid "<emphasis>Initializer</emphasis> method parameter injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:14
+#, no-c-format
+msgid ""
+"<![CDATA[public class Checkout {\n"
+"        \n"
+"    private ShoppingCart cart;\n"
+"\n"
+"    @Initializer \n"
+"    void setShoppingCart(ShoppingCart cart) {\n"
+"        this.cart = cart;\n"
+"    }\n"
+"    \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:16
+#, no-c-format
+msgid "And direct field injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:18
+#, no-c-format
+msgid ""
+"<![CDATA[public class Checkout {\n"
+"\n"
+"    private @Current ShoppingCart cart;\n"
+"    \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:20
+#, no-c-format
+msgid ""
+"Dependency injection always occurs when the Web Bean instance is first "
+"instantiated."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:25
+#, no-c-format
+msgid ""
+"First, the Web Bean manager calls the Web Bean constructor, to obtain an "
+"instance of the Web Bean."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:29
+#, no-c-format
+msgid ""
+"Next, the Web Bean manager initializes the values of all injected fields of "
+"the Web Bean."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:33
+#, no-c-format
+msgid "Next, the Web Bean manager calls all initializer methods of Web Bean."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:37
+#, no-c-format
+msgid ""
+"Finally, the <literal>@PostConstruct</literal> method of the Web Bean, if "
+"any, is called."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:42
+#, no-c-format
+msgid ""
+"Constructor parameter injection is not supported for EJB beans, since the "
+"EJB is instantiated by the EJB container, not the Web Bean manager."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:45
+#, no-c-format
+msgid ""
+"Parameters of constructors and initializer methods need not be explicitly "
+"annotated when the default binding type <literal>@Current</literal> applies. "
+"Injected fields, however, <emphasis>must</emphasis> specify a binding type, "
+"even when the default binding type applies. If the field does not specify a "
+"binding type, it will not be injected."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:51
+#, no-c-format
+msgid "Producer methods also support parameter injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:53
+#, no-c-format
+msgid ""
+"<![CDATA[@Produces Checkout createCheckout(ShoppingCart cart) {\n"
+"    return new Checkout(cart);\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:55
+#, no-c-format
+msgid ""
+"Finally, observer methods (which we'll meet in <xref linkend=\"events\"/>), "
+"disposal methods and destructor methods all support parameter injection."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:58
+#, no-c-format
+msgid ""
+"The Web Beans specification defines a procedure, called the "
+"<emphasis>typesafe resolution algorithm</emphasis>, that the Web Bean "
+"manager follows when identifying the Web Bean to inject to an injection "
+"point. This algorithm looks complex at first, but once you understand it, "
+"it's really quite intuitive. Typesafe resolution is performed at system "
+"initialization time, which means that the manager will inform the user "
+"immediately if a Web Bean's dependencies cannot be satisfied, by throwing a "
+"<literal>UnsatisfiedDependencyException</literal> or "
+"<literal>AmbiguousDependencyException</literal>."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:67
+#, no-c-format
+msgid ""
+"The purpose of this algorithm is to allow multiple Web Beans to implement "
+"the same API type and either:"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:72
+#, no-c-format
+msgid ""
+"allow the client to select which implementation it requires using "
+"<emphasis>binding annotations</emphasis>,"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:77
+#, no-c-format
+msgid ""
+"allow the application deployer to select which implementation is appropriate "
+"for a particular deployment, without changes to the client, by enabling or "
+"disabling <emphasis>deployment types</emphasis>, or"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:82
+#, no-c-format
+msgid ""
+"allow one implementation of an API to override another implementation of the "
+"same API at deployment time, without changes to the client, using "
+"<emphasis>deployment type precedence</emphasis>."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:88
+#, no-c-format
+msgid ""
+"Let's explore how the Web Beans manager determines a Web Bean to be injected."
+msgstr ""
+
+#. Tag: title
+#: injection.xml:91
+#, no-c-format
+msgid "Binding annotations"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:93
+#, no-c-format
+msgid ""
+"If we have more than one Web Bean that implements a particular API type, the "
+"injection point can specify exactly which Web Bean should be injected using "
+"a binding annotation. For example, there might be two implementations of "
+"<literal>PaymentProcessor</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:98
+#, no-c-format
+msgid ""
+"<![CDATA[@PayByCheque\n"
+"public class ChequePaymentProcessor implements PaymentProcessor {\n"
+"    public void process(Payment payment) { ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:100
+#, no-c-format
+msgid ""
+"<![CDATA[@PayByCreditCard\n"
+"public class CreditCardPaymentProcessor implements PaymentProcessor {\n"
+"    public void process(Payment payment) { ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:102
+#, no-c-format
+msgid ""
+"Where <literal>@PayByCheque</literal> and <literal>@PayByCreditCard</"
+"literal> are binding annotations:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:105
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target({TYPE, METHOD, FIELD, PARAMETER})\n"
+"@BindingType\n"
+"public @interface PayByCheque {}]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:107
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target({TYPE, METHOD, FIELD, PARAMETER})\n"
+"@BindingType\n"
+"public @interface PayByCreditCard {}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:109
+#, no-c-format
+msgid ""
+"A client Web Bean developer uses the binding annotation to specify exactly "
+"which Web Bean should be injected."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:112
+#, no-c-format
+msgid "Using field injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:114
+#, no-c-format
+msgid ""
+"<![CDATA[@PayByCheque PaymentProcessor chequePaymentProcessor;\n"
+"@PayByCreditCard PaymentProcessor creditCardPaymentProcessor;]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:116
+#, no-c-format
+msgid "Using initializer method injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:118
+#, no-c-format
+msgid ""
+"<![CDATA[@Initializer\n"
+"public void setPaymentProcessors(@PayByCheque PaymentProcessor "
+"chequePaymentProcessor, \n"
+"                                 @PayByCreditCard PaymentProcessor "
+"creditCardPaymentProcessor) {\n"
+"   this.chequePaymentProcessor = chequePaymentProcessor;\n"
+"   this.creditCardPaymentProcessor = creditCardPaymentProcessor;\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:120
+#, no-c-format
+msgid "Or using constructor injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:122
+#, no-c-format
+msgid ""
+"<![CDATA[@Initializer\n"
+"public Checkout(@PayByCheque PaymentProcessor chequePaymentProcessor, \n"
+"                @PayByCreditCard PaymentProcessor "
+"creditCardPaymentProcessor) {\n"
+"   this.chequePaymentProcessor = chequePaymentProcessor;\n"
+"   this.creditCardPaymentProcessor = creditCardPaymentProcessor;\n"
+"}]]>"
+msgstr ""
+
+#. Tag: title
+#: injection.xml:125
+#, no-c-format
+msgid "Binding annotations with members"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:127
+#, no-c-format
+msgid "Binding annotations may have members:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:129
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target({TYPE, METHOD, FIELD, PARAMETER})\n"
+"@BindingType\n"
+"public @interface PayBy {\n"
+"    PaymentType value();\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:131
+#, no-c-format
+msgid "In which case, the member value is significant:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:133
+#, no-c-format
+msgid ""
+"<![CDATA[@PayBy(CHEQUE) PaymentProcessor chequePaymentProcessor;\n"
+"@PayBy(CREDIT_CARD) PaymentProcessor creditCardPaymentProcessor;]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:135
+#, no-c-format
+msgid ""
+"You can tell the Web Bean manager to ignore a member of a binding annotation "
+"type by annotating the member <literal>@NonBinding</literal>."
+msgstr ""
+
+#. Tag: title
+#: injection.xml:141
+#, no-c-format
+msgid "Combinations of binding annnotations"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:143
+#, no-c-format
+msgid "An injection point may even specify multiple binding annotations:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:145
+#, no-c-format
+msgid ""
+"<![CDATA[@Asynchronous @PayByCheque PaymentProcessor paymentProcessor]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:147
+#, no-c-format
+msgid ""
+"In this case, only a Web Bean which has <emphasis>both</emphasis> binding "
+"annotations would be eligible for injection."
+msgstr ""
+
+#. Tag: title
+#: injection.xml:153
+#, no-c-format
+msgid "Binding annotations and producer methods"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:155
+#, no-c-format
+msgid "Even producer methods may specify binding annotations:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:157
+#, no-c-format
+msgid ""
+"<![CDATA[@Produces \n"
+"@Asynchronous @PayByCheque \n"
+"PaymentProcessor createAsyncPaymentProcessor(@PayByCheque PaymentProcessor "
+"processor) {\n"
+"    return new AsynchronousPaymentProcessor(processor);\n"
+"}]]>"
+msgstr ""
+
+#. Tag: title
+#: injection.xml:162
+#, no-c-format
+msgid "The default binding type"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:164
+#, no-c-format
+msgid ""
+"Web Beans defines a binding type <literal>@Current</literal> that is the "
+"default binding type for any injection point or Web Bean that does not "
+"explicitly specify a binding type."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:168
+#, no-c-format
+msgid ""
+"There are two common circumstances in which it is necessary to explicitly "
+"specify <literal>@Current</literal>:"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:173
+#, no-c-format
+msgid ""
+"on a field, in order to declare it as an injected field with the default "
+"binding type, and"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:177
+#, no-c-format
+msgid ""
+"on a Web Bean which has another binding type in addition to the default "
+"binding type."
+msgstr ""
+
+#. Tag: title
+#: injection.xml:187
+#, no-c-format
+msgid "Deployment types"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:189
+#, no-c-format
+msgid ""
+"All Web Beans have a <emphasis>deployment type</emphasis>. Each deployment "
+"type identifies a set of Web Beans that should be conditionally installed in "
+"some deployments of the system."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:193
+#, no-c-format
+msgid ""
+"For example, we could define a deployment type named <literal>@Mock</"
+"literal>, which would identify Web Beans that should only be installed when "
+"the system executes inside an integration testing environment:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:197
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"  @Target({TYPE, METHOD})\n"
+"  @DeploymentType\n"
+"  public @interface Mock {}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:199
+#, no-c-format
+msgid ""
+"Suppose we had some Web Bean that interacted with an external system to "
+"process payments:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:202
+#, no-c-format
+msgid ""
+"<![CDATA[public class ExternalPaymentProcessor {\n"
+"        \n"
+"    public void process(Payment p) {\n"
+"        ...\n"
+"    }\n"
+"    \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:204
+#, no-c-format
+msgid ""
+"Since this Web Bean does not explicitly specify a deployment type, it has "
+"the default deployment type <literal>@Production</literal>."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:207
+#, no-c-format
+msgid ""
+"For integration or unit testing, the external system is slow or unavailable. "
+"So we would create a mock object:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:210
+#, no-c-format
+msgid ""
+"<![CDATA[@Mock \n"
+"public class MockPaymentProcessor implements PaymentProcessor {\n"
+"\n"
+"    @Override\n"
+"    public void process(Payment p) {\n"
+"        p.setSuccessful(true);\n"
+"    }\n"
+"\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:212
+#, no-c-format
+msgid ""
+"But how does the Web Bean manager determine which implementation to use in a "
+"particular deployment?"
+msgstr ""
+
+#. Tag: title
+#: injection.xml:216
+#, no-c-format
+msgid "Enabling deployment types"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:218
+#, no-c-format
+msgid ""
+"Web Beans defines two built-in deployment types: <literal>@Production</"
+"literal> and <literal>@Standard</literal>. By default, only Web Beans with "
+"the built-in deployment types are enabled when the system is deployed. We "
+"can identify additional deployment types to be enabled in a particular "
+"deployment by listing them in <literal>web-beans.xml</literal>."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:224
+#, no-c-format
+msgid ""
+"Going back to our example, when we deploy our integration tests, we want all "
+"our <literal>@Mock</literal> objects to be installed:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:227
+#, no-c-format
+msgid ""
+"<![CDATA[<WebBeans>\n"
+"    <Deploy>\n"
+"        <Standard/>\n"
+"        <Production/>\n"
+"        <test:Mock/>\n"
+"    </Deploy>\n"
+"</WebBeans>]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:229
+#, no-c-format
+msgid ""
+"Now the Web Bean manager will identify and install all Web Beans annotated "
+"<literal>@Production</literal>, <literal>@Standard</literal> or "
+"<literal>@Mock</literal> at deployment time."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:233
+#, no-c-format
+msgid ""
+"The deployment type <literal>@Standard</literal> is used only for certain "
+"special Web Beans defined by the Web Beans specification. We can't use it "
+"for our own Web Beans, and we can't disable it."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:237
+#, no-c-format
+msgid ""
+"The deployment type <literal>@Production</literal> is the default deployment "
+"type for Web Beans which don't explicitly declare a deployment type, and may "
+"be disabled."
+msgstr ""
+
+#. Tag: title
+#: injection.xml:244
+#, no-c-format
+msgid "Deployment type precedence"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:246
+#, no-c-format
+msgid ""
+"If you've been paying attention, you're probably wondering how the Web Bean "
+"manager decides which implementation&#151;<literal>ExternalPaymentProcessor</"
+"literal> or <literal>MockPaymentProcessor</literal>&#151;to choose. Consider "
+"what happens when the manager encounters this injection point:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:251
+#, no-c-format
+msgid "<![CDATA[@Current PaymentProcessor paymentProcessor]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:253
+#, no-c-format
+msgid ""
+"There are now two Web Beans which satisfy the <literal>PaymentProcessor</"
+"literal> contract. Of course, we can't use a binding annotation to "
+"disambiguate, since binding annotations are hard-coded into the source at "
+"the injection point, and we want the manager to be able to decide at "
+"deployment time!"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:258
+#, no-c-format
+msgid ""
+"The solution to this problem is that each deployment type has a different "
+"<emphasis>precedence</emphasis>. The precedence of the deployment types is "
+"determined by the order in which they appear in <literal>web-beans.xml</"
+"literal>. In our example, <literal>@Mock</literal> appears later than "
+"<literal>@Production</literal> so it has a higher precedence."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:264
+#, no-c-format
+msgid ""
+"Whenever the manager discovers that more than one Web Bean could satisfy the "
+"contract (API type plus binding annotations) specified by an injection "
+"point, it considers the relative precedence of the Web Beans. If one has a "
+"higher precedence than the others, it chooses the higher precedence Web Bean "
+"to inject. So, in our example, the Web Bean manager will inject "
+"<literal>MockPaymentProcessor</literal> when executing in our integration "
+"testing environment (which is exactly what we want)."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:271
+#, no-c-format
+msgid ""
+"It's interesting to compare this facility to today's popular manager "
+"architectures. Various \"lightweight\" containers also allow conditional "
+"deployment of classes that exist in the classpath, but the classes that are "
+"to be deployed must be explicity, individually, listed in configuration code "
+"or in some XML configuration file. Web Beans does support Web Bean "
+"definition and configuration via XML, but in the common case where no "
+"complex configuration is required, deployment types allow a whole set of Web "
+"Beans to be enabled with a single line of XML. Meanwhile, a developer "
+"browsing the code can easily identify what deployment scenarios the Web Bean "
+"will be used in."
+msgstr ""
+
+#. Tag: title
+#: injection.xml:284
+#, no-c-format
+msgid "Example deployment types"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:286
+#, no-c-format
+msgid ""
+"Deployment types are useful for all kinds of things, here's some examples:"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:290
+#, no-c-format
+msgid ""
+"<literal>@Mock</literal> and <literal>@Staging</literal> deployment types "
+"for testing"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:294
+#, no-c-format
+msgid "<literal>@AustralianTaxLaw</literal> for site-specific Web Beans"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:297
+#, no-c-format
+msgid ""
+"<literal>@SeamFramework</literal>, <literal>@Guice</literal> for third-party "
+"frameworks which build on Web Beans"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:301
+#, no-c-format
+msgid ""
+"<literal>@Standard</literal> for standard Web Beans defined by the Web Beans "
+"specification"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:306
+#, no-c-format
+msgid "I'm sure you can think of more applications..."
+msgstr ""
+
+#. Tag: title
+#: injection.xml:313
+#, no-c-format
+msgid "Fixing unsatisfied dependencies"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:315
+#, no-c-format
+msgid ""
+"The typesafe resolution algorithm fails when, after considering the binding "
+"annotations and and deployment types of all Web Beans that implement the API "
+"type of an injection point, the Web Bean manager is unable to identify "
+"exactly one Web Bean to inject."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:320
+#, no-c-format
+msgid ""
+"It's usually easy to fix an <literal>UnsatisfiedDependencyException</"
+"literal> or <literal>AmbiguousDependencyException</literal>."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:323
+#, no-c-format
+msgid ""
+"To fix an <literal>UnsatisfiedDependencyException</literal>, simply provide "
+"a Web Bean which implements the API type and has the binding types of the "
+"injection point&#151;or enable the deployment type of a Web Bean that "
+"already implements the API type and has the binding types."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:328
+#, no-c-format
+msgid ""
+"To fix an <literal>AmbiguousDependencyException</literal>, introduce a "
+"binding type to distinguish between the two implementations of the API type, "
+"or change the deployment type of one of the implementations so that the Web "
+"Bean manager can use deployment type precedence to choose between them. An "
+"<literal>AmbiguousDependencyException</literal> can only occur if two Web "
+"Beans share a binding type and have exactly the same deployment type."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:335
+#, no-c-format
+msgid ""
+"There's one more issue you need to be aware of when using dependency "
+"injection in Web Beans."
+msgstr ""
+
+#. Tag: title
+#: injection.xml:341
+#, no-c-format
+msgid "Client proxies"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:343
+#, no-c-format
+msgid ""
+"Clients of an injected Web Bean do not usually hold a direct reference to a "
+"Web Bean instance."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:346
+#, no-c-format
+msgid ""
+"Imagine that a Web Bean bound to the application scope held a direct "
+"reference to a Web Bean bound to the request scope. The application scoped "
+"Web Bean is shared between many different requests. However, each request "
+"should see a different instance of the request scoped Web bean!"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:351
+#, no-c-format
+msgid ""
+"Now imagine that a Web Bean bound to the session scope held a direct "
+"reference to a Web Bean bound to the application scope. From time to time, "
+"the session context is serialized to disk in order to use memory more "
+"efficiently. However, the application scoped Web Bean instance should not be "
+"serialized along with the session scoped Web Bean!"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:357
+#, no-c-format
+msgid ""
+"Therefore, unless a Web Bean has the default scope <literal>@Dependent</"
+"literal>, the Web Bean manager must indirect all injected references to the "
+"Web Bean through a proxy object. This <emphasis>client proxy</emphasis> is "
+"responsible for ensuring that the Web Bean instance that receives a method "
+"invocation is the instance that is associated with the current context. The "
+"client proxy also allows Web Beans bound to contexts such as the session "
+"context to be serialized to disk without recursively serializing other "
+"injected Web Beans."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:365
+#, no-c-format
+msgid ""
+"Unfortunately, due to limitations of the Java language, some Java types "
+"cannot be proxied by the Web Bean manager. Therefore, the Web Bean manager "
+"throws an <literal>UnproxyableDependencyException</literal> if the type of "
+"an injection point cannot be proxied."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:370
+#, no-c-format
+msgid "The following Java types cannot be proxied by the Web Bean manager:"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:374
+#, no-c-format
+msgid ""
+"classes which are declared <literal>final</literal> or have a "
+"<literal>final</literal> method,"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:378
+#, no-c-format
+msgid "classes which have no non-private constructor with no parameters, and"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:381
+#, no-c-format
+msgid "arrays and primitive types."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:385
+#, no-c-format
+msgid ""
+"It's usually very easy to fix an <literal>UnproxyableDependencyException</"
+"literal>. Simply add a constructor with no parameters to the injected class, "
+"introduce an interface, or change the scope of the injected Web Bean to "
+"<literal>@Dependent</literal>."
+msgstr ""
+
+#. Tag: title
+#: injection.xml:392
+#, no-c-format
+msgid "Obtaining a Web Bean by programatic lookup"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:394
+#, no-c-format
+msgid ""
+"The application may obtain an instance of the interface <literal>Manager</"
+"literal> by injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:397
+#, no-c-format
+msgid "<![CDATA[@Current Manager manager;]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:399
+#, no-c-format
+msgid ""
+"The <literal>Manager</literal> object provides a set of methods for "
+"obtaining a Web Bean instance programatically."
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:402
+#, no-c-format
+msgid ""
+"<![CDATA[PaymentProcessor p = manager.getInstanceByType(PaymentProcessor."
+"class);]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:404
+#, no-c-format
+msgid ""
+"Binding annotations may be specified by subclassing the helper class "
+"<literal>AnnotationLiteral</literal>, since it is otherwise difficult to "
+"instantiate an annotation type in Java."
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:408
+#, no-c-format
+msgid ""
+"<![CDATA[PaymentProcessor p = manager.getInstanceByType(PaymentProcessor."
+"class, \n"
+"                                               new "
+"AnnotationLiteral<CreditCard>(){});]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:410
+#, no-c-format
+msgid ""
+"If the binding type has an annotation member, we can't use an anonymous "
+"subclass of <literal>AnnotationLiteral</literal>&#151;instead we'll need to "
+"create a named subclass:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:413
+#, no-c-format
+msgid ""
+"<![CDATA[abstract class CreditCardBinding \n"
+"    extends AnnotationLiteral<CreditCard> \n"
+"    implements CreditCard {}]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:415
+#, no-c-format
+msgid ""
+"<![CDATA[PaymentProcessor p = manager.getInstanceByType(PaymentProcessor."
+"class, \n"
+"                                               new CreditCardBinding() { \n"
+"                                                   public void value() "
+"{ return paymentType; } \n"
+"                                               } );]]>"
+msgstr ""
+
+#. Tag: title
+#: injection.xml:419
+#, no-c-format
+msgid ""
+"Lifecycle callbacks, <literal>@Resource</literal>, <literal>@EJB</literal> "
+"and <literal>@PersistenceContext</literal>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:422
+#, no-c-format
+msgid ""
+"Enterprise Web Beans support all the lifecycle callbacks defined by the EJB "
+"specification: <literal>@PostConstruct</literal>, <literal>@PreDestroy</"
+"literal>, <literal>@PrePassivate</literal> and <literal>@PostActivate</"
+"literal>."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:426
+#, no-c-format
+msgid ""
+"Simple Web Beans support only the <literal>@PostConstruct</literal> and "
+"<literal>@PreDestroy</literal> callbacks."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:429
+#, no-c-format
+msgid ""
+"Both enterprise and simple Web Beans support the use of <literal>@Resource</"
+"literal>, <literal>@EJB</literal> and <literal>@PersistenceContext</literal> "
+"for injection of Java EE resources, EJBs and JPA persistence contexts, "
+"respectively. Simple Web Beans do not support the use of "
+"<literal>@PersistenceContext(type=EXTENDED)</literal>."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:434
+#, no-c-format
+msgid ""
+"The <literal>@PostConstruct</literal> callback always occurs after all "
+"dependencies have been injected."
+msgstr ""
+
+#. Tag: title
+#: injection.xml:440
+#, no-c-format
+msgid "The <literal>InjectionPoint</literal> object"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:442
+#, no-c-format
+msgid ""
+"There are certain kinds of dependent objects&#151;Web Beans with scope "
+"<literal>@Dependent</literal>&#151;that need to know something about the "
+"object or injection point into which they are injected in order to be able "
+"to do what they do. For example:"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:448
+#, no-c-format
+msgid ""
+"The log category for a <literal>Logger</literal> depends upon the class of "
+"the object that owns it."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:452
+#, no-c-format
+msgid ""
+"Injection of a HTTP parameter or header value depends upon what parameter or "
+"header name was specified at the injection point."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:456
+#, no-c-format
+msgid ""
+"Injection of the result of an EL expression evaluation depends upon the "
+"expression that was specified at the injection point."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:461
+#, no-c-format
+msgid ""
+"A Web Bean with scope <literal>@Dependent</literal> may inject an instance "
+"of <literal>InjectionPoint</literal> and access metadata relating to the "
+"injection point to which it belongs."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:465
+#, no-c-format
+msgid ""
+"Let's look at an example. The following code is verbose, and vulnerable to "
+"refactoring problems:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:468
+#, no-c-format
+msgid "<![CDATA[Logger log = Logger.getLogger(MyClass.class.getName());]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:470
+#, no-c-format
+msgid ""
+"This clever little producer method lets you inject a JDK <literal>Logger</"
+"literal> without explicitly specifying the log category:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:473
+#, no-c-format
+msgid ""
+"<![CDATA[class LogFactory {\n"
+"\n"
+"   @Produces Logger createLogger(InjectionPoint injectionPoint) { \n"
+"      return Logger.getLogger(injectionPoint.getMember().getDeclaringClass()."
+"getName()); \n"
+"   }\n"
+"\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:475
+#, no-c-format
+msgid "We can now write:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:477
+#, no-c-format
+msgid "<![CDATA[@Current Logger log;]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:479
+#, no-c-format
+msgid ""
+"Not convinced? Then here's a second example. To inject HTTP parameters, we "
+"need to define a binding type:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:482
+#, no-c-format
+msgid ""
+"<![CDATA[@BindingType\n"
+"@Retention(RUNTIME)\n"
+"@Target({TYPE, METHOD, FIELD, PARAMETER})\n"
+"public @interface HttpParam {\n"
+"   @NonBinding public String value();\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:484
+#, no-c-format
+msgid "We would use this binding type at injection points as follows:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:486
+#, no-c-format
+msgid ""
+"<![CDATA[@HttpParam(\"username\") String username;\n"
+"@HttpParam(\"password\") String password;]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:488
+#, no-c-format
+msgid "The following producer method does the work:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:490
+#, no-c-format
+msgid ""
+"<![CDATA[class HttpParams\n"
+"\n"
+"   @Produces @HttpParam(\"\")\n"
+"   String getParamValue(ServletRequest request, InjectionPoint ip) {\n"
+"      return request.getParameter(ip.getAnnotation(HttpParam.class).value"
+"());\n"
+"   }\n"
+"\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:492
+#, no-c-format
+msgid ""
+"(Note that the <literal>value()</literal> member of the <literal>HttpParam</"
+"literal> annotation is ignored by the Web Bean manager since it is annotated "
+"<literal>@NonBinding.</literal>)"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:495
+#, no-c-format
+msgid ""
+"The Web Bean manager provides a built-in Web Bean that implements the "
+"<literal>InjectionPoint</literal> interface:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:498
+#, no-c-format
+msgid ""
+"<![CDATA[public interface InjectionPoint { \n"
+"   public Object getInstance(); \n"
+"   public Bean<?> getBean(); \n"
+"   public Member getMember(): \n"
+"   public <T extends Annotation> T getAnnotation(Class<T> annotation); \n"
+"   public Set<T extends Annotation> getAnnotations(); \n"
+"}]]>"
+msgstr ""

Added: doc/trunk/reference/ko-KR/interceptors.po
===================================================================
--- doc/trunk/reference/ko-KR/interceptors.po	                        (rev 0)
+++ doc/trunk/reference/ko-KR/interceptors.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,572 @@
+# Language ko-KR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: interceptors.xml:4
+#, no-c-format
+msgid "Interceptors"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:6
+#, no-c-format
+msgid ""
+"Web Beans re-uses the basic interceptor architecture of EJB 3.0, extending "
+"the functionality in two directions:"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:11
+#, no-c-format
+msgid "Any Web Bean may have interceptors, not just session beans."
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:14
+#, no-c-format
+msgid ""
+"Web Beans features a more sophisticated annotation-based approach to binding "
+"interceptors to Web Beans."
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:22
+#, no-c-format
+msgid "The EJB specification defines two kinds of interception points:"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:26
+#, no-c-format
+msgid "business method interception, and"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:29
+#, no-c-format
+msgid "lifecycle callback interception."
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:33
+#, no-c-format
+msgid ""
+"A <emphasis>business method interceptor</emphasis> applies to invocations of "
+"methods of the Web Bean by clients of the Web Bean:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:36
+#, no-c-format
+msgid ""
+"<![CDATA[public class TransactionInterceptor {\n"
+"    @AroundInvoke public Object manageTransaction(InvocationContext ctx) "
+"{ ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:38
+#, no-c-format
+msgid ""
+"A <emphasis>lifecycle callback interceptor</emphasis> applies to invocations "
+"of lifecycle callbacks by the container:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:41
+#, no-c-format
+msgid ""
+"<![CDATA[public class DependencyInjectionInterceptor {\n"
+"    @PostConstruct public void injectDependencies(InvocationContext ctx) "
+"{ ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:43
+#, no-c-format
+msgid ""
+"An interceptor class may intercept both lifecycle callbacks and business "
+"methods."
+msgstr ""
+
+#. Tag: title
+#: interceptors.xml:49
+#, no-c-format
+msgid "Interceptor bindings"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:51
+#, no-c-format
+msgid ""
+"Suppose we want to declare that some of our Web Beans are transactional. The "
+"first thing we need is an <emphasis>interceptor binding annotation</"
+"emphasis> to specify exactly which Web Beans we're interested in:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:55
+#, no-c-format
+msgid ""
+"<![CDATA[@InterceptorBindingType\n"
+"@Target({METHOD, TYPE})\n"
+"@Retention(RUNTIME)\n"
+"public @interface Transactional {}]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:57
+#, no-c-format
+msgid ""
+"Now we can easily specify that our <literal>ShoppingCart</literal> is a "
+"transactional object:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:60
+#, no-c-format
+msgid ""
+"<![CDATA[@Transactional\n"
+"public class ShoppingCart { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:62
+#, no-c-format
+msgid "Or, if we prefer, we can specify that just one method is transactional:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:64
+#, no-c-format
+msgid ""
+"<![CDATA[public class ShoppingCart {\n"
+"    @Transactional public void checkout() { ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: title
+#: interceptors.xml:69
+#, no-c-format
+msgid "Implementing interceptors"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:71
+#, no-c-format
+msgid ""
+"That's great, but somewhere along the line we're going to have to actually "
+"implement the interceptor that provides this transaction management aspect. "
+"All we need to do is create a standard EJB interceptor, and annotate it "
+"<literal>@Interceptor</literal> and <literal>@Transactional</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:76
+#, no-c-format
+msgid ""
+"<![CDATA[@Transactional @Interceptor\n"
+"public class TransactionInterceptor {\n"
+"    @AroundInvoke public Object manageTransaction(InvocationContext ctx) "
+"{ ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:78
+#, no-c-format
+msgid ""
+"All Web Beans interceptors are simple Web Beans, and can take advantage of "
+"dependency injection and contextual lifecycle management."
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:81
+#, no-c-format
+msgid ""
+"<![CDATA[@ApplicationScoped @Transactional @Interceptor\n"
+"public class TransactionInterceptor {\n"
+"\n"
+"    @Resource Transaction transaction;\n"
+"\n"
+"    @AroundInvoke public Object manageTransaction(InvocationContext ctx) "
+"{ ... }\n"
+"    \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:83
+#, no-c-format
+msgid "Multiple interceptors may use the same interceptor binding type."
+msgstr ""
+
+#. Tag: title
+#: interceptors.xml:88
+#, no-c-format
+msgid "Enabling interceptors"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:90
+#, no-c-format
+msgid ""
+"Finally, we need to <emphasis>enable</emphasis> our interceptor in "
+"<literal>web-beans.xml</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:93
+#, no-c-format
+msgid ""
+"<![CDATA[<Interceptors>\n"
+"    <tx:TransactionInterceptor/>\n"
+"</Interceptors>]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:95
+#, no-c-format
+msgid "Whoah! Why the angle bracket stew?"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:97
+#, no-c-format
+msgid "Well, the XML declaration solves two problems:"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:101
+#, no-c-format
+msgid ""
+"it enables us to specify a total ordering for all the interceptors in our "
+"system, ensuring deterministic behavior, and"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:105
+#, no-c-format
+msgid "it lets us enable or disable interceptor classes at deployment time."
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:109
+#, no-c-format
+msgid ""
+"For example, we could specify that our security interceptor runs before our "
+"<literal>TransactionInterceptor</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:112
+#, no-c-format
+msgid ""
+"<![CDATA[<Interceptors>\n"
+"    <sx:SecurityInterceptor/>\n"
+"    <tx:TransactionInterceptor/>\n"
+"</Interceptors>]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:114
+#, no-c-format
+msgid "Or we could turn them both off in our test environment!"
+msgstr ""
+
+#. Tag: title
+#: interceptors.xml:119
+#, no-c-format
+msgid "Interceptor bindings with members"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:121
+#, no-c-format
+msgid ""
+"Suppose we want to add some extra information to our "
+"<literal>@Transactional</literal> annotation:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:124
+#, no-c-format
+msgid ""
+"<![CDATA[@InterceptorBindingType\n"
+"@Target({METHOD, TYPE})\n"
+"@Retention(RUNTIME)\n"
+"public @interface Transactional {\n"
+"    boolean requiresNew() default false;\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:126
+#, no-c-format
+msgid ""
+"Web Beans will use the value of <literal>requiresNew</literal> to choose "
+"between two different interceptors, <literal>TransactionInterceptor</"
+"literal> and <literal>RequiresNewTransactionInterceptor</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:130
+#, no-c-format
+msgid ""
+"<![CDATA[@Transactional(requiresNew=true) @Interceptor\n"
+"public class RequiresNewTransactionInterceptor {\n"
+"    @AroundInvoke public Object manageTransaction(InvocationContext ctx) "
+"{ ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:132
+#, no-c-format
+msgid ""
+"Now we can use <literal>RequiresNewTransactionInterceptor</literal> like "
+"this:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:134
+#, no-c-format
+msgid ""
+"<![CDATA[@Transactional(requiresNew=true)\n"
+"public class ShoppingCart { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:136
+#, no-c-format
+msgid ""
+"But what if we only have one interceptor and we want the manager to ignore "
+"the value of <literal>requiresNew</literal> when binding interceptors? We "
+"can use the <literal>@NonBinding</literal> annotation:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:140
+#, no-c-format
+msgid ""
+"<![CDATA[@InterceptorBindingType\n"
+"@Target({METHOD, TYPE})\n"
+"@Retention(RUNTIME)\n"
+"public @interface Secure {\n"
+"    @NonBinding String[] rolesAllowed() default {};\n"
+"}]]>"
+msgstr ""
+
+#. Tag: title
+#: interceptors.xml:145
+#, no-c-format
+msgid "Multiple interceptor binding annotations"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:147
+#, no-c-format
+msgid ""
+"Usually we use combinations of interceptor bindings types to bind multiple "
+"interceptors to a Web Bean. For example, the following declaration would be "
+"used to bind <literal>TransactionInterceptor</literal> and "
+"<literal>SecurityInterceptor</literal> to the same Web Bean:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:152
+#, no-c-format
+msgid ""
+"<![CDATA[@Secure(rolesAllowed=\"admin\") @Transactional\n"
+"public class ShoppingCart { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:154
+#, no-c-format
+msgid ""
+"However, in very complex cases, an interceptor itself may specify some "
+"combination of interceptor binding types:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:157
+#, no-c-format
+msgid ""
+"<![CDATA[@Transactional @Secure @Interceptor\n"
+"public class TransactionalSecureInterceptor { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:159
+#, no-c-format
+msgid ""
+"Then this interceptor could be bound to the <literal>checkout()</literal> "
+"method using any one of the following combinations:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:162
+#, no-c-format
+msgid ""
+"<![CDATA[public class ShoppingCart {\n"
+"    @Transactional @Secure public void checkout() { ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:164
+#, no-c-format
+msgid ""
+"<![CDATA[@Secure\n"
+"public class ShoppingCart {\n"
+"    @Transactional public void checkout() { ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:166
+#, no-c-format
+msgid ""
+"<![CDATA[@Transactionl\n"
+"public class ShoppingCart {\n"
+"    @Secure public void checkout() { ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:168
+#, no-c-format
+msgid ""
+"<![CDATA[@Transactional @Secure\n"
+"public class ShoppingCart {\n"
+"    public void checkout() { ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: title
+#: interceptors.xml:173
+#, no-c-format
+msgid "Interceptor binding type inheritance"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:175
+#, no-c-format
+msgid ""
+"One limitation of the Java language support for annotations is the lack of "
+"annotation inheritance. Really, annotations should have reuse built in, to "
+"allow this kind of thing to work:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:179
+#, no-c-format
+msgid ""
+"<![CDATA[public @interface Action extends Transactional, Secure { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:181
+#, no-c-format
+msgid ""
+"Well, fortunately, Web Beans works around this missing feature of Java. We "
+"may annotate one interceptor binding type with other interceptor binding "
+"types. The interceptor bindings are transitive&#151;any Web Bean with the "
+"first interceptor binding inherits the interceptor bindings declared as meta-"
+"annotations."
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:186
+#, no-c-format
+msgid ""
+"<![CDATA[@Transactional @Secure\n"
+"@InterceptorBindingType\n"
+"@Target(TYPE)\n"
+"@Retention(RUNTIME)\n"
+"public @interface Action { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:188
+#, no-c-format
+msgid ""
+"Any Web Bean annotated <literal>@Action</literal> will be bound to both "
+"<literal>TransactionInterceptor</literal> and <literal>SecurityInterceptor</"
+"literal>. (And even <literal>TransactionalSecureInterceptor</literal>, if it "
+"exists.)"
+msgstr ""
+
+#. Tag: title
+#: interceptors.xml:195
+#, no-c-format
+msgid "Use of <literal>@Interceptors</literal>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:197
+#, no-c-format
+msgid ""
+"The <literal>@Interceptors</literal> annotation defined by the EJB "
+"specification is supported for both enterprise and simple Web Beans, for "
+"example:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:200
+#, no-c-format
+msgid ""
+"<![CDATA[@Interceptors({TransactionInterceptor.class, SecurityInterceptor."
+"class})\n"
+"public class ShoppingCart {\n"
+"    public void checkout() { ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:202
+#, no-c-format
+msgid "However, this approach suffers the following drawbacks:"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:206
+#, no-c-format
+msgid "the interceptor implementation is hardcoded in business code,"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:209
+#, no-c-format
+msgid "interceptors may not be easily disabled at deployment time, and"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:212
+#, no-c-format
+msgid ""
+"the interceptor ordering is non-global&#151;it is determined by the order in "
+"which interceptors are listed at the class level."
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:217
+#, no-c-format
+msgid ""
+"Therefore, we recommend the use of Web Beans-style interceptor bindings."
+msgstr ""

Added: doc/trunk/reference/ko-KR/intro.po
===================================================================
--- doc/trunk/reference/ko-KR/intro.po	                        (rev 0)
+++ doc/trunk/reference/ko-KR/intro.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,1075 @@
+# Language ko-KR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: intro.xml:4
+#, no-c-format
+msgid "Getting started with Web Beans"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: title
+#: intro.xml:13
+#, no-c-format
+msgid "Your first Web Bean"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:15
+#, no-c-format
+msgid ""
+"With certain, very special exceptions, every Java class with a constructor "
+"that accepts no parameters is a Web Bean. That includes every JavaBean. "
+"Furthermore, every EJB 3-style session bean is a Web Bean. Sure, the "
+"JavaBeans and EJBs you've been writing every day have not been able to take "
+"advantage of the new services defined by the Web Beans specification, but "
+"you'll be able to use every one of them as Web Beans&#151;injecting them "
+"into other Web Beans, configuring them via the Web Beans XML configuration "
+"facility, even adding interceptors and decorators to them&#151;without "
+"touching your existing code."
+msgstr ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:29
+#, no-c-format
+msgid ""
+"<![CDATA[public class SentenceParser {\n"
+"    public List<String> parse(String text) { ... }\n"
+"}]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:35
+#, no-c-format
+msgid ""
+"<![CDATA[@Stateless\n"
+"public class SentenceTranslator implements Translator {\n"
+"    public String translate(String sentence) { ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:37
+#, no-c-format
+msgid "Where <literal>Translator</literal> is the local interface:"
+msgstr ""
+
+#. Tag: programlisting
+#: intro.xml:39
+#, no-c-format
+msgid ""
+"<![CDATA[@Local\n"
+"public interface Translator {\n"
+"    public String translate(String sentence);\n"
+"}]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:44
+#, no-c-format
+msgid ""
+"<![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"
+"}]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:49
+#, no-c-format
+msgid ""
+"<![CDATA[@Initializer\n"
+"public setTextTranslator(TextTranslator textTranslator) {\n"
+"    this.textTranslator = textTranslator;\n"
+"}]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:54
+#, no-c-format
+msgid ""
+"<![CDATA[TextTranslator tt = manager.getInstanceByType(TextTranslator."
+"class);]]>"
+msgstr ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: para
+#: intro.xml:68
+#, no-c-format
+msgid ""
+"At system initialization time, the Web Bean manager must validate that "
+"exactly one Web Bean exists which satisfies each injection point. In our "
+"example, if no implementation of <literal>Translator</literal> "
+"available&#151;if the <literal>SentenceTranslator</literal> EJB was not "
+"deployed&#151;the Web Bean manager would throw an "
+"<literal>UnsatisfiedDependencyException</literal>. If more than one "
+"implementation of <literal>Translator</literal> was available, the Web Bean "
+"manager would throw an <literal>AmbiguousDependencyException</literal>."
+msgstr ""
+
+#. Tag: title
+#: intro.xml:80
+#, no-c-format
+msgid "What is a Web Bean?"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:82
+#, no-c-format
+msgid "So what, <emphasis>exactly</emphasis>, is a Web Bean?"
+msgstr ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: para
+#: intro.xml:105
+#, no-c-format
+msgid "the lifecycle of each instance of the Web Bean and"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:108
+#, no-c-format
+msgid ""
+"which clients share a reference to a particular instance of the Web Bean."
+msgstr ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: para
+#: intro.xml:132
+#, no-c-format
+msgid "they interact via well-defined public APIs"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:135
+#, no-c-format
+msgid "their lifecycles are completely decoupled"
+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 ""
+
+#. Tag: para
+#: intro.xml:145
+#, no-c-format
+msgid ""
+"Note that not all clients of a Web Bean are Web Beans. Other objects such as "
+"Servlets or Message-Driven Beans&#151;which are by nature not injectable, "
+"contextual objects&#151;may also obtain references to Web Beans by injection."
+msgstr ""
+
+#. Tag: para
+#: intro.xml:149
+#, no-c-format
+msgid "Enough hand-waving. More formally, according to the spec:"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:153
+#, no-c-format
+msgid "A Web Bean comprises:"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:156
+#, no-c-format
+msgid "A (nonempty) set of API types"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:157
+#, no-c-format
+msgid "A (nonempty) set of binding annotation types"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:158
+#, no-c-format
+msgid "A scope"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:159
+#, no-c-format
+msgid "A deployment type"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:160
+#, no-c-format
+msgid "Optionally, a Web Bean name"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:161
+#, no-c-format
+msgid "A set of interceptor binding types"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:162
+#, no-c-format
+msgid "A Web Bean implementation"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:167
+#, no-c-format
+msgid "Let's see what some of these terms mean, to the Web Bean developer."
+msgstr ""
+
+#. Tag: title
+#: intro.xml:170
+#, no-c-format
+msgid "API types, binding types and dependency injection"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: para
+#: intro.xml:177
+#, no-c-format
+msgid "an API type, together with"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:178
+#, no-c-format
+msgid "a set of binding types."
+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 ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:191
+#, no-c-format
+msgid "<![CDATA[@CreditCard PaymentProcessor paymentProcessor]]>"
+msgstr ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:204
+#, no-c-format
+msgid ""
+"<![CDATA[@CreditCard\n"
+"public class CreditCardPaymentProcessor \n"
+"    implements PaymentProcessor { ... }]]>"
+msgstr ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: title
+#: intro.xml:217
+#, no-c-format
+msgid "Deployment types"
+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 ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:233
+#, no-c-format
+msgid ""
+"<![CDATA[@Mock\n"
+"public class MockSentenceTranslator implements Translator {\n"
+"    public String translate(String sentence) {\n"
+"        return \"Lorem ipsum dolor sit amet\";\n"
+"    }\n"
+"}]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: para
+#: intro.xml:240
+#, no-c-format
+msgid ""
+"We'll talk more about this unique and powerful feature in <xref linkend="
+"\"deploymenttypes\"/>."
+msgstr ""
+
+#. Tag: title
+#: intro.xml:246
+#, no-c-format
+msgid "Scope"
+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 ""
+
+#. Tag: para
+#: intro.xml:254
+#, no-c-format
+msgid ""
+"For example, any web application may have <emphasis>session scoped</"
+"emphasis> Web Beans:"
+msgstr ""
+
+#. Tag: programlisting
+#: intro.xml:257
+#, no-c-format
+msgid ""
+"<![CDATA[@SessionScoped\n"
+"public class ShoppingCart { ... }]]>"
+msgstr ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: para
+#: intro.xml:267
+#, no-c-format
+msgid "We'll talk more about scopes in <xref linkend=\"scopescontexts\"/>."
+msgstr ""
+
+#. Tag: title
+#: intro.xml:272
+#, no-c-format
+msgid "Web Bean names and Unified EL"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:278
+#, no-c-format
+msgid ""
+"<![CDATA[@SessionScoped @Named(\"cart\")\n"
+"public class ShoppingCart { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:280
+#, no-c-format
+msgid "Now we can easily use the Web Bean in any JSF or JSP page:"
+msgstr ""
+
+#. Tag: programlisting
+#: intro.xml:282
+#, no-c-format
+msgid ""
+"<![CDATA[<h:dataTable value=\"#{cart.lineItems}\" var=\"item\">\n"
+"    ....\n"
+"</h:dataTable>]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:287
+#, no-c-format
+msgid ""
+"<![CDATA[@SessionScoped @Named\n"
+"public class ShoppingCart { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:289
+#, no-c-format
+msgid ""
+"In this case, the name defaults to <literal>shoppingCart</literal>&#151;the "
+"unqualified class name, with the first character changed to lowercase."
+msgstr ""
+
+#. Tag: title
+#: intro.xml:295
+#, no-c-format
+msgid "Interceptor binding types"
+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 ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:305
+#, no-c-format
+msgid ""
+"<![CDATA[@SessionScoped \n"
+"@Interceptors(TransactionInterceptor.class)\n"
+"public class ShoppingCart { ... }]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:311
+#, no-c-format
+msgid ""
+"<![CDATA[@SessionScoped @Transactional\n"
+"public class ShoppingCart { ... }]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: title
+#: intro.xml:321
+#, no-c-format
+msgid "What kinds of objects can be Web Beans?"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: title
+#: intro.xml:327
+#, no-c-format
+msgid "Simple Web Beans"
+msgstr ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: para
+#: intro.xml:338
+#, no-c-format
+msgid "it is not a non-static static inner class,"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:341
+#, no-c-format
+msgid "it is not a parameterized type, and"
+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 ""
+
+#. Tag: para
+#: intro.xml:349
+#, no-c-format
+msgid "Thus, almost every JavaBean is a simple Web Bean."
+msgstr ""
+
+#. 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 ""
+
+#. Tag: title
+#: intro.xml:358
+#, no-c-format
+msgid "Enterprise Web Beans"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:360
+#, no-c-format
+msgid ""
+"The specification says that all EJB 3-style session and singleton beans are "
+"<emphasis>enterprise</emphasis> Web Beans. Message driven beans are not Web "
+"Beans&#151;since they are not intended to be injected into other "
+"objects&#151;but they can take advantage of most of the functionality of Web "
+"Beans, including dependency injection and interceptors."
+msgstr ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:378
+#, no-c-format
+msgid ""
+"<![CDATA[@Stateful @SessionScoped\n"
+"public class ShoppingCart {\n"
+"\n"
+"    ...\n"
+"    \n"
+"    @Remove\n"
+"    public void destroy() {}\n"
+"\n"
+"}]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: para
+#: intro.xml:387
+#, no-c-format
+msgid "method-level transaction management and security,"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:390
+#, no-c-format
+msgid "concurrency management,"
+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 ""
+
+#. Tag: para
+#: intro.xml:397
+#, no-c-format
+msgid "remote and web service invocation, and"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:400
+#, no-c-format
+msgid "timers and asynchronous methods,"
+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 ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: title
+#: intro.xml:427
+#, no-c-format
+msgid "Producer methods"
+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 ""
+
+#. Tag: programlisting
+#: intro.xml:435
+#, no-c-format
+msgid ""
+"<![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"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:437
+#, no-c-format
+msgid ""
+"The result of a producer method is injected just like any other Web Bean."
+msgstr ""
+
+#. Tag: programlisting
+#: intro.xml:439
+#, no-c-format
+msgid "<![CDATA[@Random int randomNumber]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: para
+#: intro.xml:445
+#, no-c-format
+msgid "Some producer methods return objects that require explicit destruction:"
+msgstr ""
+
+#. Tag: programlisting
+#: intro.xml:447
+#, no-c-format
+msgid ""
+"<![CDATA[@Produces @RequestScoped Connection connect(User user) {\n"
+"    return createConnection( user.getId(), user.getPassword() );\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:449
+#, no-c-format
+msgid ""
+"These producer methods may define matching <emphasis>disposal methods</"
+"emphasis>:"
+msgstr ""
+
+#. Tag: programlisting
+#: intro.xml:451
+#, no-c-format
+msgid ""
+"<![CDATA[void close(@Disposes Connection connection) {\n"
+"    connection.close();\n"
+"}]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: para
+#: intro.xml:456
+#, no-c-format
+msgid ""
+"We'll talk much more about producer methods in <xref linkend="
+"\"producermethods\"/>."
+msgstr ""
+
+#. Tag: title
+#: intro.xml:461
+#, no-c-format
+msgid "JMS endpoints"
+msgstr ""
+
+#. 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 ""

Added: doc/trunk/reference/ko-KR/master.po
===================================================================
--- doc/trunk/reference/ko-KR/master.po	                        (rev 0)
+++ doc/trunk/reference/ko-KR/master.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,38 @@
+# Language ko-KR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: master.xml:12
+#, no-c-format
+msgid "Using contextual objects"
+msgstr ""
+
+#. Tag: title
+#: master.xml:25
+#, no-c-format
+msgid "Developing loosely-coupled code"
+msgstr ""
+
+#. Tag: title
+#: master.xml:35
+#, no-c-format
+msgid "Making the most of strong typing"
+msgstr ""
+
+#. Tag: title
+#: master.xml:46
+#, no-c-format
+msgid "Web Beans and the Java EE ecosystem"
+msgstr ""

Added: doc/trunk/reference/ko-KR/next.po
===================================================================
--- doc/trunk/reference/ko-KR/next.po	                        (rev 0)
+++ doc/trunk/reference/ko-KR/next.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,49 @@
+# Language ko-KR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: next.xml:4
+#, no-c-format
+msgid "Next steps"
+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 ""
+
+#. 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 ""
+
+#. 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 ""

Added: doc/trunk/reference/ko-KR/part1.po
===================================================================
--- doc/trunk/reference/ko-KR/part1.po	                        (rev 0)
+++ doc/trunk/reference/ko-KR/part1.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,229 @@
+# Language ko-KR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: para
+#: part1.xml:5
+#, no-c-format
+msgid ""
+"The Web Beans (JSR-299) specification defines a set of services for the Java "
+"EE environment that makes applications much easier to develop. Web Beans "
+"layers an enhanced lifecycle and interaction model over existing Java "
+"component types including JavaBeans and Enterprise Java Beans. As a "
+"complement to the traditional Java EE programming model, the Web Beans "
+"services provide:"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:14
+#, no-c-format
+msgid ""
+"an improved lifecycle for stateful components, bound to well-defined "
+"<emphasis>contexts</emphasis>,"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:18
+#, no-c-format
+msgid "a typesafe approach to <emphasis>dependency injection</emphasis>,"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:21
+#, no-c-format
+msgid ""
+"interaction via an <emphasis>event notification</emphasis> facility, and"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:25
+#, no-c-format
+msgid ""
+"a better approach to binding <emphasis>interceptors</emphasis> to "
+"components, along with a new kind of interceptor, called a "
+"<emphasis>decorator</emphasis>, that is more appropriate for use in solving "
+"business problems."
+msgstr ""
+
+#. Tag: para
+#: part1.xml:32
+#, no-c-format
+msgid ""
+"Dependency injection, together with contextual lifecycle management, saves "
+"the user of an unfamiliar API from having to ask and answer the following "
+"questions:"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:38
+#, no-c-format
+msgid "what is the lifecycle of this object?"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:41
+#, no-c-format
+msgid "how many simultaneous clients can it have?"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:44
+#, no-c-format
+msgid "is it multithreaded?"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:47
+#, no-c-format
+msgid "where can I get one from?"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:50
+#, no-c-format
+msgid "do I need to explicitly destroy it?"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:53
+#, no-c-format
+msgid "where should I keep my reference to it when I'm not using it directly?"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:57
+#, no-c-format
+msgid ""
+"how can I add an indirection layer, so that the implementation of this "
+"object can vary at deployment time?"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:61
+#, no-c-format
+msgid "how should I go about sharing this object between other objects?"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:65
+#, no-c-format
+msgid ""
+"A Web Bean specifies only the type and semantics of other Web Beans it "
+"depends upon. It need not be aware of the actual lifecycle, concrete "
+"implementation, threading model or other clients of any Web Bean it depends "
+"upon. Even better, the concrete implementation, lifecycle and threading "
+"model of a Web Bean it depends upon may vary according to the deployment "
+"scenario, without affecting any client."
+msgstr ""
+
+#. Tag: para
+#: part1.xml:72
+#, no-c-format
+msgid ""
+"Events, interceptors and decorators enhance the <emphasis>loose-coupling</"
+"emphasis> that is inherent in this model:"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:77
+#, no-c-format
+msgid ""
+"<emphasis>event notifications</emphasis> decouple event producers from event "
+"consumers,"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:81
+#, no-c-format
+msgid ""
+"<emphasis>interceptors</emphasis> decouple technical concerns from business "
+"logic, and"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:85
+#, no-c-format
+msgid ""
+"<emphasis>decorators</emphasis> allow business concerns to be "
+"compartmentalized."
+msgstr ""
+
+#. Tag: para
+#: part1.xml:90
+#, no-c-format
+msgid ""
+"Most importantly, Web Beans provides all these facilities in a "
+"<emphasis>typesafe</emphasis> way. Web Beans never uses string-based "
+"identifiers to determine how collaborating objects fit together. And XML, "
+"though it remains an option, is rarely used. Instead, Web Beans uses the "
+"typing information that is already available in the Java object model, "
+"together with a new pattern, called <emphasis>binding annotations</"
+"emphasis>, to wire together Web Beans, their dependencies, their "
+"interceptors and decorators and their event consumers."
+msgstr ""
+
+#. Tag: para
+#: part1.xml:100
+#, no-c-format
+msgid ""
+"The Web Beans services are general and apply to the following types of "
+"components that exist in the Java EE environment:"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:105
+#, no-c-format
+msgid "all JavaBeans,"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:108
+#, no-c-format
+msgid "all EJBs, and"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:111
+#, no-c-format
+msgid "all Servlets."
+msgstr ""
+
+#. Tag: para
+#: part1.xml:115
+#, no-c-format
+msgid ""
+"Web Beans even provides the necessary integration points so that other kinds "
+"of components defined by future Java EE specifications or by non-standard "
+"frameworks may be cleanly integrated with Web Beans, take advantage of the "
+"Web Beans services, and interact with any other kind of Web Bean."
+msgstr ""
+
+#. Tag: para
+#: part1.xml:120
+#, no-c-format
+msgid ""
+"Web Beans was influenced by a number of existing Java frameworks, including "
+"Seam, Guice and Spring. However, Web Beans has its own very distinct "
+"character: more typesafe than Seam, more stateful and less XML-centric than "
+"Spring, more web and enterprise-application capable than Guice."
+msgstr ""
+
+#. Tag: para
+#: part1.xml:125
+#, no-c-format
+msgid ""
+"Most importantly, Web Beans is a JCP standard that integrates cleanly with "
+"Java EE, and with any Java SE environment where embeddable EJB Lite is "
+"available."
+msgstr ""

Added: doc/trunk/reference/ko-KR/part2.po
===================================================================
--- doc/trunk/reference/ko-KR/part2.po	                        (rev 0)
+++ doc/trunk/reference/ko-KR/part2.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,102 @@
+# Language ko-KR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. 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 ""
+
+#. Tag: para
+#: part2.xml:10
+#, no-c-format
+msgid ""
+"<emphasis>deployment types</emphasis> enable deployment time polymorphism,"
+msgstr ""
+
+#. Tag: para
+#: part2.xml:14
+#, no-c-format
+msgid "<emphasis>producer methods</emphasis> enable runtime polymorphism, and"
+msgstr ""
+
+#. Tag: para
+#: part2.xml:18
+#, no-c-format
+msgid ""
+"<emphasis>contextual lifecycle management</emphasis> decouples Web Bean "
+"lifecycles."
+msgstr ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: para
+#: part2.xml:34
+#, no-c-format
+msgid ""
+"Web Beans provides three extra important facilities that further the goal of "
+"loose coupling:"
+msgstr ""
+
+#. Tag: para
+#: part2.xml:39
+#, no-c-format
+msgid ""
+"<emphasis>interceptors</emphasis> decouple technical concerns from business "
+"logic,"
+msgstr ""
+
+#. Tag: para
+#: part2.xml:43
+#, no-c-format
+msgid ""
+"<emphasis>decorators</emphasis> may be used to decouple some business "
+"concerns, and"
+msgstr ""
+
+#. Tag: para
+#: part2.xml:47
+#, no-c-format
+msgid ""
+"<emphasis>event notifications</emphasis> decouple event producers from event "
+"consumers."
+msgstr ""
+
+#. Tag: para
+#: part2.xml:52
+#, no-c-format
+msgid "Let's explore interceptors first."
+msgstr ""

Added: doc/trunk/reference/ko-KR/part3.po
===================================================================
--- doc/trunk/reference/ko-KR/part3.po	                        (rev 0)
+++ doc/trunk/reference/ko-KR/part3.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,150 @@
+# Language ko-KR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: para
+#: part3.xml:5
+#, no-c-format
+msgid ""
+"The second major theme of Web Beans is <emphasis>strong typing</emphasis>. "
+"The information about the dependencies, interceptors and decorators of a Web "
+"Bean, and the information about event consumers for an event producer, is "
+"contained in typesafe Java constructs that may be validated by the compiler."
+msgstr ""
+
+#. Tag: para
+#: part3.xml:10
+#, no-c-format
+msgid ""
+"You don't see string-based identifiers in Web Beans code, not because the "
+"framework is hiding them from you using clever defaulting rules&#151;so-"
+"called \"configuration by convention\"&#151;but because there are simply no "
+"strings there to begin with!"
+msgstr ""
+
+#. Tag: para
+#: part3.xml:15
+#, no-c-format
+msgid ""
+"The obvious benefit of this approach is that <emphasis>any</emphasis> IDE "
+"can provide autocompletion, validation and refactoring without the need for "
+"special tooling. But there is a second, less-immediately-obvious, benefit. "
+"It turns out that when you start thinking of identifying objects, events or "
+"interceptors via annotations instead of names, you have an opportunity to "
+"lift the semantic level of your code."
+msgstr ""
+
+#. Tag: para
+#: part3.xml:21
+#, no-c-format
+msgid ""
+"Web Beans encourages you develop annotations that model concepts, for "
+"example,"
+msgstr ""
+
+#. Tag: para
+#: part3.xml:26
+#, no-c-format
+msgid "<literal>@Asynchronous</literal>,"
+msgstr ""
+
+#. Tag: para
+#: part3.xml:29
+#, no-c-format
+msgid "<literal>@Mock</literal>,"
+msgstr ""
+
+#. Tag: para
+#: part3.xml:32
+#, no-c-format
+msgid "<literal>@Secure</literal> or"
+msgstr ""
+
+#. Tag: para
+#: part3.xml:35
+#, no-c-format
+msgid "<literal>@Updated</literal>,"
+msgstr ""
+
+#. Tag: para
+#: part3.xml:39
+#, no-c-format
+msgid "instead of using compound names like"
+msgstr ""
+
+#. Tag: para
+#: part3.xml:43
+#, no-c-format
+msgid "<literal>asyncPaymentProcessor</literal>,"
+msgstr ""
+
+#. Tag: para
+#: part3.xml:46
+#, no-c-format
+msgid "<literal>mockPaymentProcessor</literal>,"
+msgstr ""
+
+#. Tag: para
+#: part3.xml:49
+#, no-c-format
+msgid "<literal>SecurityInterceptor</literal> or"
+msgstr ""
+
+#. Tag: para
+#: part3.xml:52
+#, no-c-format
+msgid "<literal>DocumentUpdatedEvent</literal>."
+msgstr ""
+
+#. Tag: para
+#: part3.xml:56
+#, no-c-format
+msgid ""
+"The annotations are reusable. They help describe common qualities of "
+"disparate parts of the system. They help us categorize and understand our "
+"code. They help us deal with common concerns in a common way. They make our "
+"code more literate and more understandable."
+msgstr ""
+
+#. Tag: para
+#: part3.xml:61
+#, no-c-format
+msgid ""
+"Web Beans <emphasis>stereotypes</emphasis> take this idea a step further. A "
+"stereotype models a common <emphasis>role</emphasis> in your application "
+"architecture. It encapsulates various properties of the role, including "
+"scope, interceptor bindings, deployment type, etc, into a single reusable "
+"package."
+msgstr ""
+
+#. Tag: para
+#: part3.xml:66
+#, no-c-format
+msgid ""
+"Even Web Beans XML metadata is strongly typed! There's no compiler for XML, "
+"so Web Beans takes advantage of XML schemas to validate the Java types and "
+"attributes that appear in XML. This approach turns out to make the XML more "
+"literate, just like annotations made our Java code more literate."
+msgstr ""
+
+#. Tag: para
+#: part3.xml:71
+#, no-c-format
+msgid ""
+"We're now ready to meet some more advanced features of Web Beans. Bear in "
+"mind that these features exist to make our code both easier to validate and "
+"more understandable. Most of the time you don't ever really <emphasis>need</"
+"emphasis> to use these features, but if you use them wisely, you'll come to "
+"appreciate their power."
+msgstr ""

Added: doc/trunk/reference/ko-KR/part4.po
===================================================================
--- doc/trunk/reference/ko-KR/part4.po	                        (rev 0)
+++ doc/trunk/reference/ko-KR/part4.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,52 @@
+# Language ko-KR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: para
+#: part4.xml:5
+#, no-c-format
+msgid ""
+"The third theme of Web Beans is <emphasis>integration</emphasis>. Web Beans "
+"was designed to work in concert with other technologies, helping the "
+"application developer fit the other technologies together. Web Beans is an "
+"open technology. It forms a part of the Java EE ecosystem, and is itself the "
+"foundation for a new ecosystem of portable extensions and integration with "
+"existing frameworks and technologies."
+msgstr ""
+
+#. Tag: para
+#: part4.xml:12
+#, no-c-format
+msgid ""
+"We've already seen how Web Beans helps integrate EJB and JSF, allowing EJBs "
+"to be bound directly to JSF pages. That's just the beginning. Web Beans "
+"offers the same potential to diverse other technologies, such as Business "
+"Process Management engines, other Web Frameworks, and third-party component "
+"models. The Java EE platform will never be able to standardize all the "
+"interesting technologies that are used in the world of Java application "
+"development, but Web Beans makes it easier to use the technologies which are "
+"not yet part of the platform seamlessly within the Java EE environment."
+msgstr ""
+
+#. Tag: para
+#: part4.xml:21
+#, no-c-format
+msgid ""
+"We're about to see how to take full advantage of the Java EE platform in an "
+"application that uses Web Beans. We'll also briefly meet a set of SPIs that "
+"are provided to support portable extensions to Web Beans. You might not ever "
+"need to use these SPIs directly, but it's nice to know they are there if you "
+"need them. Most importantly, you'll take advantage of them indirectly, every "
+"time you use a third-party extension."
+msgstr ""

Added: doc/trunk/reference/ko-KR/producermethods.po
===================================================================
--- doc/trunk/reference/ko-KR/producermethods.po	                        (rev 0)
+++ doc/trunk/reference/ko-KR/producermethods.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,247 @@
+# Language ko-KR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: producermethods.xml:5
+#, no-c-format
+msgid "Producer methods"
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:7
+#, no-c-format
+msgid ""
+"Producer methods let us overcome certain limitations that arise when the Web "
+"Bean manager, instead of the application, is responsible for instantiating "
+"objects. They're also the easiest way to integrate objects which are not Web "
+"Beans into the Web Beans environment. (We'll meet a second approach in <xref "
+"linkend=\"xml\"/>.)"
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:12
+#, no-c-format
+msgid "According to the spec:"
+msgstr ""
+
+#. Tag: chapter
+#: producermethods.xml:12
+#, no-c-format
+msgid ""
+"<blockquote> <para>A Web Beans producer method acts as a source of objects "
+"to be injected, where:</para> <itemizedlist> <listitem> <para>the objects to "
+"be injected are not required to be instances of Web Beans,</para> </"
+"listitem> <listitem> <para>the concrete type of the objects to be injected "
+"may vary at runtime or</para> </listitem> <listitem> <para>the objects "
+"require some custom initialization that is not performed by the Web Bean "
+"constructor</para> </listitem> </itemizedlist> </blockquote> <para>For "
+"example, producer methods let us:</para> <itemizedlist> <listitem> "
+"<para>expose a JPA entity as a Web Bean,</para> </listitem> <listitem> "
+"<para>expose any JDK class as a Web Bean,</para> </listitem> <listitem> "
+"<para>define multiple Web Beans, with different scopes or initialization, "
+"for the same implementation class, or</para> </listitem> <listitem> "
+"<para>vary the implementation of an API type at runtime.</para> </listitem> "
+"</itemizedlist> <para>In particular, producer methods let us use runtime "
+"polymorphism with Web Beans. As we've seen, deployment types are a powerful "
+"solution to the problem of deployment-time polymorphism. But once the system "
+"is deployed, the Web Bean implementation is fixed. A producer method has no "
+"such limitation:</para> <programlisting role=\"JAVA\"><![CDATA"
+"[@SessionScoped\n"
+"public class Preferences {\n"
+"    \n"
+"    private PaymentStrategyType paymentStrategy;\n"
+"    \n"
+"    ...\n"
+"    \n"
+"    @Produces @Preferred \n"
+"    public PaymentStrategy getPaymentStrategy() {\n"
+"        switch (paymentStrategy) {\n"
+"            case CREDIT_CARD: return new CreditCardPaymentStrategy();\n"
+"            case CHEQUE: return new ChequePaymentStrategy();\n"
+"            case PAYPAL: return new PayPalPaymentStrategy();\n"
+"            default: return null;\n"
+"        } \n"
+"    }\n"
+"    \n"
+"}]]></programlisting> <para>Consider an injection point:</para> "
+"<programlisting role=\"JAVA\"><![CDATA[@Preferred PaymentStrategy "
+"paymentStrat;]]></programlisting> <para>This injection point has the same "
+"type and binding annotations as the producer method, so it resolves to the "
+"producer method using the usual Web Beans injection rules. The producer "
+"method will be called by the Web Bean manager to obtain an instance to "
+"service this injection point.</para>."
+msgstr ""
+
+#. Tag: title
+#: producermethods.xml:68
+#, no-c-format
+msgid "Scope of a producer method"
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:70
+#, no-c-format
+msgid ""
+"The scope of the producer method defaults to <literal>@Dependent</literal>, "
+"and so it will be called <emphasis>every time</emphasis> the Web Bean "
+"manager injects this field or any other field that resolves to the same "
+"producer method. Thus, there could be multiple instances of the "
+"<literal>PaymentStrategy</literal> object for each user session."
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:75
+#, no-c-format
+msgid ""
+"To change this behavior, we can add a <literal>@SessionScoped</literal> "
+"annotation to the method."
+msgstr ""
+
+#. Tag: programlisting
+#: producermethods.xml:78
+#, no-c-format
+msgid ""
+"<![CDATA[@Produces @Preferred @SessionScoped\n"
+"public PaymentStrategy getPaymentStrategy() {\n"
+"    ...\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:80
+#, no-c-format
+msgid ""
+"Now, when the producer method is called, the returned "
+"<literal>PaymentStrategy</literal> will be bound to the session context. The "
+"producer method won't be called again in the same session."
+msgstr ""
+
+#. Tag: title
+#: producermethods.xml:87
+#, no-c-format
+msgid "Injection into producer methods"
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:89
+#, no-c-format
+msgid ""
+"There's one potential problem with the code above. The implementations of "
+"<literal>CreditCardPaymentStrategy</literal> are instantiated using the Java "
+"<literal>new</literal> operator. Objects instantiated directly by the "
+"application can't take advantage of dependency injection and don't have "
+"interceptors."
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:94
+#, no-c-format
+msgid ""
+"If this isn't what we want we can use dependency injection into the producer "
+"method to obtain Web Bean instances:"
+msgstr ""
+
+#. Tag: programlisting
+#: producermethods.xml:97
+#, no-c-format
+msgid ""
+"<![CDATA[@Produces @Preferred @SessionScoped\n"
+"public PaymentStrategy getPaymentStrategy(CreditCardPaymentStrategy ccps,\n"
+"                                          ChequePaymentStrategy cps,\n"
+"                                          PayPalPaymentStrategy ppps) {\n"
+"    switch (paymentStrategy) {\n"
+"        case CREDIT_CARD: return ccps;\n"
+"        case CHEQUE: return cps;\n"
+"        case PAYPAL: return ppps;\n"
+"        default: return null;\n"
+"    } \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:99
+#, no-c-format
+msgid ""
+"Wait, what if <literal>CreditCardPaymentStrategy</literal> is a request "
+"scoped Web Bean? Then the producer method has the effect of \"promoting\" "
+"the current request scoped instance into session scope. This is almost "
+"certainly a bug! The request scoped object will be destroyed by the Web Bean "
+"manager before the session ends, but the reference to the object will be "
+"left \"hanging\" in the session scope. This error will <emphasis>not</"
+"emphasis> be detected by the Web Bean manager, so please take extra care "
+"when returning Web Bean instances from producer methods!"
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:107
+#, no-c-format
+msgid ""
+"There's at least three ways we could go about fixing this bug. We could "
+"change the scope of the <literal>CreditCardPaymentStrategy</literal> "
+"implementation, but this would affect other clients of that Web Bean. A "
+"better option would be to change the scope of the producer method to "
+"<literal>@Dependent</literal> or <literal>@RequestScoped</literal>."
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:113
+#, no-c-format
+msgid ""
+"But a more common solution is to use the special <literal>@New</literal> "
+"binding annotation."
+msgstr ""
+
+#. Tag: title
+#: producermethods.xml:119
+#, no-c-format
+msgid "Use of <literal>@New</literal> with producer methods"
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:121
+#, no-c-format
+msgid "Consider the following producer method:"
+msgstr ""
+
+#. Tag: programlisting
+#: producermethods.xml:123
+#, no-c-format
+msgid ""
+"<![CDATA[@Produces @Preferred @SessionScoped\n"
+"public PaymentStrategy getPaymentStrategy(@New CreditCardPaymentStrategy "
+"ccps,\n"
+"                                          @New ChequePaymentStrategy cps,\n"
+"                                          @New PayPalPaymentStrategy ppps) "
+"{\n"
+"    switch (paymentStrategy) {\n"
+"        case CREDIT_CARD: return ccps;\n"
+"        case CHEQUE: return cps;\n"
+"        case PAYPAL: return ppps;\n"
+"        default: return null;\n"
+"    } \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:125
+#, no-c-format
+msgid ""
+"Then a new <emphasis>dependent</emphasis> instance of "
+"<literal>CreditCardPaymentStrategy</literal> will be created, passed to the "
+"producer method, returned by the producer method and finally bound to the "
+"session context. The dependent object won't be destroyed until the "
+"<literal>Preferences</literal> object is destroyed, at the end of the "
+"session."
+msgstr ""

Added: doc/trunk/reference/ko-KR/ri-spi.po
===================================================================
--- doc/trunk/reference/ko-KR/ri-spi.po	                        (rev 0)
+++ doc/trunk/reference/ko-KR/ri-spi.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,389 @@
+# Language ko-KR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: ri-spi.xml:4
+#, no-c-format
+msgid "Integrating the Web Beans RI into other environments"
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:6
+#, no-c-format
+msgid ""
+"Currently the Web Beans RI only runs in JBoss AS 5; integrating the RI into "
+"other EE environments (for example another application server like "
+"Glassfish), into a servlet container (like Tomcat), or with an Embedded "
+"EJB3.1 implementation is fairly easy. In this Appendix we will briefly "
+"discuss the steps needed."
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:15
+#, no-c-format
+msgid ""
+"It should be possible to run Web Beans in an SE environment, but you'll to "
+"do more work, adding your own contexts and lifecycle. The Web Beans RI "
+"currently doesn't expose lifecycle extension points, so you would have to "
+"code directly against Web Beans RI classes."
+msgstr ""
+
+#. Tag: title
+#: ri-spi.xml:24
+#, no-c-format
+msgid "The Web Beans RI SPI"
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:26
+#, no-c-format
+msgid ""
+"The Web Beans SPI is located in <literal>webbeans-ri-spi</literal> module, "
+"and packaged as <literal>webbeans-ri-spi.jar</literal>. Some SPIs are "
+"optional, if you need to override the default behavior, others are required."
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:33
+#, no-c-format
+msgid ""
+"You can specify the implementation of an SPI either as a system property, or "
+"in a properties file <literal>META-INF/web-beans-ri.properties</literal>. "
+"All property names are the fully qualified class name of the implemented "
+"interface; all property values are the fully qualified class name of the "
+"implementation class."
+msgstr ""
+
+#. Tag: title
+#: ri-spi.xml:43
+#, no-c-format
+msgid "Web Bean Discovery"
+msgstr ""
+
+#. Tag: programlisting
+#: ri-spi.xml:45
+#, no-c-format
+msgid ""
+"<![CDATA[public interface WebBeanDiscovery {\n"
+"   /**\n"
+"    * Gets list of all classes in classpath archives with web-beans.xml "
+"files\n"
+"    * \n"
+"    * @return An iterable over the classes \n"
+"    */\n"
+"   public Iterable<Class<?>> discoverWebBeanClasses();\n"
+"   \n"
+"   /**\n"
+"    * Gets a list of all web-beans.xml files in the app classpath\n"
+"    * \n"
+"    * @return An iterable over the web-beans.xml files \n"
+"    */\n"
+"   public Iterable<URL> discoverWebBeansXml();\n"
+"   \n"
+"   /**\n"
+"    * Gets a descriptor for each EJB in the application\n"
+"    * \n"
+"    * @return The bean class to descriptor map \n"
+"    */\n"
+"   public Iterable<EjbDescriptor<?>> discoverEjbs();\n"
+"   \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:47
+#, no-c-format
+msgid ""
+"The discovery of Web Bean classes and <literal>web-bean.xml</literal> files "
+"is self-explanatory (the algorithm is described in Section 11.1 of the JSR-"
+"299 specification, and isn't repeated here)."
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:53
+#, no-c-format
+msgid ""
+"The Web Beans RI also delegates EJB3 bean discovery to the container so that "
+"it doesn't have to scan for EJB3 annotations or parse <literal>ejb-jar.xml</"
+"literal>. For each EJB in the application an EJBDescriptor should be "
+"discovered:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri-spi.xml:60
+#, no-c-format
+msgid ""
+"<![CDATA[public interface EjbDescriptor<T> {\n"
+"   \n"
+"   /**\n"
+"    * Gets the EJB type\n"
+"    * \n"
+"    * @return The EJB Bean class\n"
+"    */\n"
+"   public Class<T> getType();\n"
+"\n"
+"   /**\n"
+"    * Gets the local business interfaces of the EJB\n"
+"    * \n"
+"    * @return An iterator over the local business interfaces\n"
+"    */\n"
+"   public Iterable<BusinessInterfaceDescriptor<?>> getLocalBusinessInterfaces"
+"();\n"
+"   \n"
+"   /**\n"
+"    * Gets the remote business interfaces of the EJB\n"
+"    * \n"
+"    * @return An iterator over the remote business interfaces\n"
+"    */\n"
+"   public Iterable<BusinessInterfaceDescriptor<?>> "
+"getRemoteBusinessInterfaces();\n"
+"   \n"
+"   /**\n"
+"    * Get the remove methods of the EJB\n"
+"    * \n"
+"    * @return An iterator over the remove methods\n"
+"    */\n"
+"   public Iterable<Method> getRemoveMethods();\n"
+"\n"
+"   /**\n"
+"    * Indicates if the bean is stateless\n"
+"    * \n"
+"    * @return True if stateless, false otherwise\n"
+"    */\n"
+"   public boolean isStateless();\n"
+"\n"
+"   /**\n"
+"    * Indicates if the bean is a EJB 3.1 Singleton\n"
+"    * \n"
+"    * @return True if the bean is a singleton, false otherwise\n"
+"    */\n"
+"   public boolean isSingleton();\n"
+"\n"
+"   /**\n"
+"    * Indicates if the EJB is stateful\n"
+"    * \n"
+"    * @return True if the bean is stateful, false otherwise\n"
+"    */\n"
+"   public boolean isStateful();\n"
+"\n"
+"   /**\n"
+"    * Indicates if the EJB is and MDB\n"
+"    * \n"
+"    * @return True if the bean is an MDB, false otherwise\n"
+"    */\n"
+"   public boolean isMessageDriven();\n"
+"\n"
+"   /**\n"
+"    * Gets the EJB name\n"
+"    * \n"
+"    * @return The name\n"
+"    */\n"
+"   public String getEjbName();\n"
+"   \n"
+"   /**\n"
+"    * @return The JNDI string which can be used to lookup a proxy which \n"
+"    * implements all local business interfaces \n"
+"    * \n"
+"    */\n"
+"   public String getLocalJndiName();\n"
+"   \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:62
+#, no-c-format
+msgid ""
+"The contract described the JavaDoc is enough to implement an EJBDescriptor. "
+"In addition to these two interfaces, there is "
+"<literal>BusinessInterfaceDescriptor</literal> which represents a local "
+"business interface (encapsulating the interface class and jndi name)."
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:69
+#, no-c-format
+msgid ""
+"The Web Beans RI can be told to load your implementation of "
+"<literal>WebBeanDiscovery</literal> using the property <literal>org.jboss."
+"webbeans.bootstrap.WebBeanDiscovery</literal> with the fully qualified class "
+"name as the value. For example:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri-spi.xml:76
+#, no-c-format
+msgid ""
+"org.jboss.webbeans.bootstrap.spi.WebBeanDiscovery=org.jboss.webbeans."
+"integration.jbossas.WebBeanDiscoveryImpl"
+msgstr ""
+
+#. Tag: title
+#: ri-spi.xml:80
+#, no-c-format
+msgid "JNDI"
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:82
+#, no-c-format
+msgid ""
+"The Web Beans RI implements JNDI binding and lookup according to standards, "
+"however you may want to alter the binding and lookup (for example in an "
+"environment where JNDI isn't available). To do this, implement <literal>org."
+"jboss.webbeans.spi.resources.Naming</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri-spi.xml:90
+#, no-c-format
+msgid ""
+"<![CDATA[public interface Naming extends Serializable {\n"
+"   \n"
+"   /**\n"
+"    * Typed JNDI lookup\n"
+"    * \n"
+"    * @param <T> The type\n"
+"    * @param name The JNDI name\n"
+"    * @param expectedType The expected type\n"
+"    * @return The object\n"
+"    */\n"
+"   public <T> T lookup(String name, Class<? extends T> expectedType);\n"
+"\n"
+"   /**\n"
+"    * Binds an item to JNDI\n"
+"    * \n"
+"    * @param key The key to bind under\n"
+"    * @param value The item to bind\n"
+"    */\n"
+"   public void bind(String key, Object value);\n"
+"   \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:92 ri-spi.xml:113
+#, no-c-format
+msgid "and tell the RI to use it:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri-spi.xml:96
+#, no-c-format
+msgid "org.jboss.webbeans.resources.spi.Naming=com.acme.MyNaming"
+msgstr ""
+
+#. Tag: title
+#: ri-spi.xml:101
+#, no-c-format
+msgid "Resource loading"
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:103
+#, no-c-format
+msgid ""
+"The Web Beans RI needs to load classes and resources from the classpath at "
+"various times. By default, they are loaded from the same classloader that "
+"was used to load the RI, however this may not be correct for some "
+"environments. If this is case, you can implement <literal>org.jboss.webbeans."
+"spi.ResourceLoader</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri-spi.xml:111
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"         public interface ResourceLoader {\n"
+"    \n"
+"   /**\n"
+"    * Creates a class from a given FQCN\n"
+"    * \n"
+"    * @param name The name of the clsas\n"
+"    * @return The class\n"
+"    */\n"
+"   public Class<?> classForName(String name);\n"
+"   \n"
+"   /**\n"
+"    * Gets a resource as a URL by name\n"
+"    * \n"
+"    * @param name The name of the resource\n"
+"    * @return An URL to the resource\n"
+"    */\n"
+"   public URL getResource(String name);\n"
+"   \n"
+"   /**\n"
+"    * Gets resources as URLs by name\n"
+"    * \n"
+"    * @param name The name of the resource\n"
+"    * @return An iterable reference to the URLS\n"
+"    */\n"
+"   public Iterable<URL> getResources(String name);\n"
+"   \n"
+"}\n"
+"         ]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: ri-spi.xml:117
+#, no-c-format
+msgid "org.jboss.webbeans.resources.spi.ResourceLoader=com.acme.ResourceLoader"
+msgstr ""
+
+#. Tag: title
+#: ri-spi.xml:124
+#, no-c-format
+msgid "The contract with the container"
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:126
+#, no-c-format
+msgid ""
+"There are a number of requirements that the Web Beans RI places on the "
+"container for correct functioning that fall outside implementation of APIs"
+msgstr ""
+
+#. Tag: term
+#: ri-spi.xml:134
+#, no-c-format
+msgid "Classloader isolation"
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:138
+#, no-c-format
+msgid ""
+"If you are integrating the Web Beans into an environment that supports "
+"deployment of applications, you must enable, automatically, or through user "
+"configuation, classloader isolation for each Web Beans application"
+msgstr ""
+
+#. Tag: term
+#: ri-spi.xml:147
+#, no-c-format
+msgid "The <literal>webbeans-ri.jar</literal>"
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:151
+#, no-c-format
+msgid ""
+"If you are integrating the Web Beans into an environment that supports "
+"deployment of applications, you must insert the <literal>webbeans-ri.jar</"
+"literal> into the applications isolated classloader. It cannot be loaded "
+"from a shared classloader."
+msgstr ""

Added: doc/trunk/reference/ko-KR/ri.po
===================================================================
--- doc/trunk/reference/ko-KR/ri.po	                        (rev 0)
+++ doc/trunk/reference/ko-KR/ri.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,1003 @@
+# Language ko-KR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: ri.xml:4
+#, no-c-format
+msgid "The Web Beans Reference Implementation"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:6
+#, no-c-format
+msgid ""
+"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>."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:13
+#, no-c-format
+msgid ""
+"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:"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:22
+#, no-c-format
+msgid "the latest release of the Web Beans RI,"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:25
+#, no-c-format
+msgid "JBoss AS 5.0.0.GA, and"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:28
+#, no-c-format
+msgid "Ant 1.7.0."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:32
+#, no-c-format
+msgid ""
+"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:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:39
+#, no-c-format
+msgid ""
+"<![CDATA[$ cd /Applications\n"
+"$ unzip ~/jboss-5.0.0.GA.zip]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:41
+#, no-c-format
+msgid ""
+"Next, download the Web Beans RI from <ulink url=\"http://seamframework.org/"
+"Download\">seamframework.org</ulink>, and unzip it. For example"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:47
+#, no-c-format
+msgid ""
+"<![CDATA[$ cd ~/\n"
+"$ unzip ~/webbeans-1.0.0.ALPHA1.zip]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:50
+#, no-c-format
+msgid ""
+"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:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:56
+#, no-c-format
+msgid "jboss.home=/Applications/jboss-5.0.0.GA"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:58
+#, no-c-format
+msgid ""
+"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."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:65
+#, no-c-format
+msgid ""
+"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."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:74
+#, no-c-format
+msgid ""
+"To install the update, you'll need Ant 1.7.0 installed, and the "
+"<literal>ANT_HOME</literal> environment variable set. For example:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:79
+#, no-c-format
+msgid ""
+"$ unzip apache-ant-1.7.0.zip\n"
+"$ export ANT_HOME=~/apache-ant-1.7.0"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:81
+#, no-c-format
+msgid ""
+"Then, you can install the update. The update script will use Maven to "
+"download the Web Beans and EJB3 automatically."
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:86
+#, no-c-format
+msgid ""
+"$ cd webbeans-1.0.0.ALPHA1/jboss-as\n"
+"$ ant update"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:88
+#, no-c-format
+msgid "Now, you're ready to deploy your first example!"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:93
+#, no-c-format
+msgid ""
+"The build scripts for the examples offer a number of targets, these are:"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:99
+#, no-c-format
+msgid "<literal>ant restart</literal> - deploy the example in exploded format"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:105
+#, no-c-format
+msgid ""
+"<literal>ant explode</literal> - update an exploded example, without "
+"restarting the deployment"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:111
+#, no-c-format
+msgid ""
+"<literal>ant deploy</literal> - deploy the example in compressed jar format"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:116
+#, no-c-format
+msgid "<literal>ant undeploy</literal> - remove the example from the server"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:121
+#, no-c-format
+msgid "<literal>ant clean</literal> - clean the example"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:128
+#, no-c-format
+msgid "To deploy the numberguess example:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:132
+#, no-c-format
+msgid ""
+"$ cd examples/numberguess\n"
+"ant deploy"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:134
+#, no-c-format
+msgid ""
+"Wait for the application to deploy, and enjoy hours of fun at <ulink url="
+"\"http://localhost:8080/webbeans-numberguess\"></ulink>!"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:139
+#, no-c-format
+msgid ""
+"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:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:146
+#, no-c-format
+msgid ""
+"$ cd examples/translator\n"
+"ant deploy"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:148
+#, no-c-format
+msgid ""
+"Wait for the application to deploy, and visit <ulink url=\"http://"
+"localhost:8080/webbeans-translator\"></ulink>!"
+msgstr ""
+
+#. Tag: title
+#: ri.xml:154
+#, no-c-format
+msgid "The numberguess example"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:156
+#, no-c-format
+msgid ""
+"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."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:162
+#, no-c-format
+msgid ""
+"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."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:168
+#, no-c-format
+msgid ""
+"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:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:176
+#, no-c-format
+msgid ""
+"<![CDATA[<?xml version='1.0' encoding='UTF-8'?>\n"
+"<faces-config version=\"1.2\"\n"
+"              xmlns=\"http://java.sun.com/xml/ns/javaee\"\n"
+"              xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+"              xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://"
+"java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd\">\n"
+"    \n"
+"    <application>\n"
+"        <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>\n"
+"    </application>\n"
+"\n"
+"</faces-config>]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:178
+#, no-c-format
+msgid ""
+"There is an empty <literal>web-beans.xml</literal> file, which marks this "
+"application as a Web Beans application."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:183
+#, no-c-format
+msgid "Finally there is <literal>web.xml</literal>:"
+msgstr ""
+
+#. Tag: section
+#: ri.xml:185
+#, no-c-format
+msgid ""
+"<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\"?>\n"
+"\n"
+"<web-app version=\"2.5\"\n"
+"    xmlns=\"http://java.sun.com/xml/ns/javaee\"\n"
+"    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+"    xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://java.sun."
+"com/xml/ns/javaee/web-app_2_5.xsd\">\n"
+"   \n"
+"   <display-name>Web Beans Numbergues example</display-name>\n"
+"\n"
+"   <!-- JSF -->\n"
+"\n"
+"   <servlet>\n"
+"      <servlet-name>Faces Servlet</servlet-name>\n"
+"      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>\n"
+"      <load-on-startup>1</load-on-startup>\n"
+"   </servlet>\n"
+"\n"
+"   <servlet-mapping>\n"
+"      <servlet-name>Faces Servlet</servlet-name>\n"
+"      <url-pattern>*.jsf</url-pattern>\n"
+"   </servlet-mapping>\n"
+"   \n"
+"   <context-param>\n"
+"      <param-name>javax.faces.DEFAULT_SUFFIX</param-name>\n"
+"      <param-value>.xhtml</param-value>\n"
+"   </context-param>\n"
+"\n"
+"   <session-config>\n"
+"      <session-timeout>10</session-timeout>\n"
+"   </session-config>\n"
+"   \n"
+"    <listener>\n"
+"       <listener-class>org.jboss.webbeans.servlet.WebBeansListener</listener-"
+"class>\n"
+"    </listener>\n"
+"\n"
+"</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="
+"\"30\"/> <area id=\"submit\" coords=\"33\"/> </areaspec> <programlisting><!"
+"[CDATA[<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" "
+"\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"
+"<html xmlns=\"http://www.w3.org/1999/xhtml\"\n"
+"    xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n"
+"    xmlns:h=\"http://java.sun.com/jsf/html\"\n"
+"    xmlns:f=\"http://java.sun.com/jsf/core\"\n"
+"    xmlns:s=\"http://jboss.com/products/seam/taglib\">\n"
+"\n"
+"  <ui:composition template=\"template.xhtml\">\n"
+"    <ui:define name=\"content\">\n"
+"       <h1>Guess a number...</h1>\n"
+"       <h:form id=\"NumberGuessMain\">\n"
+"          <div style=\"color: red\">\n"
+"             <h:messages id=\"messages\" globalOnly=\"false\"/>\n"
+"             <h:outputText id=\"Higher\" value=\"Higher!\" rendered=\"#{game."
+"number gt game.guess and game.guess ne 0}\"/>\n"
+"             <h:outputText id=\"Lower\" value=\"Lower!\" rendered=\"#{game."
+"number lt game.guess and game.guess ne 0}\"/>\n"
+"          </div>\n"
+"   \n"
+"          <div>\n"
+"             I'm thinking of a number between #{game.smallest} and #{game."
+"biggest}.\n"
+"             You have #{game.remainingGuesses} guesses.\n"
+"          </div>\n"
+"     \n"
+"          <div>\n"
+"             Your guess: \n"
+"             <h:inputText id=\"inputGuess\" \n"
+"                          value=\"#{game.guess}\" \n"
+"                          required=\"true\" \n"
+"                          size=\"3\" \n"
+"                          disabled=\"#{game.number eq game.guess}\">\n"
+"                <f:validateLongRange maximum=\"#{game.biggest}\" \n"
+"                                     minimum=\"#{game.smallest}\"/>\n"
+"             </h:inputText>\n"
+"            <h:commandButton id=\"GuessButton\"  \n"
+"                             value=\"Guess\" \n"
+"                             action=\"#{game.check}\" \n"
+"                             disabled=\"#{game.number eq game.guess}\"/>\n"
+"          </div>\n"
+"          <div>\n"
+"            <h:commandButton id=\"RestartButton\" value=\"Reset\" action=\"#"
+"{game.reset}\" immediate=\"true\" />\n"
+"          </div>\n"
+"       </h:form>\n"
+"    </ui:define>\n"
+"  </ui:composition>\n"
+"</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>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:298
+#, no-c-format
+msgid ""
+"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:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:304
+#, no-c-format
+msgid ""
+"<![CDATA[@Target( { TYPE, METHOD, PARAMETER, FIELD })\n"
+"@Retention(RUNTIME)\n"
+"@Documented\n"
+"@BindingType\n"
+"public @interface Random {}]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:306
+#, no-c-format
+msgid ""
+"There is also the <literal>@MaxNumber</literal> binding type, used for "
+"injecting the maximum number that can be injected:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:311
+#, no-c-format
+msgid ""
+"<![CDATA[@Target( { TYPE, METHOD, PARAMETER, FIELD })\n"
+"@Retention(RUNTIME)\n"
+"@Documented\n"
+"@BindingType\n"
+"public @interface MaxNumber {}\n"
+"]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:313
+#, no-c-format
+msgid ""
+"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:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:319
+#, no-c-format
+msgid ""
+"<![CDATA[@ApplicationScoped\n"
+"public class Generator {\n"
+"   \n"
+"   private java.util.Random random = new java.util.Random( System."
+"currentTimeMillis() );\n"
+"   \n"
+"   private int maxNumber = 100;\n"
+"   \n"
+"   java.util.Random getRandom()\n"
+"   {\n"
+"      return random;\n"
+"   }\n"
+"   \n"
+"   @Produces @Random int next() { \n"
+"      return getRandom().nextInt(maxNumber); \n"
+"   }\n"
+"   \n"
+"   @Produces @MaxNumber int getMaxNumber()\n"
+"   {\n"
+"      return maxNumber;\n"
+"   }\n"
+"\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:321
+#, no-c-format
+msgid ""
+"You'll notice that the <literal>Generator</literal> is application scoped; "
+"therefore we don't get a different random each time."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:326
+#, no-c-format
+msgid ""
+"The final Web Bean in the application is the session scoped <literal>Game</"
+"literal>."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:331
+#, no-c-format
+msgid ""
+"You'll 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>."
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:339
+#, no-c-format
+msgid ""
+"<![CDATA[package org.jboss.webbeans.examples.numberguess;\n"
+"\n"
+"\n"
+"import javax.annotation.PostConstruct;\n"
+"import javax.faces.application.FacesMessage;\n"
+"import javax.faces.context.FacesContext;\n"
+"import javax.webbeans.AnnotationLiteral;\n"
+"import javax.webbeans.Current;\n"
+"import javax.webbeans.Initializer;\n"
+"import javax.webbeans.Named;\n"
+"import javax.webbeans.SessionScoped;\n"
+"import javax.webbeans.manager.Manager;\n"
+"\n"
+"@Named\n"
+"@SessionScoped\n"
+"public class Game\n"
+"{\n"
+"   private int number;\n"
+"   \n"
+"   private int guess;\n"
+"   private int smallest;\n"
+"   private int biggest;\n"
+"   private int remainingGuesses;\n"
+"   \n"
+"   @Current Manager manager;\n"
+"   \n"
+"   public Game()\n"
+"   {\n"
+"   }\n"
+"   \n"
+"   @Initializer\n"
+"   Game(@MaxNumber int maxNumber)\n"
+"   {      \n"
+"      this.biggest = maxNumber;\n"
+"   }\n"
+"\n"
+"   public int getNumber()\n"
+"   {\n"
+"      return number;\n"
+"   }\n"
+"   \n"
+"   public int getGuess()\n"
+"   {\n"
+"      return guess;\n"
+"   }\n"
+"   \n"
+"   public void setGuess(int guess)\n"
+"   {\n"
+"      this.guess = guess;\n"
+"   }\n"
+"   \n"
+"   public int getSmallest()\n"
+"   {\n"
+"      return smallest;\n"
+"   }\n"
+"   \n"
+"   public int getBiggest()\n"
+"   {\n"
+"      return biggest;\n"
+"   }\n"
+"   \n"
+"   public int getRemainingGuesses()\n"
+"   {\n"
+"      return remainingGuesses;\n"
+"   }\n"
+"   \n"
+"   public String check()\n"
+"   {\n"
+"      if (guess>number)\n"
+"      {\n"
+"         biggest = guess - 1;\n"
+"      }\n"
+"      if (guess<number)\n"
+"      {\n"
+"         smallest = guess + 1;\n"
+"      }\n"
+"      if (guess == number)\n"
+"      {\n"
+"         FacesContext.getCurrentInstance().addMessage(null, new FacesMessage"
+"(\"Correct!\"));\n"
+"      }\n"
+"      remainingGuesses--;\n"
+"      return null;\n"
+"   }\n"
+"   \n"
+"   @PostConstruct\n"
+"   public void reset()\n"
+"   {\n"
+"      this.smallest = 0;\n"
+"      this.guess = 0;\n"
+"      this.remainingGuesses = 10;\n"
+"      this.number = manager.getInstanceByType(Integer.class, new "
+"AnnotationLiteral<Random>(){});\n"
+"   }\n"
+"   \n"
+"}]]>"
+msgstr ""
+
+#. Tag: title
+#: ri.xml:343
+#, no-c-format
+msgid "The translator example"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:345
+#, no-c-format
+msgid ""
+"The translator example will take any sentences you enter, and translate them "
+"to Latin."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:350
+#, no-c-format
+msgid ""
+"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."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:357
+#, no-c-format
+msgid ""
+"EJB 3.1 and Jave EE 6 allow you to package EJBs in a war, which will make "
+"this structure much simpler!"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:363
+#, no-c-format
+msgid ""
+"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:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:370
+#, no-c-format
+msgid ""
+"<![CDATA[<plugin>\n"
+"   <groupId>org.apache.maven.plugins</groupId>\n"
+"   <artifactId>maven-ear-plugin</artifactId>\n"
+"   <configuration>\n"
+"      <modules>\n"
+"         <webModule>\n"
+"            <groupId>org.jboss.webbeans.examples.translator</groupId>\n"
+"            <artifactId>webbeans-translator-war</artifactId>\n"
+"            <contextRoot>/webbeans-translator</contextRoot>\n"
+"         </webModule>\n"
+"      </modules>\n"
+"      <jboss>\n"
+"         <loader-repository>webbeans.jboss.org:loader=webbeans-translator</"
+"loader-repository>\n"
+"      </jboss>\n"
+"   </configuration>\n"
+"</plugin>]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:372
+#, no-c-format
+msgid ""
+"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."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:380
+#, no-c-format
+msgid ""
+"If you aren't using Maven to generate these files, you would need "
+"<literal>META-INF/jboss-app.xml</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:385
+#, no-c-format
+msgid ""
+"<![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<!DOCTYPE jboss-app\n"
+"    PUBLIC \"-//JBoss//DTD J2EE Application 4.2//EN\"\n"
+"    \"http://www.jboss.org/j2ee/dtd/jboss-app_4_2.dtd\">\n"
+"<jboss-app>\n"
+"  <loader-repository>webbeans.jboss.org:loader=webbeans-translator</loader-"
+"repository>\n"
+"</jboss-app>]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:387
+#, no-c-format
+msgid "and <literal>META-INF/application.xml</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:391
+#, no-c-format
+msgid ""
+"<![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<application xmlns=\"http://java.sun.com/xml/ns/javaee\" \n"
+"             xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+"             xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://"
+"java.sun.com/xml/ns/javaee/application_5.xsd\"\n"
+"             version=\"5\">\n"
+"  <display-name>webbeans-translator-ear</display-name>\n"
+"  <description>Ear Example for the reference implementation of JSR 299: Web "
+"Beans</description>\n"
+"  \n"
+"  <module>\n"
+"    <web>\n"
+"      <web-uri>webbeans-translator.war</web-uri>\n"
+"      <context-root>/webbeans-translator</context-root>\n"
+"    </web>\n"
+"  </module>\n"
+"  <module>\n"
+"    <ejb>webbeans-translator.jar</ejb>\n"
+"  </module>\n"
+"</application>]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:394
+#, no-c-format
+msgid ""
+"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>."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:401
+#, no-c-format
+msgid ""
+"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):"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:407
+#, no-c-format
+msgid ""
+"<![CDATA[<h:form id=\"NumberGuessMain\">\n"
+"            \n"
+"   <table>\n"
+"      <tr align=\"center\" style=\"font-weight: bold\" >\n"
+"         <td>\n"
+"            Your text\n"
+"         </td>\n"
+"         <td>\n"
+"            Translation\n"
+"         </td>\n"
+"      </tr>\n"
+"      <tr>\n"
+"         <td>\n"
+"            <h:inputTextarea id=\"text\" value=\"#{translator.text}\" "
+"required=\"true\" rows=\"5\" cols=\"80\" />\n"
+"         </td>\n"
+"         <td>\n"
+"            <h:outputText value=\"#{translator.translatedText}\" />\n"
+"         </td>\n"
+"      </tr>\n"
+"   </table>\n"
+"   <div>\n"
+"      <h:commandButton id=\"button\" value=\"Translate\" action=\"#"
+"{translator.translate}\"/>\n"
+"   </div>\n"
+"   \n"
+"</h:form>]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:409
+#, no-c-format
+msgid ""
+"The user can enter some text in the lefthand textarea, and hit the translate "
+"button to see the result to the right."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:414
+#, no-c-format
+msgid ""
+"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:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:426
+#, no-c-format
+msgid ""
+"<![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<ejb-jar xmlns=\"http://java.sun.com/xml/ns/javaee\" \n"
+"         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \n"
+"         xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://java."
+"sun.com/xml/ns/javaee/ejb-jar_3_0.xsd\"\n"
+"         version=\"3.0\">\n"
+"         \n"
+"   <interceptors>\n"
+"     <interceptor>\n"
+"       <interceptor-class>org.jboss.webbeans.ejb.SessionBeanInterceptor</"
+"interceptor-class>\n"
+"     </interceptor>\n"
+"   </interceptors>\n"
+"   \n"
+"   <assembly-descriptor>\n"
+"      <interceptor-binding>\n"
+"         <ejb-name>*</ejb-name>\n"
+"         <interceptor-class>org.jboss.webbeans.ejb.SessionBeanInterceptor</"
+"interceptor-class>\n"
+"      </interceptor-binding>\n"
+"   </assembly-descriptor>\n"
+"   \n"
+"</ejb-jar>]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:428
+#, no-c-format
+msgid ""
+"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."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:438
+#, no-c-format
+msgid ""
+"Both <literal>SentanceParser</literal> and <literal>TextTranslator</literal> "
+"are dependent beans, and <literal>TextTranslator</literal> uses constructor "
+"initialization:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:444
+#, no-c-format
+msgid ""
+"<![CDATA[public class TextTranslator { \n"
+"   private SentenceParser sentenceParser; \n"
+"   private Translator sentenceTranslator; \n"
+"   \n"
+"   @Initializer\n"
+"   TextTranslator(SentenceParser sentenceParser, Translator "
+"sentenceTranslator) \n"
+"   { \n"
+"      this.sentenceParser = sentenceParser; \n"
+"      this.sentenceTranslator = sentenceTranslator;]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:446
+#, no-c-format
+msgid ""
+"<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!"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:452
+#, no-c-format
+msgid ""
+"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."
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:458
+#, no-c-format
+msgid ""
+"<![CDATA[@Stateful\n"
+"@RequestScoped\n"
+"@Named(\"translator\")\n"
+"public class TranslatorControllerBean implements TranslatorController\n"
+"{\n"
+"   \n"
+"   @Current TextTranslator translator;]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:460
+#, no-c-format
+msgid "The bean also has getters and setters for all the fields on the page."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:464
+#, no-c-format
+msgid "As this is a stateful session bean, we have to have a remove method:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:468
+#, no-c-format
+msgid ""
+"<![CDATA[   @Remove\n"
+"   public void remove()\n"
+"   {\n"
+"      \n"
+"   }]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:470
+#, no-c-format
+msgid ""
+"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."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:476
+#, no-c-format
+msgid ""
+"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>."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:482
+#, no-c-format
+msgid ""
+"We need help in all areas - bug fixing, writing new features, writing "
+"examples and translating this reference guide."
+msgstr ""

Added: doc/trunk/reference/ko-KR/scopescontexts.po
===================================================================
--- doc/trunk/reference/ko-KR/scopescontexts.po	                        (rev 0)
+++ doc/trunk/reference/ko-KR/scopescontexts.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,582 @@
+# Language ko-KR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: scopescontexts.xml:4
+#, no-c-format
+msgid "Scopes and contexts"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:6
+#, no-c-format
+msgid ""
+"So far, we've seen a few examples of <emphasis>scope type annotations</"
+"emphasis>. The scope of a Web Bean determines the lifecycle of instances of "
+"the Web Bean. The scope also determines which clients refer to which "
+"instances of the Web Bean. According to the Web Beans specification, a scope "
+"determines:"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:14
+#, no-c-format
+msgid "When a new instance of any Web Bean with that scope is created"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:17
+#, no-c-format
+msgid "When an existing instance of any Web Bean with that scope is destroyed"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:20
+#, no-c-format
+msgid ""
+"Which injected references refer to any instance of a Web Bean with that scope"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:25
+#, no-c-format
+msgid ""
+"For example, if we have a session scoped Web Bean, <literal>CurrentUser</"
+"literal>, all Web Beans that are called in the context of the same "
+"<literal>HttpSession</literal> will see the same instance of "
+"<literal>CurrentUser</literal>. This instance will be automatically created "
+"the first time a <literal>CurrentUser</literal> is needed in that session, "
+"and automatically destroyed when the session ends."
+msgstr ""
+
+#. Tag: title
+#: scopescontexts.xml:32
+#, no-c-format
+msgid "Scope types"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:34
+#, no-c-format
+msgid ""
+"Web Beans features an <emphasis>extensible context model</emphasis>. It is "
+"possible to define new scopes by creating a new scope type annotation:"
+msgstr ""
+
+#. Tag: programlisting
+#: scopescontexts.xml:37
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target({TYPE, METHOD})\n"
+"@ScopeType\n"
+"public @interface ClusterScoped {}]]>"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:39
+#, no-c-format
+msgid ""
+"Of course, that's the easy part of the job. For this scope type to be "
+"useful, we will also need to define a <literal>Context</literal> object that "
+"implements the scope! Implementing a <literal>Context</literal> is usually a "
+"very technical task, intended for framework development only."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:44
+#, no-c-format
+msgid ""
+"We can apply a scope type annotation to a Web Bean implementation class to "
+"specify the scope of the Web Bean:"
+msgstr ""
+
+#. Tag: programlisting
+#: scopescontexts.xml:47
+#, no-c-format
+msgid ""
+"<![CDATA[@ClusterScoped\n"
+"public class SecondLevelCache { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:58
+#, no-c-format
+msgid "Usually, you'll use one of Web Beans' built-in scopes."
+msgstr ""
+
+#. Tag: title
+#: scopescontexts.xml:63
+#, no-c-format
+msgid "Built-in scopes"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:65
+#, no-c-format
+msgid "Web Beans defines four built-in scopes:"
+msgstr ""
+
+#. Tag: literal
+#: scopescontexts.xml:69
+#, no-c-format
+msgid "@RequestScoped"
+msgstr ""
+
+#. Tag: literal
+#: scopescontexts.xml:72
+#, no-c-format
+msgid "@SessionScoped"
+msgstr ""
+
+#. Tag: literal
+#: scopescontexts.xml:75
+#, no-c-format
+msgid "@ApplicationScoped"
+msgstr ""
+
+#. Tag: literal
+#: scopescontexts.xml:78
+#, no-c-format
+msgid "@ConversationScoped"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:82
+#, no-c-format
+msgid "For a web application that uses Web Beans:"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:86
+#, no-c-format
+msgid ""
+"any servlet request has access to active request, session and application "
+"scopes, and, additionally"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:90
+#, no-c-format
+msgid "any JSF request has access to an active conversation scope."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:94
+#, no-c-format
+msgid "The request and application scopes are also active:"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:98
+#, no-c-format
+msgid "during invocations of EJB remote methods,"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:101
+#, no-c-format
+msgid "during EJB timeouts,"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:104
+#, no-c-format
+msgid "during message delivery to a message-driven bean, and"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:107
+#, no-c-format
+msgid "during web service invocations."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:111
+#, no-c-format
+msgid ""
+"If the application tries to invoke a Web Bean with a scope that does not "
+"have an active context, a <literal>ContextNotActiveException</literal> is "
+"thrown by the Web Bean manager at runtime."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:115
+#, no-c-format
+msgid ""
+"Three of the four built-in scopes should be extremely familiar to every Java "
+"EE developer, so let's not waste time discussing them here. One of the "
+"scopes, however, is new."
+msgstr ""
+
+#. Tag: title
+#: scopescontexts.xml:122
+#, no-c-format
+msgid "The conversation scope"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:124
+#, no-c-format
+msgid ""
+"The Web Beans conversation scope is a bit like the traditional session scope "
+"in that it holds state associated with a user of the system, and spans "
+"multiple requests to the server. However, unlike the session scope, the "
+"conversation scope:"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:130
+#, no-c-format
+msgid "is demarcated explicitly by the application, and"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:133
+#, no-c-format
+msgid ""
+"holds state associated with a particular web browser tab in a JSF "
+"application."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:138
+#, no-c-format
+msgid ""
+"A conversation represents a task, a unit of work from the point of view of "
+"the user. The conversation context holds state associated with what the user "
+"is currently working on. If the user is doing multiple things at the same "
+"time, there are multiple conversations."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:143
+#, no-c-format
+msgid ""
+"The conversation context is active during any JSF request. However, most "
+"conversations are destroyed at the end of the request. If a conversation "
+"should hold state across multiple requests, it must be explicitly promoted "
+"to a <emphasis>long-running conversation</emphasis>."
+msgstr ""
+
+#. Tag: title
+#: scopescontexts.xml:149
+#, no-c-format
+msgid "Conversation demarcation"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:151
+#, no-c-format
+msgid ""
+"Web Beans provides a built-in Web Bean for controlling the lifecyle of "
+"conversations in a JSF application. This Web Bean may be obtained by "
+"injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: scopescontexts.xml:154
+#, no-c-format
+msgid "@Current Conversation conversation;"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:156
+#, no-c-format
+msgid ""
+"To promote the conversation associated with the current request to a long-"
+"running conversation, call the <literal>begin()</literal> method from "
+"application code. To schedule the current long-running conversation context "
+"for destruction at the end of the current request, call <literal>end()</"
+"literal>."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:161
+#, no-c-format
+msgid ""
+"In the following example, a conversation-scoped Web Bean controls the "
+"conversation with which it is associated:"
+msgstr ""
+
+#. Tag: programlisting
+#: scopescontexts.xml:164
+#, no-c-format
+msgid ""
+"@ConversationScoped @Stateful\n"
+"public class OrderBuilder {\n"
+"\n"
+"    private Order order;\n"
+"    private @Current Conversation conversation;\n"
+"    private @PersistenceContext(type=EXTENDED) EntityManager em;\n"
+"    \n"
+"    @Produces public Order getOrder() {\n"
+"        return order;\n"
+"    }\n"
+"\n"
+"    public Order createOrder() {\n"
+"        order = new Order();\n"
+"        conversation.begin();\n"
+"        return order;\n"
+"    }\n"
+"    \n"
+"    public void addLineItem(Product product, int quantity) {\n"
+"        order.add( new LineItem(product, quantity) );\n"
+"    }\n"
+"\n"
+"    public void saveOrder(Order order) {\n"
+"        em.persist(order);\n"
+"        conversation.end();\n"
+"    }\n"
+"    \n"
+"    @Remove\n"
+"    public void destroy() {}\n"
+"    \n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:166
+#, no-c-format
+msgid ""
+"This Web Bean is able to control its own lifecycle through use of the "
+"<literal>Conversation</literal> API. But some other Web Beans have a "
+"lifecycle which depends completely upon another object."
+msgstr ""
+
+#. Tag: title
+#: scopescontexts.xml:173
+#, no-c-format
+msgid "Conversation propagation"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:175
+#, no-c-format
+msgid ""
+"The conversation context automatically propagates with any JSF faces request "
+"(JSF form submission). It does not automatically propagate with non-faces "
+"requests, for example, navigation via a link."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:179
+#, no-c-format
+msgid ""
+"We can force the conversation to propagate with a non-faces request by "
+"including the unique identifier of the conversation as a request parameter. "
+"The Web Beans specification reserves the request parameter named "
+"<literal>cid</literal> for this use. The unique identifier of the "
+"conversation may be obtained from the <literal>Conversation</literal> "
+"object, which has the Web Beans name <literal>conversation</literal>."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:186
+#, no-c-format
+msgid "Therefore, the following link propagates the conversation:"
+msgstr ""
+
+#. Tag: programlisting
+#: scopescontexts.xml:188
+#, no-c-format
+msgid ""
+"<![CDATA[<a href=\"/addProduct.jsp?cid=#{conversation.id}\">Add Product</a>]]"
+">"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:190
+#, no-c-format
+msgid ""
+"The Web Bean manager is also required to propagate conversations across any "
+"redirect, even if the conversation is not marked long-running. This makes it "
+"very easy to implement the common POST-then-redirect pattern, without resort "
+"to fragile constructs such as a \"flash\" object. In this case, the Web Bean "
+"manager automatically adds a request parameter to the redirect URL."
+msgstr ""
+
+#. Tag: title
+#: scopescontexts.xml:200
+#, no-c-format
+msgid "Conversation timeout"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:202
+#, no-c-format
+msgid ""
+"The Web Bean manager is permitted to destroy a conversation and all state "
+"held in its context at any time in order to preserve resources. A Web Bean "
+"manager implementation will normally do this on the basis of some kind of "
+"timeout&#151;though this is not required by the Web Beans specification. The "
+"timeout is the period of inactivity before the conversation is destroyed."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:208
+#, no-c-format
+msgid ""
+"The <literal>Conversation</literal> object provides a method to set the "
+"timeout. This is a hint to the Web Bean manager, which is free to ignore the "
+"setting."
+msgstr ""
+
+#. Tag: programlisting
+#: scopescontexts.xml:212
+#, no-c-format
+msgid "conversation.setTimeout(timeoutInMillis);"
+msgstr ""
+
+#. Tag: title
+#: scopescontexts.xml:219
+#, no-c-format
+msgid "The dependent pseudo-scope"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:221
+#, no-c-format
+msgid ""
+"In addition to the four built-in scopes, Web Beans features the so-called "
+"<emphasis>dependent pseudo-scope</emphasis>. This is the default scope for a "
+"Web Bean which does not explicitly declare a scope type."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:225
+#, no-c-format
+msgid ""
+"For example, this Web Bean has the scope type <literal>@Dependent</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: scopescontexts.xml:227
+#, no-c-format
+msgid "<![CDATA[public class Calculator { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:229
+#, no-c-format
+msgid ""
+"When an injection point of a Web Bean resolves to a dependent Web Bean, a "
+"new instance of the dependent Web Bean is created every time the first Web "
+"Bean is instantiated. Instances of dependent Web Beans are never shared "
+"between different Web Beans or different injection points. They are "
+"<emphasis>dependent objects</emphasis> of some other Web Bean instance."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:235
+#, no-c-format
+msgid ""
+"Dependent Web Bean instances are destroyed when the instance they depend "
+"upon is destroyed."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:243
+#, no-c-format
+msgid ""
+"Web Beans makes it easy to obtain a dependent instance of a Java class or "
+"EJB bean, even if the class or EJB bean is already declared as a Web Bean "
+"with some other scope type."
+msgstr ""
+
+#. Tag: title
+#: scopescontexts.xml:248
+#, no-c-format
+msgid "The <literal>@New</literal> annotation"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:250
+#, no-c-format
+msgid ""
+"The built-in <literal>@New</literal> binding annotation allows "
+"<emphasis>implicit</emphasis> definition of a dependent Web Bean at an "
+"injection point. Suppose we declare the following injected field:"
+msgstr ""
+
+#. Tag: programlisting
+#: scopescontexts.xml:254
+#, no-c-format
+msgid "<![CDATA[@New Calculator calculator;]]>"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:256
+#, no-c-format
+msgid ""
+"Then a Web Bean with scope <literal>@Dependent</literal>, binding type "
+"<literal>@New</literal>, API type <literal>Calculator</literal>, "
+"implementation class <literal>Calculator</literal> and deployment type "
+"<literal>@Standard</literal> is implicitly defined."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:261
+#, no-c-format
+msgid ""
+"This is true even if <literal>Calculator</literal> is <emphasis>already</"
+"emphasis> declared with a different scope type, for example:"
+msgstr ""
+
+#. Tag: programlisting
+#: scopescontexts.xml:264
+#, no-c-format
+msgid ""
+"<![CDATA[@ConversationScoped\n"
+"public class Calculator { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:266
+#, no-c-format
+msgid ""
+"So the following injected attributes each get a different instance of "
+"<literal>Calculator</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: scopescontexts.xml:269
+#, no-c-format
+msgid ""
+"<![CDATA[public class PaymentCalc {\n"
+"\n"
+"    @Current Calculator calculator;\n"
+"    @New Calculator newCalculator;\n"
+"\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:271
+#, no-c-format
+msgid ""
+"The <literal>calculator</literal> field has a conversation-scoped instance "
+"of <literal>Calculator</literal> injected. The <literal>newCalculator</"
+"literal> field has a new instance of <literal>Calculator</literal> injected, "
+"with a lifecycle that is bound to the owning <literal>PaymentCalc</literal>."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:276
+#, no-c-format
+msgid ""
+"This feature is particularly useful with producer methods, as we'll see in "
+"the next chapter."
+msgstr ""

Added: doc/trunk/reference/ko-KR/specialization.po
===================================================================
--- doc/trunk/reference/ko-KR/specialization.po	                        (rev 0)
+++ doc/trunk/reference/ko-KR/specialization.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,291 @@
+# Language ko-KR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: specialization.xml:4
+#, no-c-format
+msgid "Specialization"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:6
+#, no-c-format
+msgid ""
+"We've already seen how the Web Beans dependency injection model lets us "
+"<emphasis>override</emphasis> the implementation of an API at deployment "
+"time. For example, the following enterprise Web Bean provides an "
+"implementation of the API <literal>PaymentProcessor</literal> in production:"
+msgstr ""
+
+#. Tag: programlisting
+#: specialization.xml:11
+#, no-c-format
+msgid ""
+"@CreditCard @Stateless\n"
+"public class CreditCardPaymentProcessor \n"
+"        implements PaymentProcessor {\n"
+"    ...\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:13
+#, no-c-format
+msgid ""
+"But in our staging environment, we override that implementation of "
+"<literal>PaymentProcessor</literal> with a different Web Bean:"
+msgstr ""
+
+#. Tag: programlisting
+#: specialization.xml:16
+#, no-c-format
+msgid ""
+"@CreditCard @Stateless @Staging\n"
+"public class StagingCreditCardPaymentProcessor \n"
+"        implements PaymentProcessor {\n"
+"    ...\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:18
+#, no-c-format
+msgid ""
+"What we've tried to do with <literal>StagingCreditCardPaymentProcessor</"
+"literal> is to completely replace <literal>AsyncPaymentProcessor</literal> "
+"in a particular deployment of the system. In that deployment, the deployment "
+"type <literal>@Staging</literal> would have a higher priority than the "
+"default deployment type <literal>@Production</literal>, and therefore "
+"clients with the following injection point:"
+msgstr ""
+
+#. Tag: programlisting
+#: specialization.xml:24
+#, no-c-format
+msgid "@CreditCard PaymentProcessor ccpp"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:26
+#, no-c-format
+msgid ""
+"Would receive an instance of <literal>StagingCreditCardPaymentProcessor</"
+"literal>."
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:28
+#, no-c-format
+msgid "Unfortunately, there are several traps we can easily fall into:"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:32
+#, no-c-format
+msgid ""
+"the higher-priority Web Bean may not implement all the API types of the Web "
+"Bean that it attempts to override,"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:36
+#, no-c-format
+msgid ""
+"the higher-priority Web Bean may not declare all the binding types of the "
+"Web Bean that it attempts to override,"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:40
+#, no-c-format
+msgid ""
+"the higher-priority Web Bean might not have the same name as the Web Bean "
+"that it attempts to override, or"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:44
+#, no-c-format
+msgid ""
+"the Web Bean that it attempts to override might declare a producer method, "
+"disposal method or observer method."
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:49
+#, no-c-format
+msgid ""
+"In each of these cases, the Web Bean that we tried to override could still "
+"be called at runtime. Therefore, overriding is somewhat prone to developer "
+"error."
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:52
+#, no-c-format
+msgid ""
+"Web Beans provides a special feature, called <emphasis>specialization</"
+"emphasis>, that helps the developer avoid these traps. Specialization looks "
+"a little esoteric at first, but it's easy to use in practice, and you'll "
+"really appreciate the extra security it provides."
+msgstr ""
+
+#. Tag: title
+#: specialization.xml:58
+#, no-c-format
+msgid "Using specialization"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:60
+#, no-c-format
+msgid ""
+"Specialization is a feature that is specific to simple and enterprise Web "
+"Beans. To make use of specialization, the higher-priority Web Bean must:"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:65
+#, no-c-format
+msgid "be a direct subclass of the Web Bean it overrides, and"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:68
+#, no-c-format
+msgid ""
+"be a simple Web Bean if the Web Bean it overrides is a simple Web Bean or an "
+"enterprise Web Bean if the Web Bean it overrides is an enterprise Web Bean, "
+"and"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:73
+#, no-c-format
+msgid "be annotated <literal>@Specializes</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: specialization.xml:77
+#, no-c-format
+msgid ""
+"@Stateless @Staging @Specializes\n"
+"public class StagingCreditCardPaymentProcessor \n"
+"        extends CreditCardPaymentProcessor {\n"
+"    ...\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:79
+#, no-c-format
+msgid ""
+"We say that the higher-priority Web Bean <emphasis>specializes</emphasis> "
+"its superclass."
+msgstr ""
+
+#. Tag: title
+#: specialization.xml:85
+#, no-c-format
+msgid "Advantages of specialization"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:87
+#, no-c-format
+msgid "When specialization is used:"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:91
+#, no-c-format
+msgid ""
+"the binding types of the superclass are automatically inherited by the Web "
+"Bean annotated <literal>@Specializes</literal>, and"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:95
+#, no-c-format
+msgid ""
+"the Web Bean name of the superclass is automatically inherited by the Web "
+"Bean annotated <literal>@Specializes</literal>, and"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:99
+#, no-c-format
+msgid ""
+"producer methods, disposal methods and observer methods declared by the "
+"superclass are called upon an instance of the Web Bean annotated "
+"<literal>@Specializes</literal>."
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:105
+#, no-c-format
+msgid ""
+"In our example, the binding type <literal>@CreditCard</literal> of "
+"<literal>CreditCardPaymentProcessor</literal> is inherited by "
+"<literal>StagingCreditCardPaymentProcessor</literal>."
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:109
+#, no-c-format
+msgid "Furthermore, the Web Bean manager will validate that:"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:113
+#, no-c-format
+msgid ""
+"all API types of the superclass are API types of the Web Bean annotated "
+"<literal>@Specializes</literal> (all local interfaces of the superclass "
+"enterprise bean are also local interfaces of the subclass),"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:119
+#, no-c-format
+msgid ""
+"the deployment type of the Web Bean annotated <literal>@Specializes</"
+"literal> has a higher precedence than the deployment type of the superclass, "
+"and"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:124
+#, no-c-format
+msgid ""
+"there is no other enabled Web Bean that also specializes the superclass."
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:129
+#, no-c-format
+msgid ""
+"If any of these conditions are violated, the Web Bean manager throws an "
+"exception at initialization time."
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:132
+#, no-c-format
+msgid ""
+"Therefore, we can be certain that the superclass will <emphasis>never</"
+"emphasis> be called in any deployment of the system where the Web Bean "
+"annotated <literal>@Specializes</literal> is deployed and enabled."
+msgstr ""

Added: doc/trunk/reference/ko-KR/stereotypes.po
===================================================================
--- doc/trunk/reference/ko-KR/stereotypes.po	                        (rev 0)
+++ doc/trunk/reference/ko-KR/stereotypes.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,352 @@
+# Language ko-KR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: stereotypes.xml:4
+#, no-c-format
+msgid "Stereotypes"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:6
+#, no-c-format
+msgid "According to the Web Beans specification:"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:10
+#, no-c-format
+msgid ""
+"In many systems, use of architectural patterns produces a set of recurring "
+"Web Bean roles. A stereotype allows a framework developer to identify such a "
+"role and declare some common metadata for Web Beans with that role in a "
+"central place."
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:14
+#, no-c-format
+msgid "A stereotype encapsulates any combination of:"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:18
+#, no-c-format
+msgid "a default deployment type,"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:21
+#, no-c-format
+msgid "a default scope type,"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:24
+#, no-c-format
+msgid "a restriction upon the Web Bean scope,"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:27
+#, no-c-format
+msgid "a requirement that the Web Bean implement or extend a certain type, and"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:30
+#, no-c-format
+msgid "a set of interceptor binding annotations."
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:34
+#, no-c-format
+msgid ""
+"A stereotype may also specify that all Web Beans with the stereotype have "
+"defaulted Web Bean names."
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:37
+#, no-c-format
+msgid "A Web Bean may declare zero, one or multiple stereotypes."
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:41
+#, no-c-format
+msgid ""
+"A stereotype is a Java annotation type. This stereotype identifies action "
+"classes in some MVC framework:"
+msgstr ""
+
+#. Tag: programlisting
+#: stereotypes.xml:44
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target(TYPE)\n"
+"@Stereotype\n"
+"public @interface Action {}]]>"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:46
+#, no-c-format
+msgid "We use the stereotype by applying the annotation to a Web Bean."
+msgstr ""
+
+#. Tag: programlisting
+#: stereotypes.xml:48
+#, no-c-format
+msgid ""
+"<![CDATA[@Action \n"
+"public class LoginAction { ... }]]>"
+msgstr ""
+
+#. Tag: title
+#: stereotypes.xml:51
+#, no-c-format
+msgid "Default scope and deployment type for a stereotype"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:53
+#, no-c-format
+msgid ""
+"A stereotype may specify a default scope and/or default deployment type for "
+"Web Beans with that stereotype. For example, if the deployment type "
+"<literal>@WebTier</literal> identifies Web Beans that should only be "
+"deployed when the system executes as a web application, we might specify the "
+"following defaults for action classes:"
+msgstr ""
+
+#. Tag: programlisting
+#: stereotypes.xml:59
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target(TYPE)\n"
+"@RequestScoped\n"
+"@WebTier\n"
+"@Stereotype\n"
+"public @interface Action {}]]>"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:61
+#, no-c-format
+msgid ""
+"Of course, a particular action may still override these defaults if "
+"necessary:"
+msgstr ""
+
+#. Tag: programlisting
+#: stereotypes.xml:64
+#, no-c-format
+msgid ""
+"<![CDATA[@Dependent @Mock @Action \n"
+"public class MockLoginAction { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:66
+#, no-c-format
+msgid ""
+"If we want to force all actions to a particular scope, we can do that too."
+msgstr ""
+
+#. Tag: title
+#: stereotypes.xml:72
+#, no-c-format
+msgid "Restricting scope and type with a stereotype"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:74
+#, no-c-format
+msgid ""
+"Suppose that we wish to prevent actions from declaring certain scopes. Web "
+"Beans lets us explicitly specify the set of allowed scopes for Web Beans "
+"with a certain stereotype. For example:"
+msgstr ""
+
+#. Tag: programlisting
+#: stereotypes.xml:78
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target(TYPE)\n"
+"@RequestScoped\n"
+"@WebTier\n"
+"@Stereotype(supportedScopes=RequestScoped.class)\n"
+"public @interface Action {}]]>"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:80
+#, no-c-format
+msgid ""
+"If a particular action class attempts to specify a scope other than the Web "
+"Beans request scope, an exception will be thrown by the Web Bean manager at "
+"initialization time."
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:84
+#, no-c-format
+msgid ""
+"We can also force all Web Bean with a certain stereotype to implement an "
+"interface or extend a class:"
+msgstr ""
+
+#. Tag: programlisting
+#: stereotypes.xml:87
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target(TYPE)\n"
+"@RequestScoped\n"
+"@WebTier\n"
+"@Stereotype(requiredTypes=AbstractAction.class)\n"
+"public @interface Action {}]]>"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:89
+#, no-c-format
+msgid ""
+"If a particular action class does not extend the class "
+"<literal>AbstractAction</literal>, an exception will be thrown by the Web "
+"Bean manager at initialization time."
+msgstr ""
+
+#. Tag: title
+#: stereotypes.xml:96
+#, no-c-format
+msgid "Interceptor bindings for stereotypes"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:98
+#, no-c-format
+msgid ""
+"A stereotype may specify a set of interceptor bindings to be inherited by "
+"all Web Beans with that stereotype."
+msgstr ""
+
+#. Tag: programlisting
+#: stereotypes.xml:101
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target(TYPE)\n"
+"@RequestScoped\n"
+"@Transactional(requiresNew=true)\n"
+"@Secure\n"
+"@WebTier\n"
+"@Stereotype\n"
+"public @interface Action {}]]>"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:103
+#, no-c-format
+msgid ""
+"This helps us get technical concerns even further away from the business "
+"code!"
+msgstr ""
+
+#. Tag: title
+#: stereotypes.xml:109
+#, no-c-format
+msgid "Name defaulting with stereotypes"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:111
+#, no-c-format
+msgid ""
+"Finally, we can specify that all Web Beans with a certain stereotype have a "
+"Web Bean name, defaulted by the Web Bean manager. Actions are often "
+"referenced in JSP pages, so they're a perfect use case for this feature. All "
+"we need to do is add an empty <literal>@Named</literal> annotation:"
+msgstr ""
+
+#. Tag: programlisting
+#: stereotypes.xml:116
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target(TYPE)\n"
+"@RequestScoped\n"
+"@Transactional(requiresNew=true)\n"
+"@Secure\n"
+"@Named\n"
+"@WebTier\n"
+"@Stereotype\n"
+"public @interface Action {}]]>"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:118
+#, no-c-format
+msgid ""
+"Now, <literal>LoginAction</literal> will have the name <literal>loginAction</"
+"literal>."
+msgstr ""
+
+#. Tag: title
+#: stereotypes.xml:124
+#, no-c-format
+msgid "Standard stereotypes"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:126
+#, no-c-format
+msgid ""
+"We've already met two standard stereotypes defined by the Web Beans "
+"specification: <literal>@Interceptor</literal> and <literal>@Decorator</"
+"literal>."
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:129
+#, no-c-format
+msgid "Web Beans defines one further standard stereotype:"
+msgstr ""
+
+#. Tag: programlisting
+#: stereotypes.xml:131
+#, no-c-format
+msgid ""
+"<![CDATA[@Named \n"
+"@RequestScoped \n"
+"@Stereotype \n"
+"@Target({TYPE, METHOD}) \n"
+"@Retention(RUNTIME) \n"
+"public @interface Model {} ]]>"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:133
+#, no-c-format
+msgid ""
+"This stereotype is intended for use with JSF. Instead of using JSF managed "
+"beans, just annotate a Web Bean <literal>@Model</literal>, and use it "
+"directly in your JSF page."
+msgstr ""

Added: doc/trunk/reference/ko-KR/xml.po
===================================================================
--- doc/trunk/reference/ko-KR/xml.po	                        (rev 0)
+++ doc/trunk/reference/ko-KR/xml.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,352 @@
+# Language ko-KR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: xml.xml:4
+#, no-c-format
+msgid "Defining Web Beans using XML"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:6
+#, no-c-format
+msgid ""
+"So far, we've seen plenty of examples of Web Beans declared using "
+"annotations. However, there are a couple of occasions when we can't use "
+"annotations to define the Web Bean:"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:12
+#, no-c-format
+msgid "when the implementation class comes from some preexisting library, or"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:15
+#, no-c-format
+msgid ""
+"when there should be multiple Web Beans with the same implementation class."
+msgstr ""
+
+#. Tag: para
+#: xml.xml:20
+#, no-c-format
+msgid "In either of these cases, Web Beans gives us two options:"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:23
+#, no-c-format
+msgid "write a producer method, or"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:24
+#, no-c-format
+msgid "declare the Web Bean using XML."
+msgstr ""
+
+#. Tag: para
+#: xml.xml:27
+#, no-c-format
+msgid ""
+"Many frameworks use XML to provide metadata relating to Java classes. "
+"However, Web Beans uses a very different approach to specifying the names of "
+"Java classes, fields or methods to most other frameworks. Instead of writing "
+"class and member names as the string values of XML elements and attributes, "
+"Web Beans lets you use the class or member name as the name of the XML "
+"element."
+msgstr ""
+
+#. Tag: para
+#: xml.xml:33
+#, no-c-format
+msgid ""
+"The advantage of this approach is that you can write an XML schema that "
+"prevents spelling errors in your XML document. It's even possible for a tool "
+"to generate the XML schema automatically from the compiled Java code. Or, an "
+"integrated development environment could perform the same validation without "
+"the need for the explicit intermediate generation step."
+msgstr ""
+
+#. Tag: title
+#: xml.xml:40
+#, no-c-format
+msgid "Declaring Web Bean classes"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:42
+#, no-c-format
+msgid ""
+"For each Java package, Web Beans defines a corresponding XML namespace. The "
+"namespace is formed by prepending <literal>urn:java:</literal> to the Java "
+"package name. For the package <literal>com.mydomain.myapp</literal>, the XML "
+"namespace is <literal>urn:java:com.mydomain.myapp</literal>."
+msgstr ""
+
+#. Tag: para
+#: xml.xml:47
+#, no-c-format
+msgid ""
+"Java types belonging to a package are referred to using an XML element in "
+"the namespace corresponding to the package. The name of the element is the "
+"name of the Java type. Fields and methods of the type are specified by child "
+"elements in the same namespace. If the type is an annotation, members are "
+"specified by attributes of the element."
+msgstr ""
+
+#. Tag: para
+#: xml.xml:53
+#, no-c-format
+msgid ""
+"For example, the element <literal>&lt;util:Date/&gt;</literal> in the "
+"following XML fragment refers to the class <literal>java.util.Date</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: xml.xml:56
+#, no-c-format
+msgid ""
+"<![CDATA[<WebBeans xmlns=\"urn:java:javax.webbeans\"\n"
+"          xmlns:util=\"urn:java:java.util\">\n"
+"\n"
+"    <util:Date/>\n"
+"\n"
+"</WebBeans>]]>"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:58
+#, no-c-format
+msgid ""
+"And this is all the code we need to declare that <literal>Date</literal> is "
+"a simple Web Bean! An instance of <literal>Date</literal> may now be "
+"injected by any other Web Bean:"
+msgstr ""
+
+#. Tag: programlisting
+#: xml.xml:62
+#, no-c-format
+msgid "<![CDATA[@Current Date date]]>"
+msgstr ""
+
+#. Tag: title
+#: xml.xml:67
+#, no-c-format
+msgid "Declaring Web Bean metadata"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:69
+#, no-c-format
+msgid ""
+"We can declare the scope, deployment type and interceptor binding types "
+"using direct child elements of the Web Bean declaration:"
+msgstr ""
+
+#. Tag: programlisting
+#: xml.xml:72
+#, no-c-format
+msgid ""
+"<![CDATA[<myapp:ShoppingCart>\n"
+"    <SessionScoped/>\n"
+"    <myfwk:Transactional requiresNew=\"true\"/>\n"
+"    <myfwk:Secure/>\n"
+"</myapp:ShoppingCart>]]>"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:74
+#, no-c-format
+msgid "We use exactly the same approach to specify names and binding type:"
+msgstr ""
+
+#. Tag: programlisting
+#: xml.xml:76
+#, no-c-format
+msgid ""
+"<![CDATA[<util:Date>\n"
+"    <Named>currentTime</Named>\n"
+"</util:Date>\n"
+"\n"
+"<util:Date>\n"
+"    <SessionScoped/>\n"
+"    <myapp:Login/>\n"
+"    <Named>loginTime</Named>\n"
+"</util:Date>\n"
+"\n"
+"<util:Date>\n"
+"    <ApplicationScoped/>\n"
+"    <myapp:SystemStart/>\n"
+"    <Named>systemStartTime</Named>\n"
+"</util:Date>]]>"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:78
+#, no-c-format
+msgid ""
+"Where <literal>@Login</literal> and <literal>@SystemStart</literal> are "
+"binding annotations types."
+msgstr ""
+
+#. Tag: programlisting
+#: xml.xml:81
+#, no-c-format
+msgid ""
+"<![CDATA[@Current Date currentTime;\n"
+"@Login Date loginTime;\n"
+"@SystemStart Date systemStartTime;]]>"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:83
+#, no-c-format
+msgid "As usual, a Web Bean may support multiple binding types:"
+msgstr ""
+
+#. Tag: programlisting
+#: xml.xml:85
+#, no-c-format
+msgid ""
+"<![CDATA[<myapp:AsynchronousChequePaymentProcessor>\n"
+"    <myapp:PayByCheque/>\n"
+"    <myapp:Asynchronous/>\n"
+"</myapp:AsynchronousChequePaymentProcessor>]]>"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:87
+#, no-c-format
+msgid ""
+"Interceptors and decorators are just simple Web Beans, so they may be "
+"declared just like any other simple Web Bean:"
+msgstr ""
+
+#. Tag: programlisting
+#: xml.xml:90
+#, no-c-format
+msgid ""
+"<![CDATA[<myfwk:TransactionInterceptor>\n"
+"    <Interceptor/>\n"
+"    <myfwk:Transactional/>\n"
+"</myfwk:TransactionInterceptor>]]>"
+msgstr ""
+
+#. Tag: title
+#: xml.xml:95
+#, no-c-format
+msgid "Declaring Web Bean members"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:97
+#, no-c-format
+msgid "TODO!"
+msgstr ""
+
+#. Tag: title
+#: xml.xml:104
+#, no-c-format
+msgid "Declaring inline Web Beans"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:106
+#, no-c-format
+msgid "Web Beans lets us define a Web Bean at an injection point. For example:"
+msgstr ""
+
+#. Tag: programlisting
+#: xml.xml:108
+#, no-c-format
+msgid ""
+"<![CDATA[<myapp:System>\n"
+"    <ApplicationScoped/>\n"
+"    <myapp:admin>\n"
+"        <myapp:Name>\n"
+"            <myapp:firstname>Gavin</myapp:firstname>\n"
+"            <myapp:lastname>King</myapp:lastname>\n"
+"            <myapp:email>gavin at hibernate.org</myapp:email>\n"
+"        </myapp:Name>\n"
+"    </myapp:admin>\n"
+"</myapp:System>]]>"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:110
+#, no-c-format
+msgid ""
+"The <literal>&lt;Name&gt;</literal> element declares a simple Web Bean of "
+"scope <literal>@Dependent</literal> and class <literal>Name</literal>, with "
+"a set of initial field values. This Web Bean has a special, container-"
+"generated binding and is therefore injectable only to the specific injection "
+"point at which it is declared."
+msgstr ""
+
+#. Tag: para
+#: xml.xml:116
+#, no-c-format
+msgid ""
+"This simple but powerful feature allows the Web Beans XML format to be used "
+"to specify whole graphs of Java objects. It's not quite a full databinding "
+"solution, but it's close!"
+msgstr ""
+
+#. Tag: title
+#: xml.xml:123
+#, no-c-format
+msgid "Using a schema"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:125
+#, no-c-format
+msgid ""
+"If we want our XML document format to be authored by people who aren't Java "
+"developers, or who don't have access to our code, we need to provide a "
+"schema. There's nothing specific to Web Beans about writing or using the "
+"schema."
+msgstr ""
+
+#. Tag: programlisting
+#: xml.xml:130
+#, no-c-format
+msgid ""
+"<![CDATA[<WebBeans xmlns=\"urn:java:javax.webbeans\"\n"
+"          xmlns:myapp=\"urn:java:com.mydomain.myapp\"\n"
+"          xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+"          xsi:schemaLocation=\"urn:java:javax.webbeans http://java.sun.com/"
+"jee/web-beans-1.0.xsd\n"
+"                              urn:java:com.mydomain.myapp http://mydomain."
+"com/xsd/myapp-1.2.xsd\">\n"
+"\n"
+"    <myapp:System>\n"
+"        ...\n"
+"    </myapp:System>\n"
+"\n"
+"</WebBeans>]]>"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:132
+#, no-c-format
+msgid ""
+"Writing an XML schema is quite tedious. Therefore, the Web Beans RI project "
+"will provide a tool which automatically generates the XML schema from "
+"compiled Java code."
+msgstr ""

Modified: doc/trunk/reference/pot/messages.mo
===================================================================
(Binary files differ)

Added: doc/trunk/reference/pt-BR/Author_Group.po
===================================================================
--- doc/trunk/reference/pt-BR/Author_Group.po	                        (rev 0)
+++ doc/trunk/reference/pt-BR/Author_Group.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,60 @@
+# Language pt-BR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: author
+#: Author_Group.xml:4
+#, no-c-format
+msgid "<firstname>Gavin</firstname> <surname>King</surname>"
+msgstr ""
+
+#. Tag: affiliation
+#: Author_Group.xml:7
+#, no-c-format
+msgid ""
+"<jobtitle>Web Beans (JSR-299) specification lead</jobtitle> <orgname>Red Hat "
+"Middleware LLC</orgname>"
+msgstr ""
+
+#. Tag: author
+#: Author_Group.xml:12
+#, no-c-format
+msgid "<firstname>Pete</firstname> <surname>Muir</surname>"
+msgstr ""
+
+#. Tag: affiliation
+#: Author_Group.xml:15
+#, no-c-format
+msgid ""
+"<jobtitle>Web Beans (JSR-299) Reference Implementation lead </jobtitle> "
+"<orgname>Red Hat Middleware LLC</orgname>"
+msgstr ""
+
+#. Tag: othercredit
+#: Author_Group.xml:21
+#, no-c-format
+msgid "<firstname>Nicola</firstname> <surname>Benaglia</surname>"
+msgstr ""
+
+#. Tag: contrib
+#: Author_Group.xml:24 Author_Group.xml:29
+#, no-c-format
+msgid "Italian Translation"
+msgstr ""
+
+#. Tag: othercredit
+#: Author_Group.xml:26
+#, no-c-format
+msgid "<firstname>Francesco</firstname> <surname>Milesi</surname>"
+msgstr ""

Added: doc/trunk/reference/pt-BR/Book_Info.po
===================================================================
--- doc/trunk/reference/pt-BR/Book_Info.po	                        (rev 0)
+++ doc/trunk/reference/pt-BR/Book_Info.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,28 @@
+# Language pt-BR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: Book_Info.xml:4
+#, no-c-format
+msgid "Introduction to Web Beans"
+msgstr ""
+
+#. Tag: subtitle
+#: Book_Info.xml:5
+#, no-c-format
+msgid ""
+"The new Java standard for dependency injection and contextual state "
+"management"
+msgstr ""

Added: doc/trunk/reference/pt-BR/decorators.po
===================================================================
--- doc/trunk/reference/pt-BR/decorators.po	                        (rev 0)
+++ doc/trunk/reference/pt-BR/decorators.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,243 @@
+# Language pt-BR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: decorators.xml:4
+#, no-c-format
+msgid "Decorators"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:6
+#, no-c-format
+msgid ""
+"Interceptors are a powerful way to capture and separate concerns which are "
+"<emphasis>orthogonal</emphasis> to the type system. Any interceptor is able "
+"to intercept invocations of any Java type. This makes them perfect for "
+"solving technical concerns such as transaction management and security. "
+"However, by nature, interceptors are unaware of the actual semantics of the "
+"events they intercept. Thus, interceptors aren't an appropriate tool for "
+"separating business-related concerns."
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:14
+#, no-c-format
+msgid ""
+"The reverse is true of <emphasis>decorators</emphasis>. A decorator "
+"intercepts invocations only for a certain Java interface, and is therefore "
+"aware of all the semantics attached to that interface. This makes decorators "
+"a perfect tool for modeling some kinds of business concerns. It also means "
+"that a decorator doesn't have the generality of an interceptor. Decorators "
+"aren't able to solve technical concerns that cut across many disparate types."
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:22
+#, no-c-format
+msgid "Suppose we have an interface that represents accounts:"
+msgstr ""
+
+#. Tag: programlisting
+#: decorators.xml:24
+#, no-c-format
+msgid ""
+"<![CDATA[public interface Account {\n"
+"    public BigDecimal getBalance();\n"
+"    public User getOwner();\n"
+"    public void withdraw(BigDecimal amount);\n"
+"    public void deposit(BigDecimal amount);\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:26
+#, no-c-format
+msgid ""
+"Several different Web Beans in our system implement the <literal>Account</"
+"literal> interface. However, we have a common legal requirement that, for "
+"any kind of account, large transactions must be recorded by the system in a "
+"special log. This is a perfect job for a decorator."
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:32
+#, no-c-format
+msgid ""
+"A decorator is a simple Web Bean that implements the type it decorates and "
+"is annotated <literal>@Decorator</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: decorators.xml:35
+#, no-c-format
+msgid ""
+"<![CDATA[@Decorator\n"
+"public abstract class LargeTransactionDecorator \n"
+"        implements Account {\n"
+"    \n"
+"    @Decorates Account account;\n"
+"    \n"
+"    @PersistenceContext EntityManager em;\n"
+"    \n"
+"    public void withdraw(BigDecimal amount) {\n"
+"        account.withdraw(amount);\n"
+"        if ( amount.compareTo(LARGE_AMOUNT)>0 ) {\n"
+"            em.persist( new LoggedWithdrawl(amount) );\n"
+"        }\n"
+"    }\n"
+"    \n"
+"    public void deposit(BigDecimal amount);\n"
+"        account.deposit(amount);\n"
+"        if ( amount.compareTo(LARGE_AMOUNT)>0 ) {\n"
+"            em.persist( new LoggedDeposit(amount) );\n"
+"        }\n"
+"    }\n"
+"    \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:37
+#, no-c-format
+msgid ""
+"Unlike other simple Web Beans, a decorator may be an abstract class. If "
+"there's nothing special the decorator needs to do for a particular method of "
+"the decorated interface, you don't need to implement that method."
+msgstr ""
+
+#. Tag: title
+#: decorators.xml:43
+#, no-c-format
+msgid "Delegate attributes"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:45
+#, no-c-format
+msgid ""
+"All decorators have a <emphasis>delegate attribute</emphasis>. The type and "
+"binding types of the delegate attribute determine which Web Beans the "
+"decorator is bound to. The delegate attribute type must implement or extend "
+"all interfaces implemented by the decorator."
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:50
+#, no-c-format
+msgid ""
+"This delegate attribute specifies that the decorator is bound to all Web "
+"Beans that implement <literal>Account</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: decorators.xml:53
+#, no-c-format
+msgid "<![CDATA[@Decorates Account account;]]>"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:55
+#, no-c-format
+msgid ""
+"A delegate attribute may specify a binding annotation. Then the decorator "
+"will only be bound to Web Beans with the same binding."
+msgstr ""
+
+#. Tag: programlisting
+#: decorators.xml:58
+#, no-c-format
+msgid "<![CDATA[@Decorates @Foreign Account account;]]>"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:60
+#, no-c-format
+msgid "A decorator is bound to any Web Bean which:"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:64
+#, no-c-format
+msgid "has the type of the delegate attribute as an API type, and"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:67
+#, no-c-format
+msgid "has all binding types that are declared by the delegate attribute."
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:71
+#, no-c-format
+msgid ""
+"The decorator may invoke the delegate attribute, which has much the same "
+"effect as calling <literal>InvocationContext.proceed()</literal> from an "
+"interceptor."
+msgstr ""
+
+#. Tag: title
+#: decorators.xml:78
+#, no-c-format
+msgid "Enabling decorators"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:80
+#, no-c-format
+msgid ""
+"We need to <emphasis>enable</emphasis> our decorator in <literal>web-beans."
+"xml</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: decorators.xml:83
+#, no-c-format
+msgid ""
+"<![CDATA[<Decorators>\n"
+"    <myapp:LargeTransactionDecorator/>\n"
+"</Decorators>]]>"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:85
+#, no-c-format
+msgid ""
+"This declaration serves the same purpose for decorators that the "
+"<literal>&lt;Interceptors&gt;</literal> declaration serves for interceptors:"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:90
+#, no-c-format
+msgid ""
+"it enables us to specify a total ordering for all decorators in our system, "
+"ensuring deterministic behavior, and"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:94
+#, no-c-format
+msgid "it lets us enable or disable decorator classes at deployment time."
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:98
+#, no-c-format
+msgid ""
+"Interceptors for a method are called before decorators that apply to that "
+"method."
+msgstr ""

Added: doc/trunk/reference/pt-BR/ee.po
===================================================================
--- doc/trunk/reference/pt-BR/ee.po	                        (rev 0)
+++ doc/trunk/reference/pt-BR/ee.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,329 @@
+# Language pt-BR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: ee.xml:4
+#, no-c-format
+msgid "Java EE integration"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:6
+#, no-c-format
+msgid ""
+"Web Beans is fully integrated into the Java EE environment. Web Beans have "
+"access to Java EE resources and JPA persistence contexts. They may be used "
+"in Unified EL expressions in JSF and JSP pages. They may even be injected "
+"into some objects, such as Servlets and Message-Driven Beans, which are not "
+"Web Beans."
+msgstr ""
+
+#. Tag: title
+#: ee.xml:12
+#, no-c-format
+msgid "Injecting Java EE resources into a Web Bean"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:14
+#, no-c-format
+msgid ""
+"All simple and enterprise Web Beans may take advantage of Java EE dependency "
+"injection using <literal>@Resource</literal>, <literal>@EJB</literal> and "
+"<literal>@PersistenceContext</literal>. We've already seen a couple of "
+"examples of this, though we didn't pay much attention at the time:"
+msgstr ""
+
+#. Tag: programlisting
+#: ee.xml:19
+#, no-c-format
+msgid ""
+"<![CDATA[@Transactional @Interceptor\n"
+"public class TransactionInterceptor {\n"
+"\n"
+"    @Resource Transaction transaction;\n"
+"\n"
+"    @AroundInvoke public Object manageTransaction(InvocationContext ctx) "
+"{ ... }\n"
+"    \n"
+"}]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: ee.xml:21
+#, no-c-format
+msgid ""
+"<![CDATA[@SessionScoped\n"
+"public class Login {\n"
+"\n"
+"    @Current Credentials credentials;\n"
+"    @PersistenceContext EntityManager userDatabase;\n"
+"    \n"
+"    ...\n"
+"\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:23
+#, no-c-format
+msgid ""
+"The Java EE <literal>@PostConstruct</literal> and <literal>@PreDestroy</"
+"literal> callbacks are also supported for all simple and enterprise Web "
+"Beans. The <literal>@PostConstruct</literal> method is called after "
+"<emphasis>all</emphasis> injection has been performed."
+msgstr ""
+
+#. Tag: para
+#: ee.xml:28
+#, no-c-format
+msgid ""
+"There is one restriction to be aware of here: <literal>@PersistenceContext"
+"(type=EXTENDED)</literal> is not supported for simple Web Beans."
+msgstr ""
+
+#. Tag: title
+#: ee.xml:35
+#, no-c-format
+msgid "Calling a Web Bean from a Servlet"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:37
+#, no-c-format
+msgid ""
+"It's easy to use a Web Bean from a Servlet in Java EE 6. Simply inject the "
+"Web Bean using Web Beans field or initializer method injection."
+msgstr ""
+
+#. Tag: programlisting
+#: ee.xml:40
+#, no-c-format
+msgid ""
+"public class Login extends HttpServlet {\n"
+"\n"
+"    @Current Credentials credentials;\n"
+"    @Current Login login;\n"
+"\n"
+"    @Override\n"
+"    public void service(HttpServletRequest request, HttpServletResponse "
+"response)\n"
+"        throws ServletException, IOException {\n"
+"        credentials.setUsername( request.getAttribute(\"username\") ):\n"
+"        credentials.setPassword( request.getAttribute(\"password\") ):\n"
+"        login.login();\n"
+"        if ( login.isLoggedIn() ) {\n"
+"            response.sendRedirect(\"/home.jsp\");\n"
+"        }\n"
+"        else {\n"
+"            response.sendRedirect(\"/loginError.jsp\");\n"
+"        }\n"
+"    }\n"
+"            \n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:42
+#, no-c-format
+msgid ""
+"The Web Beans client proxy takes care of routing method invocations from the "
+"Servlet to the correct instances of <literal>Credentials</literal> and "
+"<literal>Login</literal> for the current request and HTTP session."
+msgstr ""
+
+#. Tag: title
+#: ee.xml:49
+#, no-c-format
+msgid "Calling a Web Bean from a Message-Driven Bean"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:51
+#, no-c-format
+msgid ""
+"Web Beans injection applies to all EJBs, even when they aren't under the "
+"control of the Web Bean manager (if they were obtained by direct JNDI "
+"lookup, or injection using <literal>@EJB</literal>, for example. In "
+"particular, you can use Web Beans injection in Message-Driven Beans, which "
+"are not considered Web Beans because you can't inject them."
+msgstr ""
+
+#. Tag: para
+#: ee.xml:57
+#, no-c-format
+msgid ""
+"You can even use Web Beans interceptor bindings for Message-Driven Beans."
+msgstr ""
+
+#. Tag: programlisting
+#: ee.xml:59
+#, no-c-format
+msgid ""
+"@Transactional @MessageDriven\n"
+"public class ProcessOrder implements MessageListener {\n"
+"\n"
+"    @Current Inventory inventory;\n"
+"    @PersistenceContext EntityManager em;\n"
+"\n"
+"    public void onMessage(Message message) {\n"
+"        ...\n"
+"    }\n"
+"            \n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:61
+#, no-c-format
+msgid ""
+"Thus, receiving messages is super-easy in a Web Beans environment. But "
+"beware that there is no session or conversation context available when a "
+"message is delivered to a Message-Driven Bean. Only <literal>@RequestScoped</"
+"literal> and <literal>@ApplicationScoped</literal> Web Beans are available."
+msgstr ""
+
+#. Tag: para
+#: ee.xml:66
+#, no-c-format
+msgid "It's also easy to send messages using Web Beans."
+msgstr ""
+
+#. Tag: title
+#: ee.xml:71
+#, no-c-format
+msgid "JMS endpoints"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:73
+#, no-c-format
+msgid ""
+"Sending messages using JMS can be quite complex, because of the number of "
+"different objects you need to deal with. For queues we have <literal>Queue</"
+"literal>, <literal>QueueConnectionFactory</literal>, "
+"<literal>QueueConnection</literal>, <literal>QueueSession</literal> and "
+"<literal>QueueSender</literal>. For topics we have <literal>Topic</literal>, "
+"<literal>TopicConnectionFactory</literal>, <literal>TopicConnection</"
+"literal>, <literal>TopicSession</literal> and <literal>TopicPublisher</"
+"literal>. Each of these objects has its own lifecycle and threading model "
+"that we need to worry about."
+msgstr ""
+
+#. Tag: para
+#: ee.xml:82
+#, no-c-format
+msgid ""
+"Web Beans takes care of all this for us. All we need to do is declare the "
+"queue or topic in <literal>web-beans.xml</literal>, specifying an associated "
+"binding type and connection factory."
+msgstr ""
+
+#. Tag: programlisting
+#: ee.xml:86
+#, no-c-format
+msgid ""
+"<![CDATA[<Queue>\n"
+"    <destination>java:comp/env/jms/OrderQueue</destination>\n"
+"    <connectionFactory>java:comp/env/jms/QueueConnectionFactory</"
+"connectionFactory>\n"
+"    <myapp:OrderProcessor/>    \n"
+"</Queue>]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: ee.xml:88
+#, no-c-format
+msgid ""
+"<![CDATA[<Topic>\n"
+"    <destination>java:comp/env/jms/StockPrices</destination>\n"
+"    <connectionFactory>java:comp/env/jms/TopicConnectionFactory</"
+"connectionFactory>\n"
+"    <myapp:StockPrices/>    \n"
+"</Topic>]]>"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:90
+#, no-c-format
+msgid ""
+"Now we can just inject the <literal>Queue</literal>, "
+"<literal>QueueConnection</literal>, <literal>QueueSession</literal> or "
+"<literal>QueueSender</literal> for a queue, or the <literal>Topic</literal>, "
+"<literal>TopicConnection</literal>, <literal>TopicSession</literal> or "
+"<literal>TopicPublisher</literal> for a topic."
+msgstr ""
+
+#. Tag: programlisting
+#: ee.xml:96
+#, no-c-format
+msgid ""
+"@OrderProcessor QueueSender orderSender;\n"
+"@OrderProcessor QueueSession orderSession;\n"
+"\n"
+"public void sendMessage() {\n"
+"    MapMessage msg = orderSession.createMapMessage();\n"
+"    ...\n"
+"    orderSender.send(msg);\n"
+"}"
+msgstr ""
+
+#. Tag: programlisting
+#: ee.xml:98
+#, no-c-format
+msgid ""
+"@StockPrices TopicPublisher pricePublisher;\n"
+"@StockPrices TopicSession priceSession;\n"
+"\n"
+"public void sendMessage(String price) {\n"
+"    pricePublisher.send( priceSession.createTextMessage(price) );\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:100
+#, no-c-format
+msgid ""
+"The lifecycle of the injected JMS objects is completely controlled by the "
+"Web Bean manager."
+msgstr ""
+
+#. Tag: title
+#: ee.xml:106
+#, no-c-format
+msgid "Packaging and deployment"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:108
+#, no-c-format
+msgid ""
+"Web Beans doesn't define any special deployment archive. You can package Web "
+"Beans in JARs, EJB-JARs or WARs&#151;any deployment location in the "
+"application classpath. However, each archive that contains Web Beans must "
+"include a file named <literal>web-beans.xml</literal> in the <literal>META-"
+"INF</literal> or <literal>WEB-INF</literal> directory. The file may be "
+"empty. Web Beans deployed in archives that do not have a <literal>web-beans."
+"xml</literal> file will not be available for use in the application."
+msgstr ""
+
+#. Tag: para
+#: ee.xml:116
+#, no-c-format
+msgid ""
+"For Java SE execution, Web Beans may be deployed in any location in which "
+"EJBs may be deployed for execution by the embeddable EJB Lite container. "
+"Again, each location must contain a <literal>web-beans.xml</literal> file."
+msgstr ""

Added: doc/trunk/reference/pt-BR/events.po
===================================================================
--- doc/trunk/reference/pt-BR/events.po	                        (rev 0)
+++ doc/trunk/reference/pt-BR/events.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,649 @@
+# Language pt-BR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: events.xml:4
+#, no-c-format
+msgid "Events"
+msgstr ""
+
+#. Tag: para
+#: events.xml:6
+#, no-c-format
+msgid ""
+"The Web Beans event notification facility allows Web Beans to interact in a "
+"totally decoupled manner. Event <emphasis>producers</emphasis> raise events "
+"that are then delivered to event <emphasis>observers</emphasis> by the Web "
+"Bean manager. This basic schema might sound like the familiar observer/"
+"observable pattern, but there are a couple of twists:"
+msgstr ""
+
+#. Tag: para
+#: events.xml:14
+#, no-c-format
+msgid ""
+"not only are event producers decoupled from observers; observers are "
+"completely decoupled from producers,"
+msgstr ""
+
+#. Tag: para
+#: events.xml:18
+#, no-c-format
+msgid ""
+"observers can specify a combination of \"selectors\" to narrow the set of "
+"event notifications they will receive, and"
+msgstr ""
+
+#. Tag: para
+#: events.xml:22
+#, no-c-format
+msgid ""
+"observers can be notified immediately, or can specify that delivery of the "
+"event should be delayed until the end of the current transaction"
+msgstr ""
+
+#. Tag: title
+#: events.xml:28
+#, no-c-format
+msgid "Event observers"
+msgstr ""
+
+#. Tag: para
+#: events.xml:30
+#, no-c-format
+msgid ""
+"An <emphasis>observer method</emphasis> is a method of a Web Bean with a "
+"parameter annotated <literal>@Observes</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:33
+#, no-c-format
+msgid ""
+"<![CDATA[public void onAnyDocumentEvent(@Observes Document document) "
+"{ ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:35
+#, no-c-format
+msgid ""
+"The annotated parameter is called the <emphasis>event parameter</emphasis>. "
+"The type of the event parameter is the observed <emphasis>event type</"
+"emphasis>. Observer methods may also specify \"selectors\", which are just "
+"instances of Web Beans binding types. When a binding type is used as an "
+"event selector, it is called an <emphasis>event binding type</emphasis>."
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:41
+#, no-c-format
+msgid ""
+"<![CDATA[@BindingType\n"
+"@Target({PARAMETER, FIELD})\n"
+"@Retention(RUNTIME)\n"
+"public @interface Updated { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:43
+#, no-c-format
+msgid ""
+"We specify the event bindings of the observer method by annotating the event "
+"parameter:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:46 events.xml:190
+#, no-c-format
+msgid ""
+"<![CDATA[public void afterDocumentUpdate(@Observes @Updated Document "
+"document) { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:48
+#, no-c-format
+msgid ""
+"An observer method need not specify any event bindings&#151;in this case it "
+"is interested in <emphasis>all</emphasis> events of a particular type. If it "
+"does specify event bindings, it is only interested in events which also have "
+"those event bindings."
+msgstr ""
+
+#. Tag: para
+#: events.xml:53
+#, no-c-format
+msgid ""
+"The observer method may have additional parameters, which are injected "
+"according to the usual Web Beans method parameter injection semantics:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:56
+#, no-c-format
+msgid ""
+"<![CDATA[public void afterDocumentUpdate(@Observes @Updated Document "
+"document, User user) { ... }]]>"
+msgstr ""
+
+#. Tag: title
+#: events.xml:61
+#, no-c-format
+msgid "Event producers"
+msgstr ""
+
+#. Tag: para
+#: events.xml:63
+#, no-c-format
+msgid ""
+"The event producer may obtain an <emphasis>event notifier</emphasis> object "
+"by injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:66
+#, no-c-format
+msgid "<![CDATA[@Observable Event<Document> documentEvent]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:68
+#, no-c-format
+msgid ""
+"The <literal>@Observable</literal> annotation implicitly defines a Web Bean "
+"with scope <literal>@Dependent</literal> and deployment type "
+"<literal>@Standard</literal>, with an implementation provided by the Web "
+"Bean manager."
+msgstr ""
+
+#. Tag: para
+#: events.xml:72
+#, no-c-format
+msgid ""
+"A producer raises events by calling the <literal>fire()</literal> method of "
+"the <literal>Event</literal> interface, passing an <emphasis>event object</"
+"emphasis>:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:75
+#, no-c-format
+msgid "<![CDATA[documentEvent.fire(document);]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:77
+#, no-c-format
+msgid ""
+"An event object may be an instance of any Java class that has no type "
+"variables or wildcard type parameters. The event will be delivered to every "
+"observer method that:"
+msgstr ""
+
+#. Tag: para
+#: events.xml:83 events.xml:107 events.xml:126
+#, no-c-format
+msgid "has an event parameter to which the event object is assignable, and"
+msgstr ""
+
+#. Tag: para
+#: events.xml:86
+#, no-c-format
+msgid "specifies no event bindings."
+msgstr ""
+
+#. Tag: para
+#: events.xml:90
+#, no-c-format
+msgid ""
+"The Web Bean manager simply calls all the observer methods, passing the "
+"event object as the value of the event parameter. If any observer method "
+"throws an exception, the Web Bean manager stops calling observer methods, "
+"and the exception is rethrown by the <literal>fire()</literal> method."
+msgstr ""
+
+#. Tag: para
+#: events.xml:95
+#, no-c-format
+msgid ""
+"To specify a \"selector\", the event producer may pass an instance of the "
+"event binding type to the <literal>fire()</literal> method:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:98
+#, no-c-format
+msgid ""
+"<![CDATA[documentEvent.fire( document, new AnnotationLiteral<Updated>()"
+"{} );]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:100
+#, no-c-format
+msgid ""
+"The helper class <literal>AnnotationLiteral</literal> makes it possible to "
+"instantiate binding types inline, since this is otherwise difficult to do in "
+"Java."
+msgstr ""
+
+#. Tag: para
+#: events.xml:103
+#, no-c-format
+msgid "The event will be delivered to every observer method that:"
+msgstr ""
+
+#. Tag: para
+#: events.xml:110
+#, no-c-format
+msgid ""
+"does not specify any event binding <emphasis>except</emphasis> for the event "
+"bindings passed to <literal>fire()</literal>."
+msgstr ""
+
+#. Tag: para
+#: events.xml:115
+#, no-c-format
+msgid ""
+"Alternatively, event bindings may be specified by annotating the event "
+"notifier injection point:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:118
+#, no-c-format
+msgid "<![CDATA[@Observable @Updated Event<Document> documentUpdatedEvent]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:120
+#, no-c-format
+msgid ""
+"Then every event fired via this instance of <literal>Event</literal> has the "
+"annotated event binding. The event will be delivered to every observer "
+"method that:"
+msgstr ""
+
+#. Tag: para
+#: events.xml:129
+#, no-c-format
+msgid ""
+"does not specify any event binding <emphasis>except</emphasis> for the event "
+"bindings passed to <literal>fire()</literal> or the annotated event bindings "
+"of the event notifier injection point."
+msgstr ""
+
+#. Tag: title
+#: events.xml:138
+#, no-c-format
+msgid "Registering observers dynamically"
+msgstr ""
+
+#. Tag: para
+#: events.xml:140
+#, no-c-format
+msgid ""
+"It's often useful to register an event observer dynamically. The application "
+"may implement the <literal>Observer</literal> interface and register an "
+"instance with an event notifier by calling the <literal>observe()</literal> "
+"method."
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:144
+#, no-c-format
+msgid ""
+"<![CDATA[documentEvent.observe( new Observer<Document>() { public void notify"
+"(Document doc) { ... } } );]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:146
+#, no-c-format
+msgid ""
+"Event binding types may be specified by the event notifier injection point "
+"or by passing event binding type instances to the <literal>observe()</"
+"literal> method:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:149
+#, no-c-format
+msgid ""
+"<![CDATA[documentEvent.observe( new Observer<Document>() { public void notify"
+"(Document doc) { ... } }, \n"
+"                                                new "
+"AnnotationLiteral<Updated>(){} );]]>"
+msgstr ""
+
+#. Tag: title
+#: events.xml:154
+#, no-c-format
+msgid "Event bindings with members"
+msgstr ""
+
+#. Tag: para
+#: events.xml:156
+#, no-c-format
+msgid "An event binding type may have annotation members:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:158
+#, no-c-format
+msgid ""
+"<![CDATA[@BindingType\n"
+"@Target({PARAMETER, FIELD})\n"
+"@Retention(RUNTIME)\n"
+"public @interface Role {\n"
+"    RoleType value();\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:160
+#, no-c-format
+msgid ""
+"The member value is used to narrow the messages delivered to the observer:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:162
+#, no-c-format
+msgid ""
+"<![CDATA[public void adminLoggedIn(@Observes @Role(ADMIN) LoggedIn event) "
+"{ ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:164
+#, no-c-format
+msgid ""
+"Event binding type members may be specified statically by the event "
+"producer, via annotations at the event notifier injection point:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:167
+#, no-c-format
+msgid "<![CDATA[@Observable @Role(ADMIN) Event<LoggedIn> LoggedInEvent;}}]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:169
+#, no-c-format
+msgid ""
+"Alternatively, the value of the event binding type member may be determined "
+"dynamically by the event producer. We start by writing an abstract subclass "
+"of <literal>AnnotationLiteral</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:172
+#, no-c-format
+msgid ""
+"<![CDATA[abstract class RoleBinding \n"
+"    extends AnnotationLiteral<Role> \n"
+"    implements Role {}]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:174
+#, no-c-format
+msgid ""
+"The event producer passes an instance of this class to <literal>fire()</"
+"literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:176
+#, no-c-format
+msgid ""
+"<![CDATA[documentEvent.fire( document, new RoleBinding() { public void value"
+"() { return user.getRole(); } } );]]>"
+msgstr ""
+
+#. Tag: title
+#: events.xml:181
+#, no-c-format
+msgid "Multiple event bindings"
+msgstr ""
+
+#. Tag: para
+#: events.xml:183
+#, no-c-format
+msgid "Event binding types may be combined, for example:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:185
+#, no-c-format
+msgid ""
+"<![CDATA[@Observable @Blog Event<Document> blogEvent;\n"
+"...\n"
+"if (document.isBlog()) blogEvent.fire(document, new "
+"AnnotationLiteral<Updated>(){});]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:187
+#, no-c-format
+msgid ""
+"When this event occurs, all of the following observer methods will be "
+"notified:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:189
+#, no-c-format
+msgid ""
+"<![CDATA[public void afterBlogUpdate(@Observes @Updated @Blog Document "
+"document) { ... }]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:191
+#, no-c-format
+msgid ""
+"<![CDATA[public void onAnyBlogEvent(@Observes @Blog Document document) "
+"{ ... }]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:192
+#, no-c-format
+msgid ""
+"<![CDATA[public void onAnyDocumentEvent(@Observes Document document) "
+"{ ... }}}]]>"
+msgstr ""
+
+#. Tag: title
+#: events.xml:197
+#, no-c-format
+msgid "Transactional observers"
+msgstr ""
+
+#. Tag: para
+#: events.xml:199
+#, no-c-format
+msgid ""
+"Transactional observers receive their event notifications during the before "
+"or after completion phase of the transaction in which the event was raised. "
+"For example, the following observer method needs to refresh a query result "
+"set that is cached in the application context, but only when transactions "
+"that update the <literal>Category</literal> tree succeed:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:205
+#, no-c-format
+msgid ""
+"<![CDATA[public void refreshCategoryTree(@AfterTransactionSuccess @Observes "
+"CategoryUpdateEvent event) { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:207
+#, no-c-format
+msgid "There are three kinds of transactional observers:"
+msgstr ""
+
+#. Tag: para
+#: events.xml:211
+#, no-c-format
+msgid ""
+"<literal>@AfterTransactionSuccess</literal> observers are called during the "
+"after completion phase of the transaction, but only if the transaction "
+"completes successfully"
+msgstr ""
+
+#. Tag: para
+#: events.xml:216
+#, no-c-format
+msgid ""
+"<literal>@AfterTransactionFailure</literal> observers are called during the "
+"after completion phase of the transaction, but only if the transaction fails "
+"to complete successfully"
+msgstr ""
+
+#. Tag: para
+#: events.xml:221
+#, no-c-format
+msgid ""
+"<literal>@AfterTransactionCompletion</literal> observers are called during "
+"the after completion phase of the transaction"
+msgstr ""
+
+#. Tag: para
+#: events.xml:225
+#, no-c-format
+msgid ""
+"<literal>@BeforeTransactionCompletion</literal> observers are called during "
+"the before completion phase of the transaction"
+msgstr ""
+
+#. Tag: para
+#: events.xml:230
+#, no-c-format
+msgid ""
+"Transactional observers are very important in a stateful object model like "
+"Web Beans, because state is often held for longer than a single atomic "
+"transaction."
+msgstr ""
+
+#. Tag: para
+#: events.xml:233
+#, no-c-format
+msgid ""
+"Imagine that we have cached a JPA query result set in the application scope:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:235
+#, no-c-format
+msgid ""
+"<![CDATA[@ApplicationScoped @Singleton\n"
+"public class Catalog {\n"
+"\n"
+"    @PersistenceContext EntityManager em;\n"
+"    \n"
+"    List<Product> products;\n"
+"\n"
+"    @Produces @Catalog \n"
+"    List<Product> getCatalog() {\n"
+"        if (products==null) {\n"
+"            products = em.createQuery(\"select p from Product p where p."
+"deleted = false\")\n"
+"                .getResultList();\n"
+"        }\n"
+"        return products;\n"
+"    }\n"
+"    \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:237
+#, no-c-format
+msgid ""
+"From time to time, a <literal>Product</literal> is created or deleted. When "
+"this occurs, we need to refresh the <literal>Product</literal> catalog. But "
+"we should wait until <emphasis>after</emphasis> the transaction completes "
+"successfully before performing this refresh!"
+msgstr ""
+
+#. Tag: para
+#: events.xml:242
+#, no-c-format
+msgid ""
+"The Web Bean that creates and deletes <literal>Product</literal>s could "
+"raise events, for example:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:245
+#, no-c-format
+msgid ""
+"<![CDATA[@Stateless\n"
+"public class ProductManager {\n"
+"\n"
+"    @PersistenceContext EntityManager em;\n"
+"    @Observable Event<Product> productEvent;\n"
+"\n"
+"    public void delete(Product product) {\n"
+"        em.delete(product);\n"
+"        productEvent.fire(product, new AnnotationLiteral<Deleted>(){});\n"
+"    }\n"
+"    \n"
+"    public void persist(Product product) {\n"
+"        em.persist(product);\n"
+"        productEvent.fire(product, new AnnotationLiteral<Created>(){});\n"
+"    }\n"
+"    \n"
+"    ...\n"
+"    \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:247
+#, no-c-format
+msgid ""
+"And now <literal>Catalog</literal> can observe the events after successful "
+"completion of the transaction:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:250
+#, no-c-format
+msgid ""
+"<![CDATA[@ApplicationScoped @Singleton\n"
+"public class Catalog {\n"
+"\n"
+"    ...\n"
+"    \n"
+"    void addProduct(@AfterTransactionSuccess @Observes @Created Product "
+"product) {\n"
+"        products.add(product);\n"
+"    }\n"
+"    \n"
+"    void addProduct(@AfterTransactionSuccess @Observes @Deleted Product "
+"product) {\n"
+"        products.remove(product);\n"
+"    }\n"
+"    \n"
+"}]]>"
+msgstr ""

Added: doc/trunk/reference/pt-BR/example.po
===================================================================
--- doc/trunk/reference/pt-BR/example.po	                        (rev 0)
+++ doc/trunk/reference/pt-BR/example.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,172 @@
+# Language pt-BR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: example.xml:4
+#, no-c-format
+msgid "JSF web application example"
+msgstr ""
+
+#. Tag: para
+#: example.xml:6
+#, no-c-format
+msgid ""
+"Let's illustrate these ideas with a full example. We're going to implement "
+"user login/logout for an application that uses JSF. First, we'll define a "
+"Web Bean to hold the username and password entered during login:"
+msgstr ""
+
+#. Tag: programlisting
+#: example.xml:11
+#, no-c-format
+msgid ""
+"<![CDATA[@Named @RequestScoped\n"
+"public class Credentials {\n"
+"        \n"
+"    private String username;\n"
+"    private String password;\n"
+"    \n"
+"    public String getUsername() { return username; }\n"
+"    public void setUsername(String username) { this.username = username; }\n"
+"    \n"
+"    public String getPassword() { return password; }\n"
+"    public void setPassword(String password) { this.password = password; }\n"
+"    \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: example.xml:13
+#, no-c-format
+msgid "This Web Bean is bound to the login prompt in the following JSF form:"
+msgstr ""
+
+#. Tag: programlisting
+#: example.xml:15
+#, no-c-format
+msgid ""
+"<![CDATA[<h:form>\n"
+"    <h:panelGrid columns=\"2\" rendered=\"#{!login.loggedIn}\">\n"
+"        <h:outputLabel for=\"username\">Username:</h:outputLabel>\n"
+"        <h:inputText id=\"username\" value=\"#{credentials.username}\"/>\n"
+"        <h:outputLabel for=\"password\">Password:</h:outputLabel>\n"
+"        <h:inputText id=\"password\" value=\"#{credentials.password}\"/>\n"
+"    </h:panelGrid>\n"
+"    <h:commandButton value=\"Login\" action=\"#{login.login}\" rendered=\"#{!"
+"login.loggedIn}\"/>\n"
+"    <h:commandButton value=\"Logout\" acion=\"#{login.logout}\" rendered=\"#"
+"{login.loggedIn}\"/>\n"
+"</h:form>]]>"
+msgstr ""
+
+#. Tag: para
+#: example.xml:17
+#, no-c-format
+msgid ""
+"The actual work is done by a session scoped Web Bean that maintains "
+"information about the currently logged-in user and exposes the "
+"<literal>User</literal> entity to other Web Beans:"
+msgstr ""
+
+#. Tag: programlisting
+#: example.xml:21
+#, no-c-format
+msgid ""
+"<![CDATA[@SessionScoped @Named\n"
+"public class Login {\n"
+"\n"
+"    @Current Credentials credentials;\n"
+"    @PersistenceContext EntityManager userDatabase;\n"
+"\n"
+"    private User user;\n"
+"    \n"
+"    public void login() {\n"
+"            \n"
+"        List<User> results = userDatabase.createQuery(\n"
+"           \"select u from User u where u.username=:username and u.password=:"
+"password\")\n"
+"           .setParameter(\"username\", credentials.getUsername())\n"
+"           .setParameter(\"password\", credentials.getPassword())\n"
+"           .getResultList();\n"
+"        \n"
+"        if ( !results.isEmpty() ) {\n"
+"           user = results.get(0);\n"
+"        }\n"
+"        \n"
+"    }\n"
+"    \n"
+"    public void logout() {\n"
+"        user = null;\n"
+"    }\n"
+"    \n"
+"    public boolean isLoggedIn() {\n"
+"       return user!=null;\n"
+"    }\n"
+"    \n"
+"    @Produces @LoggedIn User getCurrentUser() {\n"
+"        return user;\n"
+"    }\n"
+"\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: example.xml:23
+#, no-c-format
+msgid "Of course, <literal>@LoggedIn</literal> is a binding annotation:"
+msgstr ""
+
+#. Tag: programlisting
+#: example.xml:25
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target({TYPE, METHOD, FIELD})\n"
+"@BindingType\n"
+"public @interface LoggedIn {}]]>"
+msgstr ""
+
+#. Tag: para
+#: example.xml:27
+#, no-c-format
+msgid "Now, any other Web Bean can easily inject the current user:"
+msgstr ""
+
+#. Tag: programlisting
+#: example.xml:29
+#, no-c-format
+msgid ""
+"<![CDATA[public class DocumentEditor {\n"
+"\n"
+"    @Current Document document;\n"
+"    @LoggedIn User currentUser;\n"
+"    @PersistenceContext EntityManager docDatabase;\n"
+"    \n"
+"    public void save() {\n"
+"        document.setCreatedBy(currentUser);\n"
+"        docDatabase.persist(document);\n"
+"    }\n"
+"    \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: example.xml:31
+#, no-c-format
+msgid ""
+"Hopefully, this example gives a flavor of the Web Bean programming model. In "
+"the next chapter, we'll explore Web Beans dependency injection in greater "
+"depth."
+msgstr ""

Added: doc/trunk/reference/pt-BR/extend.po
===================================================================
--- doc/trunk/reference/pt-BR/extend.po	                        (rev 0)
+++ doc/trunk/reference/pt-BR/extend.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,252 @@
+# Language pt-BR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: extend.xml:4
+#, no-c-format
+msgid "Extending Web Beans"
+msgstr ""
+
+#. Tag: para
+#: extend.xml:6
+#, no-c-format
+msgid ""
+"Web Beans is intended to be a platform for frameworks, extensions and "
+"integration with other technologies. Therefore, Web Beans exposes a set of "
+"SPIs for the use of developers of portable extensions to Web Beans. For "
+"example, the following kinds of extensions were envisaged by the designers "
+"of Web Beans:"
+msgstr ""
+
+#. Tag: para
+#: extend.xml:14
+#, no-c-format
+msgid "integration with Business Process Management engines,"
+msgstr ""
+
+#. Tag: para
+#: extend.xml:17
+#, no-c-format
+msgid ""
+"integration with third-party frameworks such as Spring, Seam, GWT or Wicket, "
+"and"
+msgstr ""
+
+#. Tag: para
+#: extend.xml:21
+#, no-c-format
+msgid "new technology based upon the Web Beans programming model."
+msgstr ""
+
+#. Tag: para
+#: extend.xml:25
+#, no-c-format
+msgid ""
+"The nerve center for extending Web Beans is the <literal>Manager</literal> "
+"object."
+msgstr ""
+
+#. Tag: title
+#: extend.xml:29
+#, no-c-format
+msgid "The <literal>Manager</literal> object"
+msgstr ""
+
+#. Tag: para
+#: extend.xml:31
+#, no-c-format
+msgid ""
+"The <literal>Manager</literal> interface lets us register and obtain Web "
+"Beans, interceptors, decorators, observers and contexts programatically."
+msgstr ""
+
+#. Tag: programlisting
+#: extend.xml:34
+#, no-c-format
+msgid ""
+"<![CDATA[public interface Manager\n"
+"{\n"
+"\n"
+"   public <T> Set<Bean<T>> resolveByType(Class<T> type, Annotation... "
+"bindings);\n"
+"\n"
+"   public <T> Set<Bean<T>> resolveByType(TypeLiteral<T> apiType,\n"
+"         Annotation... bindings);\n"
+"\n"
+"   public <T> T getInstanceByType(Class<T> type, Annotation... bindings);\n"
+"\n"
+"   public <T> T getInstanceByType(TypeLiteral<T> type,\n"
+"         Annotation... bindings);\n"
+"\n"
+"   public Set<Bean<?>> resolveByName(String name);\n"
+"\n"
+"   public Object getInstanceByName(String name);\n"
+"\n"
+"   public <T> T getInstance(Bean<T> bean);\n"
+"\n"
+"   public void fireEvent(Object event, Annotation... bindings);\n"
+"\n"
+"   public Context getContext(Class<? extends Annotation> scopeType);\n"
+"\n"
+"   public Manager addContext(Context context);\n"
+"\n"
+"   public Manager addBean(Bean<?> bean);\n"
+"\n"
+"   public Manager addInterceptor(Interceptor interceptor);\n"
+"\n"
+"   public Manager addDecorator(Decorator decorator);\n"
+"\n"
+"   public <T> Manager addObserver(Observer<T> observer, Class<T> eventType,\n"
+"         Annotation... bindings);\n"
+"\n"
+"   public <T> Manager addObserver(Observer<T> observer, TypeLiteral<T> "
+"eventType,\n"
+"         Annotation... bindings);\n"
+"\n"
+"   public <T> Manager removeObserver(Observer<T> observer, Class<T> "
+"eventType,\n"
+"         Annotation... bindings);\n"
+"\n"
+"   public <T> Manager removeObserver(Observer<T> observer,\n"
+"         TypeLiteral<T> eventType, Annotation... bindings);\n"
+"\n"
+"   public <T> Set<Observer<T>> resolveObservers(T event, Annotation... "
+"bindings);\n"
+"\n"
+"   public List<Interceptor> resolveInterceptors(InterceptionType type,\n"
+"         Annotation... interceptorBindings);\n"
+"\n"
+"   public List<Decorator> resolveDecorators(Set<Class<?>> types,\n"
+"         Annotation... bindings);\n"
+"\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: extend.xml:36
+#, no-c-format
+msgid "We can obtain an instance of <literal>Manager</literal> via injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: extend.xml:38
+#, no-c-format
+msgid "@Current Manager manager"
+msgstr ""
+
+#. Tag: title
+#: extend.xml:43
+#, no-c-format
+msgid "The <literal>Bean</literal> class"
+msgstr ""
+
+#. Tag: para
+#: extend.xml:45
+#, no-c-format
+msgid ""
+"Instances of the abstract class <literal>Bean</literal> represent Web Beans. "
+"There is an instance of <literal>Bean</literal> registered with the "
+"<literal>Manager</literal> object for every Web Bean in the application."
+msgstr ""
+
+#. Tag: programlisting
+#: extend.xml:50
+#, no-c-format
+msgid ""
+"public abstract class Bean&lt;T&gt; {\n"
+"    \n"
+"    private final Manager manager;\n"
+"    \n"
+"    protected Bean(Manager manager) {\n"
+"        this.manager=manager;\n"
+"    }\n"
+"    \n"
+"    protected Manager getManager() {\n"
+"        return manager;\n"
+"    }\n"
+"    \n"
+"    public abstract Set&lt;Class&gt; getTypes();\n"
+"    public abstract Set&lt;Annotation&gt; getBindingTypes();\n"
+"    public abstract Class&lt;? extends Annotation&gt; getScopeType();\n"
+"    public abstract Class&lt;? extends Annotation&gt; getDeploymentType(); \n"
+"    public abstract String getName();\n"
+"    \n"
+"    public abstract boolean isSerializable();\n"
+"    public abstract boolean isNullable();\n"
+"\n"
+"    public abstract T create();\n"
+"    public abstract void destroy(T instance);\n"
+"    \n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: extend.xml:52
+#, no-c-format
+msgid ""
+"It's possible to extend the <literal>Bean</literal> class and register "
+"instances by calling <literal>Manager.addBean()</literal> to provide support "
+"for new kinds of Web Beans, beyond those defined by the Web Beans "
+"specification (simple and enterprise Web Beans, producer methods and JMS "
+"endpoints). For example, we could use the <literal>Bean</literal> class to "
+"allow objects managed by another framework to be injected into Web Beans."
+msgstr ""
+
+#. Tag: para
+#: extend.xml:60
+#, no-c-format
+msgid ""
+"There are two subclasses of <literal>Bean</literal> defined by the Web Beans "
+"specification: <literal>Interceptor</literal> and <literal>Decorator</"
+"literal>."
+msgstr ""
+
+#. Tag: title
+#: extend.xml:67
+#, no-c-format
+msgid "The <literal>Context</literal> interface"
+msgstr ""
+
+#. Tag: para
+#: extend.xml:69
+#, no-c-format
+msgid ""
+"The <literal>Context</literal> interface supports addition of new scopes to "
+"Web Beans, or extension of the built-in scopes to new environments."
+msgstr ""
+
+#. Tag: programlisting
+#: extend.xml:72
+#, no-c-format
+msgid ""
+"public interface Context {\n"
+"    \n"
+"    public Class&lt;? extends Annotation&gt; getScopeType();\n"
+"    \n"
+"    public &lt;T&gt; T get(Bean&lt;T&gt; bean, boolean create);\n"
+"    \n"
+"    boolean isActive();\n"
+"    \n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: extend.xml:74
+#, no-c-format
+msgid ""
+"For example, we might implement <literal>Context</literal> to add a business "
+"process scope to Web Beans, or to add support for the conversation scope to "
+"an application that uses Wicket."
+msgstr ""

Added: doc/trunk/reference/pt-BR/injection.po
===================================================================
--- doc/trunk/reference/pt-BR/injection.po	                        (rev 0)
+++ doc/trunk/reference/pt-BR/injection.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,1226 @@
+# Language pt-BR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: injection.xml:4
+#, no-c-format
+msgid "Dependency injection"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:6
+#, no-c-format
+msgid "Web Beans supports three primary mechanisms for dependency injection:"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:8
+#, no-c-format
+msgid "Constructor parameter injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:10
+#, no-c-format
+msgid ""
+"<![CDATA[public class Checkout {\n"
+"        \n"
+"    private final ShoppingCart cart;\n"
+"    \n"
+"    @Initializer\n"
+"    public Checkout(ShoppingCart cart) {\n"
+"        this.cart = cart;\n"
+"    }\n"
+"\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:12
+#, no-c-format
+msgid "<emphasis>Initializer</emphasis> method parameter injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:14
+#, no-c-format
+msgid ""
+"<![CDATA[public class Checkout {\n"
+"        \n"
+"    private ShoppingCart cart;\n"
+"\n"
+"    @Initializer \n"
+"    void setShoppingCart(ShoppingCart cart) {\n"
+"        this.cart = cart;\n"
+"    }\n"
+"    \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:16
+#, no-c-format
+msgid "And direct field injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:18
+#, no-c-format
+msgid ""
+"<![CDATA[public class Checkout {\n"
+"\n"
+"    private @Current ShoppingCart cart;\n"
+"    \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:20
+#, no-c-format
+msgid ""
+"Dependency injection always occurs when the Web Bean instance is first "
+"instantiated."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:25
+#, no-c-format
+msgid ""
+"First, the Web Bean manager calls the Web Bean constructor, to obtain an "
+"instance of the Web Bean."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:29
+#, no-c-format
+msgid ""
+"Next, the Web Bean manager initializes the values of all injected fields of "
+"the Web Bean."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:33
+#, no-c-format
+msgid "Next, the Web Bean manager calls all initializer methods of Web Bean."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:37
+#, no-c-format
+msgid ""
+"Finally, the <literal>@PostConstruct</literal> method of the Web Bean, if "
+"any, is called."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:42
+#, no-c-format
+msgid ""
+"Constructor parameter injection is not supported for EJB beans, since the "
+"EJB is instantiated by the EJB container, not the Web Bean manager."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:45
+#, no-c-format
+msgid ""
+"Parameters of constructors and initializer methods need not be explicitly "
+"annotated when the default binding type <literal>@Current</literal> applies. "
+"Injected fields, however, <emphasis>must</emphasis> specify a binding type, "
+"even when the default binding type applies. If the field does not specify a "
+"binding type, it will not be injected."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:51
+#, no-c-format
+msgid "Producer methods also support parameter injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:53
+#, no-c-format
+msgid ""
+"<![CDATA[@Produces Checkout createCheckout(ShoppingCart cart) {\n"
+"    return new Checkout(cart);\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:55
+#, no-c-format
+msgid ""
+"Finally, observer methods (which we'll meet in <xref linkend=\"events\"/>), "
+"disposal methods and destructor methods all support parameter injection."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:58
+#, no-c-format
+msgid ""
+"The Web Beans specification defines a procedure, called the "
+"<emphasis>typesafe resolution algorithm</emphasis>, that the Web Bean "
+"manager follows when identifying the Web Bean to inject to an injection "
+"point. This algorithm looks complex at first, but once you understand it, "
+"it's really quite intuitive. Typesafe resolution is performed at system "
+"initialization time, which means that the manager will inform the user "
+"immediately if a Web Bean's dependencies cannot be satisfied, by throwing a "
+"<literal>UnsatisfiedDependencyException</literal> or "
+"<literal>AmbiguousDependencyException</literal>."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:67
+#, no-c-format
+msgid ""
+"The purpose of this algorithm is to allow multiple Web Beans to implement "
+"the same API type and either:"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:72
+#, no-c-format
+msgid ""
+"allow the client to select which implementation it requires using "
+"<emphasis>binding annotations</emphasis>,"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:77
+#, no-c-format
+msgid ""
+"allow the application deployer to select which implementation is appropriate "
+"for a particular deployment, without changes to the client, by enabling or "
+"disabling <emphasis>deployment types</emphasis>, or"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:82
+#, no-c-format
+msgid ""
+"allow one implementation of an API to override another implementation of the "
+"same API at deployment time, without changes to the client, using "
+"<emphasis>deployment type precedence</emphasis>."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:88
+#, no-c-format
+msgid ""
+"Let's explore how the Web Beans manager determines a Web Bean to be injected."
+msgstr ""
+
+#. Tag: title
+#: injection.xml:91
+#, no-c-format
+msgid "Binding annotations"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:93
+#, no-c-format
+msgid ""
+"If we have more than one Web Bean that implements a particular API type, the "
+"injection point can specify exactly which Web Bean should be injected using "
+"a binding annotation. For example, there might be two implementations of "
+"<literal>PaymentProcessor</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:98
+#, no-c-format
+msgid ""
+"<![CDATA[@PayByCheque\n"
+"public class ChequePaymentProcessor implements PaymentProcessor {\n"
+"    public void process(Payment payment) { ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:100
+#, no-c-format
+msgid ""
+"<![CDATA[@PayByCreditCard\n"
+"public class CreditCardPaymentProcessor implements PaymentProcessor {\n"
+"    public void process(Payment payment) { ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:102
+#, no-c-format
+msgid ""
+"Where <literal>@PayByCheque</literal> and <literal>@PayByCreditCard</"
+"literal> are binding annotations:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:105
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target({TYPE, METHOD, FIELD, PARAMETER})\n"
+"@BindingType\n"
+"public @interface PayByCheque {}]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:107
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target({TYPE, METHOD, FIELD, PARAMETER})\n"
+"@BindingType\n"
+"public @interface PayByCreditCard {}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:109
+#, no-c-format
+msgid ""
+"A client Web Bean developer uses the binding annotation to specify exactly "
+"which Web Bean should be injected."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:112
+#, no-c-format
+msgid "Using field injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:114
+#, no-c-format
+msgid ""
+"<![CDATA[@PayByCheque PaymentProcessor chequePaymentProcessor;\n"
+"@PayByCreditCard PaymentProcessor creditCardPaymentProcessor;]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:116
+#, no-c-format
+msgid "Using initializer method injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:118
+#, no-c-format
+msgid ""
+"<![CDATA[@Initializer\n"
+"public void setPaymentProcessors(@PayByCheque PaymentProcessor "
+"chequePaymentProcessor, \n"
+"                                 @PayByCreditCard PaymentProcessor "
+"creditCardPaymentProcessor) {\n"
+"   this.chequePaymentProcessor = chequePaymentProcessor;\n"
+"   this.creditCardPaymentProcessor = creditCardPaymentProcessor;\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:120
+#, no-c-format
+msgid "Or using constructor injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:122
+#, no-c-format
+msgid ""
+"<![CDATA[@Initializer\n"
+"public Checkout(@PayByCheque PaymentProcessor chequePaymentProcessor, \n"
+"                @PayByCreditCard PaymentProcessor "
+"creditCardPaymentProcessor) {\n"
+"   this.chequePaymentProcessor = chequePaymentProcessor;\n"
+"   this.creditCardPaymentProcessor = creditCardPaymentProcessor;\n"
+"}]]>"
+msgstr ""
+
+#. Tag: title
+#: injection.xml:125
+#, no-c-format
+msgid "Binding annotations with members"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:127
+#, no-c-format
+msgid "Binding annotations may have members:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:129
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target({TYPE, METHOD, FIELD, PARAMETER})\n"
+"@BindingType\n"
+"public @interface PayBy {\n"
+"    PaymentType value();\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:131
+#, no-c-format
+msgid "In which case, the member value is significant:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:133
+#, no-c-format
+msgid ""
+"<![CDATA[@PayBy(CHEQUE) PaymentProcessor chequePaymentProcessor;\n"
+"@PayBy(CREDIT_CARD) PaymentProcessor creditCardPaymentProcessor;]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:135
+#, no-c-format
+msgid ""
+"You can tell the Web Bean manager to ignore a member of a binding annotation "
+"type by annotating the member <literal>@NonBinding</literal>."
+msgstr ""
+
+#. Tag: title
+#: injection.xml:141
+#, no-c-format
+msgid "Combinations of binding annnotations"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:143
+#, no-c-format
+msgid "An injection point may even specify multiple binding annotations:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:145
+#, no-c-format
+msgid ""
+"<![CDATA[@Asynchronous @PayByCheque PaymentProcessor paymentProcessor]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:147
+#, no-c-format
+msgid ""
+"In this case, only a Web Bean which has <emphasis>both</emphasis> binding "
+"annotations would be eligible for injection."
+msgstr ""
+
+#. Tag: title
+#: injection.xml:153
+#, no-c-format
+msgid "Binding annotations and producer methods"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:155
+#, no-c-format
+msgid "Even producer methods may specify binding annotations:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:157
+#, no-c-format
+msgid ""
+"<![CDATA[@Produces \n"
+"@Asynchronous @PayByCheque \n"
+"PaymentProcessor createAsyncPaymentProcessor(@PayByCheque PaymentProcessor "
+"processor) {\n"
+"    return new AsynchronousPaymentProcessor(processor);\n"
+"}]]>"
+msgstr ""
+
+#. Tag: title
+#: injection.xml:162
+#, no-c-format
+msgid "The default binding type"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:164
+#, no-c-format
+msgid ""
+"Web Beans defines a binding type <literal>@Current</literal> that is the "
+"default binding type for any injection point or Web Bean that does not "
+"explicitly specify a binding type."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:168
+#, no-c-format
+msgid ""
+"There are two common circumstances in which it is necessary to explicitly "
+"specify <literal>@Current</literal>:"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:173
+#, no-c-format
+msgid ""
+"on a field, in order to declare it as an injected field with the default "
+"binding type, and"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:177
+#, no-c-format
+msgid ""
+"on a Web Bean which has another binding type in addition to the default "
+"binding type."
+msgstr ""
+
+#. Tag: title
+#: injection.xml:187
+#, no-c-format
+msgid "Deployment types"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:189
+#, no-c-format
+msgid ""
+"All Web Beans have a <emphasis>deployment type</emphasis>. Each deployment "
+"type identifies a set of Web Beans that should be conditionally installed in "
+"some deployments of the system."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:193
+#, no-c-format
+msgid ""
+"For example, we could define a deployment type named <literal>@Mock</"
+"literal>, which would identify Web Beans that should only be installed when "
+"the system executes inside an integration testing environment:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:197
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"  @Target({TYPE, METHOD})\n"
+"  @DeploymentType\n"
+"  public @interface Mock {}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:199
+#, no-c-format
+msgid ""
+"Suppose we had some Web Bean that interacted with an external system to "
+"process payments:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:202
+#, no-c-format
+msgid ""
+"<![CDATA[public class ExternalPaymentProcessor {\n"
+"        \n"
+"    public void process(Payment p) {\n"
+"        ...\n"
+"    }\n"
+"    \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:204
+#, no-c-format
+msgid ""
+"Since this Web Bean does not explicitly specify a deployment type, it has "
+"the default deployment type <literal>@Production</literal>."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:207
+#, no-c-format
+msgid ""
+"For integration or unit testing, the external system is slow or unavailable. "
+"So we would create a mock object:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:210
+#, no-c-format
+msgid ""
+"<![CDATA[@Mock \n"
+"public class MockPaymentProcessor implements PaymentProcessor {\n"
+"\n"
+"    @Override\n"
+"    public void process(Payment p) {\n"
+"        p.setSuccessful(true);\n"
+"    }\n"
+"\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:212
+#, no-c-format
+msgid ""
+"But how does the Web Bean manager determine which implementation to use in a "
+"particular deployment?"
+msgstr ""
+
+#. Tag: title
+#: injection.xml:216
+#, no-c-format
+msgid "Enabling deployment types"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:218
+#, no-c-format
+msgid ""
+"Web Beans defines two built-in deployment types: <literal>@Production</"
+"literal> and <literal>@Standard</literal>. By default, only Web Beans with "
+"the built-in deployment types are enabled when the system is deployed. We "
+"can identify additional deployment types to be enabled in a particular "
+"deployment by listing them in <literal>web-beans.xml</literal>."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:224
+#, no-c-format
+msgid ""
+"Going back to our example, when we deploy our integration tests, we want all "
+"our <literal>@Mock</literal> objects to be installed:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:227
+#, no-c-format
+msgid ""
+"<![CDATA[<WebBeans>\n"
+"    <Deploy>\n"
+"        <Standard/>\n"
+"        <Production/>\n"
+"        <test:Mock/>\n"
+"    </Deploy>\n"
+"</WebBeans>]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:229
+#, no-c-format
+msgid ""
+"Now the Web Bean manager will identify and install all Web Beans annotated "
+"<literal>@Production</literal>, <literal>@Standard</literal> or "
+"<literal>@Mock</literal> at deployment time."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:233
+#, no-c-format
+msgid ""
+"The deployment type <literal>@Standard</literal> is used only for certain "
+"special Web Beans defined by the Web Beans specification. We can't use it "
+"for our own Web Beans, and we can't disable it."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:237
+#, no-c-format
+msgid ""
+"The deployment type <literal>@Production</literal> is the default deployment "
+"type for Web Beans which don't explicitly declare a deployment type, and may "
+"be disabled."
+msgstr ""
+
+#. Tag: title
+#: injection.xml:244
+#, no-c-format
+msgid "Deployment type precedence"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:246
+#, no-c-format
+msgid ""
+"If you've been paying attention, you're probably wondering how the Web Bean "
+"manager decides which implementation&#151;<literal>ExternalPaymentProcessor</"
+"literal> or <literal>MockPaymentProcessor</literal>&#151;to choose. Consider "
+"what happens when the manager encounters this injection point:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:251
+#, no-c-format
+msgid "<![CDATA[@Current PaymentProcessor paymentProcessor]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:253
+#, no-c-format
+msgid ""
+"There are now two Web Beans which satisfy the <literal>PaymentProcessor</"
+"literal> contract. Of course, we can't use a binding annotation to "
+"disambiguate, since binding annotations are hard-coded into the source at "
+"the injection point, and we want the manager to be able to decide at "
+"deployment time!"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:258
+#, no-c-format
+msgid ""
+"The solution to this problem is that each deployment type has a different "
+"<emphasis>precedence</emphasis>. The precedence of the deployment types is "
+"determined by the order in which they appear in <literal>web-beans.xml</"
+"literal>. In our example, <literal>@Mock</literal> appears later than "
+"<literal>@Production</literal> so it has a higher precedence."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:264
+#, no-c-format
+msgid ""
+"Whenever the manager discovers that more than one Web Bean could satisfy the "
+"contract (API type plus binding annotations) specified by an injection "
+"point, it considers the relative precedence of the Web Beans. If one has a "
+"higher precedence than the others, it chooses the higher precedence Web Bean "
+"to inject. So, in our example, the Web Bean manager will inject "
+"<literal>MockPaymentProcessor</literal> when executing in our integration "
+"testing environment (which is exactly what we want)."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:271
+#, no-c-format
+msgid ""
+"It's interesting to compare this facility to today's popular manager "
+"architectures. Various \"lightweight\" containers also allow conditional "
+"deployment of classes that exist in the classpath, but the classes that are "
+"to be deployed must be explicity, individually, listed in configuration code "
+"or in some XML configuration file. Web Beans does support Web Bean "
+"definition and configuration via XML, but in the common case where no "
+"complex configuration is required, deployment types allow a whole set of Web "
+"Beans to be enabled with a single line of XML. Meanwhile, a developer "
+"browsing the code can easily identify what deployment scenarios the Web Bean "
+"will be used in."
+msgstr ""
+
+#. Tag: title
+#: injection.xml:284
+#, no-c-format
+msgid "Example deployment types"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:286
+#, no-c-format
+msgid ""
+"Deployment types are useful for all kinds of things, here's some examples:"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:290
+#, no-c-format
+msgid ""
+"<literal>@Mock</literal> and <literal>@Staging</literal> deployment types "
+"for testing"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:294
+#, no-c-format
+msgid "<literal>@AustralianTaxLaw</literal> for site-specific Web Beans"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:297
+#, no-c-format
+msgid ""
+"<literal>@SeamFramework</literal>, <literal>@Guice</literal> for third-party "
+"frameworks which build on Web Beans"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:301
+#, no-c-format
+msgid ""
+"<literal>@Standard</literal> for standard Web Beans defined by the Web Beans "
+"specification"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:306
+#, no-c-format
+msgid "I'm sure you can think of more applications..."
+msgstr ""
+
+#. Tag: title
+#: injection.xml:313
+#, no-c-format
+msgid "Fixing unsatisfied dependencies"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:315
+#, no-c-format
+msgid ""
+"The typesafe resolution algorithm fails when, after considering the binding "
+"annotations and and deployment types of all Web Beans that implement the API "
+"type of an injection point, the Web Bean manager is unable to identify "
+"exactly one Web Bean to inject."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:320
+#, no-c-format
+msgid ""
+"It's usually easy to fix an <literal>UnsatisfiedDependencyException</"
+"literal> or <literal>AmbiguousDependencyException</literal>."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:323
+#, no-c-format
+msgid ""
+"To fix an <literal>UnsatisfiedDependencyException</literal>, simply provide "
+"a Web Bean which implements the API type and has the binding types of the "
+"injection point&#151;or enable the deployment type of a Web Bean that "
+"already implements the API type and has the binding types."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:328
+#, no-c-format
+msgid ""
+"To fix an <literal>AmbiguousDependencyException</literal>, introduce a "
+"binding type to distinguish between the two implementations of the API type, "
+"or change the deployment type of one of the implementations so that the Web "
+"Bean manager can use deployment type precedence to choose between them. An "
+"<literal>AmbiguousDependencyException</literal> can only occur if two Web "
+"Beans share a binding type and have exactly the same deployment type."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:335
+#, no-c-format
+msgid ""
+"There's one more issue you need to be aware of when using dependency "
+"injection in Web Beans."
+msgstr ""
+
+#. Tag: title
+#: injection.xml:341
+#, no-c-format
+msgid "Client proxies"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:343
+#, no-c-format
+msgid ""
+"Clients of an injected Web Bean do not usually hold a direct reference to a "
+"Web Bean instance."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:346
+#, no-c-format
+msgid ""
+"Imagine that a Web Bean bound to the application scope held a direct "
+"reference to a Web Bean bound to the request scope. The application scoped "
+"Web Bean is shared between many different requests. However, each request "
+"should see a different instance of the request scoped Web bean!"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:351
+#, no-c-format
+msgid ""
+"Now imagine that a Web Bean bound to the session scope held a direct "
+"reference to a Web Bean bound to the application scope. From time to time, "
+"the session context is serialized to disk in order to use memory more "
+"efficiently. However, the application scoped Web Bean instance should not be "
+"serialized along with the session scoped Web Bean!"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:357
+#, no-c-format
+msgid ""
+"Therefore, unless a Web Bean has the default scope <literal>@Dependent</"
+"literal>, the Web Bean manager must indirect all injected references to the "
+"Web Bean through a proxy object. This <emphasis>client proxy</emphasis> is "
+"responsible for ensuring that the Web Bean instance that receives a method "
+"invocation is the instance that is associated with the current context. The "
+"client proxy also allows Web Beans bound to contexts such as the session "
+"context to be serialized to disk without recursively serializing other "
+"injected Web Beans."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:365
+#, no-c-format
+msgid ""
+"Unfortunately, due to limitations of the Java language, some Java types "
+"cannot be proxied by the Web Bean manager. Therefore, the Web Bean manager "
+"throws an <literal>UnproxyableDependencyException</literal> if the type of "
+"an injection point cannot be proxied."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:370
+#, no-c-format
+msgid "The following Java types cannot be proxied by the Web Bean manager:"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:374
+#, no-c-format
+msgid ""
+"classes which are declared <literal>final</literal> or have a "
+"<literal>final</literal> method,"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:378
+#, no-c-format
+msgid "classes which have no non-private constructor with no parameters, and"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:381
+#, no-c-format
+msgid "arrays and primitive types."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:385
+#, no-c-format
+msgid ""
+"It's usually very easy to fix an <literal>UnproxyableDependencyException</"
+"literal>. Simply add a constructor with no parameters to the injected class, "
+"introduce an interface, or change the scope of the injected Web Bean to "
+"<literal>@Dependent</literal>."
+msgstr ""
+
+#. Tag: title
+#: injection.xml:392
+#, no-c-format
+msgid "Obtaining a Web Bean by programatic lookup"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:394
+#, no-c-format
+msgid ""
+"The application may obtain an instance of the interface <literal>Manager</"
+"literal> by injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:397
+#, no-c-format
+msgid "<![CDATA[@Current Manager manager;]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:399
+#, no-c-format
+msgid ""
+"The <literal>Manager</literal> object provides a set of methods for "
+"obtaining a Web Bean instance programatically."
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:402
+#, no-c-format
+msgid ""
+"<![CDATA[PaymentProcessor p = manager.getInstanceByType(PaymentProcessor."
+"class);]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:404
+#, no-c-format
+msgid ""
+"Binding annotations may be specified by subclassing the helper class "
+"<literal>AnnotationLiteral</literal>, since it is otherwise difficult to "
+"instantiate an annotation type in Java."
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:408
+#, no-c-format
+msgid ""
+"<![CDATA[PaymentProcessor p = manager.getInstanceByType(PaymentProcessor."
+"class, \n"
+"                                               new "
+"AnnotationLiteral<CreditCard>(){});]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:410
+#, no-c-format
+msgid ""
+"If the binding type has an annotation member, we can't use an anonymous "
+"subclass of <literal>AnnotationLiteral</literal>&#151;instead we'll need to "
+"create a named subclass:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:413
+#, no-c-format
+msgid ""
+"<![CDATA[abstract class CreditCardBinding \n"
+"    extends AnnotationLiteral<CreditCard> \n"
+"    implements CreditCard {}]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:415
+#, no-c-format
+msgid ""
+"<![CDATA[PaymentProcessor p = manager.getInstanceByType(PaymentProcessor."
+"class, \n"
+"                                               new CreditCardBinding() { \n"
+"                                                   public void value() "
+"{ return paymentType; } \n"
+"                                               } );]]>"
+msgstr ""
+
+#. Tag: title
+#: injection.xml:419
+#, no-c-format
+msgid ""
+"Lifecycle callbacks, <literal>@Resource</literal>, <literal>@EJB</literal> "
+"and <literal>@PersistenceContext</literal>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:422
+#, no-c-format
+msgid ""
+"Enterprise Web Beans support all the lifecycle callbacks defined by the EJB "
+"specification: <literal>@PostConstruct</literal>, <literal>@PreDestroy</"
+"literal>, <literal>@PrePassivate</literal> and <literal>@PostActivate</"
+"literal>."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:426
+#, no-c-format
+msgid ""
+"Simple Web Beans support only the <literal>@PostConstruct</literal> and "
+"<literal>@PreDestroy</literal> callbacks."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:429
+#, no-c-format
+msgid ""
+"Both enterprise and simple Web Beans support the use of <literal>@Resource</"
+"literal>, <literal>@EJB</literal> and <literal>@PersistenceContext</literal> "
+"for injection of Java EE resources, EJBs and JPA persistence contexts, "
+"respectively. Simple Web Beans do not support the use of "
+"<literal>@PersistenceContext(type=EXTENDED)</literal>."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:434
+#, no-c-format
+msgid ""
+"The <literal>@PostConstruct</literal> callback always occurs after all "
+"dependencies have been injected."
+msgstr ""
+
+#. Tag: title
+#: injection.xml:440
+#, no-c-format
+msgid "The <literal>InjectionPoint</literal> object"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:442
+#, no-c-format
+msgid ""
+"There are certain kinds of dependent objects&#151;Web Beans with scope "
+"<literal>@Dependent</literal>&#151;that need to know something about the "
+"object or injection point into which they are injected in order to be able "
+"to do what they do. For example:"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:448
+#, no-c-format
+msgid ""
+"The log category for a <literal>Logger</literal> depends upon the class of "
+"the object that owns it."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:452
+#, no-c-format
+msgid ""
+"Injection of a HTTP parameter or header value depends upon what parameter or "
+"header name was specified at the injection point."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:456
+#, no-c-format
+msgid ""
+"Injection of the result of an EL expression evaluation depends upon the "
+"expression that was specified at the injection point."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:461
+#, no-c-format
+msgid ""
+"A Web Bean with scope <literal>@Dependent</literal> may inject an instance "
+"of <literal>InjectionPoint</literal> and access metadata relating to the "
+"injection point to which it belongs."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:465
+#, no-c-format
+msgid ""
+"Let's look at an example. The following code is verbose, and vulnerable to "
+"refactoring problems:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:468
+#, no-c-format
+msgid "<![CDATA[Logger log = Logger.getLogger(MyClass.class.getName());]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:470
+#, no-c-format
+msgid ""
+"This clever little producer method lets you inject a JDK <literal>Logger</"
+"literal> without explicitly specifying the log category:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:473
+#, no-c-format
+msgid ""
+"<![CDATA[class LogFactory {\n"
+"\n"
+"   @Produces Logger createLogger(InjectionPoint injectionPoint) { \n"
+"      return Logger.getLogger(injectionPoint.getMember().getDeclaringClass()."
+"getName()); \n"
+"   }\n"
+"\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:475
+#, no-c-format
+msgid "We can now write:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:477
+#, no-c-format
+msgid "<![CDATA[@Current Logger log;]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:479
+#, no-c-format
+msgid ""
+"Not convinced? Then here's a second example. To inject HTTP parameters, we "
+"need to define a binding type:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:482
+#, no-c-format
+msgid ""
+"<![CDATA[@BindingType\n"
+"@Retention(RUNTIME)\n"
+"@Target({TYPE, METHOD, FIELD, PARAMETER})\n"
+"public @interface HttpParam {\n"
+"   @NonBinding public String value();\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:484
+#, no-c-format
+msgid "We would use this binding type at injection points as follows:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:486
+#, no-c-format
+msgid ""
+"<![CDATA[@HttpParam(\"username\") String username;\n"
+"@HttpParam(\"password\") String password;]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:488
+#, no-c-format
+msgid "The following producer method does the work:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:490
+#, no-c-format
+msgid ""
+"<![CDATA[class HttpParams\n"
+"\n"
+"   @Produces @HttpParam(\"\")\n"
+"   String getParamValue(ServletRequest request, InjectionPoint ip) {\n"
+"      return request.getParameter(ip.getAnnotation(HttpParam.class).value"
+"());\n"
+"   }\n"
+"\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:492
+#, no-c-format
+msgid ""
+"(Note that the <literal>value()</literal> member of the <literal>HttpParam</"
+"literal> annotation is ignored by the Web Bean manager since it is annotated "
+"<literal>@NonBinding.</literal>)"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:495
+#, no-c-format
+msgid ""
+"The Web Bean manager provides a built-in Web Bean that implements the "
+"<literal>InjectionPoint</literal> interface:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:498
+#, no-c-format
+msgid ""
+"<![CDATA[public interface InjectionPoint { \n"
+"   public Object getInstance(); \n"
+"   public Bean<?> getBean(); \n"
+"   public Member getMember(): \n"
+"   public <T extends Annotation> T getAnnotation(Class<T> annotation); \n"
+"   public Set<T extends Annotation> getAnnotations(); \n"
+"}]]>"
+msgstr ""

Added: doc/trunk/reference/pt-BR/interceptors.po
===================================================================
--- doc/trunk/reference/pt-BR/interceptors.po	                        (rev 0)
+++ doc/trunk/reference/pt-BR/interceptors.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,572 @@
+# Language pt-BR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: interceptors.xml:4
+#, no-c-format
+msgid "Interceptors"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:6
+#, no-c-format
+msgid ""
+"Web Beans re-uses the basic interceptor architecture of EJB 3.0, extending "
+"the functionality in two directions:"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:11
+#, no-c-format
+msgid "Any Web Bean may have interceptors, not just session beans."
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:14
+#, no-c-format
+msgid ""
+"Web Beans features a more sophisticated annotation-based approach to binding "
+"interceptors to Web Beans."
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:22
+#, no-c-format
+msgid "The EJB specification defines two kinds of interception points:"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:26
+#, no-c-format
+msgid "business method interception, and"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:29
+#, no-c-format
+msgid "lifecycle callback interception."
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:33
+#, no-c-format
+msgid ""
+"A <emphasis>business method interceptor</emphasis> applies to invocations of "
+"methods of the Web Bean by clients of the Web Bean:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:36
+#, no-c-format
+msgid ""
+"<![CDATA[public class TransactionInterceptor {\n"
+"    @AroundInvoke public Object manageTransaction(InvocationContext ctx) "
+"{ ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:38
+#, no-c-format
+msgid ""
+"A <emphasis>lifecycle callback interceptor</emphasis> applies to invocations "
+"of lifecycle callbacks by the container:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:41
+#, no-c-format
+msgid ""
+"<![CDATA[public class DependencyInjectionInterceptor {\n"
+"    @PostConstruct public void injectDependencies(InvocationContext ctx) "
+"{ ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:43
+#, no-c-format
+msgid ""
+"An interceptor class may intercept both lifecycle callbacks and business "
+"methods."
+msgstr ""
+
+#. Tag: title
+#: interceptors.xml:49
+#, no-c-format
+msgid "Interceptor bindings"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:51
+#, no-c-format
+msgid ""
+"Suppose we want to declare that some of our Web Beans are transactional. The "
+"first thing we need is an <emphasis>interceptor binding annotation</"
+"emphasis> to specify exactly which Web Beans we're interested in:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:55
+#, no-c-format
+msgid ""
+"<![CDATA[@InterceptorBindingType\n"
+"@Target({METHOD, TYPE})\n"
+"@Retention(RUNTIME)\n"
+"public @interface Transactional {}]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:57
+#, no-c-format
+msgid ""
+"Now we can easily specify that our <literal>ShoppingCart</literal> is a "
+"transactional object:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:60
+#, no-c-format
+msgid ""
+"<![CDATA[@Transactional\n"
+"public class ShoppingCart { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:62
+#, no-c-format
+msgid "Or, if we prefer, we can specify that just one method is transactional:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:64
+#, no-c-format
+msgid ""
+"<![CDATA[public class ShoppingCart {\n"
+"    @Transactional public void checkout() { ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: title
+#: interceptors.xml:69
+#, no-c-format
+msgid "Implementing interceptors"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:71
+#, no-c-format
+msgid ""
+"That's great, but somewhere along the line we're going to have to actually "
+"implement the interceptor that provides this transaction management aspect. "
+"All we need to do is create a standard EJB interceptor, and annotate it "
+"<literal>@Interceptor</literal> and <literal>@Transactional</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:76
+#, no-c-format
+msgid ""
+"<![CDATA[@Transactional @Interceptor\n"
+"public class TransactionInterceptor {\n"
+"    @AroundInvoke public Object manageTransaction(InvocationContext ctx) "
+"{ ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:78
+#, no-c-format
+msgid ""
+"All Web Beans interceptors are simple Web Beans, and can take advantage of "
+"dependency injection and contextual lifecycle management."
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:81
+#, no-c-format
+msgid ""
+"<![CDATA[@ApplicationScoped @Transactional @Interceptor\n"
+"public class TransactionInterceptor {\n"
+"\n"
+"    @Resource Transaction transaction;\n"
+"\n"
+"    @AroundInvoke public Object manageTransaction(InvocationContext ctx) "
+"{ ... }\n"
+"    \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:83
+#, no-c-format
+msgid "Multiple interceptors may use the same interceptor binding type."
+msgstr ""
+
+#. Tag: title
+#: interceptors.xml:88
+#, no-c-format
+msgid "Enabling interceptors"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:90
+#, no-c-format
+msgid ""
+"Finally, we need to <emphasis>enable</emphasis> our interceptor in "
+"<literal>web-beans.xml</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:93
+#, no-c-format
+msgid ""
+"<![CDATA[<Interceptors>\n"
+"    <tx:TransactionInterceptor/>\n"
+"</Interceptors>]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:95
+#, no-c-format
+msgid "Whoah! Why the angle bracket stew?"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:97
+#, no-c-format
+msgid "Well, the XML declaration solves two problems:"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:101
+#, no-c-format
+msgid ""
+"it enables us to specify a total ordering for all the interceptors in our "
+"system, ensuring deterministic behavior, and"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:105
+#, no-c-format
+msgid "it lets us enable or disable interceptor classes at deployment time."
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:109
+#, no-c-format
+msgid ""
+"For example, we could specify that our security interceptor runs before our "
+"<literal>TransactionInterceptor</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:112
+#, no-c-format
+msgid ""
+"<![CDATA[<Interceptors>\n"
+"    <sx:SecurityInterceptor/>\n"
+"    <tx:TransactionInterceptor/>\n"
+"</Interceptors>]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:114
+#, no-c-format
+msgid "Or we could turn them both off in our test environment!"
+msgstr ""
+
+#. Tag: title
+#: interceptors.xml:119
+#, no-c-format
+msgid "Interceptor bindings with members"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:121
+#, no-c-format
+msgid ""
+"Suppose we want to add some extra information to our "
+"<literal>@Transactional</literal> annotation:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:124
+#, no-c-format
+msgid ""
+"<![CDATA[@InterceptorBindingType\n"
+"@Target({METHOD, TYPE})\n"
+"@Retention(RUNTIME)\n"
+"public @interface Transactional {\n"
+"    boolean requiresNew() default false;\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:126
+#, no-c-format
+msgid ""
+"Web Beans will use the value of <literal>requiresNew</literal> to choose "
+"between two different interceptors, <literal>TransactionInterceptor</"
+"literal> and <literal>RequiresNewTransactionInterceptor</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:130
+#, no-c-format
+msgid ""
+"<![CDATA[@Transactional(requiresNew=true) @Interceptor\n"
+"public class RequiresNewTransactionInterceptor {\n"
+"    @AroundInvoke public Object manageTransaction(InvocationContext ctx) "
+"{ ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:132
+#, no-c-format
+msgid ""
+"Now we can use <literal>RequiresNewTransactionInterceptor</literal> like "
+"this:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:134
+#, no-c-format
+msgid ""
+"<![CDATA[@Transactional(requiresNew=true)\n"
+"public class ShoppingCart { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:136
+#, no-c-format
+msgid ""
+"But what if we only have one interceptor and we want the manager to ignore "
+"the value of <literal>requiresNew</literal> when binding interceptors? We "
+"can use the <literal>@NonBinding</literal> annotation:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:140
+#, no-c-format
+msgid ""
+"<![CDATA[@InterceptorBindingType\n"
+"@Target({METHOD, TYPE})\n"
+"@Retention(RUNTIME)\n"
+"public @interface Secure {\n"
+"    @NonBinding String[] rolesAllowed() default {};\n"
+"}]]>"
+msgstr ""
+
+#. Tag: title
+#: interceptors.xml:145
+#, no-c-format
+msgid "Multiple interceptor binding annotations"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:147
+#, no-c-format
+msgid ""
+"Usually we use combinations of interceptor bindings types to bind multiple "
+"interceptors to a Web Bean. For example, the following declaration would be "
+"used to bind <literal>TransactionInterceptor</literal> and "
+"<literal>SecurityInterceptor</literal> to the same Web Bean:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:152
+#, no-c-format
+msgid ""
+"<![CDATA[@Secure(rolesAllowed=\"admin\") @Transactional\n"
+"public class ShoppingCart { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:154
+#, no-c-format
+msgid ""
+"However, in very complex cases, an interceptor itself may specify some "
+"combination of interceptor binding types:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:157
+#, no-c-format
+msgid ""
+"<![CDATA[@Transactional @Secure @Interceptor\n"
+"public class TransactionalSecureInterceptor { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:159
+#, no-c-format
+msgid ""
+"Then this interceptor could be bound to the <literal>checkout()</literal> "
+"method using any one of the following combinations:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:162
+#, no-c-format
+msgid ""
+"<![CDATA[public class ShoppingCart {\n"
+"    @Transactional @Secure public void checkout() { ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:164
+#, no-c-format
+msgid ""
+"<![CDATA[@Secure\n"
+"public class ShoppingCart {\n"
+"    @Transactional public void checkout() { ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:166
+#, no-c-format
+msgid ""
+"<![CDATA[@Transactionl\n"
+"public class ShoppingCart {\n"
+"    @Secure public void checkout() { ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:168
+#, no-c-format
+msgid ""
+"<![CDATA[@Transactional @Secure\n"
+"public class ShoppingCart {\n"
+"    public void checkout() { ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: title
+#: interceptors.xml:173
+#, no-c-format
+msgid "Interceptor binding type inheritance"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:175
+#, no-c-format
+msgid ""
+"One limitation of the Java language support for annotations is the lack of "
+"annotation inheritance. Really, annotations should have reuse built in, to "
+"allow this kind of thing to work:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:179
+#, no-c-format
+msgid ""
+"<![CDATA[public @interface Action extends Transactional, Secure { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:181
+#, no-c-format
+msgid ""
+"Well, fortunately, Web Beans works around this missing feature of Java. We "
+"may annotate one interceptor binding type with other interceptor binding "
+"types. The interceptor bindings are transitive&#151;any Web Bean with the "
+"first interceptor binding inherits the interceptor bindings declared as meta-"
+"annotations."
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:186
+#, no-c-format
+msgid ""
+"<![CDATA[@Transactional @Secure\n"
+"@InterceptorBindingType\n"
+"@Target(TYPE)\n"
+"@Retention(RUNTIME)\n"
+"public @interface Action { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:188
+#, no-c-format
+msgid ""
+"Any Web Bean annotated <literal>@Action</literal> will be bound to both "
+"<literal>TransactionInterceptor</literal> and <literal>SecurityInterceptor</"
+"literal>. (And even <literal>TransactionalSecureInterceptor</literal>, if it "
+"exists.)"
+msgstr ""
+
+#. Tag: title
+#: interceptors.xml:195
+#, no-c-format
+msgid "Use of <literal>@Interceptors</literal>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:197
+#, no-c-format
+msgid ""
+"The <literal>@Interceptors</literal> annotation defined by the EJB "
+"specification is supported for both enterprise and simple Web Beans, for "
+"example:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:200
+#, no-c-format
+msgid ""
+"<![CDATA[@Interceptors({TransactionInterceptor.class, SecurityInterceptor."
+"class})\n"
+"public class ShoppingCart {\n"
+"    public void checkout() { ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:202
+#, no-c-format
+msgid "However, this approach suffers the following drawbacks:"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:206
+#, no-c-format
+msgid "the interceptor implementation is hardcoded in business code,"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:209
+#, no-c-format
+msgid "interceptors may not be easily disabled at deployment time, and"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:212
+#, no-c-format
+msgid ""
+"the interceptor ordering is non-global&#151;it is determined by the order in "
+"which interceptors are listed at the class level."
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:217
+#, no-c-format
+msgid ""
+"Therefore, we recommend the use of Web Beans-style interceptor bindings."
+msgstr ""

Added: doc/trunk/reference/pt-BR/intro.po
===================================================================
--- doc/trunk/reference/pt-BR/intro.po	                        (rev 0)
+++ doc/trunk/reference/pt-BR/intro.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,1075 @@
+# Language pt-BR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: intro.xml:4
+#, no-c-format
+msgid "Getting started with Web Beans"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: title
+#: intro.xml:13
+#, no-c-format
+msgid "Your first Web Bean"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:15
+#, no-c-format
+msgid ""
+"With certain, very special exceptions, every Java class with a constructor "
+"that accepts no parameters is a Web Bean. That includes every JavaBean. "
+"Furthermore, every EJB 3-style session bean is a Web Bean. Sure, the "
+"JavaBeans and EJBs you've been writing every day have not been able to take "
+"advantage of the new services defined by the Web Beans specification, but "
+"you'll be able to use every one of them as Web Beans&#151;injecting them "
+"into other Web Beans, configuring them via the Web Beans XML configuration "
+"facility, even adding interceptors and decorators to them&#151;without "
+"touching your existing code."
+msgstr ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:29
+#, no-c-format
+msgid ""
+"<![CDATA[public class SentenceParser {\n"
+"    public List<String> parse(String text) { ... }\n"
+"}]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:35
+#, no-c-format
+msgid ""
+"<![CDATA[@Stateless\n"
+"public class SentenceTranslator implements Translator {\n"
+"    public String translate(String sentence) { ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:37
+#, no-c-format
+msgid "Where <literal>Translator</literal> is the local interface:"
+msgstr ""
+
+#. Tag: programlisting
+#: intro.xml:39
+#, no-c-format
+msgid ""
+"<![CDATA[@Local\n"
+"public interface Translator {\n"
+"    public String translate(String sentence);\n"
+"}]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:44
+#, no-c-format
+msgid ""
+"<![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"
+"}]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:49
+#, no-c-format
+msgid ""
+"<![CDATA[@Initializer\n"
+"public setTextTranslator(TextTranslator textTranslator) {\n"
+"    this.textTranslator = textTranslator;\n"
+"}]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:54
+#, no-c-format
+msgid ""
+"<![CDATA[TextTranslator tt = manager.getInstanceByType(TextTranslator."
+"class);]]>"
+msgstr ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: para
+#: intro.xml:68
+#, no-c-format
+msgid ""
+"At system initialization time, the Web Bean manager must validate that "
+"exactly one Web Bean exists which satisfies each injection point. In our "
+"example, if no implementation of <literal>Translator</literal> "
+"available&#151;if the <literal>SentenceTranslator</literal> EJB was not "
+"deployed&#151;the Web Bean manager would throw an "
+"<literal>UnsatisfiedDependencyException</literal>. If more than one "
+"implementation of <literal>Translator</literal> was available, the Web Bean "
+"manager would throw an <literal>AmbiguousDependencyException</literal>."
+msgstr ""
+
+#. Tag: title
+#: intro.xml:80
+#, no-c-format
+msgid "What is a Web Bean?"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:82
+#, no-c-format
+msgid "So what, <emphasis>exactly</emphasis>, is a Web Bean?"
+msgstr ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: para
+#: intro.xml:105
+#, no-c-format
+msgid "the lifecycle of each instance of the Web Bean and"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:108
+#, no-c-format
+msgid ""
+"which clients share a reference to a particular instance of the Web Bean."
+msgstr ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: para
+#: intro.xml:132
+#, no-c-format
+msgid "they interact via well-defined public APIs"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:135
+#, no-c-format
+msgid "their lifecycles are completely decoupled"
+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 ""
+
+#. Tag: para
+#: intro.xml:145
+#, no-c-format
+msgid ""
+"Note that not all clients of a Web Bean are Web Beans. Other objects such as "
+"Servlets or Message-Driven Beans&#151;which are by nature not injectable, "
+"contextual objects&#151;may also obtain references to Web Beans by injection."
+msgstr ""
+
+#. Tag: para
+#: intro.xml:149
+#, no-c-format
+msgid "Enough hand-waving. More formally, according to the spec:"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:153
+#, no-c-format
+msgid "A Web Bean comprises:"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:156
+#, no-c-format
+msgid "A (nonempty) set of API types"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:157
+#, no-c-format
+msgid "A (nonempty) set of binding annotation types"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:158
+#, no-c-format
+msgid "A scope"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:159
+#, no-c-format
+msgid "A deployment type"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:160
+#, no-c-format
+msgid "Optionally, a Web Bean name"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:161
+#, no-c-format
+msgid "A set of interceptor binding types"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:162
+#, no-c-format
+msgid "A Web Bean implementation"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:167
+#, no-c-format
+msgid "Let's see what some of these terms mean, to the Web Bean developer."
+msgstr ""
+
+#. Tag: title
+#: intro.xml:170
+#, no-c-format
+msgid "API types, binding types and dependency injection"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: para
+#: intro.xml:177
+#, no-c-format
+msgid "an API type, together with"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:178
+#, no-c-format
+msgid "a set of binding types."
+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 ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:191
+#, no-c-format
+msgid "<![CDATA[@CreditCard PaymentProcessor paymentProcessor]]>"
+msgstr ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:204
+#, no-c-format
+msgid ""
+"<![CDATA[@CreditCard\n"
+"public class CreditCardPaymentProcessor \n"
+"    implements PaymentProcessor { ... }]]>"
+msgstr ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: title
+#: intro.xml:217
+#, no-c-format
+msgid "Deployment types"
+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 ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:233
+#, no-c-format
+msgid ""
+"<![CDATA[@Mock\n"
+"public class MockSentenceTranslator implements Translator {\n"
+"    public String translate(String sentence) {\n"
+"        return \"Lorem ipsum dolor sit amet\";\n"
+"    }\n"
+"}]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: para
+#: intro.xml:240
+#, no-c-format
+msgid ""
+"We'll talk more about this unique and powerful feature in <xref linkend="
+"\"deploymenttypes\"/>."
+msgstr ""
+
+#. Tag: title
+#: intro.xml:246
+#, no-c-format
+msgid "Scope"
+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 ""
+
+#. Tag: para
+#: intro.xml:254
+#, no-c-format
+msgid ""
+"For example, any web application may have <emphasis>session scoped</"
+"emphasis> Web Beans:"
+msgstr ""
+
+#. Tag: programlisting
+#: intro.xml:257
+#, no-c-format
+msgid ""
+"<![CDATA[@SessionScoped\n"
+"public class ShoppingCart { ... }]]>"
+msgstr ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: para
+#: intro.xml:267
+#, no-c-format
+msgid "We'll talk more about scopes in <xref linkend=\"scopescontexts\"/>."
+msgstr ""
+
+#. Tag: title
+#: intro.xml:272
+#, no-c-format
+msgid "Web Bean names and Unified EL"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:278
+#, no-c-format
+msgid ""
+"<![CDATA[@SessionScoped @Named(\"cart\")\n"
+"public class ShoppingCart { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:280
+#, no-c-format
+msgid "Now we can easily use the Web Bean in any JSF or JSP page:"
+msgstr ""
+
+#. Tag: programlisting
+#: intro.xml:282
+#, no-c-format
+msgid ""
+"<![CDATA[<h:dataTable value=\"#{cart.lineItems}\" var=\"item\">\n"
+"    ....\n"
+"</h:dataTable>]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:287
+#, no-c-format
+msgid ""
+"<![CDATA[@SessionScoped @Named\n"
+"public class ShoppingCart { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:289
+#, no-c-format
+msgid ""
+"In this case, the name defaults to <literal>shoppingCart</literal>&#151;the "
+"unqualified class name, with the first character changed to lowercase."
+msgstr ""
+
+#. Tag: title
+#: intro.xml:295
+#, no-c-format
+msgid "Interceptor binding types"
+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 ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:305
+#, no-c-format
+msgid ""
+"<![CDATA[@SessionScoped \n"
+"@Interceptors(TransactionInterceptor.class)\n"
+"public class ShoppingCart { ... }]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:311
+#, no-c-format
+msgid ""
+"<![CDATA[@SessionScoped @Transactional\n"
+"public class ShoppingCart { ... }]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: title
+#: intro.xml:321
+#, no-c-format
+msgid "What kinds of objects can be Web Beans?"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: title
+#: intro.xml:327
+#, no-c-format
+msgid "Simple Web Beans"
+msgstr ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: para
+#: intro.xml:338
+#, no-c-format
+msgid "it is not a non-static static inner class,"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:341
+#, no-c-format
+msgid "it is not a parameterized type, and"
+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 ""
+
+#. Tag: para
+#: intro.xml:349
+#, no-c-format
+msgid "Thus, almost every JavaBean is a simple Web Bean."
+msgstr ""
+
+#. 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 ""
+
+#. Tag: title
+#: intro.xml:358
+#, no-c-format
+msgid "Enterprise Web Beans"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:360
+#, no-c-format
+msgid ""
+"The specification says that all EJB 3-style session and singleton beans are "
+"<emphasis>enterprise</emphasis> Web Beans. Message driven beans are not Web "
+"Beans&#151;since they are not intended to be injected into other "
+"objects&#151;but they can take advantage of most of the functionality of Web "
+"Beans, including dependency injection and interceptors."
+msgstr ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:378
+#, no-c-format
+msgid ""
+"<![CDATA[@Stateful @SessionScoped\n"
+"public class ShoppingCart {\n"
+"\n"
+"    ...\n"
+"    \n"
+"    @Remove\n"
+"    public void destroy() {}\n"
+"\n"
+"}]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: para
+#: intro.xml:387
+#, no-c-format
+msgid "method-level transaction management and security,"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:390
+#, no-c-format
+msgid "concurrency management,"
+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 ""
+
+#. Tag: para
+#: intro.xml:397
+#, no-c-format
+msgid "remote and web service invocation, and"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:400
+#, no-c-format
+msgid "timers and asynchronous methods,"
+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 ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: title
+#: intro.xml:427
+#, no-c-format
+msgid "Producer methods"
+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 ""
+
+#. Tag: programlisting
+#: intro.xml:435
+#, no-c-format
+msgid ""
+"<![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"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:437
+#, no-c-format
+msgid ""
+"The result of a producer method is injected just like any other Web Bean."
+msgstr ""
+
+#. Tag: programlisting
+#: intro.xml:439
+#, no-c-format
+msgid "<![CDATA[@Random int randomNumber]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: para
+#: intro.xml:445
+#, no-c-format
+msgid "Some producer methods return objects that require explicit destruction:"
+msgstr ""
+
+#. Tag: programlisting
+#: intro.xml:447
+#, no-c-format
+msgid ""
+"<![CDATA[@Produces @RequestScoped Connection connect(User user) {\n"
+"    return createConnection( user.getId(), user.getPassword() );\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:449
+#, no-c-format
+msgid ""
+"These producer methods may define matching <emphasis>disposal methods</"
+"emphasis>:"
+msgstr ""
+
+#. Tag: programlisting
+#: intro.xml:451
+#, no-c-format
+msgid ""
+"<![CDATA[void close(@Disposes Connection connection) {\n"
+"    connection.close();\n"
+"}]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: para
+#: intro.xml:456
+#, no-c-format
+msgid ""
+"We'll talk much more about producer methods in <xref linkend="
+"\"producermethods\"/>."
+msgstr ""
+
+#. Tag: title
+#: intro.xml:461
+#, no-c-format
+msgid "JMS endpoints"
+msgstr ""
+
+#. 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 ""

Added: doc/trunk/reference/pt-BR/master.po
===================================================================
--- doc/trunk/reference/pt-BR/master.po	                        (rev 0)
+++ doc/trunk/reference/pt-BR/master.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,38 @@
+# Language pt-BR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: master.xml:12
+#, no-c-format
+msgid "Using contextual objects"
+msgstr ""
+
+#. Tag: title
+#: master.xml:25
+#, no-c-format
+msgid "Developing loosely-coupled code"
+msgstr ""
+
+#. Tag: title
+#: master.xml:35
+#, no-c-format
+msgid "Making the most of strong typing"
+msgstr ""
+
+#. Tag: title
+#: master.xml:46
+#, no-c-format
+msgid "Web Beans and the Java EE ecosystem"
+msgstr ""

Added: doc/trunk/reference/pt-BR/next.po
===================================================================
--- doc/trunk/reference/pt-BR/next.po	                        (rev 0)
+++ doc/trunk/reference/pt-BR/next.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,49 @@
+# Language pt-BR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: next.xml:4
+#, no-c-format
+msgid "Next steps"
+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 ""
+
+#. 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 ""
+
+#. 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 ""

Added: doc/trunk/reference/pt-BR/part1.po
===================================================================
--- doc/trunk/reference/pt-BR/part1.po	                        (rev 0)
+++ doc/trunk/reference/pt-BR/part1.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,229 @@
+# Language pt-BR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: para
+#: part1.xml:5
+#, no-c-format
+msgid ""
+"The Web Beans (JSR-299) specification defines a set of services for the Java "
+"EE environment that makes applications much easier to develop. Web Beans "
+"layers an enhanced lifecycle and interaction model over existing Java "
+"component types including JavaBeans and Enterprise Java Beans. As a "
+"complement to the traditional Java EE programming model, the Web Beans "
+"services provide:"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:14
+#, no-c-format
+msgid ""
+"an improved lifecycle for stateful components, bound to well-defined "
+"<emphasis>contexts</emphasis>,"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:18
+#, no-c-format
+msgid "a typesafe approach to <emphasis>dependency injection</emphasis>,"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:21
+#, no-c-format
+msgid ""
+"interaction via an <emphasis>event notification</emphasis> facility, and"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:25
+#, no-c-format
+msgid ""
+"a better approach to binding <emphasis>interceptors</emphasis> to "
+"components, along with a new kind of interceptor, called a "
+"<emphasis>decorator</emphasis>, that is more appropriate for use in solving "
+"business problems."
+msgstr ""
+
+#. Tag: para
+#: part1.xml:32
+#, no-c-format
+msgid ""
+"Dependency injection, together with contextual lifecycle management, saves "
+"the user of an unfamiliar API from having to ask and answer the following "
+"questions:"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:38
+#, no-c-format
+msgid "what is the lifecycle of this object?"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:41
+#, no-c-format
+msgid "how many simultaneous clients can it have?"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:44
+#, no-c-format
+msgid "is it multithreaded?"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:47
+#, no-c-format
+msgid "where can I get one from?"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:50
+#, no-c-format
+msgid "do I need to explicitly destroy it?"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:53
+#, no-c-format
+msgid "where should I keep my reference to it when I'm not using it directly?"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:57
+#, no-c-format
+msgid ""
+"how can I add an indirection layer, so that the implementation of this "
+"object can vary at deployment time?"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:61
+#, no-c-format
+msgid "how should I go about sharing this object between other objects?"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:65
+#, no-c-format
+msgid ""
+"A Web Bean specifies only the type and semantics of other Web Beans it "
+"depends upon. It need not be aware of the actual lifecycle, concrete "
+"implementation, threading model or other clients of any Web Bean it depends "
+"upon. Even better, the concrete implementation, lifecycle and threading "
+"model of a Web Bean it depends upon may vary according to the deployment "
+"scenario, without affecting any client."
+msgstr ""
+
+#. Tag: para
+#: part1.xml:72
+#, no-c-format
+msgid ""
+"Events, interceptors and decorators enhance the <emphasis>loose-coupling</"
+"emphasis> that is inherent in this model:"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:77
+#, no-c-format
+msgid ""
+"<emphasis>event notifications</emphasis> decouple event producers from event "
+"consumers,"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:81
+#, no-c-format
+msgid ""
+"<emphasis>interceptors</emphasis> decouple technical concerns from business "
+"logic, and"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:85
+#, no-c-format
+msgid ""
+"<emphasis>decorators</emphasis> allow business concerns to be "
+"compartmentalized."
+msgstr ""
+
+#. Tag: para
+#: part1.xml:90
+#, no-c-format
+msgid ""
+"Most importantly, Web Beans provides all these facilities in a "
+"<emphasis>typesafe</emphasis> way. Web Beans never uses string-based "
+"identifiers to determine how collaborating objects fit together. And XML, "
+"though it remains an option, is rarely used. Instead, Web Beans uses the "
+"typing information that is already available in the Java object model, "
+"together with a new pattern, called <emphasis>binding annotations</"
+"emphasis>, to wire together Web Beans, their dependencies, their "
+"interceptors and decorators and their event consumers."
+msgstr ""
+
+#. Tag: para
+#: part1.xml:100
+#, no-c-format
+msgid ""
+"The Web Beans services are general and apply to the following types of "
+"components that exist in the Java EE environment:"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:105
+#, no-c-format
+msgid "all JavaBeans,"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:108
+#, no-c-format
+msgid "all EJBs, and"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:111
+#, no-c-format
+msgid "all Servlets."
+msgstr ""
+
+#. Tag: para
+#: part1.xml:115
+#, no-c-format
+msgid ""
+"Web Beans even provides the necessary integration points so that other kinds "
+"of components defined by future Java EE specifications or by non-standard "
+"frameworks may be cleanly integrated with Web Beans, take advantage of the "
+"Web Beans services, and interact with any other kind of Web Bean."
+msgstr ""
+
+#. Tag: para
+#: part1.xml:120
+#, no-c-format
+msgid ""
+"Web Beans was influenced by a number of existing Java frameworks, including "
+"Seam, Guice and Spring. However, Web Beans has its own very distinct "
+"character: more typesafe than Seam, more stateful and less XML-centric than "
+"Spring, more web and enterprise-application capable than Guice."
+msgstr ""
+
+#. Tag: para
+#: part1.xml:125
+#, no-c-format
+msgid ""
+"Most importantly, Web Beans is a JCP standard that integrates cleanly with "
+"Java EE, and with any Java SE environment where embeddable EJB Lite is "
+"available."
+msgstr ""

Added: doc/trunk/reference/pt-BR/part2.po
===================================================================
--- doc/trunk/reference/pt-BR/part2.po	                        (rev 0)
+++ doc/trunk/reference/pt-BR/part2.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,102 @@
+# Language pt-BR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. 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 ""
+
+#. Tag: para
+#: part2.xml:10
+#, no-c-format
+msgid ""
+"<emphasis>deployment types</emphasis> enable deployment time polymorphism,"
+msgstr ""
+
+#. Tag: para
+#: part2.xml:14
+#, no-c-format
+msgid "<emphasis>producer methods</emphasis> enable runtime polymorphism, and"
+msgstr ""
+
+#. Tag: para
+#: part2.xml:18
+#, no-c-format
+msgid ""
+"<emphasis>contextual lifecycle management</emphasis> decouples Web Bean "
+"lifecycles."
+msgstr ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: para
+#: part2.xml:34
+#, no-c-format
+msgid ""
+"Web Beans provides three extra important facilities that further the goal of "
+"loose coupling:"
+msgstr ""
+
+#. Tag: para
+#: part2.xml:39
+#, no-c-format
+msgid ""
+"<emphasis>interceptors</emphasis> decouple technical concerns from business "
+"logic,"
+msgstr ""
+
+#. Tag: para
+#: part2.xml:43
+#, no-c-format
+msgid ""
+"<emphasis>decorators</emphasis> may be used to decouple some business "
+"concerns, and"
+msgstr ""
+
+#. Tag: para
+#: part2.xml:47
+#, no-c-format
+msgid ""
+"<emphasis>event notifications</emphasis> decouple event producers from event "
+"consumers."
+msgstr ""
+
+#. Tag: para
+#: part2.xml:52
+#, no-c-format
+msgid "Let's explore interceptors first."
+msgstr ""

Added: doc/trunk/reference/pt-BR/part3.po
===================================================================
--- doc/trunk/reference/pt-BR/part3.po	                        (rev 0)
+++ doc/trunk/reference/pt-BR/part3.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,150 @@
+# Language pt-BR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: para
+#: part3.xml:5
+#, no-c-format
+msgid ""
+"The second major theme of Web Beans is <emphasis>strong typing</emphasis>. "
+"The information about the dependencies, interceptors and decorators of a Web "
+"Bean, and the information about event consumers for an event producer, is "
+"contained in typesafe Java constructs that may be validated by the compiler."
+msgstr ""
+
+#. Tag: para
+#: part3.xml:10
+#, no-c-format
+msgid ""
+"You don't see string-based identifiers in Web Beans code, not because the "
+"framework is hiding them from you using clever defaulting rules&#151;so-"
+"called \"configuration by convention\"&#151;but because there are simply no "
+"strings there to begin with!"
+msgstr ""
+
+#. Tag: para
+#: part3.xml:15
+#, no-c-format
+msgid ""
+"The obvious benefit of this approach is that <emphasis>any</emphasis> IDE "
+"can provide autocompletion, validation and refactoring without the need for "
+"special tooling. But there is a second, less-immediately-obvious, benefit. "
+"It turns out that when you start thinking of identifying objects, events or "
+"interceptors via annotations instead of names, you have an opportunity to "
+"lift the semantic level of your code."
+msgstr ""
+
+#. Tag: para
+#: part3.xml:21
+#, no-c-format
+msgid ""
+"Web Beans encourages you develop annotations that model concepts, for "
+"example,"
+msgstr ""
+
+#. Tag: para
+#: part3.xml:26
+#, no-c-format
+msgid "<literal>@Asynchronous</literal>,"
+msgstr ""
+
+#. Tag: para
+#: part3.xml:29
+#, no-c-format
+msgid "<literal>@Mock</literal>,"
+msgstr ""
+
+#. Tag: para
+#: part3.xml:32
+#, no-c-format
+msgid "<literal>@Secure</literal> or"
+msgstr ""
+
+#. Tag: para
+#: part3.xml:35
+#, no-c-format
+msgid "<literal>@Updated</literal>,"
+msgstr ""
+
+#. Tag: para
+#: part3.xml:39
+#, no-c-format
+msgid "instead of using compound names like"
+msgstr ""
+
+#. Tag: para
+#: part3.xml:43
+#, no-c-format
+msgid "<literal>asyncPaymentProcessor</literal>,"
+msgstr ""
+
+#. Tag: para
+#: part3.xml:46
+#, no-c-format
+msgid "<literal>mockPaymentProcessor</literal>,"
+msgstr ""
+
+#. Tag: para
+#: part3.xml:49
+#, no-c-format
+msgid "<literal>SecurityInterceptor</literal> or"
+msgstr ""
+
+#. Tag: para
+#: part3.xml:52
+#, no-c-format
+msgid "<literal>DocumentUpdatedEvent</literal>."
+msgstr ""
+
+#. Tag: para
+#: part3.xml:56
+#, no-c-format
+msgid ""
+"The annotations are reusable. They help describe common qualities of "
+"disparate parts of the system. They help us categorize and understand our "
+"code. They help us deal with common concerns in a common way. They make our "
+"code more literate and more understandable."
+msgstr ""
+
+#. Tag: para
+#: part3.xml:61
+#, no-c-format
+msgid ""
+"Web Beans <emphasis>stereotypes</emphasis> take this idea a step further. A "
+"stereotype models a common <emphasis>role</emphasis> in your application "
+"architecture. It encapsulates various properties of the role, including "
+"scope, interceptor bindings, deployment type, etc, into a single reusable "
+"package."
+msgstr ""
+
+#. Tag: para
+#: part3.xml:66
+#, no-c-format
+msgid ""
+"Even Web Beans XML metadata is strongly typed! There's no compiler for XML, "
+"so Web Beans takes advantage of XML schemas to validate the Java types and "
+"attributes that appear in XML. This approach turns out to make the XML more "
+"literate, just like annotations made our Java code more literate."
+msgstr ""
+
+#. Tag: para
+#: part3.xml:71
+#, no-c-format
+msgid ""
+"We're now ready to meet some more advanced features of Web Beans. Bear in "
+"mind that these features exist to make our code both easier to validate and "
+"more understandable. Most of the time you don't ever really <emphasis>need</"
+"emphasis> to use these features, but if you use them wisely, you'll come to "
+"appreciate their power."
+msgstr ""

Added: doc/trunk/reference/pt-BR/part4.po
===================================================================
--- doc/trunk/reference/pt-BR/part4.po	                        (rev 0)
+++ doc/trunk/reference/pt-BR/part4.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,52 @@
+# Language pt-BR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: para
+#: part4.xml:5
+#, no-c-format
+msgid ""
+"The third theme of Web Beans is <emphasis>integration</emphasis>. Web Beans "
+"was designed to work in concert with other technologies, helping the "
+"application developer fit the other technologies together. Web Beans is an "
+"open technology. It forms a part of the Java EE ecosystem, and is itself the "
+"foundation for a new ecosystem of portable extensions and integration with "
+"existing frameworks and technologies."
+msgstr ""
+
+#. Tag: para
+#: part4.xml:12
+#, no-c-format
+msgid ""
+"We've already seen how Web Beans helps integrate EJB and JSF, allowing EJBs "
+"to be bound directly to JSF pages. That's just the beginning. Web Beans "
+"offers the same potential to diverse other technologies, such as Business "
+"Process Management engines, other Web Frameworks, and third-party component "
+"models. The Java EE platform will never be able to standardize all the "
+"interesting technologies that are used in the world of Java application "
+"development, but Web Beans makes it easier to use the technologies which are "
+"not yet part of the platform seamlessly within the Java EE environment."
+msgstr ""
+
+#. Tag: para
+#: part4.xml:21
+#, no-c-format
+msgid ""
+"We're about to see how to take full advantage of the Java EE platform in an "
+"application that uses Web Beans. We'll also briefly meet a set of SPIs that "
+"are provided to support portable extensions to Web Beans. You might not ever "
+"need to use these SPIs directly, but it's nice to know they are there if you "
+"need them. Most importantly, you'll take advantage of them indirectly, every "
+"time you use a third-party extension."
+msgstr ""

Added: doc/trunk/reference/pt-BR/producermethods.po
===================================================================
--- doc/trunk/reference/pt-BR/producermethods.po	                        (rev 0)
+++ doc/trunk/reference/pt-BR/producermethods.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,247 @@
+# Language pt-BR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: producermethods.xml:5
+#, no-c-format
+msgid "Producer methods"
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:7
+#, no-c-format
+msgid ""
+"Producer methods let us overcome certain limitations that arise when the Web "
+"Bean manager, instead of the application, is responsible for instantiating "
+"objects. They're also the easiest way to integrate objects which are not Web "
+"Beans into the Web Beans environment. (We'll meet a second approach in <xref "
+"linkend=\"xml\"/>.)"
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:12
+#, no-c-format
+msgid "According to the spec:"
+msgstr ""
+
+#. Tag: chapter
+#: producermethods.xml:12
+#, no-c-format
+msgid ""
+"<blockquote> <para>A Web Beans producer method acts as a source of objects "
+"to be injected, where:</para> <itemizedlist> <listitem> <para>the objects to "
+"be injected are not required to be instances of Web Beans,</para> </"
+"listitem> <listitem> <para>the concrete type of the objects to be injected "
+"may vary at runtime or</para> </listitem> <listitem> <para>the objects "
+"require some custom initialization that is not performed by the Web Bean "
+"constructor</para> </listitem> </itemizedlist> </blockquote> <para>For "
+"example, producer methods let us:</para> <itemizedlist> <listitem> "
+"<para>expose a JPA entity as a Web Bean,</para> </listitem> <listitem> "
+"<para>expose any JDK class as a Web Bean,</para> </listitem> <listitem> "
+"<para>define multiple Web Beans, with different scopes or initialization, "
+"for the same implementation class, or</para> </listitem> <listitem> "
+"<para>vary the implementation of an API type at runtime.</para> </listitem> "
+"</itemizedlist> <para>In particular, producer methods let us use runtime "
+"polymorphism with Web Beans. As we've seen, deployment types are a powerful "
+"solution to the problem of deployment-time polymorphism. But once the system "
+"is deployed, the Web Bean implementation is fixed. A producer method has no "
+"such limitation:</para> <programlisting role=\"JAVA\"><![CDATA"
+"[@SessionScoped\n"
+"public class Preferences {\n"
+"    \n"
+"    private PaymentStrategyType paymentStrategy;\n"
+"    \n"
+"    ...\n"
+"    \n"
+"    @Produces @Preferred \n"
+"    public PaymentStrategy getPaymentStrategy() {\n"
+"        switch (paymentStrategy) {\n"
+"            case CREDIT_CARD: return new CreditCardPaymentStrategy();\n"
+"            case CHEQUE: return new ChequePaymentStrategy();\n"
+"            case PAYPAL: return new PayPalPaymentStrategy();\n"
+"            default: return null;\n"
+"        } \n"
+"    }\n"
+"    \n"
+"}]]></programlisting> <para>Consider an injection point:</para> "
+"<programlisting role=\"JAVA\"><![CDATA[@Preferred PaymentStrategy "
+"paymentStrat;]]></programlisting> <para>This injection point has the same "
+"type and binding annotations as the producer method, so it resolves to the "
+"producer method using the usual Web Beans injection rules. The producer "
+"method will be called by the Web Bean manager to obtain an instance to "
+"service this injection point.</para>."
+msgstr ""
+
+#. Tag: title
+#: producermethods.xml:68
+#, no-c-format
+msgid "Scope of a producer method"
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:70
+#, no-c-format
+msgid ""
+"The scope of the producer method defaults to <literal>@Dependent</literal>, "
+"and so it will be called <emphasis>every time</emphasis> the Web Bean "
+"manager injects this field or any other field that resolves to the same "
+"producer method. Thus, there could be multiple instances of the "
+"<literal>PaymentStrategy</literal> object for each user session."
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:75
+#, no-c-format
+msgid ""
+"To change this behavior, we can add a <literal>@SessionScoped</literal> "
+"annotation to the method."
+msgstr ""
+
+#. Tag: programlisting
+#: producermethods.xml:78
+#, no-c-format
+msgid ""
+"<![CDATA[@Produces @Preferred @SessionScoped\n"
+"public PaymentStrategy getPaymentStrategy() {\n"
+"    ...\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:80
+#, no-c-format
+msgid ""
+"Now, when the producer method is called, the returned "
+"<literal>PaymentStrategy</literal> will be bound to the session context. The "
+"producer method won't be called again in the same session."
+msgstr ""
+
+#. Tag: title
+#: producermethods.xml:87
+#, no-c-format
+msgid "Injection into producer methods"
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:89
+#, no-c-format
+msgid ""
+"There's one potential problem with the code above. The implementations of "
+"<literal>CreditCardPaymentStrategy</literal> are instantiated using the Java "
+"<literal>new</literal> operator. Objects instantiated directly by the "
+"application can't take advantage of dependency injection and don't have "
+"interceptors."
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:94
+#, no-c-format
+msgid ""
+"If this isn't what we want we can use dependency injection into the producer "
+"method to obtain Web Bean instances:"
+msgstr ""
+
+#. Tag: programlisting
+#: producermethods.xml:97
+#, no-c-format
+msgid ""
+"<![CDATA[@Produces @Preferred @SessionScoped\n"
+"public PaymentStrategy getPaymentStrategy(CreditCardPaymentStrategy ccps,\n"
+"                                          ChequePaymentStrategy cps,\n"
+"                                          PayPalPaymentStrategy ppps) {\n"
+"    switch (paymentStrategy) {\n"
+"        case CREDIT_CARD: return ccps;\n"
+"        case CHEQUE: return cps;\n"
+"        case PAYPAL: return ppps;\n"
+"        default: return null;\n"
+"    } \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:99
+#, no-c-format
+msgid ""
+"Wait, what if <literal>CreditCardPaymentStrategy</literal> is a request "
+"scoped Web Bean? Then the producer method has the effect of \"promoting\" "
+"the current request scoped instance into session scope. This is almost "
+"certainly a bug! The request scoped object will be destroyed by the Web Bean "
+"manager before the session ends, but the reference to the object will be "
+"left \"hanging\" in the session scope. This error will <emphasis>not</"
+"emphasis> be detected by the Web Bean manager, so please take extra care "
+"when returning Web Bean instances from producer methods!"
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:107
+#, no-c-format
+msgid ""
+"There's at least three ways we could go about fixing this bug. We could "
+"change the scope of the <literal>CreditCardPaymentStrategy</literal> "
+"implementation, but this would affect other clients of that Web Bean. A "
+"better option would be to change the scope of the producer method to "
+"<literal>@Dependent</literal> or <literal>@RequestScoped</literal>."
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:113
+#, no-c-format
+msgid ""
+"But a more common solution is to use the special <literal>@New</literal> "
+"binding annotation."
+msgstr ""
+
+#. Tag: title
+#: producermethods.xml:119
+#, no-c-format
+msgid "Use of <literal>@New</literal> with producer methods"
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:121
+#, no-c-format
+msgid "Consider the following producer method:"
+msgstr ""
+
+#. Tag: programlisting
+#: producermethods.xml:123
+#, no-c-format
+msgid ""
+"<![CDATA[@Produces @Preferred @SessionScoped\n"
+"public PaymentStrategy getPaymentStrategy(@New CreditCardPaymentStrategy "
+"ccps,\n"
+"                                          @New ChequePaymentStrategy cps,\n"
+"                                          @New PayPalPaymentStrategy ppps) "
+"{\n"
+"    switch (paymentStrategy) {\n"
+"        case CREDIT_CARD: return ccps;\n"
+"        case CHEQUE: return cps;\n"
+"        case PAYPAL: return ppps;\n"
+"        default: return null;\n"
+"    } \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:125
+#, no-c-format
+msgid ""
+"Then a new <emphasis>dependent</emphasis> instance of "
+"<literal>CreditCardPaymentStrategy</literal> will be created, passed to the "
+"producer method, returned by the producer method and finally bound to the "
+"session context. The dependent object won't be destroyed until the "
+"<literal>Preferences</literal> object is destroyed, at the end of the "
+"session."
+msgstr ""

Added: doc/trunk/reference/pt-BR/ri-spi.po
===================================================================
--- doc/trunk/reference/pt-BR/ri-spi.po	                        (rev 0)
+++ doc/trunk/reference/pt-BR/ri-spi.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,389 @@
+# Language pt-BR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: ri-spi.xml:4
+#, no-c-format
+msgid "Integrating the Web Beans RI into other environments"
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:6
+#, no-c-format
+msgid ""
+"Currently the Web Beans RI only runs in JBoss AS 5; integrating the RI into "
+"other EE environments (for example another application server like "
+"Glassfish), into a servlet container (like Tomcat), or with an Embedded "
+"EJB3.1 implementation is fairly easy. In this Appendix we will briefly "
+"discuss the steps needed."
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:15
+#, no-c-format
+msgid ""
+"It should be possible to run Web Beans in an SE environment, but you'll to "
+"do more work, adding your own contexts and lifecycle. The Web Beans RI "
+"currently doesn't expose lifecycle extension points, so you would have to "
+"code directly against Web Beans RI classes."
+msgstr ""
+
+#. Tag: title
+#: ri-spi.xml:24
+#, no-c-format
+msgid "The Web Beans RI SPI"
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:26
+#, no-c-format
+msgid ""
+"The Web Beans SPI is located in <literal>webbeans-ri-spi</literal> module, "
+"and packaged as <literal>webbeans-ri-spi.jar</literal>. Some SPIs are "
+"optional, if you need to override the default behavior, others are required."
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:33
+#, no-c-format
+msgid ""
+"You can specify the implementation of an SPI either as a system property, or "
+"in a properties file <literal>META-INF/web-beans-ri.properties</literal>. "
+"All property names are the fully qualified class name of the implemented "
+"interface; all property values are the fully qualified class name of the "
+"implementation class."
+msgstr ""
+
+#. Tag: title
+#: ri-spi.xml:43
+#, no-c-format
+msgid "Web Bean Discovery"
+msgstr ""
+
+#. Tag: programlisting
+#: ri-spi.xml:45
+#, no-c-format
+msgid ""
+"<![CDATA[public interface WebBeanDiscovery {\n"
+"   /**\n"
+"    * Gets list of all classes in classpath archives with web-beans.xml "
+"files\n"
+"    * \n"
+"    * @return An iterable over the classes \n"
+"    */\n"
+"   public Iterable<Class<?>> discoverWebBeanClasses();\n"
+"   \n"
+"   /**\n"
+"    * Gets a list of all web-beans.xml files in the app classpath\n"
+"    * \n"
+"    * @return An iterable over the web-beans.xml files \n"
+"    */\n"
+"   public Iterable<URL> discoverWebBeansXml();\n"
+"   \n"
+"   /**\n"
+"    * Gets a descriptor for each EJB in the application\n"
+"    * \n"
+"    * @return The bean class to descriptor map \n"
+"    */\n"
+"   public Iterable<EjbDescriptor<?>> discoverEjbs();\n"
+"   \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:47
+#, no-c-format
+msgid ""
+"The discovery of Web Bean classes and <literal>web-bean.xml</literal> files "
+"is self-explanatory (the algorithm is described in Section 11.1 of the JSR-"
+"299 specification, and isn't repeated here)."
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:53
+#, no-c-format
+msgid ""
+"The Web Beans RI also delegates EJB3 bean discovery to the container so that "
+"it doesn't have to scan for EJB3 annotations or parse <literal>ejb-jar.xml</"
+"literal>. For each EJB in the application an EJBDescriptor should be "
+"discovered:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri-spi.xml:60
+#, no-c-format
+msgid ""
+"<![CDATA[public interface EjbDescriptor<T> {\n"
+"   \n"
+"   /**\n"
+"    * Gets the EJB type\n"
+"    * \n"
+"    * @return The EJB Bean class\n"
+"    */\n"
+"   public Class<T> getType();\n"
+"\n"
+"   /**\n"
+"    * Gets the local business interfaces of the EJB\n"
+"    * \n"
+"    * @return An iterator over the local business interfaces\n"
+"    */\n"
+"   public Iterable<BusinessInterfaceDescriptor<?>> getLocalBusinessInterfaces"
+"();\n"
+"   \n"
+"   /**\n"
+"    * Gets the remote business interfaces of the EJB\n"
+"    * \n"
+"    * @return An iterator over the remote business interfaces\n"
+"    */\n"
+"   public Iterable<BusinessInterfaceDescriptor<?>> "
+"getRemoteBusinessInterfaces();\n"
+"   \n"
+"   /**\n"
+"    * Get the remove methods of the EJB\n"
+"    * \n"
+"    * @return An iterator over the remove methods\n"
+"    */\n"
+"   public Iterable<Method> getRemoveMethods();\n"
+"\n"
+"   /**\n"
+"    * Indicates if the bean is stateless\n"
+"    * \n"
+"    * @return True if stateless, false otherwise\n"
+"    */\n"
+"   public boolean isStateless();\n"
+"\n"
+"   /**\n"
+"    * Indicates if the bean is a EJB 3.1 Singleton\n"
+"    * \n"
+"    * @return True if the bean is a singleton, false otherwise\n"
+"    */\n"
+"   public boolean isSingleton();\n"
+"\n"
+"   /**\n"
+"    * Indicates if the EJB is stateful\n"
+"    * \n"
+"    * @return True if the bean is stateful, false otherwise\n"
+"    */\n"
+"   public boolean isStateful();\n"
+"\n"
+"   /**\n"
+"    * Indicates if the EJB is and MDB\n"
+"    * \n"
+"    * @return True if the bean is an MDB, false otherwise\n"
+"    */\n"
+"   public boolean isMessageDriven();\n"
+"\n"
+"   /**\n"
+"    * Gets the EJB name\n"
+"    * \n"
+"    * @return The name\n"
+"    */\n"
+"   public String getEjbName();\n"
+"   \n"
+"   /**\n"
+"    * @return The JNDI string which can be used to lookup a proxy which \n"
+"    * implements all local business interfaces \n"
+"    * \n"
+"    */\n"
+"   public String getLocalJndiName();\n"
+"   \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:62
+#, no-c-format
+msgid ""
+"The contract described the JavaDoc is enough to implement an EJBDescriptor. "
+"In addition to these two interfaces, there is "
+"<literal>BusinessInterfaceDescriptor</literal> which represents a local "
+"business interface (encapsulating the interface class and jndi name)."
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:69
+#, no-c-format
+msgid ""
+"The Web Beans RI can be told to load your implementation of "
+"<literal>WebBeanDiscovery</literal> using the property <literal>org.jboss."
+"webbeans.bootstrap.WebBeanDiscovery</literal> with the fully qualified class "
+"name as the value. For example:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri-spi.xml:76
+#, no-c-format
+msgid ""
+"org.jboss.webbeans.bootstrap.spi.WebBeanDiscovery=org.jboss.webbeans."
+"integration.jbossas.WebBeanDiscoveryImpl"
+msgstr ""
+
+#. Tag: title
+#: ri-spi.xml:80
+#, no-c-format
+msgid "JNDI"
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:82
+#, no-c-format
+msgid ""
+"The Web Beans RI implements JNDI binding and lookup according to standards, "
+"however you may want to alter the binding and lookup (for example in an "
+"environment where JNDI isn't available). To do this, implement <literal>org."
+"jboss.webbeans.spi.resources.Naming</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri-spi.xml:90
+#, no-c-format
+msgid ""
+"<![CDATA[public interface Naming extends Serializable {\n"
+"   \n"
+"   /**\n"
+"    * Typed JNDI lookup\n"
+"    * \n"
+"    * @param <T> The type\n"
+"    * @param name The JNDI name\n"
+"    * @param expectedType The expected type\n"
+"    * @return The object\n"
+"    */\n"
+"   public <T> T lookup(String name, Class<? extends T> expectedType);\n"
+"\n"
+"   /**\n"
+"    * Binds an item to JNDI\n"
+"    * \n"
+"    * @param key The key to bind under\n"
+"    * @param value The item to bind\n"
+"    */\n"
+"   public void bind(String key, Object value);\n"
+"   \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:92 ri-spi.xml:113
+#, no-c-format
+msgid "and tell the RI to use it:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri-spi.xml:96
+#, no-c-format
+msgid "org.jboss.webbeans.resources.spi.Naming=com.acme.MyNaming"
+msgstr ""
+
+#. Tag: title
+#: ri-spi.xml:101
+#, no-c-format
+msgid "Resource loading"
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:103
+#, no-c-format
+msgid ""
+"The Web Beans RI needs to load classes and resources from the classpath at "
+"various times. By default, they are loaded from the same classloader that "
+"was used to load the RI, however this may not be correct for some "
+"environments. If this is case, you can implement <literal>org.jboss.webbeans."
+"spi.ResourceLoader</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri-spi.xml:111
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"         public interface ResourceLoader {\n"
+"    \n"
+"   /**\n"
+"    * Creates a class from a given FQCN\n"
+"    * \n"
+"    * @param name The name of the clsas\n"
+"    * @return The class\n"
+"    */\n"
+"   public Class<?> classForName(String name);\n"
+"   \n"
+"   /**\n"
+"    * Gets a resource as a URL by name\n"
+"    * \n"
+"    * @param name The name of the resource\n"
+"    * @return An URL to the resource\n"
+"    */\n"
+"   public URL getResource(String name);\n"
+"   \n"
+"   /**\n"
+"    * Gets resources as URLs by name\n"
+"    * \n"
+"    * @param name The name of the resource\n"
+"    * @return An iterable reference to the URLS\n"
+"    */\n"
+"   public Iterable<URL> getResources(String name);\n"
+"   \n"
+"}\n"
+"         ]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: ri-spi.xml:117
+#, no-c-format
+msgid "org.jboss.webbeans.resources.spi.ResourceLoader=com.acme.ResourceLoader"
+msgstr ""
+
+#. Tag: title
+#: ri-spi.xml:124
+#, no-c-format
+msgid "The contract with the container"
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:126
+#, no-c-format
+msgid ""
+"There are a number of requirements that the Web Beans RI places on the "
+"container for correct functioning that fall outside implementation of APIs"
+msgstr ""
+
+#. Tag: term
+#: ri-spi.xml:134
+#, no-c-format
+msgid "Classloader isolation"
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:138
+#, no-c-format
+msgid ""
+"If you are integrating the Web Beans into an environment that supports "
+"deployment of applications, you must enable, automatically, or through user "
+"configuation, classloader isolation for each Web Beans application"
+msgstr ""
+
+#. Tag: term
+#: ri-spi.xml:147
+#, no-c-format
+msgid "The <literal>webbeans-ri.jar</literal>"
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:151
+#, no-c-format
+msgid ""
+"If you are integrating the Web Beans into an environment that supports "
+"deployment of applications, you must insert the <literal>webbeans-ri.jar</"
+"literal> into the applications isolated classloader. It cannot be loaded "
+"from a shared classloader."
+msgstr ""

Added: doc/trunk/reference/pt-BR/ri.po
===================================================================
--- doc/trunk/reference/pt-BR/ri.po	                        (rev 0)
+++ doc/trunk/reference/pt-BR/ri.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,1003 @@
+# Language pt-BR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: ri.xml:4
+#, no-c-format
+msgid "The Web Beans Reference Implementation"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:6
+#, no-c-format
+msgid ""
+"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>."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:13
+#, no-c-format
+msgid ""
+"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:"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:22
+#, no-c-format
+msgid "the latest release of the Web Beans RI,"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:25
+#, no-c-format
+msgid "JBoss AS 5.0.0.GA, and"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:28
+#, no-c-format
+msgid "Ant 1.7.0."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:32
+#, no-c-format
+msgid ""
+"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:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:39
+#, no-c-format
+msgid ""
+"<![CDATA[$ cd /Applications\n"
+"$ unzip ~/jboss-5.0.0.GA.zip]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:41
+#, no-c-format
+msgid ""
+"Next, download the Web Beans RI from <ulink url=\"http://seamframework.org/"
+"Download\">seamframework.org</ulink>, and unzip it. For example"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:47
+#, no-c-format
+msgid ""
+"<![CDATA[$ cd ~/\n"
+"$ unzip ~/webbeans-1.0.0.ALPHA1.zip]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:50
+#, no-c-format
+msgid ""
+"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:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:56
+#, no-c-format
+msgid "jboss.home=/Applications/jboss-5.0.0.GA"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:58
+#, no-c-format
+msgid ""
+"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."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:65
+#, no-c-format
+msgid ""
+"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."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:74
+#, no-c-format
+msgid ""
+"To install the update, you'll need Ant 1.7.0 installed, and the "
+"<literal>ANT_HOME</literal> environment variable set. For example:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:79
+#, no-c-format
+msgid ""
+"$ unzip apache-ant-1.7.0.zip\n"
+"$ export ANT_HOME=~/apache-ant-1.7.0"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:81
+#, no-c-format
+msgid ""
+"Then, you can install the update. The update script will use Maven to "
+"download the Web Beans and EJB3 automatically."
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:86
+#, no-c-format
+msgid ""
+"$ cd webbeans-1.0.0.ALPHA1/jboss-as\n"
+"$ ant update"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:88
+#, no-c-format
+msgid "Now, you're ready to deploy your first example!"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:93
+#, no-c-format
+msgid ""
+"The build scripts for the examples offer a number of targets, these are:"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:99
+#, no-c-format
+msgid "<literal>ant restart</literal> - deploy the example in exploded format"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:105
+#, no-c-format
+msgid ""
+"<literal>ant explode</literal> - update an exploded example, without "
+"restarting the deployment"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:111
+#, no-c-format
+msgid ""
+"<literal>ant deploy</literal> - deploy the example in compressed jar format"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:116
+#, no-c-format
+msgid "<literal>ant undeploy</literal> - remove the example from the server"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:121
+#, no-c-format
+msgid "<literal>ant clean</literal> - clean the example"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:128
+#, no-c-format
+msgid "To deploy the numberguess example:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:132
+#, no-c-format
+msgid ""
+"$ cd examples/numberguess\n"
+"ant deploy"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:134
+#, no-c-format
+msgid ""
+"Wait for the application to deploy, and enjoy hours of fun at <ulink url="
+"\"http://localhost:8080/webbeans-numberguess\"></ulink>!"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:139
+#, no-c-format
+msgid ""
+"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:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:146
+#, no-c-format
+msgid ""
+"$ cd examples/translator\n"
+"ant deploy"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:148
+#, no-c-format
+msgid ""
+"Wait for the application to deploy, and visit <ulink url=\"http://"
+"localhost:8080/webbeans-translator\"></ulink>!"
+msgstr ""
+
+#. Tag: title
+#: ri.xml:154
+#, no-c-format
+msgid "The numberguess example"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:156
+#, no-c-format
+msgid ""
+"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."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:162
+#, no-c-format
+msgid ""
+"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."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:168
+#, no-c-format
+msgid ""
+"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:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:176
+#, no-c-format
+msgid ""
+"<![CDATA[<?xml version='1.0' encoding='UTF-8'?>\n"
+"<faces-config version=\"1.2\"\n"
+"              xmlns=\"http://java.sun.com/xml/ns/javaee\"\n"
+"              xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+"              xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://"
+"java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd\">\n"
+"    \n"
+"    <application>\n"
+"        <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>\n"
+"    </application>\n"
+"\n"
+"</faces-config>]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:178
+#, no-c-format
+msgid ""
+"There is an empty <literal>web-beans.xml</literal> file, which marks this "
+"application as a Web Beans application."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:183
+#, no-c-format
+msgid "Finally there is <literal>web.xml</literal>:"
+msgstr ""
+
+#. Tag: section
+#: ri.xml:185
+#, no-c-format
+msgid ""
+"<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\"?>\n"
+"\n"
+"<web-app version=\"2.5\"\n"
+"    xmlns=\"http://java.sun.com/xml/ns/javaee\"\n"
+"    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+"    xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://java.sun."
+"com/xml/ns/javaee/web-app_2_5.xsd\">\n"
+"   \n"
+"   <display-name>Web Beans Numbergues example</display-name>\n"
+"\n"
+"   <!-- JSF -->\n"
+"\n"
+"   <servlet>\n"
+"      <servlet-name>Faces Servlet</servlet-name>\n"
+"      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>\n"
+"      <load-on-startup>1</load-on-startup>\n"
+"   </servlet>\n"
+"\n"
+"   <servlet-mapping>\n"
+"      <servlet-name>Faces Servlet</servlet-name>\n"
+"      <url-pattern>*.jsf</url-pattern>\n"
+"   </servlet-mapping>\n"
+"   \n"
+"   <context-param>\n"
+"      <param-name>javax.faces.DEFAULT_SUFFIX</param-name>\n"
+"      <param-value>.xhtml</param-value>\n"
+"   </context-param>\n"
+"\n"
+"   <session-config>\n"
+"      <session-timeout>10</session-timeout>\n"
+"   </session-config>\n"
+"   \n"
+"    <listener>\n"
+"       <listener-class>org.jboss.webbeans.servlet.WebBeansListener</listener-"
+"class>\n"
+"    </listener>\n"
+"\n"
+"</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="
+"\"30\"/> <area id=\"submit\" coords=\"33\"/> </areaspec> <programlisting><!"
+"[CDATA[<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" "
+"\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"
+"<html xmlns=\"http://www.w3.org/1999/xhtml\"\n"
+"    xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n"
+"    xmlns:h=\"http://java.sun.com/jsf/html\"\n"
+"    xmlns:f=\"http://java.sun.com/jsf/core\"\n"
+"    xmlns:s=\"http://jboss.com/products/seam/taglib\">\n"
+"\n"
+"  <ui:composition template=\"template.xhtml\">\n"
+"    <ui:define name=\"content\">\n"
+"       <h1>Guess a number...</h1>\n"
+"       <h:form id=\"NumberGuessMain\">\n"
+"          <div style=\"color: red\">\n"
+"             <h:messages id=\"messages\" globalOnly=\"false\"/>\n"
+"             <h:outputText id=\"Higher\" value=\"Higher!\" rendered=\"#{game."
+"number gt game.guess and game.guess ne 0}\"/>\n"
+"             <h:outputText id=\"Lower\" value=\"Lower!\" rendered=\"#{game."
+"number lt game.guess and game.guess ne 0}\"/>\n"
+"          </div>\n"
+"   \n"
+"          <div>\n"
+"             I'm thinking of a number between #{game.smallest} and #{game."
+"biggest}.\n"
+"             You have #{game.remainingGuesses} guesses.\n"
+"          </div>\n"
+"     \n"
+"          <div>\n"
+"             Your guess: \n"
+"             <h:inputText id=\"inputGuess\" \n"
+"                          value=\"#{game.guess}\" \n"
+"                          required=\"true\" \n"
+"                          size=\"3\" \n"
+"                          disabled=\"#{game.number eq game.guess}\">\n"
+"                <f:validateLongRange maximum=\"#{game.biggest}\" \n"
+"                                     minimum=\"#{game.smallest}\"/>\n"
+"             </h:inputText>\n"
+"            <h:commandButton id=\"GuessButton\"  \n"
+"                             value=\"Guess\" \n"
+"                             action=\"#{game.check}\" \n"
+"                             disabled=\"#{game.number eq game.guess}\"/>\n"
+"          </div>\n"
+"          <div>\n"
+"            <h:commandButton id=\"RestartButton\" value=\"Reset\" action=\"#"
+"{game.reset}\" immediate=\"true\" />\n"
+"          </div>\n"
+"       </h:form>\n"
+"    </ui:define>\n"
+"  </ui:composition>\n"
+"</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>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:298
+#, no-c-format
+msgid ""
+"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:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:304
+#, no-c-format
+msgid ""
+"<![CDATA[@Target( { TYPE, METHOD, PARAMETER, FIELD })\n"
+"@Retention(RUNTIME)\n"
+"@Documented\n"
+"@BindingType\n"
+"public @interface Random {}]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:306
+#, no-c-format
+msgid ""
+"There is also the <literal>@MaxNumber</literal> binding type, used for "
+"injecting the maximum number that can be injected:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:311
+#, no-c-format
+msgid ""
+"<![CDATA[@Target( { TYPE, METHOD, PARAMETER, FIELD })\n"
+"@Retention(RUNTIME)\n"
+"@Documented\n"
+"@BindingType\n"
+"public @interface MaxNumber {}\n"
+"]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:313
+#, no-c-format
+msgid ""
+"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:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:319
+#, no-c-format
+msgid ""
+"<![CDATA[@ApplicationScoped\n"
+"public class Generator {\n"
+"   \n"
+"   private java.util.Random random = new java.util.Random( System."
+"currentTimeMillis() );\n"
+"   \n"
+"   private int maxNumber = 100;\n"
+"   \n"
+"   java.util.Random getRandom()\n"
+"   {\n"
+"      return random;\n"
+"   }\n"
+"   \n"
+"   @Produces @Random int next() { \n"
+"      return getRandom().nextInt(maxNumber); \n"
+"   }\n"
+"   \n"
+"   @Produces @MaxNumber int getMaxNumber()\n"
+"   {\n"
+"      return maxNumber;\n"
+"   }\n"
+"\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:321
+#, no-c-format
+msgid ""
+"You'll notice that the <literal>Generator</literal> is application scoped; "
+"therefore we don't get a different random each time."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:326
+#, no-c-format
+msgid ""
+"The final Web Bean in the application is the session scoped <literal>Game</"
+"literal>."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:331
+#, no-c-format
+msgid ""
+"You'll 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>."
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:339
+#, no-c-format
+msgid ""
+"<![CDATA[package org.jboss.webbeans.examples.numberguess;\n"
+"\n"
+"\n"
+"import javax.annotation.PostConstruct;\n"
+"import javax.faces.application.FacesMessage;\n"
+"import javax.faces.context.FacesContext;\n"
+"import javax.webbeans.AnnotationLiteral;\n"
+"import javax.webbeans.Current;\n"
+"import javax.webbeans.Initializer;\n"
+"import javax.webbeans.Named;\n"
+"import javax.webbeans.SessionScoped;\n"
+"import javax.webbeans.manager.Manager;\n"
+"\n"
+"@Named\n"
+"@SessionScoped\n"
+"public class Game\n"
+"{\n"
+"   private int number;\n"
+"   \n"
+"   private int guess;\n"
+"   private int smallest;\n"
+"   private int biggest;\n"
+"   private int remainingGuesses;\n"
+"   \n"
+"   @Current Manager manager;\n"
+"   \n"
+"   public Game()\n"
+"   {\n"
+"   }\n"
+"   \n"
+"   @Initializer\n"
+"   Game(@MaxNumber int maxNumber)\n"
+"   {      \n"
+"      this.biggest = maxNumber;\n"
+"   }\n"
+"\n"
+"   public int getNumber()\n"
+"   {\n"
+"      return number;\n"
+"   }\n"
+"   \n"
+"   public int getGuess()\n"
+"   {\n"
+"      return guess;\n"
+"   }\n"
+"   \n"
+"   public void setGuess(int guess)\n"
+"   {\n"
+"      this.guess = guess;\n"
+"   }\n"
+"   \n"
+"   public int getSmallest()\n"
+"   {\n"
+"      return smallest;\n"
+"   }\n"
+"   \n"
+"   public int getBiggest()\n"
+"   {\n"
+"      return biggest;\n"
+"   }\n"
+"   \n"
+"   public int getRemainingGuesses()\n"
+"   {\n"
+"      return remainingGuesses;\n"
+"   }\n"
+"   \n"
+"   public String check()\n"
+"   {\n"
+"      if (guess>number)\n"
+"      {\n"
+"         biggest = guess - 1;\n"
+"      }\n"
+"      if (guess<number)\n"
+"      {\n"
+"         smallest = guess + 1;\n"
+"      }\n"
+"      if (guess == number)\n"
+"      {\n"
+"         FacesContext.getCurrentInstance().addMessage(null, new FacesMessage"
+"(\"Correct!\"));\n"
+"      }\n"
+"      remainingGuesses--;\n"
+"      return null;\n"
+"   }\n"
+"   \n"
+"   @PostConstruct\n"
+"   public void reset()\n"
+"   {\n"
+"      this.smallest = 0;\n"
+"      this.guess = 0;\n"
+"      this.remainingGuesses = 10;\n"
+"      this.number = manager.getInstanceByType(Integer.class, new "
+"AnnotationLiteral<Random>(){});\n"
+"   }\n"
+"   \n"
+"}]]>"
+msgstr ""
+
+#. Tag: title
+#: ri.xml:343
+#, no-c-format
+msgid "The translator example"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:345
+#, no-c-format
+msgid ""
+"The translator example will take any sentences you enter, and translate them "
+"to Latin."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:350
+#, no-c-format
+msgid ""
+"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."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:357
+#, no-c-format
+msgid ""
+"EJB 3.1 and Jave EE 6 allow you to package EJBs in a war, which will make "
+"this structure much simpler!"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:363
+#, no-c-format
+msgid ""
+"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:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:370
+#, no-c-format
+msgid ""
+"<![CDATA[<plugin>\n"
+"   <groupId>org.apache.maven.plugins</groupId>\n"
+"   <artifactId>maven-ear-plugin</artifactId>\n"
+"   <configuration>\n"
+"      <modules>\n"
+"         <webModule>\n"
+"            <groupId>org.jboss.webbeans.examples.translator</groupId>\n"
+"            <artifactId>webbeans-translator-war</artifactId>\n"
+"            <contextRoot>/webbeans-translator</contextRoot>\n"
+"         </webModule>\n"
+"      </modules>\n"
+"      <jboss>\n"
+"         <loader-repository>webbeans.jboss.org:loader=webbeans-translator</"
+"loader-repository>\n"
+"      </jboss>\n"
+"   </configuration>\n"
+"</plugin>]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:372
+#, no-c-format
+msgid ""
+"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."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:380
+#, no-c-format
+msgid ""
+"If you aren't using Maven to generate these files, you would need "
+"<literal>META-INF/jboss-app.xml</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:385
+#, no-c-format
+msgid ""
+"<![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<!DOCTYPE jboss-app\n"
+"    PUBLIC \"-//JBoss//DTD J2EE Application 4.2//EN\"\n"
+"    \"http://www.jboss.org/j2ee/dtd/jboss-app_4_2.dtd\">\n"
+"<jboss-app>\n"
+"  <loader-repository>webbeans.jboss.org:loader=webbeans-translator</loader-"
+"repository>\n"
+"</jboss-app>]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:387
+#, no-c-format
+msgid "and <literal>META-INF/application.xml</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:391
+#, no-c-format
+msgid ""
+"<![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<application xmlns=\"http://java.sun.com/xml/ns/javaee\" \n"
+"             xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+"             xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://"
+"java.sun.com/xml/ns/javaee/application_5.xsd\"\n"
+"             version=\"5\">\n"
+"  <display-name>webbeans-translator-ear</display-name>\n"
+"  <description>Ear Example for the reference implementation of JSR 299: Web "
+"Beans</description>\n"
+"  \n"
+"  <module>\n"
+"    <web>\n"
+"      <web-uri>webbeans-translator.war</web-uri>\n"
+"      <context-root>/webbeans-translator</context-root>\n"
+"    </web>\n"
+"  </module>\n"
+"  <module>\n"
+"    <ejb>webbeans-translator.jar</ejb>\n"
+"  </module>\n"
+"</application>]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:394
+#, no-c-format
+msgid ""
+"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>."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:401
+#, no-c-format
+msgid ""
+"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):"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:407
+#, no-c-format
+msgid ""
+"<![CDATA[<h:form id=\"NumberGuessMain\">\n"
+"            \n"
+"   <table>\n"
+"      <tr align=\"center\" style=\"font-weight: bold\" >\n"
+"         <td>\n"
+"            Your text\n"
+"         </td>\n"
+"         <td>\n"
+"            Translation\n"
+"         </td>\n"
+"      </tr>\n"
+"      <tr>\n"
+"         <td>\n"
+"            <h:inputTextarea id=\"text\" value=\"#{translator.text}\" "
+"required=\"true\" rows=\"5\" cols=\"80\" />\n"
+"         </td>\n"
+"         <td>\n"
+"            <h:outputText value=\"#{translator.translatedText}\" />\n"
+"         </td>\n"
+"      </tr>\n"
+"   </table>\n"
+"   <div>\n"
+"      <h:commandButton id=\"button\" value=\"Translate\" action=\"#"
+"{translator.translate}\"/>\n"
+"   </div>\n"
+"   \n"
+"</h:form>]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:409
+#, no-c-format
+msgid ""
+"The user can enter some text in the lefthand textarea, and hit the translate "
+"button to see the result to the right."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:414
+#, no-c-format
+msgid ""
+"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:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:426
+#, no-c-format
+msgid ""
+"<![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<ejb-jar xmlns=\"http://java.sun.com/xml/ns/javaee\" \n"
+"         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \n"
+"         xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://java."
+"sun.com/xml/ns/javaee/ejb-jar_3_0.xsd\"\n"
+"         version=\"3.0\">\n"
+"         \n"
+"   <interceptors>\n"
+"     <interceptor>\n"
+"       <interceptor-class>org.jboss.webbeans.ejb.SessionBeanInterceptor</"
+"interceptor-class>\n"
+"     </interceptor>\n"
+"   </interceptors>\n"
+"   \n"
+"   <assembly-descriptor>\n"
+"      <interceptor-binding>\n"
+"         <ejb-name>*</ejb-name>\n"
+"         <interceptor-class>org.jboss.webbeans.ejb.SessionBeanInterceptor</"
+"interceptor-class>\n"
+"      </interceptor-binding>\n"
+"   </assembly-descriptor>\n"
+"   \n"
+"</ejb-jar>]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:428
+#, no-c-format
+msgid ""
+"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."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:438
+#, no-c-format
+msgid ""
+"Both <literal>SentanceParser</literal> and <literal>TextTranslator</literal> "
+"are dependent beans, and <literal>TextTranslator</literal> uses constructor "
+"initialization:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:444
+#, no-c-format
+msgid ""
+"<![CDATA[public class TextTranslator { \n"
+"   private SentenceParser sentenceParser; \n"
+"   private Translator sentenceTranslator; \n"
+"   \n"
+"   @Initializer\n"
+"   TextTranslator(SentenceParser sentenceParser, Translator "
+"sentenceTranslator) \n"
+"   { \n"
+"      this.sentenceParser = sentenceParser; \n"
+"      this.sentenceTranslator = sentenceTranslator;]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:446
+#, no-c-format
+msgid ""
+"<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!"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:452
+#, no-c-format
+msgid ""
+"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."
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:458
+#, no-c-format
+msgid ""
+"<![CDATA[@Stateful\n"
+"@RequestScoped\n"
+"@Named(\"translator\")\n"
+"public class TranslatorControllerBean implements TranslatorController\n"
+"{\n"
+"   \n"
+"   @Current TextTranslator translator;]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:460
+#, no-c-format
+msgid "The bean also has getters and setters for all the fields on the page."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:464
+#, no-c-format
+msgid "As this is a stateful session bean, we have to have a remove method:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:468
+#, no-c-format
+msgid ""
+"<![CDATA[   @Remove\n"
+"   public void remove()\n"
+"   {\n"
+"      \n"
+"   }]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:470
+#, no-c-format
+msgid ""
+"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."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:476
+#, no-c-format
+msgid ""
+"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>."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:482
+#, no-c-format
+msgid ""
+"We need help in all areas - bug fixing, writing new features, writing "
+"examples and translating this reference guide."
+msgstr ""

Added: doc/trunk/reference/pt-BR/scopescontexts.po
===================================================================
--- doc/trunk/reference/pt-BR/scopescontexts.po	                        (rev 0)
+++ doc/trunk/reference/pt-BR/scopescontexts.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,582 @@
+# Language pt-BR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: scopescontexts.xml:4
+#, no-c-format
+msgid "Scopes and contexts"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:6
+#, no-c-format
+msgid ""
+"So far, we've seen a few examples of <emphasis>scope type annotations</"
+"emphasis>. The scope of a Web Bean determines the lifecycle of instances of "
+"the Web Bean. The scope also determines which clients refer to which "
+"instances of the Web Bean. According to the Web Beans specification, a scope "
+"determines:"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:14
+#, no-c-format
+msgid "When a new instance of any Web Bean with that scope is created"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:17
+#, no-c-format
+msgid "When an existing instance of any Web Bean with that scope is destroyed"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:20
+#, no-c-format
+msgid ""
+"Which injected references refer to any instance of a Web Bean with that scope"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:25
+#, no-c-format
+msgid ""
+"For example, if we have a session scoped Web Bean, <literal>CurrentUser</"
+"literal>, all Web Beans that are called in the context of the same "
+"<literal>HttpSession</literal> will see the same instance of "
+"<literal>CurrentUser</literal>. This instance will be automatically created "
+"the first time a <literal>CurrentUser</literal> is needed in that session, "
+"and automatically destroyed when the session ends."
+msgstr ""
+
+#. Tag: title
+#: scopescontexts.xml:32
+#, no-c-format
+msgid "Scope types"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:34
+#, no-c-format
+msgid ""
+"Web Beans features an <emphasis>extensible context model</emphasis>. It is "
+"possible to define new scopes by creating a new scope type annotation:"
+msgstr ""
+
+#. Tag: programlisting
+#: scopescontexts.xml:37
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target({TYPE, METHOD})\n"
+"@ScopeType\n"
+"public @interface ClusterScoped {}]]>"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:39
+#, no-c-format
+msgid ""
+"Of course, that's the easy part of the job. For this scope type to be "
+"useful, we will also need to define a <literal>Context</literal> object that "
+"implements the scope! Implementing a <literal>Context</literal> is usually a "
+"very technical task, intended for framework development only."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:44
+#, no-c-format
+msgid ""
+"We can apply a scope type annotation to a Web Bean implementation class to "
+"specify the scope of the Web Bean:"
+msgstr ""
+
+#. Tag: programlisting
+#: scopescontexts.xml:47
+#, no-c-format
+msgid ""
+"<![CDATA[@ClusterScoped\n"
+"public class SecondLevelCache { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:58
+#, no-c-format
+msgid "Usually, you'll use one of Web Beans' built-in scopes."
+msgstr ""
+
+#. Tag: title
+#: scopescontexts.xml:63
+#, no-c-format
+msgid "Built-in scopes"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:65
+#, no-c-format
+msgid "Web Beans defines four built-in scopes:"
+msgstr ""
+
+#. Tag: literal
+#: scopescontexts.xml:69
+#, no-c-format
+msgid "@RequestScoped"
+msgstr ""
+
+#. Tag: literal
+#: scopescontexts.xml:72
+#, no-c-format
+msgid "@SessionScoped"
+msgstr ""
+
+#. Tag: literal
+#: scopescontexts.xml:75
+#, no-c-format
+msgid "@ApplicationScoped"
+msgstr ""
+
+#. Tag: literal
+#: scopescontexts.xml:78
+#, no-c-format
+msgid "@ConversationScoped"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:82
+#, no-c-format
+msgid "For a web application that uses Web Beans:"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:86
+#, no-c-format
+msgid ""
+"any servlet request has access to active request, session and application "
+"scopes, and, additionally"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:90
+#, no-c-format
+msgid "any JSF request has access to an active conversation scope."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:94
+#, no-c-format
+msgid "The request and application scopes are also active:"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:98
+#, no-c-format
+msgid "during invocations of EJB remote methods,"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:101
+#, no-c-format
+msgid "during EJB timeouts,"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:104
+#, no-c-format
+msgid "during message delivery to a message-driven bean, and"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:107
+#, no-c-format
+msgid "during web service invocations."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:111
+#, no-c-format
+msgid ""
+"If the application tries to invoke a Web Bean with a scope that does not "
+"have an active context, a <literal>ContextNotActiveException</literal> is "
+"thrown by the Web Bean manager at runtime."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:115
+#, no-c-format
+msgid ""
+"Three of the four built-in scopes should be extremely familiar to every Java "
+"EE developer, so let's not waste time discussing them here. One of the "
+"scopes, however, is new."
+msgstr ""
+
+#. Tag: title
+#: scopescontexts.xml:122
+#, no-c-format
+msgid "The conversation scope"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:124
+#, no-c-format
+msgid ""
+"The Web Beans conversation scope is a bit like the traditional session scope "
+"in that it holds state associated with a user of the system, and spans "
+"multiple requests to the server. However, unlike the session scope, the "
+"conversation scope:"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:130
+#, no-c-format
+msgid "is demarcated explicitly by the application, and"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:133
+#, no-c-format
+msgid ""
+"holds state associated with a particular web browser tab in a JSF "
+"application."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:138
+#, no-c-format
+msgid ""
+"A conversation represents a task, a unit of work from the point of view of "
+"the user. The conversation context holds state associated with what the user "
+"is currently working on. If the user is doing multiple things at the same "
+"time, there are multiple conversations."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:143
+#, no-c-format
+msgid ""
+"The conversation context is active during any JSF request. However, most "
+"conversations are destroyed at the end of the request. If a conversation "
+"should hold state across multiple requests, it must be explicitly promoted "
+"to a <emphasis>long-running conversation</emphasis>."
+msgstr ""
+
+#. Tag: title
+#: scopescontexts.xml:149
+#, no-c-format
+msgid "Conversation demarcation"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:151
+#, no-c-format
+msgid ""
+"Web Beans provides a built-in Web Bean for controlling the lifecyle of "
+"conversations in a JSF application. This Web Bean may be obtained by "
+"injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: scopescontexts.xml:154
+#, no-c-format
+msgid "@Current Conversation conversation;"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:156
+#, no-c-format
+msgid ""
+"To promote the conversation associated with the current request to a long-"
+"running conversation, call the <literal>begin()</literal> method from "
+"application code. To schedule the current long-running conversation context "
+"for destruction at the end of the current request, call <literal>end()</"
+"literal>."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:161
+#, no-c-format
+msgid ""
+"In the following example, a conversation-scoped Web Bean controls the "
+"conversation with which it is associated:"
+msgstr ""
+
+#. Tag: programlisting
+#: scopescontexts.xml:164
+#, no-c-format
+msgid ""
+"@ConversationScoped @Stateful\n"
+"public class OrderBuilder {\n"
+"\n"
+"    private Order order;\n"
+"    private @Current Conversation conversation;\n"
+"    private @PersistenceContext(type=EXTENDED) EntityManager em;\n"
+"    \n"
+"    @Produces public Order getOrder() {\n"
+"        return order;\n"
+"    }\n"
+"\n"
+"    public Order createOrder() {\n"
+"        order = new Order();\n"
+"        conversation.begin();\n"
+"        return order;\n"
+"    }\n"
+"    \n"
+"    public void addLineItem(Product product, int quantity) {\n"
+"        order.add( new LineItem(product, quantity) );\n"
+"    }\n"
+"\n"
+"    public void saveOrder(Order order) {\n"
+"        em.persist(order);\n"
+"        conversation.end();\n"
+"    }\n"
+"    \n"
+"    @Remove\n"
+"    public void destroy() {}\n"
+"    \n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:166
+#, no-c-format
+msgid ""
+"This Web Bean is able to control its own lifecycle through use of the "
+"<literal>Conversation</literal> API. But some other Web Beans have a "
+"lifecycle which depends completely upon another object."
+msgstr ""
+
+#. Tag: title
+#: scopescontexts.xml:173
+#, no-c-format
+msgid "Conversation propagation"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:175
+#, no-c-format
+msgid ""
+"The conversation context automatically propagates with any JSF faces request "
+"(JSF form submission). It does not automatically propagate with non-faces "
+"requests, for example, navigation via a link."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:179
+#, no-c-format
+msgid ""
+"We can force the conversation to propagate with a non-faces request by "
+"including the unique identifier of the conversation as a request parameter. "
+"The Web Beans specification reserves the request parameter named "
+"<literal>cid</literal> for this use. The unique identifier of the "
+"conversation may be obtained from the <literal>Conversation</literal> "
+"object, which has the Web Beans name <literal>conversation</literal>."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:186
+#, no-c-format
+msgid "Therefore, the following link propagates the conversation:"
+msgstr ""
+
+#. Tag: programlisting
+#: scopescontexts.xml:188
+#, no-c-format
+msgid ""
+"<![CDATA[<a href=\"/addProduct.jsp?cid=#{conversation.id}\">Add Product</a>]]"
+">"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:190
+#, no-c-format
+msgid ""
+"The Web Bean manager is also required to propagate conversations across any "
+"redirect, even if the conversation is not marked long-running. This makes it "
+"very easy to implement the common POST-then-redirect pattern, without resort "
+"to fragile constructs such as a \"flash\" object. In this case, the Web Bean "
+"manager automatically adds a request parameter to the redirect URL."
+msgstr ""
+
+#. Tag: title
+#: scopescontexts.xml:200
+#, no-c-format
+msgid "Conversation timeout"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:202
+#, no-c-format
+msgid ""
+"The Web Bean manager is permitted to destroy a conversation and all state "
+"held in its context at any time in order to preserve resources. A Web Bean "
+"manager implementation will normally do this on the basis of some kind of "
+"timeout&#151;though this is not required by the Web Beans specification. The "
+"timeout is the period of inactivity before the conversation is destroyed."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:208
+#, no-c-format
+msgid ""
+"The <literal>Conversation</literal> object provides a method to set the "
+"timeout. This is a hint to the Web Bean manager, which is free to ignore the "
+"setting."
+msgstr ""
+
+#. Tag: programlisting
+#: scopescontexts.xml:212
+#, no-c-format
+msgid "conversation.setTimeout(timeoutInMillis);"
+msgstr ""
+
+#. Tag: title
+#: scopescontexts.xml:219
+#, no-c-format
+msgid "The dependent pseudo-scope"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:221
+#, no-c-format
+msgid ""
+"In addition to the four built-in scopes, Web Beans features the so-called "
+"<emphasis>dependent pseudo-scope</emphasis>. This is the default scope for a "
+"Web Bean which does not explicitly declare a scope type."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:225
+#, no-c-format
+msgid ""
+"For example, this Web Bean has the scope type <literal>@Dependent</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: scopescontexts.xml:227
+#, no-c-format
+msgid "<![CDATA[public class Calculator { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:229
+#, no-c-format
+msgid ""
+"When an injection point of a Web Bean resolves to a dependent Web Bean, a "
+"new instance of the dependent Web Bean is created every time the first Web "
+"Bean is instantiated. Instances of dependent Web Beans are never shared "
+"between different Web Beans or different injection points. They are "
+"<emphasis>dependent objects</emphasis> of some other Web Bean instance."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:235
+#, no-c-format
+msgid ""
+"Dependent Web Bean instances are destroyed when the instance they depend "
+"upon is destroyed."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:243
+#, no-c-format
+msgid ""
+"Web Beans makes it easy to obtain a dependent instance of a Java class or "
+"EJB bean, even if the class or EJB bean is already declared as a Web Bean "
+"with some other scope type."
+msgstr ""
+
+#. Tag: title
+#: scopescontexts.xml:248
+#, no-c-format
+msgid "The <literal>@New</literal> annotation"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:250
+#, no-c-format
+msgid ""
+"The built-in <literal>@New</literal> binding annotation allows "
+"<emphasis>implicit</emphasis> definition of a dependent Web Bean at an "
+"injection point. Suppose we declare the following injected field:"
+msgstr ""
+
+#. Tag: programlisting
+#: scopescontexts.xml:254
+#, no-c-format
+msgid "<![CDATA[@New Calculator calculator;]]>"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:256
+#, no-c-format
+msgid ""
+"Then a Web Bean with scope <literal>@Dependent</literal>, binding type "
+"<literal>@New</literal>, API type <literal>Calculator</literal>, "
+"implementation class <literal>Calculator</literal> and deployment type "
+"<literal>@Standard</literal> is implicitly defined."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:261
+#, no-c-format
+msgid ""
+"This is true even if <literal>Calculator</literal> is <emphasis>already</"
+"emphasis> declared with a different scope type, for example:"
+msgstr ""
+
+#. Tag: programlisting
+#: scopescontexts.xml:264
+#, no-c-format
+msgid ""
+"<![CDATA[@ConversationScoped\n"
+"public class Calculator { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:266
+#, no-c-format
+msgid ""
+"So the following injected attributes each get a different instance of "
+"<literal>Calculator</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: scopescontexts.xml:269
+#, no-c-format
+msgid ""
+"<![CDATA[public class PaymentCalc {\n"
+"\n"
+"    @Current Calculator calculator;\n"
+"    @New Calculator newCalculator;\n"
+"\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:271
+#, no-c-format
+msgid ""
+"The <literal>calculator</literal> field has a conversation-scoped instance "
+"of <literal>Calculator</literal> injected. The <literal>newCalculator</"
+"literal> field has a new instance of <literal>Calculator</literal> injected, "
+"with a lifecycle that is bound to the owning <literal>PaymentCalc</literal>."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:276
+#, no-c-format
+msgid ""
+"This feature is particularly useful with producer methods, as we'll see in "
+"the next chapter."
+msgstr ""

Added: doc/trunk/reference/pt-BR/specialization.po
===================================================================
--- doc/trunk/reference/pt-BR/specialization.po	                        (rev 0)
+++ doc/trunk/reference/pt-BR/specialization.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,291 @@
+# Language pt-BR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: specialization.xml:4
+#, no-c-format
+msgid "Specialization"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:6
+#, no-c-format
+msgid ""
+"We've already seen how the Web Beans dependency injection model lets us "
+"<emphasis>override</emphasis> the implementation of an API at deployment "
+"time. For example, the following enterprise Web Bean provides an "
+"implementation of the API <literal>PaymentProcessor</literal> in production:"
+msgstr ""
+
+#. Tag: programlisting
+#: specialization.xml:11
+#, no-c-format
+msgid ""
+"@CreditCard @Stateless\n"
+"public class CreditCardPaymentProcessor \n"
+"        implements PaymentProcessor {\n"
+"    ...\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:13
+#, no-c-format
+msgid ""
+"But in our staging environment, we override that implementation of "
+"<literal>PaymentProcessor</literal> with a different Web Bean:"
+msgstr ""
+
+#. Tag: programlisting
+#: specialization.xml:16
+#, no-c-format
+msgid ""
+"@CreditCard @Stateless @Staging\n"
+"public class StagingCreditCardPaymentProcessor \n"
+"        implements PaymentProcessor {\n"
+"    ...\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:18
+#, no-c-format
+msgid ""
+"What we've tried to do with <literal>StagingCreditCardPaymentProcessor</"
+"literal> is to completely replace <literal>AsyncPaymentProcessor</literal> "
+"in a particular deployment of the system. In that deployment, the deployment "
+"type <literal>@Staging</literal> would have a higher priority than the "
+"default deployment type <literal>@Production</literal>, and therefore "
+"clients with the following injection point:"
+msgstr ""
+
+#. Tag: programlisting
+#: specialization.xml:24
+#, no-c-format
+msgid "@CreditCard PaymentProcessor ccpp"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:26
+#, no-c-format
+msgid ""
+"Would receive an instance of <literal>StagingCreditCardPaymentProcessor</"
+"literal>."
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:28
+#, no-c-format
+msgid "Unfortunately, there are several traps we can easily fall into:"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:32
+#, no-c-format
+msgid ""
+"the higher-priority Web Bean may not implement all the API types of the Web "
+"Bean that it attempts to override,"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:36
+#, no-c-format
+msgid ""
+"the higher-priority Web Bean may not declare all the binding types of the "
+"Web Bean that it attempts to override,"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:40
+#, no-c-format
+msgid ""
+"the higher-priority Web Bean might not have the same name as the Web Bean "
+"that it attempts to override, or"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:44
+#, no-c-format
+msgid ""
+"the Web Bean that it attempts to override might declare a producer method, "
+"disposal method or observer method."
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:49
+#, no-c-format
+msgid ""
+"In each of these cases, the Web Bean that we tried to override could still "
+"be called at runtime. Therefore, overriding is somewhat prone to developer "
+"error."
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:52
+#, no-c-format
+msgid ""
+"Web Beans provides a special feature, called <emphasis>specialization</"
+"emphasis>, that helps the developer avoid these traps. Specialization looks "
+"a little esoteric at first, but it's easy to use in practice, and you'll "
+"really appreciate the extra security it provides."
+msgstr ""
+
+#. Tag: title
+#: specialization.xml:58
+#, no-c-format
+msgid "Using specialization"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:60
+#, no-c-format
+msgid ""
+"Specialization is a feature that is specific to simple and enterprise Web "
+"Beans. To make use of specialization, the higher-priority Web Bean must:"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:65
+#, no-c-format
+msgid "be a direct subclass of the Web Bean it overrides, and"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:68
+#, no-c-format
+msgid ""
+"be a simple Web Bean if the Web Bean it overrides is a simple Web Bean or an "
+"enterprise Web Bean if the Web Bean it overrides is an enterprise Web Bean, "
+"and"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:73
+#, no-c-format
+msgid "be annotated <literal>@Specializes</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: specialization.xml:77
+#, no-c-format
+msgid ""
+"@Stateless @Staging @Specializes\n"
+"public class StagingCreditCardPaymentProcessor \n"
+"        extends CreditCardPaymentProcessor {\n"
+"    ...\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:79
+#, no-c-format
+msgid ""
+"We say that the higher-priority Web Bean <emphasis>specializes</emphasis> "
+"its superclass."
+msgstr ""
+
+#. Tag: title
+#: specialization.xml:85
+#, no-c-format
+msgid "Advantages of specialization"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:87
+#, no-c-format
+msgid "When specialization is used:"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:91
+#, no-c-format
+msgid ""
+"the binding types of the superclass are automatically inherited by the Web "
+"Bean annotated <literal>@Specializes</literal>, and"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:95
+#, no-c-format
+msgid ""
+"the Web Bean name of the superclass is automatically inherited by the Web "
+"Bean annotated <literal>@Specializes</literal>, and"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:99
+#, no-c-format
+msgid ""
+"producer methods, disposal methods and observer methods declared by the "
+"superclass are called upon an instance of the Web Bean annotated "
+"<literal>@Specializes</literal>."
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:105
+#, no-c-format
+msgid ""
+"In our example, the binding type <literal>@CreditCard</literal> of "
+"<literal>CreditCardPaymentProcessor</literal> is inherited by "
+"<literal>StagingCreditCardPaymentProcessor</literal>."
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:109
+#, no-c-format
+msgid "Furthermore, the Web Bean manager will validate that:"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:113
+#, no-c-format
+msgid ""
+"all API types of the superclass are API types of the Web Bean annotated "
+"<literal>@Specializes</literal> (all local interfaces of the superclass "
+"enterprise bean are also local interfaces of the subclass),"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:119
+#, no-c-format
+msgid ""
+"the deployment type of the Web Bean annotated <literal>@Specializes</"
+"literal> has a higher precedence than the deployment type of the superclass, "
+"and"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:124
+#, no-c-format
+msgid ""
+"there is no other enabled Web Bean that also specializes the superclass."
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:129
+#, no-c-format
+msgid ""
+"If any of these conditions are violated, the Web Bean manager throws an "
+"exception at initialization time."
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:132
+#, no-c-format
+msgid ""
+"Therefore, we can be certain that the superclass will <emphasis>never</"
+"emphasis> be called in any deployment of the system where the Web Bean "
+"annotated <literal>@Specializes</literal> is deployed and enabled."
+msgstr ""

Added: doc/trunk/reference/pt-BR/stereotypes.po
===================================================================
--- doc/trunk/reference/pt-BR/stereotypes.po	                        (rev 0)
+++ doc/trunk/reference/pt-BR/stereotypes.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,352 @@
+# Language pt-BR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: stereotypes.xml:4
+#, no-c-format
+msgid "Stereotypes"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:6
+#, no-c-format
+msgid "According to the Web Beans specification:"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:10
+#, no-c-format
+msgid ""
+"In many systems, use of architectural patterns produces a set of recurring "
+"Web Bean roles. A stereotype allows a framework developer to identify such a "
+"role and declare some common metadata for Web Beans with that role in a "
+"central place."
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:14
+#, no-c-format
+msgid "A stereotype encapsulates any combination of:"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:18
+#, no-c-format
+msgid "a default deployment type,"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:21
+#, no-c-format
+msgid "a default scope type,"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:24
+#, no-c-format
+msgid "a restriction upon the Web Bean scope,"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:27
+#, no-c-format
+msgid "a requirement that the Web Bean implement or extend a certain type, and"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:30
+#, no-c-format
+msgid "a set of interceptor binding annotations."
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:34
+#, no-c-format
+msgid ""
+"A stereotype may also specify that all Web Beans with the stereotype have "
+"defaulted Web Bean names."
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:37
+#, no-c-format
+msgid "A Web Bean may declare zero, one or multiple stereotypes."
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:41
+#, no-c-format
+msgid ""
+"A stereotype is a Java annotation type. This stereotype identifies action "
+"classes in some MVC framework:"
+msgstr ""
+
+#. Tag: programlisting
+#: stereotypes.xml:44
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target(TYPE)\n"
+"@Stereotype\n"
+"public @interface Action {}]]>"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:46
+#, no-c-format
+msgid "We use the stereotype by applying the annotation to a Web Bean."
+msgstr ""
+
+#. Tag: programlisting
+#: stereotypes.xml:48
+#, no-c-format
+msgid ""
+"<![CDATA[@Action \n"
+"public class LoginAction { ... }]]>"
+msgstr ""
+
+#. Tag: title
+#: stereotypes.xml:51
+#, no-c-format
+msgid "Default scope and deployment type for a stereotype"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:53
+#, no-c-format
+msgid ""
+"A stereotype may specify a default scope and/or default deployment type for "
+"Web Beans with that stereotype. For example, if the deployment type "
+"<literal>@WebTier</literal> identifies Web Beans that should only be "
+"deployed when the system executes as a web application, we might specify the "
+"following defaults for action classes:"
+msgstr ""
+
+#. Tag: programlisting
+#: stereotypes.xml:59
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target(TYPE)\n"
+"@RequestScoped\n"
+"@WebTier\n"
+"@Stereotype\n"
+"public @interface Action {}]]>"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:61
+#, no-c-format
+msgid ""
+"Of course, a particular action may still override these defaults if "
+"necessary:"
+msgstr ""
+
+#. Tag: programlisting
+#: stereotypes.xml:64
+#, no-c-format
+msgid ""
+"<![CDATA[@Dependent @Mock @Action \n"
+"public class MockLoginAction { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:66
+#, no-c-format
+msgid ""
+"If we want to force all actions to a particular scope, we can do that too."
+msgstr ""
+
+#. Tag: title
+#: stereotypes.xml:72
+#, no-c-format
+msgid "Restricting scope and type with a stereotype"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:74
+#, no-c-format
+msgid ""
+"Suppose that we wish to prevent actions from declaring certain scopes. Web "
+"Beans lets us explicitly specify the set of allowed scopes for Web Beans "
+"with a certain stereotype. For example:"
+msgstr ""
+
+#. Tag: programlisting
+#: stereotypes.xml:78
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target(TYPE)\n"
+"@RequestScoped\n"
+"@WebTier\n"
+"@Stereotype(supportedScopes=RequestScoped.class)\n"
+"public @interface Action {}]]>"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:80
+#, no-c-format
+msgid ""
+"If a particular action class attempts to specify a scope other than the Web "
+"Beans request scope, an exception will be thrown by the Web Bean manager at "
+"initialization time."
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:84
+#, no-c-format
+msgid ""
+"We can also force all Web Bean with a certain stereotype to implement an "
+"interface or extend a class:"
+msgstr ""
+
+#. Tag: programlisting
+#: stereotypes.xml:87
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target(TYPE)\n"
+"@RequestScoped\n"
+"@WebTier\n"
+"@Stereotype(requiredTypes=AbstractAction.class)\n"
+"public @interface Action {}]]>"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:89
+#, no-c-format
+msgid ""
+"If a particular action class does not extend the class "
+"<literal>AbstractAction</literal>, an exception will be thrown by the Web "
+"Bean manager at initialization time."
+msgstr ""
+
+#. Tag: title
+#: stereotypes.xml:96
+#, no-c-format
+msgid "Interceptor bindings for stereotypes"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:98
+#, no-c-format
+msgid ""
+"A stereotype may specify a set of interceptor bindings to be inherited by "
+"all Web Beans with that stereotype."
+msgstr ""
+
+#. Tag: programlisting
+#: stereotypes.xml:101
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target(TYPE)\n"
+"@RequestScoped\n"
+"@Transactional(requiresNew=true)\n"
+"@Secure\n"
+"@WebTier\n"
+"@Stereotype\n"
+"public @interface Action {}]]>"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:103
+#, no-c-format
+msgid ""
+"This helps us get technical concerns even further away from the business "
+"code!"
+msgstr ""
+
+#. Tag: title
+#: stereotypes.xml:109
+#, no-c-format
+msgid "Name defaulting with stereotypes"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:111
+#, no-c-format
+msgid ""
+"Finally, we can specify that all Web Beans with a certain stereotype have a "
+"Web Bean name, defaulted by the Web Bean manager. Actions are often "
+"referenced in JSP pages, so they're a perfect use case for this feature. All "
+"we need to do is add an empty <literal>@Named</literal> annotation:"
+msgstr ""
+
+#. Tag: programlisting
+#: stereotypes.xml:116
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target(TYPE)\n"
+"@RequestScoped\n"
+"@Transactional(requiresNew=true)\n"
+"@Secure\n"
+"@Named\n"
+"@WebTier\n"
+"@Stereotype\n"
+"public @interface Action {}]]>"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:118
+#, no-c-format
+msgid ""
+"Now, <literal>LoginAction</literal> will have the name <literal>loginAction</"
+"literal>."
+msgstr ""
+
+#. Tag: title
+#: stereotypes.xml:124
+#, no-c-format
+msgid "Standard stereotypes"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:126
+#, no-c-format
+msgid ""
+"We've already met two standard stereotypes defined by the Web Beans "
+"specification: <literal>@Interceptor</literal> and <literal>@Decorator</"
+"literal>."
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:129
+#, no-c-format
+msgid "Web Beans defines one further standard stereotype:"
+msgstr ""
+
+#. Tag: programlisting
+#: stereotypes.xml:131
+#, no-c-format
+msgid ""
+"<![CDATA[@Named \n"
+"@RequestScoped \n"
+"@Stereotype \n"
+"@Target({TYPE, METHOD}) \n"
+"@Retention(RUNTIME) \n"
+"public @interface Model {} ]]>"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:133
+#, no-c-format
+msgid ""
+"This stereotype is intended for use with JSF. Instead of using JSF managed "
+"beans, just annotate a Web Bean <literal>@Model</literal>, and use it "
+"directly in your JSF page."
+msgstr ""

Added: doc/trunk/reference/pt-BR/xml.po
===================================================================
--- doc/trunk/reference/pt-BR/xml.po	                        (rev 0)
+++ doc/trunk/reference/pt-BR/xml.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,352 @@
+# Language pt-BR translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: xml.xml:4
+#, no-c-format
+msgid "Defining Web Beans using XML"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:6
+#, no-c-format
+msgid ""
+"So far, we've seen plenty of examples of Web Beans declared using "
+"annotations. However, there are a couple of occasions when we can't use "
+"annotations to define the Web Bean:"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:12
+#, no-c-format
+msgid "when the implementation class comes from some preexisting library, or"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:15
+#, no-c-format
+msgid ""
+"when there should be multiple Web Beans with the same implementation class."
+msgstr ""
+
+#. Tag: para
+#: xml.xml:20
+#, no-c-format
+msgid "In either of these cases, Web Beans gives us two options:"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:23
+#, no-c-format
+msgid "write a producer method, or"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:24
+#, no-c-format
+msgid "declare the Web Bean using XML."
+msgstr ""
+
+#. Tag: para
+#: xml.xml:27
+#, no-c-format
+msgid ""
+"Many frameworks use XML to provide metadata relating to Java classes. "
+"However, Web Beans uses a very different approach to specifying the names of "
+"Java classes, fields or methods to most other frameworks. Instead of writing "
+"class and member names as the string values of XML elements and attributes, "
+"Web Beans lets you use the class or member name as the name of the XML "
+"element."
+msgstr ""
+
+#. Tag: para
+#: xml.xml:33
+#, no-c-format
+msgid ""
+"The advantage of this approach is that you can write an XML schema that "
+"prevents spelling errors in your XML document. It's even possible for a tool "
+"to generate the XML schema automatically from the compiled Java code. Or, an "
+"integrated development environment could perform the same validation without "
+"the need for the explicit intermediate generation step."
+msgstr ""
+
+#. Tag: title
+#: xml.xml:40
+#, no-c-format
+msgid "Declaring Web Bean classes"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:42
+#, no-c-format
+msgid ""
+"For each Java package, Web Beans defines a corresponding XML namespace. The "
+"namespace is formed by prepending <literal>urn:java:</literal> to the Java "
+"package name. For the package <literal>com.mydomain.myapp</literal>, the XML "
+"namespace is <literal>urn:java:com.mydomain.myapp</literal>."
+msgstr ""
+
+#. Tag: para
+#: xml.xml:47
+#, no-c-format
+msgid ""
+"Java types belonging to a package are referred to using an XML element in "
+"the namespace corresponding to the package. The name of the element is the "
+"name of the Java type. Fields and methods of the type are specified by child "
+"elements in the same namespace. If the type is an annotation, members are "
+"specified by attributes of the element."
+msgstr ""
+
+#. Tag: para
+#: xml.xml:53
+#, no-c-format
+msgid ""
+"For example, the element <literal>&lt;util:Date/&gt;</literal> in the "
+"following XML fragment refers to the class <literal>java.util.Date</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: xml.xml:56
+#, no-c-format
+msgid ""
+"<![CDATA[<WebBeans xmlns=\"urn:java:javax.webbeans\"\n"
+"          xmlns:util=\"urn:java:java.util\">\n"
+"\n"
+"    <util:Date/>\n"
+"\n"
+"</WebBeans>]]>"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:58
+#, no-c-format
+msgid ""
+"And this is all the code we need to declare that <literal>Date</literal> is "
+"a simple Web Bean! An instance of <literal>Date</literal> may now be "
+"injected by any other Web Bean:"
+msgstr ""
+
+#. Tag: programlisting
+#: xml.xml:62
+#, no-c-format
+msgid "<![CDATA[@Current Date date]]>"
+msgstr ""
+
+#. Tag: title
+#: xml.xml:67
+#, no-c-format
+msgid "Declaring Web Bean metadata"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:69
+#, no-c-format
+msgid ""
+"We can declare the scope, deployment type and interceptor binding types "
+"using direct child elements of the Web Bean declaration:"
+msgstr ""
+
+#. Tag: programlisting
+#: xml.xml:72
+#, no-c-format
+msgid ""
+"<![CDATA[<myapp:ShoppingCart>\n"
+"    <SessionScoped/>\n"
+"    <myfwk:Transactional requiresNew=\"true\"/>\n"
+"    <myfwk:Secure/>\n"
+"</myapp:ShoppingCart>]]>"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:74
+#, no-c-format
+msgid "We use exactly the same approach to specify names and binding type:"
+msgstr ""
+
+#. Tag: programlisting
+#: xml.xml:76
+#, no-c-format
+msgid ""
+"<![CDATA[<util:Date>\n"
+"    <Named>currentTime</Named>\n"
+"</util:Date>\n"
+"\n"
+"<util:Date>\n"
+"    <SessionScoped/>\n"
+"    <myapp:Login/>\n"
+"    <Named>loginTime</Named>\n"
+"</util:Date>\n"
+"\n"
+"<util:Date>\n"
+"    <ApplicationScoped/>\n"
+"    <myapp:SystemStart/>\n"
+"    <Named>systemStartTime</Named>\n"
+"</util:Date>]]>"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:78
+#, no-c-format
+msgid ""
+"Where <literal>@Login</literal> and <literal>@SystemStart</literal> are "
+"binding annotations types."
+msgstr ""
+
+#. Tag: programlisting
+#: xml.xml:81
+#, no-c-format
+msgid ""
+"<![CDATA[@Current Date currentTime;\n"
+"@Login Date loginTime;\n"
+"@SystemStart Date systemStartTime;]]>"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:83
+#, no-c-format
+msgid "As usual, a Web Bean may support multiple binding types:"
+msgstr ""
+
+#. Tag: programlisting
+#: xml.xml:85
+#, no-c-format
+msgid ""
+"<![CDATA[<myapp:AsynchronousChequePaymentProcessor>\n"
+"    <myapp:PayByCheque/>\n"
+"    <myapp:Asynchronous/>\n"
+"</myapp:AsynchronousChequePaymentProcessor>]]>"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:87
+#, no-c-format
+msgid ""
+"Interceptors and decorators are just simple Web Beans, so they may be "
+"declared just like any other simple Web Bean:"
+msgstr ""
+
+#. Tag: programlisting
+#: xml.xml:90
+#, no-c-format
+msgid ""
+"<![CDATA[<myfwk:TransactionInterceptor>\n"
+"    <Interceptor/>\n"
+"    <myfwk:Transactional/>\n"
+"</myfwk:TransactionInterceptor>]]>"
+msgstr ""
+
+#. Tag: title
+#: xml.xml:95
+#, no-c-format
+msgid "Declaring Web Bean members"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:97
+#, no-c-format
+msgid "TODO!"
+msgstr ""
+
+#. Tag: title
+#: xml.xml:104
+#, no-c-format
+msgid "Declaring inline Web Beans"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:106
+#, no-c-format
+msgid "Web Beans lets us define a Web Bean at an injection point. For example:"
+msgstr ""
+
+#. Tag: programlisting
+#: xml.xml:108
+#, no-c-format
+msgid ""
+"<![CDATA[<myapp:System>\n"
+"    <ApplicationScoped/>\n"
+"    <myapp:admin>\n"
+"        <myapp:Name>\n"
+"            <myapp:firstname>Gavin</myapp:firstname>\n"
+"            <myapp:lastname>King</myapp:lastname>\n"
+"            <myapp:email>gavin at hibernate.org</myapp:email>\n"
+"        </myapp:Name>\n"
+"    </myapp:admin>\n"
+"</myapp:System>]]>"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:110
+#, no-c-format
+msgid ""
+"The <literal>&lt;Name&gt;</literal> element declares a simple Web Bean of "
+"scope <literal>@Dependent</literal> and class <literal>Name</literal>, with "
+"a set of initial field values. This Web Bean has a special, container-"
+"generated binding and is therefore injectable only to the specific injection "
+"point at which it is declared."
+msgstr ""
+
+#. Tag: para
+#: xml.xml:116
+#, no-c-format
+msgid ""
+"This simple but powerful feature allows the Web Beans XML format to be used "
+"to specify whole graphs of Java objects. It's not quite a full databinding "
+"solution, but it's close!"
+msgstr ""
+
+#. Tag: title
+#: xml.xml:123
+#, no-c-format
+msgid "Using a schema"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:125
+#, no-c-format
+msgid ""
+"If we want our XML document format to be authored by people who aren't Java "
+"developers, or who don't have access to our code, we need to provide a "
+"schema. There's nothing specific to Web Beans about writing or using the "
+"schema."
+msgstr ""
+
+#. Tag: programlisting
+#: xml.xml:130
+#, no-c-format
+msgid ""
+"<![CDATA[<WebBeans xmlns=\"urn:java:javax.webbeans\"\n"
+"          xmlns:myapp=\"urn:java:com.mydomain.myapp\"\n"
+"          xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+"          xsi:schemaLocation=\"urn:java:javax.webbeans http://java.sun.com/"
+"jee/web-beans-1.0.xsd\n"
+"                              urn:java:com.mydomain.myapp http://mydomain."
+"com/xsd/myapp-1.2.xsd\">\n"
+"\n"
+"    <myapp:System>\n"
+"        ...\n"
+"    </myapp:System>\n"
+"\n"
+"</WebBeans>]]>"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:132
+#, no-c-format
+msgid ""
+"Writing an XML schema is quite tedious. Therefore, the Web Beans RI project "
+"will provide a tool which automatically generates the XML schema from "
+"compiled Java code."
+msgstr ""

Added: doc/trunk/reference/zh-TW/Author_Group.po
===================================================================
--- doc/trunk/reference/zh-TW/Author_Group.po	                        (rev 0)
+++ doc/trunk/reference/zh-TW/Author_Group.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,60 @@
+# Language zh-TW translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: author
+#: Author_Group.xml:4
+#, no-c-format
+msgid "<firstname>Gavin</firstname> <surname>King</surname>"
+msgstr ""
+
+#. Tag: affiliation
+#: Author_Group.xml:7
+#, no-c-format
+msgid ""
+"<jobtitle>Web Beans (JSR-299) specification lead</jobtitle> <orgname>Red Hat "
+"Middleware LLC</orgname>"
+msgstr ""
+
+#. Tag: author
+#: Author_Group.xml:12
+#, no-c-format
+msgid "<firstname>Pete</firstname> <surname>Muir</surname>"
+msgstr ""
+
+#. Tag: affiliation
+#: Author_Group.xml:15
+#, no-c-format
+msgid ""
+"<jobtitle>Web Beans (JSR-299) Reference Implementation lead </jobtitle> "
+"<orgname>Red Hat Middleware LLC</orgname>"
+msgstr ""
+
+#. Tag: othercredit
+#: Author_Group.xml:21
+#, no-c-format
+msgid "<firstname>Nicola</firstname> <surname>Benaglia</surname>"
+msgstr ""
+
+#. Tag: contrib
+#: Author_Group.xml:24 Author_Group.xml:29
+#, no-c-format
+msgid "Italian Translation"
+msgstr ""
+
+#. Tag: othercredit
+#: Author_Group.xml:26
+#, no-c-format
+msgid "<firstname>Francesco</firstname> <surname>Milesi</surname>"
+msgstr ""

Added: doc/trunk/reference/zh-TW/Book_Info.po
===================================================================
--- doc/trunk/reference/zh-TW/Book_Info.po	                        (rev 0)
+++ doc/trunk/reference/zh-TW/Book_Info.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,28 @@
+# Language zh-TW translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: Book_Info.xml:4
+#, no-c-format
+msgid "Introduction to Web Beans"
+msgstr ""
+
+#. Tag: subtitle
+#: Book_Info.xml:5
+#, no-c-format
+msgid ""
+"The new Java standard for dependency injection and contextual state "
+"management"
+msgstr ""

Added: doc/trunk/reference/zh-TW/decorators.po
===================================================================
--- doc/trunk/reference/zh-TW/decorators.po	                        (rev 0)
+++ doc/trunk/reference/zh-TW/decorators.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,243 @@
+# Language zh-TW translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: decorators.xml:4
+#, no-c-format
+msgid "Decorators"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:6
+#, no-c-format
+msgid ""
+"Interceptors are a powerful way to capture and separate concerns which are "
+"<emphasis>orthogonal</emphasis> to the type system. Any interceptor is able "
+"to intercept invocations of any Java type. This makes them perfect for "
+"solving technical concerns such as transaction management and security. "
+"However, by nature, interceptors are unaware of the actual semantics of the "
+"events they intercept. Thus, interceptors aren't an appropriate tool for "
+"separating business-related concerns."
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:14
+#, no-c-format
+msgid ""
+"The reverse is true of <emphasis>decorators</emphasis>. A decorator "
+"intercepts invocations only for a certain Java interface, and is therefore "
+"aware of all the semantics attached to that interface. This makes decorators "
+"a perfect tool for modeling some kinds of business concerns. It also means "
+"that a decorator doesn't have the generality of an interceptor. Decorators "
+"aren't able to solve technical concerns that cut across many disparate types."
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:22
+#, no-c-format
+msgid "Suppose we have an interface that represents accounts:"
+msgstr ""
+
+#. Tag: programlisting
+#: decorators.xml:24
+#, no-c-format
+msgid ""
+"<![CDATA[public interface Account {\n"
+"    public BigDecimal getBalance();\n"
+"    public User getOwner();\n"
+"    public void withdraw(BigDecimal amount);\n"
+"    public void deposit(BigDecimal amount);\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:26
+#, no-c-format
+msgid ""
+"Several different Web Beans in our system implement the <literal>Account</"
+"literal> interface. However, we have a common legal requirement that, for "
+"any kind of account, large transactions must be recorded by the system in a "
+"special log. This is a perfect job for a decorator."
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:32
+#, no-c-format
+msgid ""
+"A decorator is a simple Web Bean that implements the type it decorates and "
+"is annotated <literal>@Decorator</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: decorators.xml:35
+#, no-c-format
+msgid ""
+"<![CDATA[@Decorator\n"
+"public abstract class LargeTransactionDecorator \n"
+"        implements Account {\n"
+"    \n"
+"    @Decorates Account account;\n"
+"    \n"
+"    @PersistenceContext EntityManager em;\n"
+"    \n"
+"    public void withdraw(BigDecimal amount) {\n"
+"        account.withdraw(amount);\n"
+"        if ( amount.compareTo(LARGE_AMOUNT)>0 ) {\n"
+"            em.persist( new LoggedWithdrawl(amount) );\n"
+"        }\n"
+"    }\n"
+"    \n"
+"    public void deposit(BigDecimal amount);\n"
+"        account.deposit(amount);\n"
+"        if ( amount.compareTo(LARGE_AMOUNT)>0 ) {\n"
+"            em.persist( new LoggedDeposit(amount) );\n"
+"        }\n"
+"    }\n"
+"    \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:37
+#, no-c-format
+msgid ""
+"Unlike other simple Web Beans, a decorator may be an abstract class. If "
+"there's nothing special the decorator needs to do for a particular method of "
+"the decorated interface, you don't need to implement that method."
+msgstr ""
+
+#. Tag: title
+#: decorators.xml:43
+#, no-c-format
+msgid "Delegate attributes"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:45
+#, no-c-format
+msgid ""
+"All decorators have a <emphasis>delegate attribute</emphasis>. The type and "
+"binding types of the delegate attribute determine which Web Beans the "
+"decorator is bound to. The delegate attribute type must implement or extend "
+"all interfaces implemented by the decorator."
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:50
+#, no-c-format
+msgid ""
+"This delegate attribute specifies that the decorator is bound to all Web "
+"Beans that implement <literal>Account</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: decorators.xml:53
+#, no-c-format
+msgid "<![CDATA[@Decorates Account account;]]>"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:55
+#, no-c-format
+msgid ""
+"A delegate attribute may specify a binding annotation. Then the decorator "
+"will only be bound to Web Beans with the same binding."
+msgstr ""
+
+#. Tag: programlisting
+#: decorators.xml:58
+#, no-c-format
+msgid "<![CDATA[@Decorates @Foreign Account account;]]>"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:60
+#, no-c-format
+msgid "A decorator is bound to any Web Bean which:"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:64
+#, no-c-format
+msgid "has the type of the delegate attribute as an API type, and"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:67
+#, no-c-format
+msgid "has all binding types that are declared by the delegate attribute."
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:71
+#, no-c-format
+msgid ""
+"The decorator may invoke the delegate attribute, which has much the same "
+"effect as calling <literal>InvocationContext.proceed()</literal> from an "
+"interceptor."
+msgstr ""
+
+#. Tag: title
+#: decorators.xml:78
+#, no-c-format
+msgid "Enabling decorators"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:80
+#, no-c-format
+msgid ""
+"We need to <emphasis>enable</emphasis> our decorator in <literal>web-beans."
+"xml</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: decorators.xml:83
+#, no-c-format
+msgid ""
+"<![CDATA[<Decorators>\n"
+"    <myapp:LargeTransactionDecorator/>\n"
+"</Decorators>]]>"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:85
+#, no-c-format
+msgid ""
+"This declaration serves the same purpose for decorators that the "
+"<literal>&lt;Interceptors&gt;</literal> declaration serves for interceptors:"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:90
+#, no-c-format
+msgid ""
+"it enables us to specify a total ordering for all decorators in our system, "
+"ensuring deterministic behavior, and"
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:94
+#, no-c-format
+msgid "it lets us enable or disable decorator classes at deployment time."
+msgstr ""
+
+#. Tag: para
+#: decorators.xml:98
+#, no-c-format
+msgid ""
+"Interceptors for a method are called before decorators that apply to that "
+"method."
+msgstr ""

Added: doc/trunk/reference/zh-TW/ee.po
===================================================================
--- doc/trunk/reference/zh-TW/ee.po	                        (rev 0)
+++ doc/trunk/reference/zh-TW/ee.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,329 @@
+# Language zh-TW translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: ee.xml:4
+#, no-c-format
+msgid "Java EE integration"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:6
+#, no-c-format
+msgid ""
+"Web Beans is fully integrated into the Java EE environment. Web Beans have "
+"access to Java EE resources and JPA persistence contexts. They may be used "
+"in Unified EL expressions in JSF and JSP pages. They may even be injected "
+"into some objects, such as Servlets and Message-Driven Beans, which are not "
+"Web Beans."
+msgstr ""
+
+#. Tag: title
+#: ee.xml:12
+#, no-c-format
+msgid "Injecting Java EE resources into a Web Bean"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:14
+#, no-c-format
+msgid ""
+"All simple and enterprise Web Beans may take advantage of Java EE dependency "
+"injection using <literal>@Resource</literal>, <literal>@EJB</literal> and "
+"<literal>@PersistenceContext</literal>. We've already seen a couple of "
+"examples of this, though we didn't pay much attention at the time:"
+msgstr ""
+
+#. Tag: programlisting
+#: ee.xml:19
+#, no-c-format
+msgid ""
+"<![CDATA[@Transactional @Interceptor\n"
+"public class TransactionInterceptor {\n"
+"\n"
+"    @Resource Transaction transaction;\n"
+"\n"
+"    @AroundInvoke public Object manageTransaction(InvocationContext ctx) "
+"{ ... }\n"
+"    \n"
+"}]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: ee.xml:21
+#, no-c-format
+msgid ""
+"<![CDATA[@SessionScoped\n"
+"public class Login {\n"
+"\n"
+"    @Current Credentials credentials;\n"
+"    @PersistenceContext EntityManager userDatabase;\n"
+"    \n"
+"    ...\n"
+"\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:23
+#, no-c-format
+msgid ""
+"The Java EE <literal>@PostConstruct</literal> and <literal>@PreDestroy</"
+"literal> callbacks are also supported for all simple and enterprise Web "
+"Beans. The <literal>@PostConstruct</literal> method is called after "
+"<emphasis>all</emphasis> injection has been performed."
+msgstr ""
+
+#. Tag: para
+#: ee.xml:28
+#, no-c-format
+msgid ""
+"There is one restriction to be aware of here: <literal>@PersistenceContext"
+"(type=EXTENDED)</literal> is not supported for simple Web Beans."
+msgstr ""
+
+#. Tag: title
+#: ee.xml:35
+#, no-c-format
+msgid "Calling a Web Bean from a Servlet"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:37
+#, no-c-format
+msgid ""
+"It's easy to use a Web Bean from a Servlet in Java EE 6. Simply inject the "
+"Web Bean using Web Beans field or initializer method injection."
+msgstr ""
+
+#. Tag: programlisting
+#: ee.xml:40
+#, no-c-format
+msgid ""
+"public class Login extends HttpServlet {\n"
+"\n"
+"    @Current Credentials credentials;\n"
+"    @Current Login login;\n"
+"\n"
+"    @Override\n"
+"    public void service(HttpServletRequest request, HttpServletResponse "
+"response)\n"
+"        throws ServletException, IOException {\n"
+"        credentials.setUsername( request.getAttribute(\"username\") ):\n"
+"        credentials.setPassword( request.getAttribute(\"password\") ):\n"
+"        login.login();\n"
+"        if ( login.isLoggedIn() ) {\n"
+"            response.sendRedirect(\"/home.jsp\");\n"
+"        }\n"
+"        else {\n"
+"            response.sendRedirect(\"/loginError.jsp\");\n"
+"        }\n"
+"    }\n"
+"            \n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:42
+#, no-c-format
+msgid ""
+"The Web Beans client proxy takes care of routing method invocations from the "
+"Servlet to the correct instances of <literal>Credentials</literal> and "
+"<literal>Login</literal> for the current request and HTTP session."
+msgstr ""
+
+#. Tag: title
+#: ee.xml:49
+#, no-c-format
+msgid "Calling a Web Bean from a Message-Driven Bean"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:51
+#, no-c-format
+msgid ""
+"Web Beans injection applies to all EJBs, even when they aren't under the "
+"control of the Web Bean manager (if they were obtained by direct JNDI "
+"lookup, or injection using <literal>@EJB</literal>, for example. In "
+"particular, you can use Web Beans injection in Message-Driven Beans, which "
+"are not considered Web Beans because you can't inject them."
+msgstr ""
+
+#. Tag: para
+#: ee.xml:57
+#, no-c-format
+msgid ""
+"You can even use Web Beans interceptor bindings for Message-Driven Beans."
+msgstr ""
+
+#. Tag: programlisting
+#: ee.xml:59
+#, no-c-format
+msgid ""
+"@Transactional @MessageDriven\n"
+"public class ProcessOrder implements MessageListener {\n"
+"\n"
+"    @Current Inventory inventory;\n"
+"    @PersistenceContext EntityManager em;\n"
+"\n"
+"    public void onMessage(Message message) {\n"
+"        ...\n"
+"    }\n"
+"            \n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:61
+#, no-c-format
+msgid ""
+"Thus, receiving messages is super-easy in a Web Beans environment. But "
+"beware that there is no session or conversation context available when a "
+"message is delivered to a Message-Driven Bean. Only <literal>@RequestScoped</"
+"literal> and <literal>@ApplicationScoped</literal> Web Beans are available."
+msgstr ""
+
+#. Tag: para
+#: ee.xml:66
+#, no-c-format
+msgid "It's also easy to send messages using Web Beans."
+msgstr ""
+
+#. Tag: title
+#: ee.xml:71
+#, no-c-format
+msgid "JMS endpoints"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:73
+#, no-c-format
+msgid ""
+"Sending messages using JMS can be quite complex, because of the number of "
+"different objects you need to deal with. For queues we have <literal>Queue</"
+"literal>, <literal>QueueConnectionFactory</literal>, "
+"<literal>QueueConnection</literal>, <literal>QueueSession</literal> and "
+"<literal>QueueSender</literal>. For topics we have <literal>Topic</literal>, "
+"<literal>TopicConnectionFactory</literal>, <literal>TopicConnection</"
+"literal>, <literal>TopicSession</literal> and <literal>TopicPublisher</"
+"literal>. Each of these objects has its own lifecycle and threading model "
+"that we need to worry about."
+msgstr ""
+
+#. Tag: para
+#: ee.xml:82
+#, no-c-format
+msgid ""
+"Web Beans takes care of all this for us. All we need to do is declare the "
+"queue or topic in <literal>web-beans.xml</literal>, specifying an associated "
+"binding type and connection factory."
+msgstr ""
+
+#. Tag: programlisting
+#: ee.xml:86
+#, no-c-format
+msgid ""
+"<![CDATA[<Queue>\n"
+"    <destination>java:comp/env/jms/OrderQueue</destination>\n"
+"    <connectionFactory>java:comp/env/jms/QueueConnectionFactory</"
+"connectionFactory>\n"
+"    <myapp:OrderProcessor/>    \n"
+"</Queue>]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: ee.xml:88
+#, no-c-format
+msgid ""
+"<![CDATA[<Topic>\n"
+"    <destination>java:comp/env/jms/StockPrices</destination>\n"
+"    <connectionFactory>java:comp/env/jms/TopicConnectionFactory</"
+"connectionFactory>\n"
+"    <myapp:StockPrices/>    \n"
+"</Topic>]]>"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:90
+#, no-c-format
+msgid ""
+"Now we can just inject the <literal>Queue</literal>, "
+"<literal>QueueConnection</literal>, <literal>QueueSession</literal> or "
+"<literal>QueueSender</literal> for a queue, or the <literal>Topic</literal>, "
+"<literal>TopicConnection</literal>, <literal>TopicSession</literal> or "
+"<literal>TopicPublisher</literal> for a topic."
+msgstr ""
+
+#. Tag: programlisting
+#: ee.xml:96
+#, no-c-format
+msgid ""
+"@OrderProcessor QueueSender orderSender;\n"
+"@OrderProcessor QueueSession orderSession;\n"
+"\n"
+"public void sendMessage() {\n"
+"    MapMessage msg = orderSession.createMapMessage();\n"
+"    ...\n"
+"    orderSender.send(msg);\n"
+"}"
+msgstr ""
+
+#. Tag: programlisting
+#: ee.xml:98
+#, no-c-format
+msgid ""
+"@StockPrices TopicPublisher pricePublisher;\n"
+"@StockPrices TopicSession priceSession;\n"
+"\n"
+"public void sendMessage(String price) {\n"
+"    pricePublisher.send( priceSession.createTextMessage(price) );\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:100
+#, no-c-format
+msgid ""
+"The lifecycle of the injected JMS objects is completely controlled by the "
+"Web Bean manager."
+msgstr ""
+
+#. Tag: title
+#: ee.xml:106
+#, no-c-format
+msgid "Packaging and deployment"
+msgstr ""
+
+#. Tag: para
+#: ee.xml:108
+#, no-c-format
+msgid ""
+"Web Beans doesn't define any special deployment archive. You can package Web "
+"Beans in JARs, EJB-JARs or WARs&#151;any deployment location in the "
+"application classpath. However, each archive that contains Web Beans must "
+"include a file named <literal>web-beans.xml</literal> in the <literal>META-"
+"INF</literal> or <literal>WEB-INF</literal> directory. The file may be "
+"empty. Web Beans deployed in archives that do not have a <literal>web-beans."
+"xml</literal> file will not be available for use in the application."
+msgstr ""
+
+#. Tag: para
+#: ee.xml:116
+#, no-c-format
+msgid ""
+"For Java SE execution, Web Beans may be deployed in any location in which "
+"EJBs may be deployed for execution by the embeddable EJB Lite container. "
+"Again, each location must contain a <literal>web-beans.xml</literal> file."
+msgstr ""

Added: doc/trunk/reference/zh-TW/events.po
===================================================================
--- doc/trunk/reference/zh-TW/events.po	                        (rev 0)
+++ doc/trunk/reference/zh-TW/events.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,649 @@
+# Language zh-TW translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: events.xml:4
+#, no-c-format
+msgid "Events"
+msgstr ""
+
+#. Tag: para
+#: events.xml:6
+#, no-c-format
+msgid ""
+"The Web Beans event notification facility allows Web Beans to interact in a "
+"totally decoupled manner. Event <emphasis>producers</emphasis> raise events "
+"that are then delivered to event <emphasis>observers</emphasis> by the Web "
+"Bean manager. This basic schema might sound like the familiar observer/"
+"observable pattern, but there are a couple of twists:"
+msgstr ""
+
+#. Tag: para
+#: events.xml:14
+#, no-c-format
+msgid ""
+"not only are event producers decoupled from observers; observers are "
+"completely decoupled from producers,"
+msgstr ""
+
+#. Tag: para
+#: events.xml:18
+#, no-c-format
+msgid ""
+"observers can specify a combination of \"selectors\" to narrow the set of "
+"event notifications they will receive, and"
+msgstr ""
+
+#. Tag: para
+#: events.xml:22
+#, no-c-format
+msgid ""
+"observers can be notified immediately, or can specify that delivery of the "
+"event should be delayed until the end of the current transaction"
+msgstr ""
+
+#. Tag: title
+#: events.xml:28
+#, no-c-format
+msgid "Event observers"
+msgstr ""
+
+#. Tag: para
+#: events.xml:30
+#, no-c-format
+msgid ""
+"An <emphasis>observer method</emphasis> is a method of a Web Bean with a "
+"parameter annotated <literal>@Observes</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:33
+#, no-c-format
+msgid ""
+"<![CDATA[public void onAnyDocumentEvent(@Observes Document document) "
+"{ ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:35
+#, no-c-format
+msgid ""
+"The annotated parameter is called the <emphasis>event parameter</emphasis>. "
+"The type of the event parameter is the observed <emphasis>event type</"
+"emphasis>. Observer methods may also specify \"selectors\", which are just "
+"instances of Web Beans binding types. When a binding type is used as an "
+"event selector, it is called an <emphasis>event binding type</emphasis>."
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:41
+#, no-c-format
+msgid ""
+"<![CDATA[@BindingType\n"
+"@Target({PARAMETER, FIELD})\n"
+"@Retention(RUNTIME)\n"
+"public @interface Updated { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:43
+#, no-c-format
+msgid ""
+"We specify the event bindings of the observer method by annotating the event "
+"parameter:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:46 events.xml:190
+#, no-c-format
+msgid ""
+"<![CDATA[public void afterDocumentUpdate(@Observes @Updated Document "
+"document) { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:48
+#, no-c-format
+msgid ""
+"An observer method need not specify any event bindings&#151;in this case it "
+"is interested in <emphasis>all</emphasis> events of a particular type. If it "
+"does specify event bindings, it is only interested in events which also have "
+"those event bindings."
+msgstr ""
+
+#. Tag: para
+#: events.xml:53
+#, no-c-format
+msgid ""
+"The observer method may have additional parameters, which are injected "
+"according to the usual Web Beans method parameter injection semantics:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:56
+#, no-c-format
+msgid ""
+"<![CDATA[public void afterDocumentUpdate(@Observes @Updated Document "
+"document, User user) { ... }]]>"
+msgstr ""
+
+#. Tag: title
+#: events.xml:61
+#, no-c-format
+msgid "Event producers"
+msgstr ""
+
+#. Tag: para
+#: events.xml:63
+#, no-c-format
+msgid ""
+"The event producer may obtain an <emphasis>event notifier</emphasis> object "
+"by injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:66
+#, no-c-format
+msgid "<![CDATA[@Observable Event<Document> documentEvent]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:68
+#, no-c-format
+msgid ""
+"The <literal>@Observable</literal> annotation implicitly defines a Web Bean "
+"with scope <literal>@Dependent</literal> and deployment type "
+"<literal>@Standard</literal>, with an implementation provided by the Web "
+"Bean manager."
+msgstr ""
+
+#. Tag: para
+#: events.xml:72
+#, no-c-format
+msgid ""
+"A producer raises events by calling the <literal>fire()</literal> method of "
+"the <literal>Event</literal> interface, passing an <emphasis>event object</"
+"emphasis>:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:75
+#, no-c-format
+msgid "<![CDATA[documentEvent.fire(document);]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:77
+#, no-c-format
+msgid ""
+"An event object may be an instance of any Java class that has no type "
+"variables or wildcard type parameters. The event will be delivered to every "
+"observer method that:"
+msgstr ""
+
+#. Tag: para
+#: events.xml:83 events.xml:107 events.xml:126
+#, no-c-format
+msgid "has an event parameter to which the event object is assignable, and"
+msgstr ""
+
+#. Tag: para
+#: events.xml:86
+#, no-c-format
+msgid "specifies no event bindings."
+msgstr ""
+
+#. Tag: para
+#: events.xml:90
+#, no-c-format
+msgid ""
+"The Web Bean manager simply calls all the observer methods, passing the "
+"event object as the value of the event parameter. If any observer method "
+"throws an exception, the Web Bean manager stops calling observer methods, "
+"and the exception is rethrown by the <literal>fire()</literal> method."
+msgstr ""
+
+#. Tag: para
+#: events.xml:95
+#, no-c-format
+msgid ""
+"To specify a \"selector\", the event producer may pass an instance of the "
+"event binding type to the <literal>fire()</literal> method:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:98
+#, no-c-format
+msgid ""
+"<![CDATA[documentEvent.fire( document, new AnnotationLiteral<Updated>()"
+"{} );]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:100
+#, no-c-format
+msgid ""
+"The helper class <literal>AnnotationLiteral</literal> makes it possible to "
+"instantiate binding types inline, since this is otherwise difficult to do in "
+"Java."
+msgstr ""
+
+#. Tag: para
+#: events.xml:103
+#, no-c-format
+msgid "The event will be delivered to every observer method that:"
+msgstr ""
+
+#. Tag: para
+#: events.xml:110
+#, no-c-format
+msgid ""
+"does not specify any event binding <emphasis>except</emphasis> for the event "
+"bindings passed to <literal>fire()</literal>."
+msgstr ""
+
+#. Tag: para
+#: events.xml:115
+#, no-c-format
+msgid ""
+"Alternatively, event bindings may be specified by annotating the event "
+"notifier injection point:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:118
+#, no-c-format
+msgid "<![CDATA[@Observable @Updated Event<Document> documentUpdatedEvent]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:120
+#, no-c-format
+msgid ""
+"Then every event fired via this instance of <literal>Event</literal> has the "
+"annotated event binding. The event will be delivered to every observer "
+"method that:"
+msgstr ""
+
+#. Tag: para
+#: events.xml:129
+#, no-c-format
+msgid ""
+"does not specify any event binding <emphasis>except</emphasis> for the event "
+"bindings passed to <literal>fire()</literal> or the annotated event bindings "
+"of the event notifier injection point."
+msgstr ""
+
+#. Tag: title
+#: events.xml:138
+#, no-c-format
+msgid "Registering observers dynamically"
+msgstr ""
+
+#. Tag: para
+#: events.xml:140
+#, no-c-format
+msgid ""
+"It's often useful to register an event observer dynamically. The application "
+"may implement the <literal>Observer</literal> interface and register an "
+"instance with an event notifier by calling the <literal>observe()</literal> "
+"method."
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:144
+#, no-c-format
+msgid ""
+"<![CDATA[documentEvent.observe( new Observer<Document>() { public void notify"
+"(Document doc) { ... } } );]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:146
+#, no-c-format
+msgid ""
+"Event binding types may be specified by the event notifier injection point "
+"or by passing event binding type instances to the <literal>observe()</"
+"literal> method:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:149
+#, no-c-format
+msgid ""
+"<![CDATA[documentEvent.observe( new Observer<Document>() { public void notify"
+"(Document doc) { ... } }, \n"
+"                                                new "
+"AnnotationLiteral<Updated>(){} );]]>"
+msgstr ""
+
+#. Tag: title
+#: events.xml:154
+#, no-c-format
+msgid "Event bindings with members"
+msgstr ""
+
+#. Tag: para
+#: events.xml:156
+#, no-c-format
+msgid "An event binding type may have annotation members:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:158
+#, no-c-format
+msgid ""
+"<![CDATA[@BindingType\n"
+"@Target({PARAMETER, FIELD})\n"
+"@Retention(RUNTIME)\n"
+"public @interface Role {\n"
+"    RoleType value();\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:160
+#, no-c-format
+msgid ""
+"The member value is used to narrow the messages delivered to the observer:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:162
+#, no-c-format
+msgid ""
+"<![CDATA[public void adminLoggedIn(@Observes @Role(ADMIN) LoggedIn event) "
+"{ ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:164
+#, no-c-format
+msgid ""
+"Event binding type members may be specified statically by the event "
+"producer, via annotations at the event notifier injection point:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:167
+#, no-c-format
+msgid "<![CDATA[@Observable @Role(ADMIN) Event<LoggedIn> LoggedInEvent;}}]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:169
+#, no-c-format
+msgid ""
+"Alternatively, the value of the event binding type member may be determined "
+"dynamically by the event producer. We start by writing an abstract subclass "
+"of <literal>AnnotationLiteral</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:172
+#, no-c-format
+msgid ""
+"<![CDATA[abstract class RoleBinding \n"
+"    extends AnnotationLiteral<Role> \n"
+"    implements Role {}]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:174
+#, no-c-format
+msgid ""
+"The event producer passes an instance of this class to <literal>fire()</"
+"literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:176
+#, no-c-format
+msgid ""
+"<![CDATA[documentEvent.fire( document, new RoleBinding() { public void value"
+"() { return user.getRole(); } } );]]>"
+msgstr ""
+
+#. Tag: title
+#: events.xml:181
+#, no-c-format
+msgid "Multiple event bindings"
+msgstr ""
+
+#. Tag: para
+#: events.xml:183
+#, no-c-format
+msgid "Event binding types may be combined, for example:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:185
+#, no-c-format
+msgid ""
+"<![CDATA[@Observable @Blog Event<Document> blogEvent;\n"
+"...\n"
+"if (document.isBlog()) blogEvent.fire(document, new "
+"AnnotationLiteral<Updated>(){});]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:187
+#, no-c-format
+msgid ""
+"When this event occurs, all of the following observer methods will be "
+"notified:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:189
+#, no-c-format
+msgid ""
+"<![CDATA[public void afterBlogUpdate(@Observes @Updated @Blog Document "
+"document) { ... }]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:191
+#, no-c-format
+msgid ""
+"<![CDATA[public void onAnyBlogEvent(@Observes @Blog Document document) "
+"{ ... }]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:192
+#, no-c-format
+msgid ""
+"<![CDATA[public void onAnyDocumentEvent(@Observes Document document) "
+"{ ... }}}]]>"
+msgstr ""
+
+#. Tag: title
+#: events.xml:197
+#, no-c-format
+msgid "Transactional observers"
+msgstr ""
+
+#. Tag: para
+#: events.xml:199
+#, no-c-format
+msgid ""
+"Transactional observers receive their event notifications during the before "
+"or after completion phase of the transaction in which the event was raised. "
+"For example, the following observer method needs to refresh a query result "
+"set that is cached in the application context, but only when transactions "
+"that update the <literal>Category</literal> tree succeed:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:205
+#, no-c-format
+msgid ""
+"<![CDATA[public void refreshCategoryTree(@AfterTransactionSuccess @Observes "
+"CategoryUpdateEvent event) { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:207
+#, no-c-format
+msgid "There are three kinds of transactional observers:"
+msgstr ""
+
+#. Tag: para
+#: events.xml:211
+#, no-c-format
+msgid ""
+"<literal>@AfterTransactionSuccess</literal> observers are called during the "
+"after completion phase of the transaction, but only if the transaction "
+"completes successfully"
+msgstr ""
+
+#. Tag: para
+#: events.xml:216
+#, no-c-format
+msgid ""
+"<literal>@AfterTransactionFailure</literal> observers are called during the "
+"after completion phase of the transaction, but only if the transaction fails "
+"to complete successfully"
+msgstr ""
+
+#. Tag: para
+#: events.xml:221
+#, no-c-format
+msgid ""
+"<literal>@AfterTransactionCompletion</literal> observers are called during "
+"the after completion phase of the transaction"
+msgstr ""
+
+#. Tag: para
+#: events.xml:225
+#, no-c-format
+msgid ""
+"<literal>@BeforeTransactionCompletion</literal> observers are called during "
+"the before completion phase of the transaction"
+msgstr ""
+
+#. Tag: para
+#: events.xml:230
+#, no-c-format
+msgid ""
+"Transactional observers are very important in a stateful object model like "
+"Web Beans, because state is often held for longer than a single atomic "
+"transaction."
+msgstr ""
+
+#. Tag: para
+#: events.xml:233
+#, no-c-format
+msgid ""
+"Imagine that we have cached a JPA query result set in the application scope:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:235
+#, no-c-format
+msgid ""
+"<![CDATA[@ApplicationScoped @Singleton\n"
+"public class Catalog {\n"
+"\n"
+"    @PersistenceContext EntityManager em;\n"
+"    \n"
+"    List<Product> products;\n"
+"\n"
+"    @Produces @Catalog \n"
+"    List<Product> getCatalog() {\n"
+"        if (products==null) {\n"
+"            products = em.createQuery(\"select p from Product p where p."
+"deleted = false\")\n"
+"                .getResultList();\n"
+"        }\n"
+"        return products;\n"
+"    }\n"
+"    \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:237
+#, no-c-format
+msgid ""
+"From time to time, a <literal>Product</literal> is created or deleted. When "
+"this occurs, we need to refresh the <literal>Product</literal> catalog. But "
+"we should wait until <emphasis>after</emphasis> the transaction completes "
+"successfully before performing this refresh!"
+msgstr ""
+
+#. Tag: para
+#: events.xml:242
+#, no-c-format
+msgid ""
+"The Web Bean that creates and deletes <literal>Product</literal>s could "
+"raise events, for example:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:245
+#, no-c-format
+msgid ""
+"<![CDATA[@Stateless\n"
+"public class ProductManager {\n"
+"\n"
+"    @PersistenceContext EntityManager em;\n"
+"    @Observable Event<Product> productEvent;\n"
+"\n"
+"    public void delete(Product product) {\n"
+"        em.delete(product);\n"
+"        productEvent.fire(product, new AnnotationLiteral<Deleted>(){});\n"
+"    }\n"
+"    \n"
+"    public void persist(Product product) {\n"
+"        em.persist(product);\n"
+"        productEvent.fire(product, new AnnotationLiteral<Created>(){});\n"
+"    }\n"
+"    \n"
+"    ...\n"
+"    \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: events.xml:247
+#, no-c-format
+msgid ""
+"And now <literal>Catalog</literal> can observe the events after successful "
+"completion of the transaction:"
+msgstr ""
+
+#. Tag: programlisting
+#: events.xml:250
+#, no-c-format
+msgid ""
+"<![CDATA[@ApplicationScoped @Singleton\n"
+"public class Catalog {\n"
+"\n"
+"    ...\n"
+"    \n"
+"    void addProduct(@AfterTransactionSuccess @Observes @Created Product "
+"product) {\n"
+"        products.add(product);\n"
+"    }\n"
+"    \n"
+"    void addProduct(@AfterTransactionSuccess @Observes @Deleted Product "
+"product) {\n"
+"        products.remove(product);\n"
+"    }\n"
+"    \n"
+"}]]>"
+msgstr ""

Added: doc/trunk/reference/zh-TW/example.po
===================================================================
--- doc/trunk/reference/zh-TW/example.po	                        (rev 0)
+++ doc/trunk/reference/zh-TW/example.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,172 @@
+# Language zh-TW translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: example.xml:4
+#, no-c-format
+msgid "JSF web application example"
+msgstr ""
+
+#. Tag: para
+#: example.xml:6
+#, no-c-format
+msgid ""
+"Let's illustrate these ideas with a full example. We're going to implement "
+"user login/logout for an application that uses JSF. First, we'll define a "
+"Web Bean to hold the username and password entered during login:"
+msgstr ""
+
+#. Tag: programlisting
+#: example.xml:11
+#, no-c-format
+msgid ""
+"<![CDATA[@Named @RequestScoped\n"
+"public class Credentials {\n"
+"        \n"
+"    private String username;\n"
+"    private String password;\n"
+"    \n"
+"    public String getUsername() { return username; }\n"
+"    public void setUsername(String username) { this.username = username; }\n"
+"    \n"
+"    public String getPassword() { return password; }\n"
+"    public void setPassword(String password) { this.password = password; }\n"
+"    \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: example.xml:13
+#, no-c-format
+msgid "This Web Bean is bound to the login prompt in the following JSF form:"
+msgstr ""
+
+#. Tag: programlisting
+#: example.xml:15
+#, no-c-format
+msgid ""
+"<![CDATA[<h:form>\n"
+"    <h:panelGrid columns=\"2\" rendered=\"#{!login.loggedIn}\">\n"
+"        <h:outputLabel for=\"username\">Username:</h:outputLabel>\n"
+"        <h:inputText id=\"username\" value=\"#{credentials.username}\"/>\n"
+"        <h:outputLabel for=\"password\">Password:</h:outputLabel>\n"
+"        <h:inputText id=\"password\" value=\"#{credentials.password}\"/>\n"
+"    </h:panelGrid>\n"
+"    <h:commandButton value=\"Login\" action=\"#{login.login}\" rendered=\"#{!"
+"login.loggedIn}\"/>\n"
+"    <h:commandButton value=\"Logout\" acion=\"#{login.logout}\" rendered=\"#"
+"{login.loggedIn}\"/>\n"
+"</h:form>]]>"
+msgstr ""
+
+#. Tag: para
+#: example.xml:17
+#, no-c-format
+msgid ""
+"The actual work is done by a session scoped Web Bean that maintains "
+"information about the currently logged-in user and exposes the "
+"<literal>User</literal> entity to other Web Beans:"
+msgstr ""
+
+#. Tag: programlisting
+#: example.xml:21
+#, no-c-format
+msgid ""
+"<![CDATA[@SessionScoped @Named\n"
+"public class Login {\n"
+"\n"
+"    @Current Credentials credentials;\n"
+"    @PersistenceContext EntityManager userDatabase;\n"
+"\n"
+"    private User user;\n"
+"    \n"
+"    public void login() {\n"
+"            \n"
+"        List<User> results = userDatabase.createQuery(\n"
+"           \"select u from User u where u.username=:username and u.password=:"
+"password\")\n"
+"           .setParameter(\"username\", credentials.getUsername())\n"
+"           .setParameter(\"password\", credentials.getPassword())\n"
+"           .getResultList();\n"
+"        \n"
+"        if ( !results.isEmpty() ) {\n"
+"           user = results.get(0);\n"
+"        }\n"
+"        \n"
+"    }\n"
+"    \n"
+"    public void logout() {\n"
+"        user = null;\n"
+"    }\n"
+"    \n"
+"    public boolean isLoggedIn() {\n"
+"       return user!=null;\n"
+"    }\n"
+"    \n"
+"    @Produces @LoggedIn User getCurrentUser() {\n"
+"        return user;\n"
+"    }\n"
+"\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: example.xml:23
+#, no-c-format
+msgid "Of course, <literal>@LoggedIn</literal> is a binding annotation:"
+msgstr ""
+
+#. Tag: programlisting
+#: example.xml:25
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target({TYPE, METHOD, FIELD})\n"
+"@BindingType\n"
+"public @interface LoggedIn {}]]>"
+msgstr ""
+
+#. Tag: para
+#: example.xml:27
+#, no-c-format
+msgid "Now, any other Web Bean can easily inject the current user:"
+msgstr ""
+
+#. Tag: programlisting
+#: example.xml:29
+#, no-c-format
+msgid ""
+"<![CDATA[public class DocumentEditor {\n"
+"\n"
+"    @Current Document document;\n"
+"    @LoggedIn User currentUser;\n"
+"    @PersistenceContext EntityManager docDatabase;\n"
+"    \n"
+"    public void save() {\n"
+"        document.setCreatedBy(currentUser);\n"
+"        docDatabase.persist(document);\n"
+"    }\n"
+"    \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: example.xml:31
+#, no-c-format
+msgid ""
+"Hopefully, this example gives a flavor of the Web Bean programming model. In "
+"the next chapter, we'll explore Web Beans dependency injection in greater "
+"depth."
+msgstr ""

Added: doc/trunk/reference/zh-TW/extend.po
===================================================================
--- doc/trunk/reference/zh-TW/extend.po	                        (rev 0)
+++ doc/trunk/reference/zh-TW/extend.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,252 @@
+# Language zh-TW translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: extend.xml:4
+#, no-c-format
+msgid "Extending Web Beans"
+msgstr ""
+
+#. Tag: para
+#: extend.xml:6
+#, no-c-format
+msgid ""
+"Web Beans is intended to be a platform for frameworks, extensions and "
+"integration with other technologies. Therefore, Web Beans exposes a set of "
+"SPIs for the use of developers of portable extensions to Web Beans. For "
+"example, the following kinds of extensions were envisaged by the designers "
+"of Web Beans:"
+msgstr ""
+
+#. Tag: para
+#: extend.xml:14
+#, no-c-format
+msgid "integration with Business Process Management engines,"
+msgstr ""
+
+#. Tag: para
+#: extend.xml:17
+#, no-c-format
+msgid ""
+"integration with third-party frameworks such as Spring, Seam, GWT or Wicket, "
+"and"
+msgstr ""
+
+#. Tag: para
+#: extend.xml:21
+#, no-c-format
+msgid "new technology based upon the Web Beans programming model."
+msgstr ""
+
+#. Tag: para
+#: extend.xml:25
+#, no-c-format
+msgid ""
+"The nerve center for extending Web Beans is the <literal>Manager</literal> "
+"object."
+msgstr ""
+
+#. Tag: title
+#: extend.xml:29
+#, no-c-format
+msgid "The <literal>Manager</literal> object"
+msgstr ""
+
+#. Tag: para
+#: extend.xml:31
+#, no-c-format
+msgid ""
+"The <literal>Manager</literal> interface lets us register and obtain Web "
+"Beans, interceptors, decorators, observers and contexts programatically."
+msgstr ""
+
+#. Tag: programlisting
+#: extend.xml:34
+#, no-c-format
+msgid ""
+"<![CDATA[public interface Manager\n"
+"{\n"
+"\n"
+"   public <T> Set<Bean<T>> resolveByType(Class<T> type, Annotation... "
+"bindings);\n"
+"\n"
+"   public <T> Set<Bean<T>> resolveByType(TypeLiteral<T> apiType,\n"
+"         Annotation... bindings);\n"
+"\n"
+"   public <T> T getInstanceByType(Class<T> type, Annotation... bindings);\n"
+"\n"
+"   public <T> T getInstanceByType(TypeLiteral<T> type,\n"
+"         Annotation... bindings);\n"
+"\n"
+"   public Set<Bean<?>> resolveByName(String name);\n"
+"\n"
+"   public Object getInstanceByName(String name);\n"
+"\n"
+"   public <T> T getInstance(Bean<T> bean);\n"
+"\n"
+"   public void fireEvent(Object event, Annotation... bindings);\n"
+"\n"
+"   public Context getContext(Class<? extends Annotation> scopeType);\n"
+"\n"
+"   public Manager addContext(Context context);\n"
+"\n"
+"   public Manager addBean(Bean<?> bean);\n"
+"\n"
+"   public Manager addInterceptor(Interceptor interceptor);\n"
+"\n"
+"   public Manager addDecorator(Decorator decorator);\n"
+"\n"
+"   public <T> Manager addObserver(Observer<T> observer, Class<T> eventType,\n"
+"         Annotation... bindings);\n"
+"\n"
+"   public <T> Manager addObserver(Observer<T> observer, TypeLiteral<T> "
+"eventType,\n"
+"         Annotation... bindings);\n"
+"\n"
+"   public <T> Manager removeObserver(Observer<T> observer, Class<T> "
+"eventType,\n"
+"         Annotation... bindings);\n"
+"\n"
+"   public <T> Manager removeObserver(Observer<T> observer,\n"
+"         TypeLiteral<T> eventType, Annotation... bindings);\n"
+"\n"
+"   public <T> Set<Observer<T>> resolveObservers(T event, Annotation... "
+"bindings);\n"
+"\n"
+"   public List<Interceptor> resolveInterceptors(InterceptionType type,\n"
+"         Annotation... interceptorBindings);\n"
+"\n"
+"   public List<Decorator> resolveDecorators(Set<Class<?>> types,\n"
+"         Annotation... bindings);\n"
+"\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: extend.xml:36
+#, no-c-format
+msgid "We can obtain an instance of <literal>Manager</literal> via injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: extend.xml:38
+#, no-c-format
+msgid "@Current Manager manager"
+msgstr ""
+
+#. Tag: title
+#: extend.xml:43
+#, no-c-format
+msgid "The <literal>Bean</literal> class"
+msgstr ""
+
+#. Tag: para
+#: extend.xml:45
+#, no-c-format
+msgid ""
+"Instances of the abstract class <literal>Bean</literal> represent Web Beans. "
+"There is an instance of <literal>Bean</literal> registered with the "
+"<literal>Manager</literal> object for every Web Bean in the application."
+msgstr ""
+
+#. Tag: programlisting
+#: extend.xml:50
+#, no-c-format
+msgid ""
+"public abstract class Bean&lt;T&gt; {\n"
+"    \n"
+"    private final Manager manager;\n"
+"    \n"
+"    protected Bean(Manager manager) {\n"
+"        this.manager=manager;\n"
+"    }\n"
+"    \n"
+"    protected Manager getManager() {\n"
+"        return manager;\n"
+"    }\n"
+"    \n"
+"    public abstract Set&lt;Class&gt; getTypes();\n"
+"    public abstract Set&lt;Annotation&gt; getBindingTypes();\n"
+"    public abstract Class&lt;? extends Annotation&gt; getScopeType();\n"
+"    public abstract Class&lt;? extends Annotation&gt; getDeploymentType(); \n"
+"    public abstract String getName();\n"
+"    \n"
+"    public abstract boolean isSerializable();\n"
+"    public abstract boolean isNullable();\n"
+"\n"
+"    public abstract T create();\n"
+"    public abstract void destroy(T instance);\n"
+"    \n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: extend.xml:52
+#, no-c-format
+msgid ""
+"It's possible to extend the <literal>Bean</literal> class and register "
+"instances by calling <literal>Manager.addBean()</literal> to provide support "
+"for new kinds of Web Beans, beyond those defined by the Web Beans "
+"specification (simple and enterprise Web Beans, producer methods and JMS "
+"endpoints). For example, we could use the <literal>Bean</literal> class to "
+"allow objects managed by another framework to be injected into Web Beans."
+msgstr ""
+
+#. Tag: para
+#: extend.xml:60
+#, no-c-format
+msgid ""
+"There are two subclasses of <literal>Bean</literal> defined by the Web Beans "
+"specification: <literal>Interceptor</literal> and <literal>Decorator</"
+"literal>."
+msgstr ""
+
+#. Tag: title
+#: extend.xml:67
+#, no-c-format
+msgid "The <literal>Context</literal> interface"
+msgstr ""
+
+#. Tag: para
+#: extend.xml:69
+#, no-c-format
+msgid ""
+"The <literal>Context</literal> interface supports addition of new scopes to "
+"Web Beans, or extension of the built-in scopes to new environments."
+msgstr ""
+
+#. Tag: programlisting
+#: extend.xml:72
+#, no-c-format
+msgid ""
+"public interface Context {\n"
+"    \n"
+"    public Class&lt;? extends Annotation&gt; getScopeType();\n"
+"    \n"
+"    public &lt;T&gt; T get(Bean&lt;T&gt; bean, boolean create);\n"
+"    \n"
+"    boolean isActive();\n"
+"    \n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: extend.xml:74
+#, no-c-format
+msgid ""
+"For example, we might implement <literal>Context</literal> to add a business "
+"process scope to Web Beans, or to add support for the conversation scope to "
+"an application that uses Wicket."
+msgstr ""

Added: doc/trunk/reference/zh-TW/injection.po
===================================================================
--- doc/trunk/reference/zh-TW/injection.po	                        (rev 0)
+++ doc/trunk/reference/zh-TW/injection.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,1226 @@
+# Language zh-TW translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: injection.xml:4
+#, no-c-format
+msgid "Dependency injection"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:6
+#, no-c-format
+msgid "Web Beans supports three primary mechanisms for dependency injection:"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:8
+#, no-c-format
+msgid "Constructor parameter injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:10
+#, no-c-format
+msgid ""
+"<![CDATA[public class Checkout {\n"
+"        \n"
+"    private final ShoppingCart cart;\n"
+"    \n"
+"    @Initializer\n"
+"    public Checkout(ShoppingCart cart) {\n"
+"        this.cart = cart;\n"
+"    }\n"
+"\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:12
+#, no-c-format
+msgid "<emphasis>Initializer</emphasis> method parameter injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:14
+#, no-c-format
+msgid ""
+"<![CDATA[public class Checkout {\n"
+"        \n"
+"    private ShoppingCart cart;\n"
+"\n"
+"    @Initializer \n"
+"    void setShoppingCart(ShoppingCart cart) {\n"
+"        this.cart = cart;\n"
+"    }\n"
+"    \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:16
+#, no-c-format
+msgid "And direct field injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:18
+#, no-c-format
+msgid ""
+"<![CDATA[public class Checkout {\n"
+"\n"
+"    private @Current ShoppingCart cart;\n"
+"    \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:20
+#, no-c-format
+msgid ""
+"Dependency injection always occurs when the Web Bean instance is first "
+"instantiated."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:25
+#, no-c-format
+msgid ""
+"First, the Web Bean manager calls the Web Bean constructor, to obtain an "
+"instance of the Web Bean."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:29
+#, no-c-format
+msgid ""
+"Next, the Web Bean manager initializes the values of all injected fields of "
+"the Web Bean."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:33
+#, no-c-format
+msgid "Next, the Web Bean manager calls all initializer methods of Web Bean."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:37
+#, no-c-format
+msgid ""
+"Finally, the <literal>@PostConstruct</literal> method of the Web Bean, if "
+"any, is called."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:42
+#, no-c-format
+msgid ""
+"Constructor parameter injection is not supported for EJB beans, since the "
+"EJB is instantiated by the EJB container, not the Web Bean manager."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:45
+#, no-c-format
+msgid ""
+"Parameters of constructors and initializer methods need not be explicitly "
+"annotated when the default binding type <literal>@Current</literal> applies. "
+"Injected fields, however, <emphasis>must</emphasis> specify a binding type, "
+"even when the default binding type applies. If the field does not specify a "
+"binding type, it will not be injected."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:51
+#, no-c-format
+msgid "Producer methods also support parameter injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:53
+#, no-c-format
+msgid ""
+"<![CDATA[@Produces Checkout createCheckout(ShoppingCart cart) {\n"
+"    return new Checkout(cart);\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:55
+#, no-c-format
+msgid ""
+"Finally, observer methods (which we'll meet in <xref linkend=\"events\"/>), "
+"disposal methods and destructor methods all support parameter injection."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:58
+#, no-c-format
+msgid ""
+"The Web Beans specification defines a procedure, called the "
+"<emphasis>typesafe resolution algorithm</emphasis>, that the Web Bean "
+"manager follows when identifying the Web Bean to inject to an injection "
+"point. This algorithm looks complex at first, but once you understand it, "
+"it's really quite intuitive. Typesafe resolution is performed at system "
+"initialization time, which means that the manager will inform the user "
+"immediately if a Web Bean's dependencies cannot be satisfied, by throwing a "
+"<literal>UnsatisfiedDependencyException</literal> or "
+"<literal>AmbiguousDependencyException</literal>."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:67
+#, no-c-format
+msgid ""
+"The purpose of this algorithm is to allow multiple Web Beans to implement "
+"the same API type and either:"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:72
+#, no-c-format
+msgid ""
+"allow the client to select which implementation it requires using "
+"<emphasis>binding annotations</emphasis>,"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:77
+#, no-c-format
+msgid ""
+"allow the application deployer to select which implementation is appropriate "
+"for a particular deployment, without changes to the client, by enabling or "
+"disabling <emphasis>deployment types</emphasis>, or"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:82
+#, no-c-format
+msgid ""
+"allow one implementation of an API to override another implementation of the "
+"same API at deployment time, without changes to the client, using "
+"<emphasis>deployment type precedence</emphasis>."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:88
+#, no-c-format
+msgid ""
+"Let's explore how the Web Beans manager determines a Web Bean to be injected."
+msgstr ""
+
+#. Tag: title
+#: injection.xml:91
+#, no-c-format
+msgid "Binding annotations"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:93
+#, no-c-format
+msgid ""
+"If we have more than one Web Bean that implements a particular API type, the "
+"injection point can specify exactly which Web Bean should be injected using "
+"a binding annotation. For example, there might be two implementations of "
+"<literal>PaymentProcessor</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:98
+#, no-c-format
+msgid ""
+"<![CDATA[@PayByCheque\n"
+"public class ChequePaymentProcessor implements PaymentProcessor {\n"
+"    public void process(Payment payment) { ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:100
+#, no-c-format
+msgid ""
+"<![CDATA[@PayByCreditCard\n"
+"public class CreditCardPaymentProcessor implements PaymentProcessor {\n"
+"    public void process(Payment payment) { ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:102
+#, no-c-format
+msgid ""
+"Where <literal>@PayByCheque</literal> and <literal>@PayByCreditCard</"
+"literal> are binding annotations:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:105
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target({TYPE, METHOD, FIELD, PARAMETER})\n"
+"@BindingType\n"
+"public @interface PayByCheque {}]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:107
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target({TYPE, METHOD, FIELD, PARAMETER})\n"
+"@BindingType\n"
+"public @interface PayByCreditCard {}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:109
+#, no-c-format
+msgid ""
+"A client Web Bean developer uses the binding annotation to specify exactly "
+"which Web Bean should be injected."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:112
+#, no-c-format
+msgid "Using field injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:114
+#, no-c-format
+msgid ""
+"<![CDATA[@PayByCheque PaymentProcessor chequePaymentProcessor;\n"
+"@PayByCreditCard PaymentProcessor creditCardPaymentProcessor;]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:116
+#, no-c-format
+msgid "Using initializer method injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:118
+#, no-c-format
+msgid ""
+"<![CDATA[@Initializer\n"
+"public void setPaymentProcessors(@PayByCheque PaymentProcessor "
+"chequePaymentProcessor, \n"
+"                                 @PayByCreditCard PaymentProcessor "
+"creditCardPaymentProcessor) {\n"
+"   this.chequePaymentProcessor = chequePaymentProcessor;\n"
+"   this.creditCardPaymentProcessor = creditCardPaymentProcessor;\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:120
+#, no-c-format
+msgid "Or using constructor injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:122
+#, no-c-format
+msgid ""
+"<![CDATA[@Initializer\n"
+"public Checkout(@PayByCheque PaymentProcessor chequePaymentProcessor, \n"
+"                @PayByCreditCard PaymentProcessor "
+"creditCardPaymentProcessor) {\n"
+"   this.chequePaymentProcessor = chequePaymentProcessor;\n"
+"   this.creditCardPaymentProcessor = creditCardPaymentProcessor;\n"
+"}]]>"
+msgstr ""
+
+#. Tag: title
+#: injection.xml:125
+#, no-c-format
+msgid "Binding annotations with members"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:127
+#, no-c-format
+msgid "Binding annotations may have members:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:129
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target({TYPE, METHOD, FIELD, PARAMETER})\n"
+"@BindingType\n"
+"public @interface PayBy {\n"
+"    PaymentType value();\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:131
+#, no-c-format
+msgid "In which case, the member value is significant:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:133
+#, no-c-format
+msgid ""
+"<![CDATA[@PayBy(CHEQUE) PaymentProcessor chequePaymentProcessor;\n"
+"@PayBy(CREDIT_CARD) PaymentProcessor creditCardPaymentProcessor;]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:135
+#, no-c-format
+msgid ""
+"You can tell the Web Bean manager to ignore a member of a binding annotation "
+"type by annotating the member <literal>@NonBinding</literal>."
+msgstr ""
+
+#. Tag: title
+#: injection.xml:141
+#, no-c-format
+msgid "Combinations of binding annnotations"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:143
+#, no-c-format
+msgid "An injection point may even specify multiple binding annotations:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:145
+#, no-c-format
+msgid ""
+"<![CDATA[@Asynchronous @PayByCheque PaymentProcessor paymentProcessor]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:147
+#, no-c-format
+msgid ""
+"In this case, only a Web Bean which has <emphasis>both</emphasis> binding "
+"annotations would be eligible for injection."
+msgstr ""
+
+#. Tag: title
+#: injection.xml:153
+#, no-c-format
+msgid "Binding annotations and producer methods"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:155
+#, no-c-format
+msgid "Even producer methods may specify binding annotations:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:157
+#, no-c-format
+msgid ""
+"<![CDATA[@Produces \n"
+"@Asynchronous @PayByCheque \n"
+"PaymentProcessor createAsyncPaymentProcessor(@PayByCheque PaymentProcessor "
+"processor) {\n"
+"    return new AsynchronousPaymentProcessor(processor);\n"
+"}]]>"
+msgstr ""
+
+#. Tag: title
+#: injection.xml:162
+#, no-c-format
+msgid "The default binding type"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:164
+#, no-c-format
+msgid ""
+"Web Beans defines a binding type <literal>@Current</literal> that is the "
+"default binding type for any injection point or Web Bean that does not "
+"explicitly specify a binding type."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:168
+#, no-c-format
+msgid ""
+"There are two common circumstances in which it is necessary to explicitly "
+"specify <literal>@Current</literal>:"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:173
+#, no-c-format
+msgid ""
+"on a field, in order to declare it as an injected field with the default "
+"binding type, and"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:177
+#, no-c-format
+msgid ""
+"on a Web Bean which has another binding type in addition to the default "
+"binding type."
+msgstr ""
+
+#. Tag: title
+#: injection.xml:187
+#, no-c-format
+msgid "Deployment types"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:189
+#, no-c-format
+msgid ""
+"All Web Beans have a <emphasis>deployment type</emphasis>. Each deployment "
+"type identifies a set of Web Beans that should be conditionally installed in "
+"some deployments of the system."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:193
+#, no-c-format
+msgid ""
+"For example, we could define a deployment type named <literal>@Mock</"
+"literal>, which would identify Web Beans that should only be installed when "
+"the system executes inside an integration testing environment:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:197
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"  @Target({TYPE, METHOD})\n"
+"  @DeploymentType\n"
+"  public @interface Mock {}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:199
+#, no-c-format
+msgid ""
+"Suppose we had some Web Bean that interacted with an external system to "
+"process payments:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:202
+#, no-c-format
+msgid ""
+"<![CDATA[public class ExternalPaymentProcessor {\n"
+"        \n"
+"    public void process(Payment p) {\n"
+"        ...\n"
+"    }\n"
+"    \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:204
+#, no-c-format
+msgid ""
+"Since this Web Bean does not explicitly specify a deployment type, it has "
+"the default deployment type <literal>@Production</literal>."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:207
+#, no-c-format
+msgid ""
+"For integration or unit testing, the external system is slow or unavailable. "
+"So we would create a mock object:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:210
+#, no-c-format
+msgid ""
+"<![CDATA[@Mock \n"
+"public class MockPaymentProcessor implements PaymentProcessor {\n"
+"\n"
+"    @Override\n"
+"    public void process(Payment p) {\n"
+"        p.setSuccessful(true);\n"
+"    }\n"
+"\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:212
+#, no-c-format
+msgid ""
+"But how does the Web Bean manager determine which implementation to use in a "
+"particular deployment?"
+msgstr ""
+
+#. Tag: title
+#: injection.xml:216
+#, no-c-format
+msgid "Enabling deployment types"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:218
+#, no-c-format
+msgid ""
+"Web Beans defines two built-in deployment types: <literal>@Production</"
+"literal> and <literal>@Standard</literal>. By default, only Web Beans with "
+"the built-in deployment types are enabled when the system is deployed. We "
+"can identify additional deployment types to be enabled in a particular "
+"deployment by listing them in <literal>web-beans.xml</literal>."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:224
+#, no-c-format
+msgid ""
+"Going back to our example, when we deploy our integration tests, we want all "
+"our <literal>@Mock</literal> objects to be installed:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:227
+#, no-c-format
+msgid ""
+"<![CDATA[<WebBeans>\n"
+"    <Deploy>\n"
+"        <Standard/>\n"
+"        <Production/>\n"
+"        <test:Mock/>\n"
+"    </Deploy>\n"
+"</WebBeans>]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:229
+#, no-c-format
+msgid ""
+"Now the Web Bean manager will identify and install all Web Beans annotated "
+"<literal>@Production</literal>, <literal>@Standard</literal> or "
+"<literal>@Mock</literal> at deployment time."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:233
+#, no-c-format
+msgid ""
+"The deployment type <literal>@Standard</literal> is used only for certain "
+"special Web Beans defined by the Web Beans specification. We can't use it "
+"for our own Web Beans, and we can't disable it."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:237
+#, no-c-format
+msgid ""
+"The deployment type <literal>@Production</literal> is the default deployment "
+"type for Web Beans which don't explicitly declare a deployment type, and may "
+"be disabled."
+msgstr ""
+
+#. Tag: title
+#: injection.xml:244
+#, no-c-format
+msgid "Deployment type precedence"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:246
+#, no-c-format
+msgid ""
+"If you've been paying attention, you're probably wondering how the Web Bean "
+"manager decides which implementation&#151;<literal>ExternalPaymentProcessor</"
+"literal> or <literal>MockPaymentProcessor</literal>&#151;to choose. Consider "
+"what happens when the manager encounters this injection point:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:251
+#, no-c-format
+msgid "<![CDATA[@Current PaymentProcessor paymentProcessor]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:253
+#, no-c-format
+msgid ""
+"There are now two Web Beans which satisfy the <literal>PaymentProcessor</"
+"literal> contract. Of course, we can't use a binding annotation to "
+"disambiguate, since binding annotations are hard-coded into the source at "
+"the injection point, and we want the manager to be able to decide at "
+"deployment time!"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:258
+#, no-c-format
+msgid ""
+"The solution to this problem is that each deployment type has a different "
+"<emphasis>precedence</emphasis>. The precedence of the deployment types is "
+"determined by the order in which they appear in <literal>web-beans.xml</"
+"literal>. In our example, <literal>@Mock</literal> appears later than "
+"<literal>@Production</literal> so it has a higher precedence."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:264
+#, no-c-format
+msgid ""
+"Whenever the manager discovers that more than one Web Bean could satisfy the "
+"contract (API type plus binding annotations) specified by an injection "
+"point, it considers the relative precedence of the Web Beans. If one has a "
+"higher precedence than the others, it chooses the higher precedence Web Bean "
+"to inject. So, in our example, the Web Bean manager will inject "
+"<literal>MockPaymentProcessor</literal> when executing in our integration "
+"testing environment (which is exactly what we want)."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:271
+#, no-c-format
+msgid ""
+"It's interesting to compare this facility to today's popular manager "
+"architectures. Various \"lightweight\" containers also allow conditional "
+"deployment of classes that exist in the classpath, but the classes that are "
+"to be deployed must be explicity, individually, listed in configuration code "
+"or in some XML configuration file. Web Beans does support Web Bean "
+"definition and configuration via XML, but in the common case where no "
+"complex configuration is required, deployment types allow a whole set of Web "
+"Beans to be enabled with a single line of XML. Meanwhile, a developer "
+"browsing the code can easily identify what deployment scenarios the Web Bean "
+"will be used in."
+msgstr ""
+
+#. Tag: title
+#: injection.xml:284
+#, no-c-format
+msgid "Example deployment types"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:286
+#, no-c-format
+msgid ""
+"Deployment types are useful for all kinds of things, here's some examples:"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:290
+#, no-c-format
+msgid ""
+"<literal>@Mock</literal> and <literal>@Staging</literal> deployment types "
+"for testing"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:294
+#, no-c-format
+msgid "<literal>@AustralianTaxLaw</literal> for site-specific Web Beans"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:297
+#, no-c-format
+msgid ""
+"<literal>@SeamFramework</literal>, <literal>@Guice</literal> for third-party "
+"frameworks which build on Web Beans"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:301
+#, no-c-format
+msgid ""
+"<literal>@Standard</literal> for standard Web Beans defined by the Web Beans "
+"specification"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:306
+#, no-c-format
+msgid "I'm sure you can think of more applications..."
+msgstr ""
+
+#. Tag: title
+#: injection.xml:313
+#, no-c-format
+msgid "Fixing unsatisfied dependencies"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:315
+#, no-c-format
+msgid ""
+"The typesafe resolution algorithm fails when, after considering the binding "
+"annotations and and deployment types of all Web Beans that implement the API "
+"type of an injection point, the Web Bean manager is unable to identify "
+"exactly one Web Bean to inject."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:320
+#, no-c-format
+msgid ""
+"It's usually easy to fix an <literal>UnsatisfiedDependencyException</"
+"literal> or <literal>AmbiguousDependencyException</literal>."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:323
+#, no-c-format
+msgid ""
+"To fix an <literal>UnsatisfiedDependencyException</literal>, simply provide "
+"a Web Bean which implements the API type and has the binding types of the "
+"injection point&#151;or enable the deployment type of a Web Bean that "
+"already implements the API type and has the binding types."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:328
+#, no-c-format
+msgid ""
+"To fix an <literal>AmbiguousDependencyException</literal>, introduce a "
+"binding type to distinguish between the two implementations of the API type, "
+"or change the deployment type of one of the implementations so that the Web "
+"Bean manager can use deployment type precedence to choose between them. An "
+"<literal>AmbiguousDependencyException</literal> can only occur if two Web "
+"Beans share a binding type and have exactly the same deployment type."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:335
+#, no-c-format
+msgid ""
+"There's one more issue you need to be aware of when using dependency "
+"injection in Web Beans."
+msgstr ""
+
+#. Tag: title
+#: injection.xml:341
+#, no-c-format
+msgid "Client proxies"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:343
+#, no-c-format
+msgid ""
+"Clients of an injected Web Bean do not usually hold a direct reference to a "
+"Web Bean instance."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:346
+#, no-c-format
+msgid ""
+"Imagine that a Web Bean bound to the application scope held a direct "
+"reference to a Web Bean bound to the request scope. The application scoped "
+"Web Bean is shared between many different requests. However, each request "
+"should see a different instance of the request scoped Web bean!"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:351
+#, no-c-format
+msgid ""
+"Now imagine that a Web Bean bound to the session scope held a direct "
+"reference to a Web Bean bound to the application scope. From time to time, "
+"the session context is serialized to disk in order to use memory more "
+"efficiently. However, the application scoped Web Bean instance should not be "
+"serialized along with the session scoped Web Bean!"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:357
+#, no-c-format
+msgid ""
+"Therefore, unless a Web Bean has the default scope <literal>@Dependent</"
+"literal>, the Web Bean manager must indirect all injected references to the "
+"Web Bean through a proxy object. This <emphasis>client proxy</emphasis> is "
+"responsible for ensuring that the Web Bean instance that receives a method "
+"invocation is the instance that is associated with the current context. The "
+"client proxy also allows Web Beans bound to contexts such as the session "
+"context to be serialized to disk without recursively serializing other "
+"injected Web Beans."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:365
+#, no-c-format
+msgid ""
+"Unfortunately, due to limitations of the Java language, some Java types "
+"cannot be proxied by the Web Bean manager. Therefore, the Web Bean manager "
+"throws an <literal>UnproxyableDependencyException</literal> if the type of "
+"an injection point cannot be proxied."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:370
+#, no-c-format
+msgid "The following Java types cannot be proxied by the Web Bean manager:"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:374
+#, no-c-format
+msgid ""
+"classes which are declared <literal>final</literal> or have a "
+"<literal>final</literal> method,"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:378
+#, no-c-format
+msgid "classes which have no non-private constructor with no parameters, and"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:381
+#, no-c-format
+msgid "arrays and primitive types."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:385
+#, no-c-format
+msgid ""
+"It's usually very easy to fix an <literal>UnproxyableDependencyException</"
+"literal>. Simply add a constructor with no parameters to the injected class, "
+"introduce an interface, or change the scope of the injected Web Bean to "
+"<literal>@Dependent</literal>."
+msgstr ""
+
+#. Tag: title
+#: injection.xml:392
+#, no-c-format
+msgid "Obtaining a Web Bean by programatic lookup"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:394
+#, no-c-format
+msgid ""
+"The application may obtain an instance of the interface <literal>Manager</"
+"literal> by injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:397
+#, no-c-format
+msgid "<![CDATA[@Current Manager manager;]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:399
+#, no-c-format
+msgid ""
+"The <literal>Manager</literal> object provides a set of methods for "
+"obtaining a Web Bean instance programatically."
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:402
+#, no-c-format
+msgid ""
+"<![CDATA[PaymentProcessor p = manager.getInstanceByType(PaymentProcessor."
+"class);]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:404
+#, no-c-format
+msgid ""
+"Binding annotations may be specified by subclassing the helper class "
+"<literal>AnnotationLiteral</literal>, since it is otherwise difficult to "
+"instantiate an annotation type in Java."
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:408
+#, no-c-format
+msgid ""
+"<![CDATA[PaymentProcessor p = manager.getInstanceByType(PaymentProcessor."
+"class, \n"
+"                                               new "
+"AnnotationLiteral<CreditCard>(){});]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:410
+#, no-c-format
+msgid ""
+"If the binding type has an annotation member, we can't use an anonymous "
+"subclass of <literal>AnnotationLiteral</literal>&#151;instead we'll need to "
+"create a named subclass:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:413
+#, no-c-format
+msgid ""
+"<![CDATA[abstract class CreditCardBinding \n"
+"    extends AnnotationLiteral<CreditCard> \n"
+"    implements CreditCard {}]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:415
+#, no-c-format
+msgid ""
+"<![CDATA[PaymentProcessor p = manager.getInstanceByType(PaymentProcessor."
+"class, \n"
+"                                               new CreditCardBinding() { \n"
+"                                                   public void value() "
+"{ return paymentType; } \n"
+"                                               } );]]>"
+msgstr ""
+
+#. Tag: title
+#: injection.xml:419
+#, no-c-format
+msgid ""
+"Lifecycle callbacks, <literal>@Resource</literal>, <literal>@EJB</literal> "
+"and <literal>@PersistenceContext</literal>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:422
+#, no-c-format
+msgid ""
+"Enterprise Web Beans support all the lifecycle callbacks defined by the EJB "
+"specification: <literal>@PostConstruct</literal>, <literal>@PreDestroy</"
+"literal>, <literal>@PrePassivate</literal> and <literal>@PostActivate</"
+"literal>."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:426
+#, no-c-format
+msgid ""
+"Simple Web Beans support only the <literal>@PostConstruct</literal> and "
+"<literal>@PreDestroy</literal> callbacks."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:429
+#, no-c-format
+msgid ""
+"Both enterprise and simple Web Beans support the use of <literal>@Resource</"
+"literal>, <literal>@EJB</literal> and <literal>@PersistenceContext</literal> "
+"for injection of Java EE resources, EJBs and JPA persistence contexts, "
+"respectively. Simple Web Beans do not support the use of "
+"<literal>@PersistenceContext(type=EXTENDED)</literal>."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:434
+#, no-c-format
+msgid ""
+"The <literal>@PostConstruct</literal> callback always occurs after all "
+"dependencies have been injected."
+msgstr ""
+
+#. Tag: title
+#: injection.xml:440
+#, no-c-format
+msgid "The <literal>InjectionPoint</literal> object"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:442
+#, no-c-format
+msgid ""
+"There are certain kinds of dependent objects&#151;Web Beans with scope "
+"<literal>@Dependent</literal>&#151;that need to know something about the "
+"object or injection point into which they are injected in order to be able "
+"to do what they do. For example:"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:448
+#, no-c-format
+msgid ""
+"The log category for a <literal>Logger</literal> depends upon the class of "
+"the object that owns it."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:452
+#, no-c-format
+msgid ""
+"Injection of a HTTP parameter or header value depends upon what parameter or "
+"header name was specified at the injection point."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:456
+#, no-c-format
+msgid ""
+"Injection of the result of an EL expression evaluation depends upon the "
+"expression that was specified at the injection point."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:461
+#, no-c-format
+msgid ""
+"A Web Bean with scope <literal>@Dependent</literal> may inject an instance "
+"of <literal>InjectionPoint</literal> and access metadata relating to the "
+"injection point to which it belongs."
+msgstr ""
+
+#. Tag: para
+#: injection.xml:465
+#, no-c-format
+msgid ""
+"Let's look at an example. The following code is verbose, and vulnerable to "
+"refactoring problems:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:468
+#, no-c-format
+msgid "<![CDATA[Logger log = Logger.getLogger(MyClass.class.getName());]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:470
+#, no-c-format
+msgid ""
+"This clever little producer method lets you inject a JDK <literal>Logger</"
+"literal> without explicitly specifying the log category:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:473
+#, no-c-format
+msgid ""
+"<![CDATA[class LogFactory {\n"
+"\n"
+"   @Produces Logger createLogger(InjectionPoint injectionPoint) { \n"
+"      return Logger.getLogger(injectionPoint.getMember().getDeclaringClass()."
+"getName()); \n"
+"   }\n"
+"\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:475
+#, no-c-format
+msgid "We can now write:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:477
+#, no-c-format
+msgid "<![CDATA[@Current Logger log;]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:479
+#, no-c-format
+msgid ""
+"Not convinced? Then here's a second example. To inject HTTP parameters, we "
+"need to define a binding type:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:482
+#, no-c-format
+msgid ""
+"<![CDATA[@BindingType\n"
+"@Retention(RUNTIME)\n"
+"@Target({TYPE, METHOD, FIELD, PARAMETER})\n"
+"public @interface HttpParam {\n"
+"   @NonBinding public String value();\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:484
+#, no-c-format
+msgid "We would use this binding type at injection points as follows:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:486
+#, no-c-format
+msgid ""
+"<![CDATA[@HttpParam(\"username\") String username;\n"
+"@HttpParam(\"password\") String password;]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:488
+#, no-c-format
+msgid "The following producer method does the work:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:490
+#, no-c-format
+msgid ""
+"<![CDATA[class HttpParams\n"
+"\n"
+"   @Produces @HttpParam(\"\")\n"
+"   String getParamValue(ServletRequest request, InjectionPoint ip) {\n"
+"      return request.getParameter(ip.getAnnotation(HttpParam.class).value"
+"());\n"
+"   }\n"
+"\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:492
+#, no-c-format
+msgid ""
+"(Note that the <literal>value()</literal> member of the <literal>HttpParam</"
+"literal> annotation is ignored by the Web Bean manager since it is annotated "
+"<literal>@NonBinding.</literal>)"
+msgstr ""
+
+#. Tag: para
+#: injection.xml:495
+#, no-c-format
+msgid ""
+"The Web Bean manager provides a built-in Web Bean that implements the "
+"<literal>InjectionPoint</literal> interface:"
+msgstr ""
+
+#. Tag: programlisting
+#: injection.xml:498
+#, no-c-format
+msgid ""
+"<![CDATA[public interface InjectionPoint { \n"
+"   public Object getInstance(); \n"
+"   public Bean<?> getBean(); \n"
+"   public Member getMember(): \n"
+"   public <T extends Annotation> T getAnnotation(Class<T> annotation); \n"
+"   public Set<T extends Annotation> getAnnotations(); \n"
+"}]]>"
+msgstr ""

Added: doc/trunk/reference/zh-TW/interceptors.po
===================================================================
--- doc/trunk/reference/zh-TW/interceptors.po	                        (rev 0)
+++ doc/trunk/reference/zh-TW/interceptors.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,572 @@
+# Language zh-TW translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: interceptors.xml:4
+#, no-c-format
+msgid "Interceptors"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:6
+#, no-c-format
+msgid ""
+"Web Beans re-uses the basic interceptor architecture of EJB 3.0, extending "
+"the functionality in two directions:"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:11
+#, no-c-format
+msgid "Any Web Bean may have interceptors, not just session beans."
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:14
+#, no-c-format
+msgid ""
+"Web Beans features a more sophisticated annotation-based approach to binding "
+"interceptors to Web Beans."
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:22
+#, no-c-format
+msgid "The EJB specification defines two kinds of interception points:"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:26
+#, no-c-format
+msgid "business method interception, and"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:29
+#, no-c-format
+msgid "lifecycle callback interception."
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:33
+#, no-c-format
+msgid ""
+"A <emphasis>business method interceptor</emphasis> applies to invocations of "
+"methods of the Web Bean by clients of the Web Bean:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:36
+#, no-c-format
+msgid ""
+"<![CDATA[public class TransactionInterceptor {\n"
+"    @AroundInvoke public Object manageTransaction(InvocationContext ctx) "
+"{ ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:38
+#, no-c-format
+msgid ""
+"A <emphasis>lifecycle callback interceptor</emphasis> applies to invocations "
+"of lifecycle callbacks by the container:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:41
+#, no-c-format
+msgid ""
+"<![CDATA[public class DependencyInjectionInterceptor {\n"
+"    @PostConstruct public void injectDependencies(InvocationContext ctx) "
+"{ ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:43
+#, no-c-format
+msgid ""
+"An interceptor class may intercept both lifecycle callbacks and business "
+"methods."
+msgstr ""
+
+#. Tag: title
+#: interceptors.xml:49
+#, no-c-format
+msgid "Interceptor bindings"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:51
+#, no-c-format
+msgid ""
+"Suppose we want to declare that some of our Web Beans are transactional. The "
+"first thing we need is an <emphasis>interceptor binding annotation</"
+"emphasis> to specify exactly which Web Beans we're interested in:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:55
+#, no-c-format
+msgid ""
+"<![CDATA[@InterceptorBindingType\n"
+"@Target({METHOD, TYPE})\n"
+"@Retention(RUNTIME)\n"
+"public @interface Transactional {}]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:57
+#, no-c-format
+msgid ""
+"Now we can easily specify that our <literal>ShoppingCart</literal> is a "
+"transactional object:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:60
+#, no-c-format
+msgid ""
+"<![CDATA[@Transactional\n"
+"public class ShoppingCart { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:62
+#, no-c-format
+msgid "Or, if we prefer, we can specify that just one method is transactional:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:64
+#, no-c-format
+msgid ""
+"<![CDATA[public class ShoppingCart {\n"
+"    @Transactional public void checkout() { ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: title
+#: interceptors.xml:69
+#, no-c-format
+msgid "Implementing interceptors"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:71
+#, no-c-format
+msgid ""
+"That's great, but somewhere along the line we're going to have to actually "
+"implement the interceptor that provides this transaction management aspect. "
+"All we need to do is create a standard EJB interceptor, and annotate it "
+"<literal>@Interceptor</literal> and <literal>@Transactional</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:76
+#, no-c-format
+msgid ""
+"<![CDATA[@Transactional @Interceptor\n"
+"public class TransactionInterceptor {\n"
+"    @AroundInvoke public Object manageTransaction(InvocationContext ctx) "
+"{ ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:78
+#, no-c-format
+msgid ""
+"All Web Beans interceptors are simple Web Beans, and can take advantage of "
+"dependency injection and contextual lifecycle management."
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:81
+#, no-c-format
+msgid ""
+"<![CDATA[@ApplicationScoped @Transactional @Interceptor\n"
+"public class TransactionInterceptor {\n"
+"\n"
+"    @Resource Transaction transaction;\n"
+"\n"
+"    @AroundInvoke public Object manageTransaction(InvocationContext ctx) "
+"{ ... }\n"
+"    \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:83
+#, no-c-format
+msgid "Multiple interceptors may use the same interceptor binding type."
+msgstr ""
+
+#. Tag: title
+#: interceptors.xml:88
+#, no-c-format
+msgid "Enabling interceptors"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:90
+#, no-c-format
+msgid ""
+"Finally, we need to <emphasis>enable</emphasis> our interceptor in "
+"<literal>web-beans.xml</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:93
+#, no-c-format
+msgid ""
+"<![CDATA[<Interceptors>\n"
+"    <tx:TransactionInterceptor/>\n"
+"</Interceptors>]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:95
+#, no-c-format
+msgid "Whoah! Why the angle bracket stew?"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:97
+#, no-c-format
+msgid "Well, the XML declaration solves two problems:"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:101
+#, no-c-format
+msgid ""
+"it enables us to specify a total ordering for all the interceptors in our "
+"system, ensuring deterministic behavior, and"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:105
+#, no-c-format
+msgid "it lets us enable or disable interceptor classes at deployment time."
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:109
+#, no-c-format
+msgid ""
+"For example, we could specify that our security interceptor runs before our "
+"<literal>TransactionInterceptor</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:112
+#, no-c-format
+msgid ""
+"<![CDATA[<Interceptors>\n"
+"    <sx:SecurityInterceptor/>\n"
+"    <tx:TransactionInterceptor/>\n"
+"</Interceptors>]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:114
+#, no-c-format
+msgid "Or we could turn them both off in our test environment!"
+msgstr ""
+
+#. Tag: title
+#: interceptors.xml:119
+#, no-c-format
+msgid "Interceptor bindings with members"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:121
+#, no-c-format
+msgid ""
+"Suppose we want to add some extra information to our "
+"<literal>@Transactional</literal> annotation:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:124
+#, no-c-format
+msgid ""
+"<![CDATA[@InterceptorBindingType\n"
+"@Target({METHOD, TYPE})\n"
+"@Retention(RUNTIME)\n"
+"public @interface Transactional {\n"
+"    boolean requiresNew() default false;\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:126
+#, no-c-format
+msgid ""
+"Web Beans will use the value of <literal>requiresNew</literal> to choose "
+"between two different interceptors, <literal>TransactionInterceptor</"
+"literal> and <literal>RequiresNewTransactionInterceptor</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:130
+#, no-c-format
+msgid ""
+"<![CDATA[@Transactional(requiresNew=true) @Interceptor\n"
+"public class RequiresNewTransactionInterceptor {\n"
+"    @AroundInvoke public Object manageTransaction(InvocationContext ctx) "
+"{ ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:132
+#, no-c-format
+msgid ""
+"Now we can use <literal>RequiresNewTransactionInterceptor</literal> like "
+"this:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:134
+#, no-c-format
+msgid ""
+"<![CDATA[@Transactional(requiresNew=true)\n"
+"public class ShoppingCart { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:136
+#, no-c-format
+msgid ""
+"But what if we only have one interceptor and we want the manager to ignore "
+"the value of <literal>requiresNew</literal> when binding interceptors? We "
+"can use the <literal>@NonBinding</literal> annotation:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:140
+#, no-c-format
+msgid ""
+"<![CDATA[@InterceptorBindingType\n"
+"@Target({METHOD, TYPE})\n"
+"@Retention(RUNTIME)\n"
+"public @interface Secure {\n"
+"    @NonBinding String[] rolesAllowed() default {};\n"
+"}]]>"
+msgstr ""
+
+#. Tag: title
+#: interceptors.xml:145
+#, no-c-format
+msgid "Multiple interceptor binding annotations"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:147
+#, no-c-format
+msgid ""
+"Usually we use combinations of interceptor bindings types to bind multiple "
+"interceptors to a Web Bean. For example, the following declaration would be "
+"used to bind <literal>TransactionInterceptor</literal> and "
+"<literal>SecurityInterceptor</literal> to the same Web Bean:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:152
+#, no-c-format
+msgid ""
+"<![CDATA[@Secure(rolesAllowed=\"admin\") @Transactional\n"
+"public class ShoppingCart { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:154
+#, no-c-format
+msgid ""
+"However, in very complex cases, an interceptor itself may specify some "
+"combination of interceptor binding types:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:157
+#, no-c-format
+msgid ""
+"<![CDATA[@Transactional @Secure @Interceptor\n"
+"public class TransactionalSecureInterceptor { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:159
+#, no-c-format
+msgid ""
+"Then this interceptor could be bound to the <literal>checkout()</literal> "
+"method using any one of the following combinations:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:162
+#, no-c-format
+msgid ""
+"<![CDATA[public class ShoppingCart {\n"
+"    @Transactional @Secure public void checkout() { ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:164
+#, no-c-format
+msgid ""
+"<![CDATA[@Secure\n"
+"public class ShoppingCart {\n"
+"    @Transactional public void checkout() { ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:166
+#, no-c-format
+msgid ""
+"<![CDATA[@Transactionl\n"
+"public class ShoppingCart {\n"
+"    @Secure public void checkout() { ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:168
+#, no-c-format
+msgid ""
+"<![CDATA[@Transactional @Secure\n"
+"public class ShoppingCart {\n"
+"    public void checkout() { ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: title
+#: interceptors.xml:173
+#, no-c-format
+msgid "Interceptor binding type inheritance"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:175
+#, no-c-format
+msgid ""
+"One limitation of the Java language support for annotations is the lack of "
+"annotation inheritance. Really, annotations should have reuse built in, to "
+"allow this kind of thing to work:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:179
+#, no-c-format
+msgid ""
+"<![CDATA[public @interface Action extends Transactional, Secure { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:181
+#, no-c-format
+msgid ""
+"Well, fortunately, Web Beans works around this missing feature of Java. We "
+"may annotate one interceptor binding type with other interceptor binding "
+"types. The interceptor bindings are transitive&#151;any Web Bean with the "
+"first interceptor binding inherits the interceptor bindings declared as meta-"
+"annotations."
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:186
+#, no-c-format
+msgid ""
+"<![CDATA[@Transactional @Secure\n"
+"@InterceptorBindingType\n"
+"@Target(TYPE)\n"
+"@Retention(RUNTIME)\n"
+"public @interface Action { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:188
+#, no-c-format
+msgid ""
+"Any Web Bean annotated <literal>@Action</literal> will be bound to both "
+"<literal>TransactionInterceptor</literal> and <literal>SecurityInterceptor</"
+"literal>. (And even <literal>TransactionalSecureInterceptor</literal>, if it "
+"exists.)"
+msgstr ""
+
+#. Tag: title
+#: interceptors.xml:195
+#, no-c-format
+msgid "Use of <literal>@Interceptors</literal>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:197
+#, no-c-format
+msgid ""
+"The <literal>@Interceptors</literal> annotation defined by the EJB "
+"specification is supported for both enterprise and simple Web Beans, for "
+"example:"
+msgstr ""
+
+#. Tag: programlisting
+#: interceptors.xml:200
+#, no-c-format
+msgid ""
+"<![CDATA[@Interceptors({TransactionInterceptor.class, SecurityInterceptor."
+"class})\n"
+"public class ShoppingCart {\n"
+"    public void checkout() { ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:202
+#, no-c-format
+msgid "However, this approach suffers the following drawbacks:"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:206
+#, no-c-format
+msgid "the interceptor implementation is hardcoded in business code,"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:209
+#, no-c-format
+msgid "interceptors may not be easily disabled at deployment time, and"
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:212
+#, no-c-format
+msgid ""
+"the interceptor ordering is non-global&#151;it is determined by the order in "
+"which interceptors are listed at the class level."
+msgstr ""
+
+#. Tag: para
+#: interceptors.xml:217
+#, no-c-format
+msgid ""
+"Therefore, we recommend the use of Web Beans-style interceptor bindings."
+msgstr ""

Added: doc/trunk/reference/zh-TW/intro.po
===================================================================
--- doc/trunk/reference/zh-TW/intro.po	                        (rev 0)
+++ doc/trunk/reference/zh-TW/intro.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,1075 @@
+# Language zh-TW translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: intro.xml:4
+#, no-c-format
+msgid "Getting started with Web Beans"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: title
+#: intro.xml:13
+#, no-c-format
+msgid "Your first Web Bean"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:15
+#, no-c-format
+msgid ""
+"With certain, very special exceptions, every Java class with a constructor "
+"that accepts no parameters is a Web Bean. That includes every JavaBean. "
+"Furthermore, every EJB 3-style session bean is a Web Bean. Sure, the "
+"JavaBeans and EJBs you've been writing every day have not been able to take "
+"advantage of the new services defined by the Web Beans specification, but "
+"you'll be able to use every one of them as Web Beans&#151;injecting them "
+"into other Web Beans, configuring them via the Web Beans XML configuration "
+"facility, even adding interceptors and decorators to them&#151;without "
+"touching your existing code."
+msgstr ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:29
+#, no-c-format
+msgid ""
+"<![CDATA[public class SentenceParser {\n"
+"    public List<String> parse(String text) { ... }\n"
+"}]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:35
+#, no-c-format
+msgid ""
+"<![CDATA[@Stateless\n"
+"public class SentenceTranslator implements Translator {\n"
+"    public String translate(String sentence) { ... }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:37
+#, no-c-format
+msgid "Where <literal>Translator</literal> is the local interface:"
+msgstr ""
+
+#. Tag: programlisting
+#: intro.xml:39
+#, no-c-format
+msgid ""
+"<![CDATA[@Local\n"
+"public interface Translator {\n"
+"    public String translate(String sentence);\n"
+"}]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:44
+#, no-c-format
+msgid ""
+"<![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"
+"}]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:49
+#, no-c-format
+msgid ""
+"<![CDATA[@Initializer\n"
+"public setTextTranslator(TextTranslator textTranslator) {\n"
+"    this.textTranslator = textTranslator;\n"
+"}]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:54
+#, no-c-format
+msgid ""
+"<![CDATA[TextTranslator tt = manager.getInstanceByType(TextTranslator."
+"class);]]>"
+msgstr ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: para
+#: intro.xml:68
+#, no-c-format
+msgid ""
+"At system initialization time, the Web Bean manager must validate that "
+"exactly one Web Bean exists which satisfies each injection point. In our "
+"example, if no implementation of <literal>Translator</literal> "
+"available&#151;if the <literal>SentenceTranslator</literal> EJB was not "
+"deployed&#151;the Web Bean manager would throw an "
+"<literal>UnsatisfiedDependencyException</literal>. If more than one "
+"implementation of <literal>Translator</literal> was available, the Web Bean "
+"manager would throw an <literal>AmbiguousDependencyException</literal>."
+msgstr ""
+
+#. Tag: title
+#: intro.xml:80
+#, no-c-format
+msgid "What is a Web Bean?"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:82
+#, no-c-format
+msgid "So what, <emphasis>exactly</emphasis>, is a Web Bean?"
+msgstr ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: para
+#: intro.xml:105
+#, no-c-format
+msgid "the lifecycle of each instance of the Web Bean and"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:108
+#, no-c-format
+msgid ""
+"which clients share a reference to a particular instance of the Web Bean."
+msgstr ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: para
+#: intro.xml:132
+#, no-c-format
+msgid "they interact via well-defined public APIs"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:135
+#, no-c-format
+msgid "their lifecycles are completely decoupled"
+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 ""
+
+#. Tag: para
+#: intro.xml:145
+#, no-c-format
+msgid ""
+"Note that not all clients of a Web Bean are Web Beans. Other objects such as "
+"Servlets or Message-Driven Beans&#151;which are by nature not injectable, "
+"contextual objects&#151;may also obtain references to Web Beans by injection."
+msgstr ""
+
+#. Tag: para
+#: intro.xml:149
+#, no-c-format
+msgid "Enough hand-waving. More formally, according to the spec:"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:153
+#, no-c-format
+msgid "A Web Bean comprises:"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:156
+#, no-c-format
+msgid "A (nonempty) set of API types"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:157
+#, no-c-format
+msgid "A (nonempty) set of binding annotation types"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:158
+#, no-c-format
+msgid "A scope"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:159
+#, no-c-format
+msgid "A deployment type"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:160
+#, no-c-format
+msgid "Optionally, a Web Bean name"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:161
+#, no-c-format
+msgid "A set of interceptor binding types"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:162
+#, no-c-format
+msgid "A Web Bean implementation"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:167
+#, no-c-format
+msgid "Let's see what some of these terms mean, to the Web Bean developer."
+msgstr ""
+
+#. Tag: title
+#: intro.xml:170
+#, no-c-format
+msgid "API types, binding types and dependency injection"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: para
+#: intro.xml:177
+#, no-c-format
+msgid "an API type, together with"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:178
+#, no-c-format
+msgid "a set of binding types."
+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 ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:191
+#, no-c-format
+msgid "<![CDATA[@CreditCard PaymentProcessor paymentProcessor]]>"
+msgstr ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:204
+#, no-c-format
+msgid ""
+"<![CDATA[@CreditCard\n"
+"public class CreditCardPaymentProcessor \n"
+"    implements PaymentProcessor { ... }]]>"
+msgstr ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: title
+#: intro.xml:217
+#, no-c-format
+msgid "Deployment types"
+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 ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:233
+#, no-c-format
+msgid ""
+"<![CDATA[@Mock\n"
+"public class MockSentenceTranslator implements Translator {\n"
+"    public String translate(String sentence) {\n"
+"        return \"Lorem ipsum dolor sit amet\";\n"
+"    }\n"
+"}]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: para
+#: intro.xml:240
+#, no-c-format
+msgid ""
+"We'll talk more about this unique and powerful feature in <xref linkend="
+"\"deploymenttypes\"/>."
+msgstr ""
+
+#. Tag: title
+#: intro.xml:246
+#, no-c-format
+msgid "Scope"
+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 ""
+
+#. Tag: para
+#: intro.xml:254
+#, no-c-format
+msgid ""
+"For example, any web application may have <emphasis>session scoped</"
+"emphasis> Web Beans:"
+msgstr ""
+
+#. Tag: programlisting
+#: intro.xml:257
+#, no-c-format
+msgid ""
+"<![CDATA[@SessionScoped\n"
+"public class ShoppingCart { ... }]]>"
+msgstr ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: para
+#: intro.xml:267
+#, no-c-format
+msgid "We'll talk more about scopes in <xref linkend=\"scopescontexts\"/>."
+msgstr ""
+
+#. Tag: title
+#: intro.xml:272
+#, no-c-format
+msgid "Web Bean names and Unified EL"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:278
+#, no-c-format
+msgid ""
+"<![CDATA[@SessionScoped @Named(\"cart\")\n"
+"public class ShoppingCart { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:280
+#, no-c-format
+msgid "Now we can easily use the Web Bean in any JSF or JSP page:"
+msgstr ""
+
+#. Tag: programlisting
+#: intro.xml:282
+#, no-c-format
+msgid ""
+"<![CDATA[<h:dataTable value=\"#{cart.lineItems}\" var=\"item\">\n"
+"    ....\n"
+"</h:dataTable>]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:287
+#, no-c-format
+msgid ""
+"<![CDATA[@SessionScoped @Named\n"
+"public class ShoppingCart { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:289
+#, no-c-format
+msgid ""
+"In this case, the name defaults to <literal>shoppingCart</literal>&#151;the "
+"unqualified class name, with the first character changed to lowercase."
+msgstr ""
+
+#. Tag: title
+#: intro.xml:295
+#, no-c-format
+msgid "Interceptor binding types"
+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 ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:305
+#, no-c-format
+msgid ""
+"<![CDATA[@SessionScoped \n"
+"@Interceptors(TransactionInterceptor.class)\n"
+"public class ShoppingCart { ... }]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:311
+#, no-c-format
+msgid ""
+"<![CDATA[@SessionScoped @Transactional\n"
+"public class ShoppingCart { ... }]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: title
+#: intro.xml:321
+#, no-c-format
+msgid "What kinds of objects can be Web Beans?"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: title
+#: intro.xml:327
+#, no-c-format
+msgid "Simple Web Beans"
+msgstr ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: para
+#: intro.xml:338
+#, no-c-format
+msgid "it is not a non-static static inner class,"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:341
+#, no-c-format
+msgid "it is not a parameterized type, and"
+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 ""
+
+#. Tag: para
+#: intro.xml:349
+#, no-c-format
+msgid "Thus, almost every JavaBean is a simple Web Bean."
+msgstr ""
+
+#. 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 ""
+
+#. Tag: title
+#: intro.xml:358
+#, no-c-format
+msgid "Enterprise Web Beans"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:360
+#, no-c-format
+msgid ""
+"The specification says that all EJB 3-style session and singleton beans are "
+"<emphasis>enterprise</emphasis> Web Beans. Message driven beans are not Web "
+"Beans&#151;since they are not intended to be injected into other "
+"objects&#151;but they can take advantage of most of the functionality of Web "
+"Beans, including dependency injection and interceptors."
+msgstr ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: programlisting
+#: intro.xml:378
+#, no-c-format
+msgid ""
+"<![CDATA[@Stateful @SessionScoped\n"
+"public class ShoppingCart {\n"
+"\n"
+"    ...\n"
+"    \n"
+"    @Remove\n"
+"    public void destroy() {}\n"
+"\n"
+"}]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: para
+#: intro.xml:387
+#, no-c-format
+msgid "method-level transaction management and security,"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:390
+#, no-c-format
+msgid "concurrency management,"
+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 ""
+
+#. Tag: para
+#: intro.xml:397
+#, no-c-format
+msgid "remote and web service invocation, and"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:400
+#, no-c-format
+msgid "timers and asynchronous methods,"
+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 ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: title
+#: intro.xml:427
+#, no-c-format
+msgid "Producer methods"
+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 ""
+
+#. Tag: programlisting
+#: intro.xml:435
+#, no-c-format
+msgid ""
+"<![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"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:437
+#, no-c-format
+msgid ""
+"The result of a producer method is injected just like any other Web Bean."
+msgstr ""
+
+#. Tag: programlisting
+#: intro.xml:439
+#, no-c-format
+msgid "<![CDATA[@Random int randomNumber]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: para
+#: intro.xml:445
+#, no-c-format
+msgid "Some producer methods return objects that require explicit destruction:"
+msgstr ""
+
+#. Tag: programlisting
+#: intro.xml:447
+#, no-c-format
+msgid ""
+"<![CDATA[@Produces @RequestScoped Connection connect(User user) {\n"
+"    return createConnection( user.getId(), user.getPassword() );\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: intro.xml:449
+#, no-c-format
+msgid ""
+"These producer methods may define matching <emphasis>disposal methods</"
+"emphasis>:"
+msgstr ""
+
+#. Tag: programlisting
+#: intro.xml:451
+#, no-c-format
+msgid ""
+"<![CDATA[void close(@Disposes Connection connection) {\n"
+"    connection.close();\n"
+"}]]>"
+msgstr ""
+
+#. 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 ""
+
+#. Tag: para
+#: intro.xml:456
+#, no-c-format
+msgid ""
+"We'll talk much more about producer methods in <xref linkend="
+"\"producermethods\"/>."
+msgstr ""
+
+#. Tag: title
+#: intro.xml:461
+#, no-c-format
+msgid "JMS endpoints"
+msgstr ""
+
+#. 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 ""

Added: doc/trunk/reference/zh-TW/master.po
===================================================================
--- doc/trunk/reference/zh-TW/master.po	                        (rev 0)
+++ doc/trunk/reference/zh-TW/master.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,38 @@
+# Language zh-TW translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: master.xml:12
+#, no-c-format
+msgid "Using contextual objects"
+msgstr ""
+
+#. Tag: title
+#: master.xml:25
+#, no-c-format
+msgid "Developing loosely-coupled code"
+msgstr ""
+
+#. Tag: title
+#: master.xml:35
+#, no-c-format
+msgid "Making the most of strong typing"
+msgstr ""
+
+#. Tag: title
+#: master.xml:46
+#, no-c-format
+msgid "Web Beans and the Java EE ecosystem"
+msgstr ""

Added: doc/trunk/reference/zh-TW/next.po
===================================================================
--- doc/trunk/reference/zh-TW/next.po	                        (rev 0)
+++ doc/trunk/reference/zh-TW/next.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,49 @@
+# Language zh-TW translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: next.xml:4
+#, no-c-format
+msgid "Next steps"
+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 ""
+
+#. 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 ""
+
+#. 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 ""

Added: doc/trunk/reference/zh-TW/part1.po
===================================================================
--- doc/trunk/reference/zh-TW/part1.po	                        (rev 0)
+++ doc/trunk/reference/zh-TW/part1.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,229 @@
+# Language zh-TW translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: para
+#: part1.xml:5
+#, no-c-format
+msgid ""
+"The Web Beans (JSR-299) specification defines a set of services for the Java "
+"EE environment that makes applications much easier to develop. Web Beans "
+"layers an enhanced lifecycle and interaction model over existing Java "
+"component types including JavaBeans and Enterprise Java Beans. As a "
+"complement to the traditional Java EE programming model, the Web Beans "
+"services provide:"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:14
+#, no-c-format
+msgid ""
+"an improved lifecycle for stateful components, bound to well-defined "
+"<emphasis>contexts</emphasis>,"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:18
+#, no-c-format
+msgid "a typesafe approach to <emphasis>dependency injection</emphasis>,"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:21
+#, no-c-format
+msgid ""
+"interaction via an <emphasis>event notification</emphasis> facility, and"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:25
+#, no-c-format
+msgid ""
+"a better approach to binding <emphasis>interceptors</emphasis> to "
+"components, along with a new kind of interceptor, called a "
+"<emphasis>decorator</emphasis>, that is more appropriate for use in solving "
+"business problems."
+msgstr ""
+
+#. Tag: para
+#: part1.xml:32
+#, no-c-format
+msgid ""
+"Dependency injection, together with contextual lifecycle management, saves "
+"the user of an unfamiliar API from having to ask and answer the following "
+"questions:"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:38
+#, no-c-format
+msgid "what is the lifecycle of this object?"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:41
+#, no-c-format
+msgid "how many simultaneous clients can it have?"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:44
+#, no-c-format
+msgid "is it multithreaded?"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:47
+#, no-c-format
+msgid "where can I get one from?"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:50
+#, no-c-format
+msgid "do I need to explicitly destroy it?"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:53
+#, no-c-format
+msgid "where should I keep my reference to it when I'm not using it directly?"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:57
+#, no-c-format
+msgid ""
+"how can I add an indirection layer, so that the implementation of this "
+"object can vary at deployment time?"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:61
+#, no-c-format
+msgid "how should I go about sharing this object between other objects?"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:65
+#, no-c-format
+msgid ""
+"A Web Bean specifies only the type and semantics of other Web Beans it "
+"depends upon. It need not be aware of the actual lifecycle, concrete "
+"implementation, threading model or other clients of any Web Bean it depends "
+"upon. Even better, the concrete implementation, lifecycle and threading "
+"model of a Web Bean it depends upon may vary according to the deployment "
+"scenario, without affecting any client."
+msgstr ""
+
+#. Tag: para
+#: part1.xml:72
+#, no-c-format
+msgid ""
+"Events, interceptors and decorators enhance the <emphasis>loose-coupling</"
+"emphasis> that is inherent in this model:"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:77
+#, no-c-format
+msgid ""
+"<emphasis>event notifications</emphasis> decouple event producers from event "
+"consumers,"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:81
+#, no-c-format
+msgid ""
+"<emphasis>interceptors</emphasis> decouple technical concerns from business "
+"logic, and"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:85
+#, no-c-format
+msgid ""
+"<emphasis>decorators</emphasis> allow business concerns to be "
+"compartmentalized."
+msgstr ""
+
+#. Tag: para
+#: part1.xml:90
+#, no-c-format
+msgid ""
+"Most importantly, Web Beans provides all these facilities in a "
+"<emphasis>typesafe</emphasis> way. Web Beans never uses string-based "
+"identifiers to determine how collaborating objects fit together. And XML, "
+"though it remains an option, is rarely used. Instead, Web Beans uses the "
+"typing information that is already available in the Java object model, "
+"together with a new pattern, called <emphasis>binding annotations</"
+"emphasis>, to wire together Web Beans, their dependencies, their "
+"interceptors and decorators and their event consumers."
+msgstr ""
+
+#. Tag: para
+#: part1.xml:100
+#, no-c-format
+msgid ""
+"The Web Beans services are general and apply to the following types of "
+"components that exist in the Java EE environment:"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:105
+#, no-c-format
+msgid "all JavaBeans,"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:108
+#, no-c-format
+msgid "all EJBs, and"
+msgstr ""
+
+#. Tag: para
+#: part1.xml:111
+#, no-c-format
+msgid "all Servlets."
+msgstr ""
+
+#. Tag: para
+#: part1.xml:115
+#, no-c-format
+msgid ""
+"Web Beans even provides the necessary integration points so that other kinds "
+"of components defined by future Java EE specifications or by non-standard "
+"frameworks may be cleanly integrated with Web Beans, take advantage of the "
+"Web Beans services, and interact with any other kind of Web Bean."
+msgstr ""
+
+#. Tag: para
+#: part1.xml:120
+#, no-c-format
+msgid ""
+"Web Beans was influenced by a number of existing Java frameworks, including "
+"Seam, Guice and Spring. However, Web Beans has its own very distinct "
+"character: more typesafe than Seam, more stateful and less XML-centric than "
+"Spring, more web and enterprise-application capable than Guice."
+msgstr ""
+
+#. Tag: para
+#: part1.xml:125
+#, no-c-format
+msgid ""
+"Most importantly, Web Beans is a JCP standard that integrates cleanly with "
+"Java EE, and with any Java SE environment where embeddable EJB Lite is "
+"available."
+msgstr ""

Added: doc/trunk/reference/zh-TW/part2.po
===================================================================
--- doc/trunk/reference/zh-TW/part2.po	                        (rev 0)
+++ doc/trunk/reference/zh-TW/part2.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,102 @@
+# Language zh-TW translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. 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 ""
+
+#. Tag: para
+#: part2.xml:10
+#, no-c-format
+msgid ""
+"<emphasis>deployment types</emphasis> enable deployment time polymorphism,"
+msgstr ""
+
+#. Tag: para
+#: part2.xml:14
+#, no-c-format
+msgid "<emphasis>producer methods</emphasis> enable runtime polymorphism, and"
+msgstr ""
+
+#. Tag: para
+#: part2.xml:18
+#, no-c-format
+msgid ""
+"<emphasis>contextual lifecycle management</emphasis> decouples Web Bean "
+"lifecycles."
+msgstr ""
+
+#. 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 ""
+
+#. 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 ""
+
+#. Tag: para
+#: part2.xml:34
+#, no-c-format
+msgid ""
+"Web Beans provides three extra important facilities that further the goal of "
+"loose coupling:"
+msgstr ""
+
+#. Tag: para
+#: part2.xml:39
+#, no-c-format
+msgid ""
+"<emphasis>interceptors</emphasis> decouple technical concerns from business "
+"logic,"
+msgstr ""
+
+#. Tag: para
+#: part2.xml:43
+#, no-c-format
+msgid ""
+"<emphasis>decorators</emphasis> may be used to decouple some business "
+"concerns, and"
+msgstr ""
+
+#. Tag: para
+#: part2.xml:47
+#, no-c-format
+msgid ""
+"<emphasis>event notifications</emphasis> decouple event producers from event "
+"consumers."
+msgstr ""
+
+#. Tag: para
+#: part2.xml:52
+#, no-c-format
+msgid "Let's explore interceptors first."
+msgstr ""

Added: doc/trunk/reference/zh-TW/part3.po
===================================================================
--- doc/trunk/reference/zh-TW/part3.po	                        (rev 0)
+++ doc/trunk/reference/zh-TW/part3.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,150 @@
+# Language zh-TW translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: para
+#: part3.xml:5
+#, no-c-format
+msgid ""
+"The second major theme of Web Beans is <emphasis>strong typing</emphasis>. "
+"The information about the dependencies, interceptors and decorators of a Web "
+"Bean, and the information about event consumers for an event producer, is "
+"contained in typesafe Java constructs that may be validated by the compiler."
+msgstr ""
+
+#. Tag: para
+#: part3.xml:10
+#, no-c-format
+msgid ""
+"You don't see string-based identifiers in Web Beans code, not because the "
+"framework is hiding them from you using clever defaulting rules&#151;so-"
+"called \"configuration by convention\"&#151;but because there are simply no "
+"strings there to begin with!"
+msgstr ""
+
+#. Tag: para
+#: part3.xml:15
+#, no-c-format
+msgid ""
+"The obvious benefit of this approach is that <emphasis>any</emphasis> IDE "
+"can provide autocompletion, validation and refactoring without the need for "
+"special tooling. But there is a second, less-immediately-obvious, benefit. "
+"It turns out that when you start thinking of identifying objects, events or "
+"interceptors via annotations instead of names, you have an opportunity to "
+"lift the semantic level of your code."
+msgstr ""
+
+#. Tag: para
+#: part3.xml:21
+#, no-c-format
+msgid ""
+"Web Beans encourages you develop annotations that model concepts, for "
+"example,"
+msgstr ""
+
+#. Tag: para
+#: part3.xml:26
+#, no-c-format
+msgid "<literal>@Asynchronous</literal>,"
+msgstr ""
+
+#. Tag: para
+#: part3.xml:29
+#, no-c-format
+msgid "<literal>@Mock</literal>,"
+msgstr ""
+
+#. Tag: para
+#: part3.xml:32
+#, no-c-format
+msgid "<literal>@Secure</literal> or"
+msgstr ""
+
+#. Tag: para
+#: part3.xml:35
+#, no-c-format
+msgid "<literal>@Updated</literal>,"
+msgstr ""
+
+#. Tag: para
+#: part3.xml:39
+#, no-c-format
+msgid "instead of using compound names like"
+msgstr ""
+
+#. Tag: para
+#: part3.xml:43
+#, no-c-format
+msgid "<literal>asyncPaymentProcessor</literal>,"
+msgstr ""
+
+#. Tag: para
+#: part3.xml:46
+#, no-c-format
+msgid "<literal>mockPaymentProcessor</literal>,"
+msgstr ""
+
+#. Tag: para
+#: part3.xml:49
+#, no-c-format
+msgid "<literal>SecurityInterceptor</literal> or"
+msgstr ""
+
+#. Tag: para
+#: part3.xml:52
+#, no-c-format
+msgid "<literal>DocumentUpdatedEvent</literal>."
+msgstr ""
+
+#. Tag: para
+#: part3.xml:56
+#, no-c-format
+msgid ""
+"The annotations are reusable. They help describe common qualities of "
+"disparate parts of the system. They help us categorize and understand our "
+"code. They help us deal with common concerns in a common way. They make our "
+"code more literate and more understandable."
+msgstr ""
+
+#. Tag: para
+#: part3.xml:61
+#, no-c-format
+msgid ""
+"Web Beans <emphasis>stereotypes</emphasis> take this idea a step further. A "
+"stereotype models a common <emphasis>role</emphasis> in your application "
+"architecture. It encapsulates various properties of the role, including "
+"scope, interceptor bindings, deployment type, etc, into a single reusable "
+"package."
+msgstr ""
+
+#. Tag: para
+#: part3.xml:66
+#, no-c-format
+msgid ""
+"Even Web Beans XML metadata is strongly typed! There's no compiler for XML, "
+"so Web Beans takes advantage of XML schemas to validate the Java types and "
+"attributes that appear in XML. This approach turns out to make the XML more "
+"literate, just like annotations made our Java code more literate."
+msgstr ""
+
+#. Tag: para
+#: part3.xml:71
+#, no-c-format
+msgid ""
+"We're now ready to meet some more advanced features of Web Beans. Bear in "
+"mind that these features exist to make our code both easier to validate and "
+"more understandable. Most of the time you don't ever really <emphasis>need</"
+"emphasis> to use these features, but if you use them wisely, you'll come to "
+"appreciate their power."
+msgstr ""

Added: doc/trunk/reference/zh-TW/part4.po
===================================================================
--- doc/trunk/reference/zh-TW/part4.po	                        (rev 0)
+++ doc/trunk/reference/zh-TW/part4.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,52 @@
+# Language zh-TW translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: para
+#: part4.xml:5
+#, no-c-format
+msgid ""
+"The third theme of Web Beans is <emphasis>integration</emphasis>. Web Beans "
+"was designed to work in concert with other technologies, helping the "
+"application developer fit the other technologies together. Web Beans is an "
+"open technology. It forms a part of the Java EE ecosystem, and is itself the "
+"foundation for a new ecosystem of portable extensions and integration with "
+"existing frameworks and technologies."
+msgstr ""
+
+#. Tag: para
+#: part4.xml:12
+#, no-c-format
+msgid ""
+"We've already seen how Web Beans helps integrate EJB and JSF, allowing EJBs "
+"to be bound directly to JSF pages. That's just the beginning. Web Beans "
+"offers the same potential to diverse other technologies, such as Business "
+"Process Management engines, other Web Frameworks, and third-party component "
+"models. The Java EE platform will never be able to standardize all the "
+"interesting technologies that are used in the world of Java application "
+"development, but Web Beans makes it easier to use the technologies which are "
+"not yet part of the platform seamlessly within the Java EE environment."
+msgstr ""
+
+#. Tag: para
+#: part4.xml:21
+#, no-c-format
+msgid ""
+"We're about to see how to take full advantage of the Java EE platform in an "
+"application that uses Web Beans. We'll also briefly meet a set of SPIs that "
+"are provided to support portable extensions to Web Beans. You might not ever "
+"need to use these SPIs directly, but it's nice to know they are there if you "
+"need them. Most importantly, you'll take advantage of them indirectly, every "
+"time you use a third-party extension."
+msgstr ""

Added: doc/trunk/reference/zh-TW/producermethods.po
===================================================================
--- doc/trunk/reference/zh-TW/producermethods.po	                        (rev 0)
+++ doc/trunk/reference/zh-TW/producermethods.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,247 @@
+# Language zh-TW translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: producermethods.xml:5
+#, no-c-format
+msgid "Producer methods"
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:7
+#, no-c-format
+msgid ""
+"Producer methods let us overcome certain limitations that arise when the Web "
+"Bean manager, instead of the application, is responsible for instantiating "
+"objects. They're also the easiest way to integrate objects which are not Web "
+"Beans into the Web Beans environment. (We'll meet a second approach in <xref "
+"linkend=\"xml\"/>.)"
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:12
+#, no-c-format
+msgid "According to the spec:"
+msgstr ""
+
+#. Tag: chapter
+#: producermethods.xml:12
+#, no-c-format
+msgid ""
+"<blockquote> <para>A Web Beans producer method acts as a source of objects "
+"to be injected, where:</para> <itemizedlist> <listitem> <para>the objects to "
+"be injected are not required to be instances of Web Beans,</para> </"
+"listitem> <listitem> <para>the concrete type of the objects to be injected "
+"may vary at runtime or</para> </listitem> <listitem> <para>the objects "
+"require some custom initialization that is not performed by the Web Bean "
+"constructor</para> </listitem> </itemizedlist> </blockquote> <para>For "
+"example, producer methods let us:</para> <itemizedlist> <listitem> "
+"<para>expose a JPA entity as a Web Bean,</para> </listitem> <listitem> "
+"<para>expose any JDK class as a Web Bean,</para> </listitem> <listitem> "
+"<para>define multiple Web Beans, with different scopes or initialization, "
+"for the same implementation class, or</para> </listitem> <listitem> "
+"<para>vary the implementation of an API type at runtime.</para> </listitem> "
+"</itemizedlist> <para>In particular, producer methods let us use runtime "
+"polymorphism with Web Beans. As we've seen, deployment types are a powerful "
+"solution to the problem of deployment-time polymorphism. But once the system "
+"is deployed, the Web Bean implementation is fixed. A producer method has no "
+"such limitation:</para> <programlisting role=\"JAVA\"><![CDATA"
+"[@SessionScoped\n"
+"public class Preferences {\n"
+"    \n"
+"    private PaymentStrategyType paymentStrategy;\n"
+"    \n"
+"    ...\n"
+"    \n"
+"    @Produces @Preferred \n"
+"    public PaymentStrategy getPaymentStrategy() {\n"
+"        switch (paymentStrategy) {\n"
+"            case CREDIT_CARD: return new CreditCardPaymentStrategy();\n"
+"            case CHEQUE: return new ChequePaymentStrategy();\n"
+"            case PAYPAL: return new PayPalPaymentStrategy();\n"
+"            default: return null;\n"
+"        } \n"
+"    }\n"
+"    \n"
+"}]]></programlisting> <para>Consider an injection point:</para> "
+"<programlisting role=\"JAVA\"><![CDATA[@Preferred PaymentStrategy "
+"paymentStrat;]]></programlisting> <para>This injection point has the same "
+"type and binding annotations as the producer method, so it resolves to the "
+"producer method using the usual Web Beans injection rules. The producer "
+"method will be called by the Web Bean manager to obtain an instance to "
+"service this injection point.</para>."
+msgstr ""
+
+#. Tag: title
+#: producermethods.xml:68
+#, no-c-format
+msgid "Scope of a producer method"
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:70
+#, no-c-format
+msgid ""
+"The scope of the producer method defaults to <literal>@Dependent</literal>, "
+"and so it will be called <emphasis>every time</emphasis> the Web Bean "
+"manager injects this field or any other field that resolves to the same "
+"producer method. Thus, there could be multiple instances of the "
+"<literal>PaymentStrategy</literal> object for each user session."
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:75
+#, no-c-format
+msgid ""
+"To change this behavior, we can add a <literal>@SessionScoped</literal> "
+"annotation to the method."
+msgstr ""
+
+#. Tag: programlisting
+#: producermethods.xml:78
+#, no-c-format
+msgid ""
+"<![CDATA[@Produces @Preferred @SessionScoped\n"
+"public PaymentStrategy getPaymentStrategy() {\n"
+"    ...\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:80
+#, no-c-format
+msgid ""
+"Now, when the producer method is called, the returned "
+"<literal>PaymentStrategy</literal> will be bound to the session context. The "
+"producer method won't be called again in the same session."
+msgstr ""
+
+#. Tag: title
+#: producermethods.xml:87
+#, no-c-format
+msgid "Injection into producer methods"
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:89
+#, no-c-format
+msgid ""
+"There's one potential problem with the code above. The implementations of "
+"<literal>CreditCardPaymentStrategy</literal> are instantiated using the Java "
+"<literal>new</literal> operator. Objects instantiated directly by the "
+"application can't take advantage of dependency injection and don't have "
+"interceptors."
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:94
+#, no-c-format
+msgid ""
+"If this isn't what we want we can use dependency injection into the producer "
+"method to obtain Web Bean instances:"
+msgstr ""
+
+#. Tag: programlisting
+#: producermethods.xml:97
+#, no-c-format
+msgid ""
+"<![CDATA[@Produces @Preferred @SessionScoped\n"
+"public PaymentStrategy getPaymentStrategy(CreditCardPaymentStrategy ccps,\n"
+"                                          ChequePaymentStrategy cps,\n"
+"                                          PayPalPaymentStrategy ppps) {\n"
+"    switch (paymentStrategy) {\n"
+"        case CREDIT_CARD: return ccps;\n"
+"        case CHEQUE: return cps;\n"
+"        case PAYPAL: return ppps;\n"
+"        default: return null;\n"
+"    } \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:99
+#, no-c-format
+msgid ""
+"Wait, what if <literal>CreditCardPaymentStrategy</literal> is a request "
+"scoped Web Bean? Then the producer method has the effect of \"promoting\" "
+"the current request scoped instance into session scope. This is almost "
+"certainly a bug! The request scoped object will be destroyed by the Web Bean "
+"manager before the session ends, but the reference to the object will be "
+"left \"hanging\" in the session scope. This error will <emphasis>not</"
+"emphasis> be detected by the Web Bean manager, so please take extra care "
+"when returning Web Bean instances from producer methods!"
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:107
+#, no-c-format
+msgid ""
+"There's at least three ways we could go about fixing this bug. We could "
+"change the scope of the <literal>CreditCardPaymentStrategy</literal> "
+"implementation, but this would affect other clients of that Web Bean. A "
+"better option would be to change the scope of the producer method to "
+"<literal>@Dependent</literal> or <literal>@RequestScoped</literal>."
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:113
+#, no-c-format
+msgid ""
+"But a more common solution is to use the special <literal>@New</literal> "
+"binding annotation."
+msgstr ""
+
+#. Tag: title
+#: producermethods.xml:119
+#, no-c-format
+msgid "Use of <literal>@New</literal> with producer methods"
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:121
+#, no-c-format
+msgid "Consider the following producer method:"
+msgstr ""
+
+#. Tag: programlisting
+#: producermethods.xml:123
+#, no-c-format
+msgid ""
+"<![CDATA[@Produces @Preferred @SessionScoped\n"
+"public PaymentStrategy getPaymentStrategy(@New CreditCardPaymentStrategy "
+"ccps,\n"
+"                                          @New ChequePaymentStrategy cps,\n"
+"                                          @New PayPalPaymentStrategy ppps) "
+"{\n"
+"    switch (paymentStrategy) {\n"
+"        case CREDIT_CARD: return ccps;\n"
+"        case CHEQUE: return cps;\n"
+"        case PAYPAL: return ppps;\n"
+"        default: return null;\n"
+"    } \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: producermethods.xml:125
+#, no-c-format
+msgid ""
+"Then a new <emphasis>dependent</emphasis> instance of "
+"<literal>CreditCardPaymentStrategy</literal> will be created, passed to the "
+"producer method, returned by the producer method and finally bound to the "
+"session context. The dependent object won't be destroyed until the "
+"<literal>Preferences</literal> object is destroyed, at the end of the "
+"session."
+msgstr ""

Added: doc/trunk/reference/zh-TW/ri-spi.po
===================================================================
--- doc/trunk/reference/zh-TW/ri-spi.po	                        (rev 0)
+++ doc/trunk/reference/zh-TW/ri-spi.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,389 @@
+# Language zh-TW translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: ri-spi.xml:4
+#, no-c-format
+msgid "Integrating the Web Beans RI into other environments"
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:6
+#, no-c-format
+msgid ""
+"Currently the Web Beans RI only runs in JBoss AS 5; integrating the RI into "
+"other EE environments (for example another application server like "
+"Glassfish), into a servlet container (like Tomcat), or with an Embedded "
+"EJB3.1 implementation is fairly easy. In this Appendix we will briefly "
+"discuss the steps needed."
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:15
+#, no-c-format
+msgid ""
+"It should be possible to run Web Beans in an SE environment, but you'll to "
+"do more work, adding your own contexts and lifecycle. The Web Beans RI "
+"currently doesn't expose lifecycle extension points, so you would have to "
+"code directly against Web Beans RI classes."
+msgstr ""
+
+#. Tag: title
+#: ri-spi.xml:24
+#, no-c-format
+msgid "The Web Beans RI SPI"
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:26
+#, no-c-format
+msgid ""
+"The Web Beans SPI is located in <literal>webbeans-ri-spi</literal> module, "
+"and packaged as <literal>webbeans-ri-spi.jar</literal>. Some SPIs are "
+"optional, if you need to override the default behavior, others are required."
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:33
+#, no-c-format
+msgid ""
+"You can specify the implementation of an SPI either as a system property, or "
+"in a properties file <literal>META-INF/web-beans-ri.properties</literal>. "
+"All property names are the fully qualified class name of the implemented "
+"interface; all property values are the fully qualified class name of the "
+"implementation class."
+msgstr ""
+
+#. Tag: title
+#: ri-spi.xml:43
+#, no-c-format
+msgid "Web Bean Discovery"
+msgstr ""
+
+#. Tag: programlisting
+#: ri-spi.xml:45
+#, no-c-format
+msgid ""
+"<![CDATA[public interface WebBeanDiscovery {\n"
+"   /**\n"
+"    * Gets list of all classes in classpath archives with web-beans.xml "
+"files\n"
+"    * \n"
+"    * @return An iterable over the classes \n"
+"    */\n"
+"   public Iterable<Class<?>> discoverWebBeanClasses();\n"
+"   \n"
+"   /**\n"
+"    * Gets a list of all web-beans.xml files in the app classpath\n"
+"    * \n"
+"    * @return An iterable over the web-beans.xml files \n"
+"    */\n"
+"   public Iterable<URL> discoverWebBeansXml();\n"
+"   \n"
+"   /**\n"
+"    * Gets a descriptor for each EJB in the application\n"
+"    * \n"
+"    * @return The bean class to descriptor map \n"
+"    */\n"
+"   public Iterable<EjbDescriptor<?>> discoverEjbs();\n"
+"   \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:47
+#, no-c-format
+msgid ""
+"The discovery of Web Bean classes and <literal>web-bean.xml</literal> files "
+"is self-explanatory (the algorithm is described in Section 11.1 of the JSR-"
+"299 specification, and isn't repeated here)."
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:53
+#, no-c-format
+msgid ""
+"The Web Beans RI also delegates EJB3 bean discovery to the container so that "
+"it doesn't have to scan for EJB3 annotations or parse <literal>ejb-jar.xml</"
+"literal>. For each EJB in the application an EJBDescriptor should be "
+"discovered:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri-spi.xml:60
+#, no-c-format
+msgid ""
+"<![CDATA[public interface EjbDescriptor<T> {\n"
+"   \n"
+"   /**\n"
+"    * Gets the EJB type\n"
+"    * \n"
+"    * @return The EJB Bean class\n"
+"    */\n"
+"   public Class<T> getType();\n"
+"\n"
+"   /**\n"
+"    * Gets the local business interfaces of the EJB\n"
+"    * \n"
+"    * @return An iterator over the local business interfaces\n"
+"    */\n"
+"   public Iterable<BusinessInterfaceDescriptor<?>> getLocalBusinessInterfaces"
+"();\n"
+"   \n"
+"   /**\n"
+"    * Gets the remote business interfaces of the EJB\n"
+"    * \n"
+"    * @return An iterator over the remote business interfaces\n"
+"    */\n"
+"   public Iterable<BusinessInterfaceDescriptor<?>> "
+"getRemoteBusinessInterfaces();\n"
+"   \n"
+"   /**\n"
+"    * Get the remove methods of the EJB\n"
+"    * \n"
+"    * @return An iterator over the remove methods\n"
+"    */\n"
+"   public Iterable<Method> getRemoveMethods();\n"
+"\n"
+"   /**\n"
+"    * Indicates if the bean is stateless\n"
+"    * \n"
+"    * @return True if stateless, false otherwise\n"
+"    */\n"
+"   public boolean isStateless();\n"
+"\n"
+"   /**\n"
+"    * Indicates if the bean is a EJB 3.1 Singleton\n"
+"    * \n"
+"    * @return True if the bean is a singleton, false otherwise\n"
+"    */\n"
+"   public boolean isSingleton();\n"
+"\n"
+"   /**\n"
+"    * Indicates if the EJB is stateful\n"
+"    * \n"
+"    * @return True if the bean is stateful, false otherwise\n"
+"    */\n"
+"   public boolean isStateful();\n"
+"\n"
+"   /**\n"
+"    * Indicates if the EJB is and MDB\n"
+"    * \n"
+"    * @return True if the bean is an MDB, false otherwise\n"
+"    */\n"
+"   public boolean isMessageDriven();\n"
+"\n"
+"   /**\n"
+"    * Gets the EJB name\n"
+"    * \n"
+"    * @return The name\n"
+"    */\n"
+"   public String getEjbName();\n"
+"   \n"
+"   /**\n"
+"    * @return The JNDI string which can be used to lookup a proxy which \n"
+"    * implements all local business interfaces \n"
+"    * \n"
+"    */\n"
+"   public String getLocalJndiName();\n"
+"   \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:62
+#, no-c-format
+msgid ""
+"The contract described the JavaDoc is enough to implement an EJBDescriptor. "
+"In addition to these two interfaces, there is "
+"<literal>BusinessInterfaceDescriptor</literal> which represents a local "
+"business interface (encapsulating the interface class and jndi name)."
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:69
+#, no-c-format
+msgid ""
+"The Web Beans RI can be told to load your implementation of "
+"<literal>WebBeanDiscovery</literal> using the property <literal>org.jboss."
+"webbeans.bootstrap.WebBeanDiscovery</literal> with the fully qualified class "
+"name as the value. For example:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri-spi.xml:76
+#, no-c-format
+msgid ""
+"org.jboss.webbeans.bootstrap.spi.WebBeanDiscovery=org.jboss.webbeans."
+"integration.jbossas.WebBeanDiscoveryImpl"
+msgstr ""
+
+#. Tag: title
+#: ri-spi.xml:80
+#, no-c-format
+msgid "JNDI"
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:82
+#, no-c-format
+msgid ""
+"The Web Beans RI implements JNDI binding and lookup according to standards, "
+"however you may want to alter the binding and lookup (for example in an "
+"environment where JNDI isn't available). To do this, implement <literal>org."
+"jboss.webbeans.spi.resources.Naming</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri-spi.xml:90
+#, no-c-format
+msgid ""
+"<![CDATA[public interface Naming extends Serializable {\n"
+"   \n"
+"   /**\n"
+"    * Typed JNDI lookup\n"
+"    * \n"
+"    * @param <T> The type\n"
+"    * @param name The JNDI name\n"
+"    * @param expectedType The expected type\n"
+"    * @return The object\n"
+"    */\n"
+"   public <T> T lookup(String name, Class<? extends T> expectedType);\n"
+"\n"
+"   /**\n"
+"    * Binds an item to JNDI\n"
+"    * \n"
+"    * @param key The key to bind under\n"
+"    * @param value The item to bind\n"
+"    */\n"
+"   public void bind(String key, Object value);\n"
+"   \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:92 ri-spi.xml:113
+#, no-c-format
+msgid "and tell the RI to use it:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri-spi.xml:96
+#, no-c-format
+msgid "org.jboss.webbeans.resources.spi.Naming=com.acme.MyNaming"
+msgstr ""
+
+#. Tag: title
+#: ri-spi.xml:101
+#, no-c-format
+msgid "Resource loading"
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:103
+#, no-c-format
+msgid ""
+"The Web Beans RI needs to load classes and resources from the classpath at "
+"various times. By default, they are loaded from the same classloader that "
+"was used to load the RI, however this may not be correct for some "
+"environments. If this is case, you can implement <literal>org.jboss.webbeans."
+"spi.ResourceLoader</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri-spi.xml:111
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"         public interface ResourceLoader {\n"
+"    \n"
+"   /**\n"
+"    * Creates a class from a given FQCN\n"
+"    * \n"
+"    * @param name The name of the clsas\n"
+"    * @return The class\n"
+"    */\n"
+"   public Class<?> classForName(String name);\n"
+"   \n"
+"   /**\n"
+"    * Gets a resource as a URL by name\n"
+"    * \n"
+"    * @param name The name of the resource\n"
+"    * @return An URL to the resource\n"
+"    */\n"
+"   public URL getResource(String name);\n"
+"   \n"
+"   /**\n"
+"    * Gets resources as URLs by name\n"
+"    * \n"
+"    * @param name The name of the resource\n"
+"    * @return An iterable reference to the URLS\n"
+"    */\n"
+"   public Iterable<URL> getResources(String name);\n"
+"   \n"
+"}\n"
+"         ]]>"
+msgstr ""
+
+#. Tag: programlisting
+#: ri-spi.xml:117
+#, no-c-format
+msgid "org.jboss.webbeans.resources.spi.ResourceLoader=com.acme.ResourceLoader"
+msgstr ""
+
+#. Tag: title
+#: ri-spi.xml:124
+#, no-c-format
+msgid "The contract with the container"
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:126
+#, no-c-format
+msgid ""
+"There are a number of requirements that the Web Beans RI places on the "
+"container for correct functioning that fall outside implementation of APIs"
+msgstr ""
+
+#. Tag: term
+#: ri-spi.xml:134
+#, no-c-format
+msgid "Classloader isolation"
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:138
+#, no-c-format
+msgid ""
+"If you are integrating the Web Beans into an environment that supports "
+"deployment of applications, you must enable, automatically, or through user "
+"configuation, classloader isolation for each Web Beans application"
+msgstr ""
+
+#. Tag: term
+#: ri-spi.xml:147
+#, no-c-format
+msgid "The <literal>webbeans-ri.jar</literal>"
+msgstr ""
+
+#. Tag: para
+#: ri-spi.xml:151
+#, no-c-format
+msgid ""
+"If you are integrating the Web Beans into an environment that supports "
+"deployment of applications, you must insert the <literal>webbeans-ri.jar</"
+"literal> into the applications isolated classloader. It cannot be loaded "
+"from a shared classloader."
+msgstr ""

Added: doc/trunk/reference/zh-TW/ri.po
===================================================================
--- doc/trunk/reference/zh-TW/ri.po	                        (rev 0)
+++ doc/trunk/reference/zh-TW/ri.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,1003 @@
+# Language zh-TW translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: ri.xml:4
+#, no-c-format
+msgid "The Web Beans Reference Implementation"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:6
+#, no-c-format
+msgid ""
+"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>."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:13
+#, no-c-format
+msgid ""
+"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:"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:22
+#, no-c-format
+msgid "the latest release of the Web Beans RI,"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:25
+#, no-c-format
+msgid "JBoss AS 5.0.0.GA, and"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:28
+#, no-c-format
+msgid "Ant 1.7.0."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:32
+#, no-c-format
+msgid ""
+"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:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:39
+#, no-c-format
+msgid ""
+"<![CDATA[$ cd /Applications\n"
+"$ unzip ~/jboss-5.0.0.GA.zip]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:41
+#, no-c-format
+msgid ""
+"Next, download the Web Beans RI from <ulink url=\"http://seamframework.org/"
+"Download\">seamframework.org</ulink>, and unzip it. For example"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:47
+#, no-c-format
+msgid ""
+"<![CDATA[$ cd ~/\n"
+"$ unzip ~/webbeans-1.0.0.ALPHA1.zip]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:50
+#, no-c-format
+msgid ""
+"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:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:56
+#, no-c-format
+msgid "jboss.home=/Applications/jboss-5.0.0.GA"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:58
+#, no-c-format
+msgid ""
+"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."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:65
+#, no-c-format
+msgid ""
+"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."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:74
+#, no-c-format
+msgid ""
+"To install the update, you'll need Ant 1.7.0 installed, and the "
+"<literal>ANT_HOME</literal> environment variable set. For example:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:79
+#, no-c-format
+msgid ""
+"$ unzip apache-ant-1.7.0.zip\n"
+"$ export ANT_HOME=~/apache-ant-1.7.0"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:81
+#, no-c-format
+msgid ""
+"Then, you can install the update. The update script will use Maven to "
+"download the Web Beans and EJB3 automatically."
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:86
+#, no-c-format
+msgid ""
+"$ cd webbeans-1.0.0.ALPHA1/jboss-as\n"
+"$ ant update"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:88
+#, no-c-format
+msgid "Now, you're ready to deploy your first example!"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:93
+#, no-c-format
+msgid ""
+"The build scripts for the examples offer a number of targets, these are:"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:99
+#, no-c-format
+msgid "<literal>ant restart</literal> - deploy the example in exploded format"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:105
+#, no-c-format
+msgid ""
+"<literal>ant explode</literal> - update an exploded example, without "
+"restarting the deployment"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:111
+#, no-c-format
+msgid ""
+"<literal>ant deploy</literal> - deploy the example in compressed jar format"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:116
+#, no-c-format
+msgid "<literal>ant undeploy</literal> - remove the example from the server"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:121
+#, no-c-format
+msgid "<literal>ant clean</literal> - clean the example"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:128
+#, no-c-format
+msgid "To deploy the numberguess example:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:132
+#, no-c-format
+msgid ""
+"$ cd examples/numberguess\n"
+"ant deploy"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:134
+#, no-c-format
+msgid ""
+"Wait for the application to deploy, and enjoy hours of fun at <ulink url="
+"\"http://localhost:8080/webbeans-numberguess\"></ulink>!"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:139
+#, no-c-format
+msgid ""
+"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:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:146
+#, no-c-format
+msgid ""
+"$ cd examples/translator\n"
+"ant deploy"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:148
+#, no-c-format
+msgid ""
+"Wait for the application to deploy, and visit <ulink url=\"http://"
+"localhost:8080/webbeans-translator\"></ulink>!"
+msgstr ""
+
+#. Tag: title
+#: ri.xml:154
+#, no-c-format
+msgid "The numberguess example"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:156
+#, no-c-format
+msgid ""
+"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."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:162
+#, no-c-format
+msgid ""
+"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."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:168
+#, no-c-format
+msgid ""
+"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:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:176
+#, no-c-format
+msgid ""
+"<![CDATA[<?xml version='1.0' encoding='UTF-8'?>\n"
+"<faces-config version=\"1.2\"\n"
+"              xmlns=\"http://java.sun.com/xml/ns/javaee\"\n"
+"              xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+"              xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://"
+"java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd\">\n"
+"    \n"
+"    <application>\n"
+"        <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>\n"
+"    </application>\n"
+"\n"
+"</faces-config>]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:178
+#, no-c-format
+msgid ""
+"There is an empty <literal>web-beans.xml</literal> file, which marks this "
+"application as a Web Beans application."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:183
+#, no-c-format
+msgid "Finally there is <literal>web.xml</literal>:"
+msgstr ""
+
+#. Tag: section
+#: ri.xml:185
+#, no-c-format
+msgid ""
+"<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\"?>\n"
+"\n"
+"<web-app version=\"2.5\"\n"
+"    xmlns=\"http://java.sun.com/xml/ns/javaee\"\n"
+"    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+"    xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://java.sun."
+"com/xml/ns/javaee/web-app_2_5.xsd\">\n"
+"   \n"
+"   <display-name>Web Beans Numbergues example</display-name>\n"
+"\n"
+"   <!-- JSF -->\n"
+"\n"
+"   <servlet>\n"
+"      <servlet-name>Faces Servlet</servlet-name>\n"
+"      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>\n"
+"      <load-on-startup>1</load-on-startup>\n"
+"   </servlet>\n"
+"\n"
+"   <servlet-mapping>\n"
+"      <servlet-name>Faces Servlet</servlet-name>\n"
+"      <url-pattern>*.jsf</url-pattern>\n"
+"   </servlet-mapping>\n"
+"   \n"
+"   <context-param>\n"
+"      <param-name>javax.faces.DEFAULT_SUFFIX</param-name>\n"
+"      <param-value>.xhtml</param-value>\n"
+"   </context-param>\n"
+"\n"
+"   <session-config>\n"
+"      <session-timeout>10</session-timeout>\n"
+"   </session-config>\n"
+"   \n"
+"    <listener>\n"
+"       <listener-class>org.jboss.webbeans.servlet.WebBeansListener</listener-"
+"class>\n"
+"    </listener>\n"
+"\n"
+"</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="
+"\"30\"/> <area id=\"submit\" coords=\"33\"/> </areaspec> <programlisting><!"
+"[CDATA[<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" "
+"\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"
+"<html xmlns=\"http://www.w3.org/1999/xhtml\"\n"
+"    xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n"
+"    xmlns:h=\"http://java.sun.com/jsf/html\"\n"
+"    xmlns:f=\"http://java.sun.com/jsf/core\"\n"
+"    xmlns:s=\"http://jboss.com/products/seam/taglib\">\n"
+"\n"
+"  <ui:composition template=\"template.xhtml\">\n"
+"    <ui:define name=\"content\">\n"
+"       <h1>Guess a number...</h1>\n"
+"       <h:form id=\"NumberGuessMain\">\n"
+"          <div style=\"color: red\">\n"
+"             <h:messages id=\"messages\" globalOnly=\"false\"/>\n"
+"             <h:outputText id=\"Higher\" value=\"Higher!\" rendered=\"#{game."
+"number gt game.guess and game.guess ne 0}\"/>\n"
+"             <h:outputText id=\"Lower\" value=\"Lower!\" rendered=\"#{game."
+"number lt game.guess and game.guess ne 0}\"/>\n"
+"          </div>\n"
+"   \n"
+"          <div>\n"
+"             I'm thinking of a number between #{game.smallest} and #{game."
+"biggest}.\n"
+"             You have #{game.remainingGuesses} guesses.\n"
+"          </div>\n"
+"     \n"
+"          <div>\n"
+"             Your guess: \n"
+"             <h:inputText id=\"inputGuess\" \n"
+"                          value=\"#{game.guess}\" \n"
+"                          required=\"true\" \n"
+"                          size=\"3\" \n"
+"                          disabled=\"#{game.number eq game.guess}\">\n"
+"                <f:validateLongRange maximum=\"#{game.biggest}\" \n"
+"                                     minimum=\"#{game.smallest}\"/>\n"
+"             </h:inputText>\n"
+"            <h:commandButton id=\"GuessButton\"  \n"
+"                             value=\"Guess\" \n"
+"                             action=\"#{game.check}\" \n"
+"                             disabled=\"#{game.number eq game.guess}\"/>\n"
+"          </div>\n"
+"          <div>\n"
+"            <h:commandButton id=\"RestartButton\" value=\"Reset\" action=\"#"
+"{game.reset}\" immediate=\"true\" />\n"
+"          </div>\n"
+"       </h:form>\n"
+"    </ui:define>\n"
+"  </ui:composition>\n"
+"</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>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:298
+#, no-c-format
+msgid ""
+"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:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:304
+#, no-c-format
+msgid ""
+"<![CDATA[@Target( { TYPE, METHOD, PARAMETER, FIELD })\n"
+"@Retention(RUNTIME)\n"
+"@Documented\n"
+"@BindingType\n"
+"public @interface Random {}]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:306
+#, no-c-format
+msgid ""
+"There is also the <literal>@MaxNumber</literal> binding type, used for "
+"injecting the maximum number that can be injected:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:311
+#, no-c-format
+msgid ""
+"<![CDATA[@Target( { TYPE, METHOD, PARAMETER, FIELD })\n"
+"@Retention(RUNTIME)\n"
+"@Documented\n"
+"@BindingType\n"
+"public @interface MaxNumber {}\n"
+"]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:313
+#, no-c-format
+msgid ""
+"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:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:319
+#, no-c-format
+msgid ""
+"<![CDATA[@ApplicationScoped\n"
+"public class Generator {\n"
+"   \n"
+"   private java.util.Random random = new java.util.Random( System."
+"currentTimeMillis() );\n"
+"   \n"
+"   private int maxNumber = 100;\n"
+"   \n"
+"   java.util.Random getRandom()\n"
+"   {\n"
+"      return random;\n"
+"   }\n"
+"   \n"
+"   @Produces @Random int next() { \n"
+"      return getRandom().nextInt(maxNumber); \n"
+"   }\n"
+"   \n"
+"   @Produces @MaxNumber int getMaxNumber()\n"
+"   {\n"
+"      return maxNumber;\n"
+"   }\n"
+"\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:321
+#, no-c-format
+msgid ""
+"You'll notice that the <literal>Generator</literal> is application scoped; "
+"therefore we don't get a different random each time."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:326
+#, no-c-format
+msgid ""
+"The final Web Bean in the application is the session scoped <literal>Game</"
+"literal>."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:331
+#, no-c-format
+msgid ""
+"You'll 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>."
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:339
+#, no-c-format
+msgid ""
+"<![CDATA[package org.jboss.webbeans.examples.numberguess;\n"
+"\n"
+"\n"
+"import javax.annotation.PostConstruct;\n"
+"import javax.faces.application.FacesMessage;\n"
+"import javax.faces.context.FacesContext;\n"
+"import javax.webbeans.AnnotationLiteral;\n"
+"import javax.webbeans.Current;\n"
+"import javax.webbeans.Initializer;\n"
+"import javax.webbeans.Named;\n"
+"import javax.webbeans.SessionScoped;\n"
+"import javax.webbeans.manager.Manager;\n"
+"\n"
+"@Named\n"
+"@SessionScoped\n"
+"public class Game\n"
+"{\n"
+"   private int number;\n"
+"   \n"
+"   private int guess;\n"
+"   private int smallest;\n"
+"   private int biggest;\n"
+"   private int remainingGuesses;\n"
+"   \n"
+"   @Current Manager manager;\n"
+"   \n"
+"   public Game()\n"
+"   {\n"
+"   }\n"
+"   \n"
+"   @Initializer\n"
+"   Game(@MaxNumber int maxNumber)\n"
+"   {      \n"
+"      this.biggest = maxNumber;\n"
+"   }\n"
+"\n"
+"   public int getNumber()\n"
+"   {\n"
+"      return number;\n"
+"   }\n"
+"   \n"
+"   public int getGuess()\n"
+"   {\n"
+"      return guess;\n"
+"   }\n"
+"   \n"
+"   public void setGuess(int guess)\n"
+"   {\n"
+"      this.guess = guess;\n"
+"   }\n"
+"   \n"
+"   public int getSmallest()\n"
+"   {\n"
+"      return smallest;\n"
+"   }\n"
+"   \n"
+"   public int getBiggest()\n"
+"   {\n"
+"      return biggest;\n"
+"   }\n"
+"   \n"
+"   public int getRemainingGuesses()\n"
+"   {\n"
+"      return remainingGuesses;\n"
+"   }\n"
+"   \n"
+"   public String check()\n"
+"   {\n"
+"      if (guess>number)\n"
+"      {\n"
+"         biggest = guess - 1;\n"
+"      }\n"
+"      if (guess<number)\n"
+"      {\n"
+"         smallest = guess + 1;\n"
+"      }\n"
+"      if (guess == number)\n"
+"      {\n"
+"         FacesContext.getCurrentInstance().addMessage(null, new FacesMessage"
+"(\"Correct!\"));\n"
+"      }\n"
+"      remainingGuesses--;\n"
+"      return null;\n"
+"   }\n"
+"   \n"
+"   @PostConstruct\n"
+"   public void reset()\n"
+"   {\n"
+"      this.smallest = 0;\n"
+"      this.guess = 0;\n"
+"      this.remainingGuesses = 10;\n"
+"      this.number = manager.getInstanceByType(Integer.class, new "
+"AnnotationLiteral<Random>(){});\n"
+"   }\n"
+"   \n"
+"}]]>"
+msgstr ""
+
+#. Tag: title
+#: ri.xml:343
+#, no-c-format
+msgid "The translator example"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:345
+#, no-c-format
+msgid ""
+"The translator example will take any sentences you enter, and translate them "
+"to Latin."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:350
+#, no-c-format
+msgid ""
+"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."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:357
+#, no-c-format
+msgid ""
+"EJB 3.1 and Jave EE 6 allow you to package EJBs in a war, which will make "
+"this structure much simpler!"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:363
+#, no-c-format
+msgid ""
+"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:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:370
+#, no-c-format
+msgid ""
+"<![CDATA[<plugin>\n"
+"   <groupId>org.apache.maven.plugins</groupId>\n"
+"   <artifactId>maven-ear-plugin</artifactId>\n"
+"   <configuration>\n"
+"      <modules>\n"
+"         <webModule>\n"
+"            <groupId>org.jboss.webbeans.examples.translator</groupId>\n"
+"            <artifactId>webbeans-translator-war</artifactId>\n"
+"            <contextRoot>/webbeans-translator</contextRoot>\n"
+"         </webModule>\n"
+"      </modules>\n"
+"      <jboss>\n"
+"         <loader-repository>webbeans.jboss.org:loader=webbeans-translator</"
+"loader-repository>\n"
+"      </jboss>\n"
+"   </configuration>\n"
+"</plugin>]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:372
+#, no-c-format
+msgid ""
+"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."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:380
+#, no-c-format
+msgid ""
+"If you aren't using Maven to generate these files, you would need "
+"<literal>META-INF/jboss-app.xml</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:385
+#, no-c-format
+msgid ""
+"<![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<!DOCTYPE jboss-app\n"
+"    PUBLIC \"-//JBoss//DTD J2EE Application 4.2//EN\"\n"
+"    \"http://www.jboss.org/j2ee/dtd/jboss-app_4_2.dtd\">\n"
+"<jboss-app>\n"
+"  <loader-repository>webbeans.jboss.org:loader=webbeans-translator</loader-"
+"repository>\n"
+"</jboss-app>]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:387
+#, no-c-format
+msgid "and <literal>META-INF/application.xml</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:391
+#, no-c-format
+msgid ""
+"<![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<application xmlns=\"http://java.sun.com/xml/ns/javaee\" \n"
+"             xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+"             xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://"
+"java.sun.com/xml/ns/javaee/application_5.xsd\"\n"
+"             version=\"5\">\n"
+"  <display-name>webbeans-translator-ear</display-name>\n"
+"  <description>Ear Example for the reference implementation of JSR 299: Web "
+"Beans</description>\n"
+"  \n"
+"  <module>\n"
+"    <web>\n"
+"      <web-uri>webbeans-translator.war</web-uri>\n"
+"      <context-root>/webbeans-translator</context-root>\n"
+"    </web>\n"
+"  </module>\n"
+"  <module>\n"
+"    <ejb>webbeans-translator.jar</ejb>\n"
+"  </module>\n"
+"</application>]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:394
+#, no-c-format
+msgid ""
+"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>."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:401
+#, no-c-format
+msgid ""
+"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):"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:407
+#, no-c-format
+msgid ""
+"<![CDATA[<h:form id=\"NumberGuessMain\">\n"
+"            \n"
+"   <table>\n"
+"      <tr align=\"center\" style=\"font-weight: bold\" >\n"
+"         <td>\n"
+"            Your text\n"
+"         </td>\n"
+"         <td>\n"
+"            Translation\n"
+"         </td>\n"
+"      </tr>\n"
+"      <tr>\n"
+"         <td>\n"
+"            <h:inputTextarea id=\"text\" value=\"#{translator.text}\" "
+"required=\"true\" rows=\"5\" cols=\"80\" />\n"
+"         </td>\n"
+"         <td>\n"
+"            <h:outputText value=\"#{translator.translatedText}\" />\n"
+"         </td>\n"
+"      </tr>\n"
+"   </table>\n"
+"   <div>\n"
+"      <h:commandButton id=\"button\" value=\"Translate\" action=\"#"
+"{translator.translate}\"/>\n"
+"   </div>\n"
+"   \n"
+"</h:form>]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:409
+#, no-c-format
+msgid ""
+"The user can enter some text in the lefthand textarea, and hit the translate "
+"button to see the result to the right."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:414
+#, no-c-format
+msgid ""
+"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:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:426
+#, no-c-format
+msgid ""
+"<![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<ejb-jar xmlns=\"http://java.sun.com/xml/ns/javaee\" \n"
+"         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \n"
+"         xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://java."
+"sun.com/xml/ns/javaee/ejb-jar_3_0.xsd\"\n"
+"         version=\"3.0\">\n"
+"         \n"
+"   <interceptors>\n"
+"     <interceptor>\n"
+"       <interceptor-class>org.jboss.webbeans.ejb.SessionBeanInterceptor</"
+"interceptor-class>\n"
+"     </interceptor>\n"
+"   </interceptors>\n"
+"   \n"
+"   <assembly-descriptor>\n"
+"      <interceptor-binding>\n"
+"         <ejb-name>*</ejb-name>\n"
+"         <interceptor-class>org.jboss.webbeans.ejb.SessionBeanInterceptor</"
+"interceptor-class>\n"
+"      </interceptor-binding>\n"
+"   </assembly-descriptor>\n"
+"   \n"
+"</ejb-jar>]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:428
+#, no-c-format
+msgid ""
+"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."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:438
+#, no-c-format
+msgid ""
+"Both <literal>SentanceParser</literal> and <literal>TextTranslator</literal> "
+"are dependent beans, and <literal>TextTranslator</literal> uses constructor "
+"initialization:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:444
+#, no-c-format
+msgid ""
+"<![CDATA[public class TextTranslator { \n"
+"   private SentenceParser sentenceParser; \n"
+"   private Translator sentenceTranslator; \n"
+"   \n"
+"   @Initializer\n"
+"   TextTranslator(SentenceParser sentenceParser, Translator "
+"sentenceTranslator) \n"
+"   { \n"
+"      this.sentenceParser = sentenceParser; \n"
+"      this.sentenceTranslator = sentenceTranslator;]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:446
+#, no-c-format
+msgid ""
+"<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!"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:452
+#, no-c-format
+msgid ""
+"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."
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:458
+#, no-c-format
+msgid ""
+"<![CDATA[@Stateful\n"
+"@RequestScoped\n"
+"@Named(\"translator\")\n"
+"public class TranslatorControllerBean implements TranslatorController\n"
+"{\n"
+"   \n"
+"   @Current TextTranslator translator;]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:460
+#, no-c-format
+msgid "The bean also has getters and setters for all the fields on the page."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:464
+#, no-c-format
+msgid "As this is a stateful session bean, we have to have a remove method:"
+msgstr ""
+
+#. Tag: programlisting
+#: ri.xml:468
+#, no-c-format
+msgid ""
+"<![CDATA[   @Remove\n"
+"   public void remove()\n"
+"   {\n"
+"      \n"
+"   }]]>"
+msgstr ""
+
+#. Tag: para
+#: ri.xml:470
+#, no-c-format
+msgid ""
+"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."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:476
+#, no-c-format
+msgid ""
+"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>."
+msgstr ""
+
+#. Tag: para
+#: ri.xml:482
+#, no-c-format
+msgid ""
+"We need help in all areas - bug fixing, writing new features, writing "
+"examples and translating this reference guide."
+msgstr ""

Added: doc/trunk/reference/zh-TW/scopescontexts.po
===================================================================
--- doc/trunk/reference/zh-TW/scopescontexts.po	                        (rev 0)
+++ doc/trunk/reference/zh-TW/scopescontexts.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,582 @@
+# Language zh-TW translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: scopescontexts.xml:4
+#, no-c-format
+msgid "Scopes and contexts"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:6
+#, no-c-format
+msgid ""
+"So far, we've seen a few examples of <emphasis>scope type annotations</"
+"emphasis>. The scope of a Web Bean determines the lifecycle of instances of "
+"the Web Bean. The scope also determines which clients refer to which "
+"instances of the Web Bean. According to the Web Beans specification, a scope "
+"determines:"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:14
+#, no-c-format
+msgid "When a new instance of any Web Bean with that scope is created"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:17
+#, no-c-format
+msgid "When an existing instance of any Web Bean with that scope is destroyed"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:20
+#, no-c-format
+msgid ""
+"Which injected references refer to any instance of a Web Bean with that scope"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:25
+#, no-c-format
+msgid ""
+"For example, if we have a session scoped Web Bean, <literal>CurrentUser</"
+"literal>, all Web Beans that are called in the context of the same "
+"<literal>HttpSession</literal> will see the same instance of "
+"<literal>CurrentUser</literal>. This instance will be automatically created "
+"the first time a <literal>CurrentUser</literal> is needed in that session, "
+"and automatically destroyed when the session ends."
+msgstr ""
+
+#. Tag: title
+#: scopescontexts.xml:32
+#, no-c-format
+msgid "Scope types"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:34
+#, no-c-format
+msgid ""
+"Web Beans features an <emphasis>extensible context model</emphasis>. It is "
+"possible to define new scopes by creating a new scope type annotation:"
+msgstr ""
+
+#. Tag: programlisting
+#: scopescontexts.xml:37
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target({TYPE, METHOD})\n"
+"@ScopeType\n"
+"public @interface ClusterScoped {}]]>"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:39
+#, no-c-format
+msgid ""
+"Of course, that's the easy part of the job. For this scope type to be "
+"useful, we will also need to define a <literal>Context</literal> object that "
+"implements the scope! Implementing a <literal>Context</literal> is usually a "
+"very technical task, intended for framework development only."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:44
+#, no-c-format
+msgid ""
+"We can apply a scope type annotation to a Web Bean implementation class to "
+"specify the scope of the Web Bean:"
+msgstr ""
+
+#. Tag: programlisting
+#: scopescontexts.xml:47
+#, no-c-format
+msgid ""
+"<![CDATA[@ClusterScoped\n"
+"public class SecondLevelCache { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:58
+#, no-c-format
+msgid "Usually, you'll use one of Web Beans' built-in scopes."
+msgstr ""
+
+#. Tag: title
+#: scopescontexts.xml:63
+#, no-c-format
+msgid "Built-in scopes"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:65
+#, no-c-format
+msgid "Web Beans defines four built-in scopes:"
+msgstr ""
+
+#. Tag: literal
+#: scopescontexts.xml:69
+#, no-c-format
+msgid "@RequestScoped"
+msgstr ""
+
+#. Tag: literal
+#: scopescontexts.xml:72
+#, no-c-format
+msgid "@SessionScoped"
+msgstr ""
+
+#. Tag: literal
+#: scopescontexts.xml:75
+#, no-c-format
+msgid "@ApplicationScoped"
+msgstr ""
+
+#. Tag: literal
+#: scopescontexts.xml:78
+#, no-c-format
+msgid "@ConversationScoped"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:82
+#, no-c-format
+msgid "For a web application that uses Web Beans:"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:86
+#, no-c-format
+msgid ""
+"any servlet request has access to active request, session and application "
+"scopes, and, additionally"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:90
+#, no-c-format
+msgid "any JSF request has access to an active conversation scope."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:94
+#, no-c-format
+msgid "The request and application scopes are also active:"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:98
+#, no-c-format
+msgid "during invocations of EJB remote methods,"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:101
+#, no-c-format
+msgid "during EJB timeouts,"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:104
+#, no-c-format
+msgid "during message delivery to a message-driven bean, and"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:107
+#, no-c-format
+msgid "during web service invocations."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:111
+#, no-c-format
+msgid ""
+"If the application tries to invoke a Web Bean with a scope that does not "
+"have an active context, a <literal>ContextNotActiveException</literal> is "
+"thrown by the Web Bean manager at runtime."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:115
+#, no-c-format
+msgid ""
+"Three of the four built-in scopes should be extremely familiar to every Java "
+"EE developer, so let's not waste time discussing them here. One of the "
+"scopes, however, is new."
+msgstr ""
+
+#. Tag: title
+#: scopescontexts.xml:122
+#, no-c-format
+msgid "The conversation scope"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:124
+#, no-c-format
+msgid ""
+"The Web Beans conversation scope is a bit like the traditional session scope "
+"in that it holds state associated with a user of the system, and spans "
+"multiple requests to the server. However, unlike the session scope, the "
+"conversation scope:"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:130
+#, no-c-format
+msgid "is demarcated explicitly by the application, and"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:133
+#, no-c-format
+msgid ""
+"holds state associated with a particular web browser tab in a JSF "
+"application."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:138
+#, no-c-format
+msgid ""
+"A conversation represents a task, a unit of work from the point of view of "
+"the user. The conversation context holds state associated with what the user "
+"is currently working on. If the user is doing multiple things at the same "
+"time, there are multiple conversations."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:143
+#, no-c-format
+msgid ""
+"The conversation context is active during any JSF request. However, most "
+"conversations are destroyed at the end of the request. If a conversation "
+"should hold state across multiple requests, it must be explicitly promoted "
+"to a <emphasis>long-running conversation</emphasis>."
+msgstr ""
+
+#. Tag: title
+#: scopescontexts.xml:149
+#, no-c-format
+msgid "Conversation demarcation"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:151
+#, no-c-format
+msgid ""
+"Web Beans provides a built-in Web Bean for controlling the lifecyle of "
+"conversations in a JSF application. This Web Bean may be obtained by "
+"injection:"
+msgstr ""
+
+#. Tag: programlisting
+#: scopescontexts.xml:154
+#, no-c-format
+msgid "@Current Conversation conversation;"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:156
+#, no-c-format
+msgid ""
+"To promote the conversation associated with the current request to a long-"
+"running conversation, call the <literal>begin()</literal> method from "
+"application code. To schedule the current long-running conversation context "
+"for destruction at the end of the current request, call <literal>end()</"
+"literal>."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:161
+#, no-c-format
+msgid ""
+"In the following example, a conversation-scoped Web Bean controls the "
+"conversation with which it is associated:"
+msgstr ""
+
+#. Tag: programlisting
+#: scopescontexts.xml:164
+#, no-c-format
+msgid ""
+"@ConversationScoped @Stateful\n"
+"public class OrderBuilder {\n"
+"\n"
+"    private Order order;\n"
+"    private @Current Conversation conversation;\n"
+"    private @PersistenceContext(type=EXTENDED) EntityManager em;\n"
+"    \n"
+"    @Produces public Order getOrder() {\n"
+"        return order;\n"
+"    }\n"
+"\n"
+"    public Order createOrder() {\n"
+"        order = new Order();\n"
+"        conversation.begin();\n"
+"        return order;\n"
+"    }\n"
+"    \n"
+"    public void addLineItem(Product product, int quantity) {\n"
+"        order.add( new LineItem(product, quantity) );\n"
+"    }\n"
+"\n"
+"    public void saveOrder(Order order) {\n"
+"        em.persist(order);\n"
+"        conversation.end();\n"
+"    }\n"
+"    \n"
+"    @Remove\n"
+"    public void destroy() {}\n"
+"    \n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:166
+#, no-c-format
+msgid ""
+"This Web Bean is able to control its own lifecycle through use of the "
+"<literal>Conversation</literal> API. But some other Web Beans have a "
+"lifecycle which depends completely upon another object."
+msgstr ""
+
+#. Tag: title
+#: scopescontexts.xml:173
+#, no-c-format
+msgid "Conversation propagation"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:175
+#, no-c-format
+msgid ""
+"The conversation context automatically propagates with any JSF faces request "
+"(JSF form submission). It does not automatically propagate with non-faces "
+"requests, for example, navigation via a link."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:179
+#, no-c-format
+msgid ""
+"We can force the conversation to propagate with a non-faces request by "
+"including the unique identifier of the conversation as a request parameter. "
+"The Web Beans specification reserves the request parameter named "
+"<literal>cid</literal> for this use. The unique identifier of the "
+"conversation may be obtained from the <literal>Conversation</literal> "
+"object, which has the Web Beans name <literal>conversation</literal>."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:186
+#, no-c-format
+msgid "Therefore, the following link propagates the conversation:"
+msgstr ""
+
+#. Tag: programlisting
+#: scopescontexts.xml:188
+#, no-c-format
+msgid ""
+"<![CDATA[<a href=\"/addProduct.jsp?cid=#{conversation.id}\">Add Product</a>]]"
+">"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:190
+#, no-c-format
+msgid ""
+"The Web Bean manager is also required to propagate conversations across any "
+"redirect, even if the conversation is not marked long-running. This makes it "
+"very easy to implement the common POST-then-redirect pattern, without resort "
+"to fragile constructs such as a \"flash\" object. In this case, the Web Bean "
+"manager automatically adds a request parameter to the redirect URL."
+msgstr ""
+
+#. Tag: title
+#: scopescontexts.xml:200
+#, no-c-format
+msgid "Conversation timeout"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:202
+#, no-c-format
+msgid ""
+"The Web Bean manager is permitted to destroy a conversation and all state "
+"held in its context at any time in order to preserve resources. A Web Bean "
+"manager implementation will normally do this on the basis of some kind of "
+"timeout&#151;though this is not required by the Web Beans specification. The "
+"timeout is the period of inactivity before the conversation is destroyed."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:208
+#, no-c-format
+msgid ""
+"The <literal>Conversation</literal> object provides a method to set the "
+"timeout. This is a hint to the Web Bean manager, which is free to ignore the "
+"setting."
+msgstr ""
+
+#. Tag: programlisting
+#: scopescontexts.xml:212
+#, no-c-format
+msgid "conversation.setTimeout(timeoutInMillis);"
+msgstr ""
+
+#. Tag: title
+#: scopescontexts.xml:219
+#, no-c-format
+msgid "The dependent pseudo-scope"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:221
+#, no-c-format
+msgid ""
+"In addition to the four built-in scopes, Web Beans features the so-called "
+"<emphasis>dependent pseudo-scope</emphasis>. This is the default scope for a "
+"Web Bean which does not explicitly declare a scope type."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:225
+#, no-c-format
+msgid ""
+"For example, this Web Bean has the scope type <literal>@Dependent</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: scopescontexts.xml:227
+#, no-c-format
+msgid "<![CDATA[public class Calculator { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:229
+#, no-c-format
+msgid ""
+"When an injection point of a Web Bean resolves to a dependent Web Bean, a "
+"new instance of the dependent Web Bean is created every time the first Web "
+"Bean is instantiated. Instances of dependent Web Beans are never shared "
+"between different Web Beans or different injection points. They are "
+"<emphasis>dependent objects</emphasis> of some other Web Bean instance."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:235
+#, no-c-format
+msgid ""
+"Dependent Web Bean instances are destroyed when the instance they depend "
+"upon is destroyed."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:243
+#, no-c-format
+msgid ""
+"Web Beans makes it easy to obtain a dependent instance of a Java class or "
+"EJB bean, even if the class or EJB bean is already declared as a Web Bean "
+"with some other scope type."
+msgstr ""
+
+#. Tag: title
+#: scopescontexts.xml:248
+#, no-c-format
+msgid "The <literal>@New</literal> annotation"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:250
+#, no-c-format
+msgid ""
+"The built-in <literal>@New</literal> binding annotation allows "
+"<emphasis>implicit</emphasis> definition of a dependent Web Bean at an "
+"injection point. Suppose we declare the following injected field:"
+msgstr ""
+
+#. Tag: programlisting
+#: scopescontexts.xml:254
+#, no-c-format
+msgid "<![CDATA[@New Calculator calculator;]]>"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:256
+#, no-c-format
+msgid ""
+"Then a Web Bean with scope <literal>@Dependent</literal>, binding type "
+"<literal>@New</literal>, API type <literal>Calculator</literal>, "
+"implementation class <literal>Calculator</literal> and deployment type "
+"<literal>@Standard</literal> is implicitly defined."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:261
+#, no-c-format
+msgid ""
+"This is true even if <literal>Calculator</literal> is <emphasis>already</"
+"emphasis> declared with a different scope type, for example:"
+msgstr ""
+
+#. Tag: programlisting
+#: scopescontexts.xml:264
+#, no-c-format
+msgid ""
+"<![CDATA[@ConversationScoped\n"
+"public class Calculator { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:266
+#, no-c-format
+msgid ""
+"So the following injected attributes each get a different instance of "
+"<literal>Calculator</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: scopescontexts.xml:269
+#, no-c-format
+msgid ""
+"<![CDATA[public class PaymentCalc {\n"
+"\n"
+"    @Current Calculator calculator;\n"
+"    @New Calculator newCalculator;\n"
+"\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:271
+#, no-c-format
+msgid ""
+"The <literal>calculator</literal> field has a conversation-scoped instance "
+"of <literal>Calculator</literal> injected. The <literal>newCalculator</"
+"literal> field has a new instance of <literal>Calculator</literal> injected, "
+"with a lifecycle that is bound to the owning <literal>PaymentCalc</literal>."
+msgstr ""
+
+#. Tag: para
+#: scopescontexts.xml:276
+#, no-c-format
+msgid ""
+"This feature is particularly useful with producer methods, as we'll see in "
+"the next chapter."
+msgstr ""

Added: doc/trunk/reference/zh-TW/specialization.po
===================================================================
--- doc/trunk/reference/zh-TW/specialization.po	                        (rev 0)
+++ doc/trunk/reference/zh-TW/specialization.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,291 @@
+# Language zh-TW translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: specialization.xml:4
+#, no-c-format
+msgid "Specialization"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:6
+#, no-c-format
+msgid ""
+"We've already seen how the Web Beans dependency injection model lets us "
+"<emphasis>override</emphasis> the implementation of an API at deployment "
+"time. For example, the following enterprise Web Bean provides an "
+"implementation of the API <literal>PaymentProcessor</literal> in production:"
+msgstr ""
+
+#. Tag: programlisting
+#: specialization.xml:11
+#, no-c-format
+msgid ""
+"@CreditCard @Stateless\n"
+"public class CreditCardPaymentProcessor \n"
+"        implements PaymentProcessor {\n"
+"    ...\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:13
+#, no-c-format
+msgid ""
+"But in our staging environment, we override that implementation of "
+"<literal>PaymentProcessor</literal> with a different Web Bean:"
+msgstr ""
+
+#. Tag: programlisting
+#: specialization.xml:16
+#, no-c-format
+msgid ""
+"@CreditCard @Stateless @Staging\n"
+"public class StagingCreditCardPaymentProcessor \n"
+"        implements PaymentProcessor {\n"
+"    ...\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:18
+#, no-c-format
+msgid ""
+"What we've tried to do with <literal>StagingCreditCardPaymentProcessor</"
+"literal> is to completely replace <literal>AsyncPaymentProcessor</literal> "
+"in a particular deployment of the system. In that deployment, the deployment "
+"type <literal>@Staging</literal> would have a higher priority than the "
+"default deployment type <literal>@Production</literal>, and therefore "
+"clients with the following injection point:"
+msgstr ""
+
+#. Tag: programlisting
+#: specialization.xml:24
+#, no-c-format
+msgid "@CreditCard PaymentProcessor ccpp"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:26
+#, no-c-format
+msgid ""
+"Would receive an instance of <literal>StagingCreditCardPaymentProcessor</"
+"literal>."
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:28
+#, no-c-format
+msgid "Unfortunately, there are several traps we can easily fall into:"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:32
+#, no-c-format
+msgid ""
+"the higher-priority Web Bean may not implement all the API types of the Web "
+"Bean that it attempts to override,"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:36
+#, no-c-format
+msgid ""
+"the higher-priority Web Bean may not declare all the binding types of the "
+"Web Bean that it attempts to override,"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:40
+#, no-c-format
+msgid ""
+"the higher-priority Web Bean might not have the same name as the Web Bean "
+"that it attempts to override, or"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:44
+#, no-c-format
+msgid ""
+"the Web Bean that it attempts to override might declare a producer method, "
+"disposal method or observer method."
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:49
+#, no-c-format
+msgid ""
+"In each of these cases, the Web Bean that we tried to override could still "
+"be called at runtime. Therefore, overriding is somewhat prone to developer "
+"error."
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:52
+#, no-c-format
+msgid ""
+"Web Beans provides a special feature, called <emphasis>specialization</"
+"emphasis>, that helps the developer avoid these traps. Specialization looks "
+"a little esoteric at first, but it's easy to use in practice, and you'll "
+"really appreciate the extra security it provides."
+msgstr ""
+
+#. Tag: title
+#: specialization.xml:58
+#, no-c-format
+msgid "Using specialization"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:60
+#, no-c-format
+msgid ""
+"Specialization is a feature that is specific to simple and enterprise Web "
+"Beans. To make use of specialization, the higher-priority Web Bean must:"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:65
+#, no-c-format
+msgid "be a direct subclass of the Web Bean it overrides, and"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:68
+#, no-c-format
+msgid ""
+"be a simple Web Bean if the Web Bean it overrides is a simple Web Bean or an "
+"enterprise Web Bean if the Web Bean it overrides is an enterprise Web Bean, "
+"and"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:73
+#, no-c-format
+msgid "be annotated <literal>@Specializes</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: specialization.xml:77
+#, no-c-format
+msgid ""
+"@Stateless @Staging @Specializes\n"
+"public class StagingCreditCardPaymentProcessor \n"
+"        extends CreditCardPaymentProcessor {\n"
+"    ...\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:79
+#, no-c-format
+msgid ""
+"We say that the higher-priority Web Bean <emphasis>specializes</emphasis> "
+"its superclass."
+msgstr ""
+
+#. Tag: title
+#: specialization.xml:85
+#, no-c-format
+msgid "Advantages of specialization"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:87
+#, no-c-format
+msgid "When specialization is used:"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:91
+#, no-c-format
+msgid ""
+"the binding types of the superclass are automatically inherited by the Web "
+"Bean annotated <literal>@Specializes</literal>, and"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:95
+#, no-c-format
+msgid ""
+"the Web Bean name of the superclass is automatically inherited by the Web "
+"Bean annotated <literal>@Specializes</literal>, and"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:99
+#, no-c-format
+msgid ""
+"producer methods, disposal methods and observer methods declared by the "
+"superclass are called upon an instance of the Web Bean annotated "
+"<literal>@Specializes</literal>."
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:105
+#, no-c-format
+msgid ""
+"In our example, the binding type <literal>@CreditCard</literal> of "
+"<literal>CreditCardPaymentProcessor</literal> is inherited by "
+"<literal>StagingCreditCardPaymentProcessor</literal>."
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:109
+#, no-c-format
+msgid "Furthermore, the Web Bean manager will validate that:"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:113
+#, no-c-format
+msgid ""
+"all API types of the superclass are API types of the Web Bean annotated "
+"<literal>@Specializes</literal> (all local interfaces of the superclass "
+"enterprise bean are also local interfaces of the subclass),"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:119
+#, no-c-format
+msgid ""
+"the deployment type of the Web Bean annotated <literal>@Specializes</"
+"literal> has a higher precedence than the deployment type of the superclass, "
+"and"
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:124
+#, no-c-format
+msgid ""
+"there is no other enabled Web Bean that also specializes the superclass."
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:129
+#, no-c-format
+msgid ""
+"If any of these conditions are violated, the Web Bean manager throws an "
+"exception at initialization time."
+msgstr ""
+
+#. Tag: para
+#: specialization.xml:132
+#, no-c-format
+msgid ""
+"Therefore, we can be certain that the superclass will <emphasis>never</"
+"emphasis> be called in any deployment of the system where the Web Bean "
+"annotated <literal>@Specializes</literal> is deployed and enabled."
+msgstr ""

Added: doc/trunk/reference/zh-TW/stereotypes.po
===================================================================
--- doc/trunk/reference/zh-TW/stereotypes.po	                        (rev 0)
+++ doc/trunk/reference/zh-TW/stereotypes.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,352 @@
+# Language zh-TW translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: stereotypes.xml:4
+#, no-c-format
+msgid "Stereotypes"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:6
+#, no-c-format
+msgid "According to the Web Beans specification:"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:10
+#, no-c-format
+msgid ""
+"In many systems, use of architectural patterns produces a set of recurring "
+"Web Bean roles. A stereotype allows a framework developer to identify such a "
+"role and declare some common metadata for Web Beans with that role in a "
+"central place."
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:14
+#, no-c-format
+msgid "A stereotype encapsulates any combination of:"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:18
+#, no-c-format
+msgid "a default deployment type,"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:21
+#, no-c-format
+msgid "a default scope type,"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:24
+#, no-c-format
+msgid "a restriction upon the Web Bean scope,"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:27
+#, no-c-format
+msgid "a requirement that the Web Bean implement or extend a certain type, and"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:30
+#, no-c-format
+msgid "a set of interceptor binding annotations."
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:34
+#, no-c-format
+msgid ""
+"A stereotype may also specify that all Web Beans with the stereotype have "
+"defaulted Web Bean names."
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:37
+#, no-c-format
+msgid "A Web Bean may declare zero, one or multiple stereotypes."
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:41
+#, no-c-format
+msgid ""
+"A stereotype is a Java annotation type. This stereotype identifies action "
+"classes in some MVC framework:"
+msgstr ""
+
+#. Tag: programlisting
+#: stereotypes.xml:44
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target(TYPE)\n"
+"@Stereotype\n"
+"public @interface Action {}]]>"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:46
+#, no-c-format
+msgid "We use the stereotype by applying the annotation to a Web Bean."
+msgstr ""
+
+#. Tag: programlisting
+#: stereotypes.xml:48
+#, no-c-format
+msgid ""
+"<![CDATA[@Action \n"
+"public class LoginAction { ... }]]>"
+msgstr ""
+
+#. Tag: title
+#: stereotypes.xml:51
+#, no-c-format
+msgid "Default scope and deployment type for a stereotype"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:53
+#, no-c-format
+msgid ""
+"A stereotype may specify a default scope and/or default deployment type for "
+"Web Beans with that stereotype. For example, if the deployment type "
+"<literal>@WebTier</literal> identifies Web Beans that should only be "
+"deployed when the system executes as a web application, we might specify the "
+"following defaults for action classes:"
+msgstr ""
+
+#. Tag: programlisting
+#: stereotypes.xml:59
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target(TYPE)\n"
+"@RequestScoped\n"
+"@WebTier\n"
+"@Stereotype\n"
+"public @interface Action {}]]>"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:61
+#, no-c-format
+msgid ""
+"Of course, a particular action may still override these defaults if "
+"necessary:"
+msgstr ""
+
+#. Tag: programlisting
+#: stereotypes.xml:64
+#, no-c-format
+msgid ""
+"<![CDATA[@Dependent @Mock @Action \n"
+"public class MockLoginAction { ... }]]>"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:66
+#, no-c-format
+msgid ""
+"If we want to force all actions to a particular scope, we can do that too."
+msgstr ""
+
+#. Tag: title
+#: stereotypes.xml:72
+#, no-c-format
+msgid "Restricting scope and type with a stereotype"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:74
+#, no-c-format
+msgid ""
+"Suppose that we wish to prevent actions from declaring certain scopes. Web "
+"Beans lets us explicitly specify the set of allowed scopes for Web Beans "
+"with a certain stereotype. For example:"
+msgstr ""
+
+#. Tag: programlisting
+#: stereotypes.xml:78
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target(TYPE)\n"
+"@RequestScoped\n"
+"@WebTier\n"
+"@Stereotype(supportedScopes=RequestScoped.class)\n"
+"public @interface Action {}]]>"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:80
+#, no-c-format
+msgid ""
+"If a particular action class attempts to specify a scope other than the Web "
+"Beans request scope, an exception will be thrown by the Web Bean manager at "
+"initialization time."
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:84
+#, no-c-format
+msgid ""
+"We can also force all Web Bean with a certain stereotype to implement an "
+"interface or extend a class:"
+msgstr ""
+
+#. Tag: programlisting
+#: stereotypes.xml:87
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target(TYPE)\n"
+"@RequestScoped\n"
+"@WebTier\n"
+"@Stereotype(requiredTypes=AbstractAction.class)\n"
+"public @interface Action {}]]>"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:89
+#, no-c-format
+msgid ""
+"If a particular action class does not extend the class "
+"<literal>AbstractAction</literal>, an exception will be thrown by the Web "
+"Bean manager at initialization time."
+msgstr ""
+
+#. Tag: title
+#: stereotypes.xml:96
+#, no-c-format
+msgid "Interceptor bindings for stereotypes"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:98
+#, no-c-format
+msgid ""
+"A stereotype may specify a set of interceptor bindings to be inherited by "
+"all Web Beans with that stereotype."
+msgstr ""
+
+#. Tag: programlisting
+#: stereotypes.xml:101
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target(TYPE)\n"
+"@RequestScoped\n"
+"@Transactional(requiresNew=true)\n"
+"@Secure\n"
+"@WebTier\n"
+"@Stereotype\n"
+"public @interface Action {}]]>"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:103
+#, no-c-format
+msgid ""
+"This helps us get technical concerns even further away from the business "
+"code!"
+msgstr ""
+
+#. Tag: title
+#: stereotypes.xml:109
+#, no-c-format
+msgid "Name defaulting with stereotypes"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:111
+#, no-c-format
+msgid ""
+"Finally, we can specify that all Web Beans with a certain stereotype have a "
+"Web Bean name, defaulted by the Web Bean manager. Actions are often "
+"referenced in JSP pages, so they're a perfect use case for this feature. All "
+"we need to do is add an empty <literal>@Named</literal> annotation:"
+msgstr ""
+
+#. Tag: programlisting
+#: stereotypes.xml:116
+#, no-c-format
+msgid ""
+"<![CDATA[@Retention(RUNTIME)\n"
+"@Target(TYPE)\n"
+"@RequestScoped\n"
+"@Transactional(requiresNew=true)\n"
+"@Secure\n"
+"@Named\n"
+"@WebTier\n"
+"@Stereotype\n"
+"public @interface Action {}]]>"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:118
+#, no-c-format
+msgid ""
+"Now, <literal>LoginAction</literal> will have the name <literal>loginAction</"
+"literal>."
+msgstr ""
+
+#. Tag: title
+#: stereotypes.xml:124
+#, no-c-format
+msgid "Standard stereotypes"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:126
+#, no-c-format
+msgid ""
+"We've already met two standard stereotypes defined by the Web Beans "
+"specification: <literal>@Interceptor</literal> and <literal>@Decorator</"
+"literal>."
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:129
+#, no-c-format
+msgid "Web Beans defines one further standard stereotype:"
+msgstr ""
+
+#. Tag: programlisting
+#: stereotypes.xml:131
+#, no-c-format
+msgid ""
+"<![CDATA[@Named \n"
+"@RequestScoped \n"
+"@Stereotype \n"
+"@Target({TYPE, METHOD}) \n"
+"@Retention(RUNTIME) \n"
+"public @interface Model {} ]]>"
+msgstr ""
+
+#. Tag: para
+#: stereotypes.xml:133
+#, no-c-format
+msgid ""
+"This stereotype is intended for use with JSF. Instead of using JSF managed "
+"beans, just annotate a Web Bean <literal>@Model</literal>, and use it "
+"directly in your JSF page."
+msgstr ""

Added: doc/trunk/reference/zh-TW/xml.po
===================================================================
--- doc/trunk/reference/zh-TW/xml.po	                        (rev 0)
+++ doc/trunk/reference/zh-TW/xml.po	2009-01-07 11:49:47 UTC (rev 805)
@@ -0,0 +1,352 @@
+# Language zh-TW translations for Introduction_to_Web_Beans package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-06 11:30+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: xml.xml:4
+#, no-c-format
+msgid "Defining Web Beans using XML"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:6
+#, no-c-format
+msgid ""
+"So far, we've seen plenty of examples of Web Beans declared using "
+"annotations. However, there are a couple of occasions when we can't use "
+"annotations to define the Web Bean:"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:12
+#, no-c-format
+msgid "when the implementation class comes from some preexisting library, or"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:15
+#, no-c-format
+msgid ""
+"when there should be multiple Web Beans with the same implementation class."
+msgstr ""
+
+#. Tag: para
+#: xml.xml:20
+#, no-c-format
+msgid "In either of these cases, Web Beans gives us two options:"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:23
+#, no-c-format
+msgid "write a producer method, or"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:24
+#, no-c-format
+msgid "declare the Web Bean using XML."
+msgstr ""
+
+#. Tag: para
+#: xml.xml:27
+#, no-c-format
+msgid ""
+"Many frameworks use XML to provide metadata relating to Java classes. "
+"However, Web Beans uses a very different approach to specifying the names of "
+"Java classes, fields or methods to most other frameworks. Instead of writing "
+"class and member names as the string values of XML elements and attributes, "
+"Web Beans lets you use the class or member name as the name of the XML "
+"element."
+msgstr ""
+
+#. Tag: para
+#: xml.xml:33
+#, no-c-format
+msgid ""
+"The advantage of this approach is that you can write an XML schema that "
+"prevents spelling errors in your XML document. It's even possible for a tool "
+"to generate the XML schema automatically from the compiled Java code. Or, an "
+"integrated development environment could perform the same validation without "
+"the need for the explicit intermediate generation step."
+msgstr ""
+
+#. Tag: title
+#: xml.xml:40
+#, no-c-format
+msgid "Declaring Web Bean classes"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:42
+#, no-c-format
+msgid ""
+"For each Java package, Web Beans defines a corresponding XML namespace. The "
+"namespace is formed by prepending <literal>urn:java:</literal> to the Java "
+"package name. For the package <literal>com.mydomain.myapp</literal>, the XML "
+"namespace is <literal>urn:java:com.mydomain.myapp</literal>."
+msgstr ""
+
+#. Tag: para
+#: xml.xml:47
+#, no-c-format
+msgid ""
+"Java types belonging to a package are referred to using an XML element in "
+"the namespace corresponding to the package. The name of the element is the "
+"name of the Java type. Fields and methods of the type are specified by child "
+"elements in the same namespace. If the type is an annotation, members are "
+"specified by attributes of the element."
+msgstr ""
+
+#. Tag: para
+#: xml.xml:53
+#, no-c-format
+msgid ""
+"For example, the element <literal>&lt;util:Date/&gt;</literal> in the "
+"following XML fragment refers to the class <literal>java.util.Date</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: xml.xml:56
+#, no-c-format
+msgid ""
+"<![CDATA[<WebBeans xmlns=\"urn:java:javax.webbeans\"\n"
+"          xmlns:util=\"urn:java:java.util\">\n"
+"\n"
+"    <util:Date/>\n"
+"\n"
+"</WebBeans>]]>"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:58
+#, no-c-format
+msgid ""
+"And this is all the code we need to declare that <literal>Date</literal> is "
+"a simple Web Bean! An instance of <literal>Date</literal> may now be "
+"injected by any other Web Bean:"
+msgstr ""
+
+#. Tag: programlisting
+#: xml.xml:62
+#, no-c-format
+msgid "<![CDATA[@Current Date date]]>"
+msgstr ""
+
+#. Tag: title
+#: xml.xml:67
+#, no-c-format
+msgid "Declaring Web Bean metadata"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:69
+#, no-c-format
+msgid ""
+"We can declare the scope, deployment type and interceptor binding types "
+"using direct child elements of the Web Bean declaration:"
+msgstr ""
+
+#. Tag: programlisting
+#: xml.xml:72
+#, no-c-format
+msgid ""
+"<![CDATA[<myapp:ShoppingCart>\n"
+"    <SessionScoped/>\n"
+"    <myfwk:Transactional requiresNew=\"true\"/>\n"
+"    <myfwk:Secure/>\n"
+"</myapp:ShoppingCart>]]>"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:74
+#, no-c-format
+msgid "We use exactly the same approach to specify names and binding type:"
+msgstr ""
+
+#. Tag: programlisting
+#: xml.xml:76
+#, no-c-format
+msgid ""
+"<![CDATA[<util:Date>\n"
+"    <Named>currentTime</Named>\n"
+"</util:Date>\n"
+"\n"
+"<util:Date>\n"
+"    <SessionScoped/>\n"
+"    <myapp:Login/>\n"
+"    <Named>loginTime</Named>\n"
+"</util:Date>\n"
+"\n"
+"<util:Date>\n"
+"    <ApplicationScoped/>\n"
+"    <myapp:SystemStart/>\n"
+"    <Named>systemStartTime</Named>\n"
+"</util:Date>]]>"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:78
+#, no-c-format
+msgid ""
+"Where <literal>@Login</literal> and <literal>@SystemStart</literal> are "
+"binding annotations types."
+msgstr ""
+
+#. Tag: programlisting
+#: xml.xml:81
+#, no-c-format
+msgid ""
+"<![CDATA[@Current Date currentTime;\n"
+"@Login Date loginTime;\n"
+"@SystemStart Date systemStartTime;]]>"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:83
+#, no-c-format
+msgid "As usual, a Web Bean may support multiple binding types:"
+msgstr ""
+
+#. Tag: programlisting
+#: xml.xml:85
+#, no-c-format
+msgid ""
+"<![CDATA[<myapp:AsynchronousChequePaymentProcessor>\n"
+"    <myapp:PayByCheque/>\n"
+"    <myapp:Asynchronous/>\n"
+"</myapp:AsynchronousChequePaymentProcessor>]]>"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:87
+#, no-c-format
+msgid ""
+"Interceptors and decorators are just simple Web Beans, so they may be "
+"declared just like any other simple Web Bean:"
+msgstr ""
+
+#. Tag: programlisting
+#: xml.xml:90
+#, no-c-format
+msgid ""
+"<![CDATA[<myfwk:TransactionInterceptor>\n"
+"    <Interceptor/>\n"
+"    <myfwk:Transactional/>\n"
+"</myfwk:TransactionInterceptor>]]>"
+msgstr ""
+
+#. Tag: title
+#: xml.xml:95
+#, no-c-format
+msgid "Declaring Web Bean members"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:97
+#, no-c-format
+msgid "TODO!"
+msgstr ""
+
+#. Tag: title
+#: xml.xml:104
+#, no-c-format
+msgid "Declaring inline Web Beans"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:106
+#, no-c-format
+msgid "Web Beans lets us define a Web Bean at an injection point. For example:"
+msgstr ""
+
+#. Tag: programlisting
+#: xml.xml:108
+#, no-c-format
+msgid ""
+"<![CDATA[<myapp:System>\n"
+"    <ApplicationScoped/>\n"
+"    <myapp:admin>\n"
+"        <myapp:Name>\n"
+"            <myapp:firstname>Gavin</myapp:firstname>\n"
+"            <myapp:lastname>King</myapp:lastname>\n"
+"            <myapp:email>gavin at hibernate.org</myapp:email>\n"
+"        </myapp:Name>\n"
+"    </myapp:admin>\n"
+"</myapp:System>]]>"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:110
+#, no-c-format
+msgid ""
+"The <literal>&lt;Name&gt;</literal> element declares a simple Web Bean of "
+"scope <literal>@Dependent</literal> and class <literal>Name</literal>, with "
+"a set of initial field values. This Web Bean has a special, container-"
+"generated binding and is therefore injectable only to the specific injection "
+"point at which it is declared."
+msgstr ""
+
+#. Tag: para
+#: xml.xml:116
+#, no-c-format
+msgid ""
+"This simple but powerful feature allows the Web Beans XML format to be used "
+"to specify whole graphs of Java objects. It's not quite a full databinding "
+"solution, but it's close!"
+msgstr ""
+
+#. Tag: title
+#: xml.xml:123
+#, no-c-format
+msgid "Using a schema"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:125
+#, no-c-format
+msgid ""
+"If we want our XML document format to be authored by people who aren't Java "
+"developers, or who don't have access to our code, we need to provide a "
+"schema. There's nothing specific to Web Beans about writing or using the "
+"schema."
+msgstr ""
+
+#. Tag: programlisting
+#: xml.xml:130
+#, no-c-format
+msgid ""
+"<![CDATA[<WebBeans xmlns=\"urn:java:javax.webbeans\"\n"
+"          xmlns:myapp=\"urn:java:com.mydomain.myapp\"\n"
+"          xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+"          xsi:schemaLocation=\"urn:java:javax.webbeans http://java.sun.com/"
+"jee/web-beans-1.0.xsd\n"
+"                              urn:java:com.mydomain.myapp http://mydomain."
+"com/xsd/myapp-1.2.xsd\">\n"
+"\n"
+"    <myapp:System>\n"
+"        ...\n"
+"    </myapp:System>\n"
+"\n"
+"</WebBeans>]]>"
+msgstr ""
+
+#. Tag: para
+#: xml.xml:132
+#, no-c-format
+msgid ""
+"Writing an XML schema is quite tedious. Therefore, the Web Beans RI project "
+"will provide a tool which automatically generates the XML schema from "
+"compiled Java code."
+msgstr ""




More information about the weld-commits mailing list