[webbeans-commits] Webbeans SVN: r1082 - doc/trunk/reference/ko-KR.
by webbeans-commits@lists.jboss.org
Author: eukim
Date: 2009-01-19 10:45:09 -0500 (Mon, 19 Jan 2009)
New Revision: 1082
Modified:
doc/trunk/reference/ko-KR/injection.po
doc/trunk/reference/ko-KR/specialization.po
Log:
updated
Modified: doc/trunk/reference/ko-KR/injection.po
===================================================================
--- doc/trunk/reference/ko-KR/injection.po 2009-01-19 15:28:06 UTC (rev 1081)
+++ doc/trunk/reference/ko-KR/injection.po 2009-01-19 15:45:09 UTC (rev 1082)
@@ -8,7 +8,7 @@
"Project-Id-Version: injection\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-19 14:48+1000\n"
+"PO-Revision-Date: 2009-01-20 01:43+1000\n"
"Last-Translator: Eunju Kim <eukim(a)redhat.com>\n"
"Language-Team: Korean <ko(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -19,6 +19,9 @@
"\n"
"\n"
"\n"
+"\n"
+"\n"
+"\n"
#. Tag: title
#: injection.xml:4
@@ -124,7 +127,7 @@
msgid ""
"Dependency injection always occurs when the Web Bean instance is first "
"instantiated."
-msgstr ""
+msgstr "Web Bean 인스턴스가 먼저 인스턴스화되었을 경우 의존성 삽입이 발생합니다. "
#. Tag: para
#: injection.xml:25
@@ -132,7 +135,7 @@
msgid ""
"First, the Web Bean manager calls the Web Bean constructor, to obtain an "
"instance of the Web Bean."
-msgstr ""
+msgstr "먼저, Web Bean 관리자는 Web Bean 생성자를 호출하여 Web Bean 인스턴스를 획득합니다. "
#. Tag: para
#: injection.xml:29
@@ -140,13 +143,13 @@
msgid ""
"Next, the Web Bean manager initializes the values of all injected fields of "
"the Web Bean."
-msgstr ""
+msgstr "다음으로, Web Bean 관리자는 Web Bean의 삽입된 모든 영역의 값을 초기화합니다. "
#. Tag: para
#: injection.xml:33
#, no-c-format
msgid "Next, the Web Bean manager calls all initializer methods of Web Bean."
-msgstr ""
+msgstr "그 후, Web Bean 관리자는 Web Bean의 모든 초기화 방식을 호출합니다. "
#. Tag: para
#: injection.xml:37
@@ -154,7 +157,7 @@
msgid ""
"Finally, the <literal>@PostConstruct</literal> method of the Web Bean, if "
"any, is called."
-msgstr ""
+msgstr "마지막으로 Web Bean의 <literal>@PostConstruct</literal> 방식이 호출됩니다. "
#. Tag: para
#: injection.xml:42
@@ -162,7 +165,7 @@
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 ""
+msgstr "EJB가 Web Bean 관리자가 아닌 EJB 컨테이너에 의해 인스턴스화된 이래 생성자 매개변수 삽입은 EJB beans을 지원하지 않습니다. "
#. Tag: para
#: injection.xml:45
@@ -179,7 +182,7 @@
#: injection.xml:51
#, no-c-format
msgid "Producer methods also support parameter injection:"
-msgstr ""
+msgstr "생산자 방식은 매개 변수 삽입을 지원합니다: "
#. Tag: programlisting
#: injection.xml:53
@@ -199,7 +202,7 @@
msgid ""
"Finally, observer methods (which we'll meet in <xref linkend=\"events\"/>), "
"disposal methods and destructor methods all support parameter injection."
-msgstr ""
+msgstr "마지막으로 옵저버 방식 (<xref linkend=\"events\"/>에서 살펴보게됨), 폐지 방식 및 소멸자 방식 모두는 매개 변수 삽입을 지원합니다. "
#. Tag: para
#: injection.xml:58
@@ -260,7 +263,7 @@
#: injection.xml:91
#, no-c-format
msgid "Binding annotations"
-msgstr ""
+msgstr "바인딩 어노테이션 "
#. Tag: para
#: injection.xml:93
@@ -270,7 +273,7 @@
"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 ""
+msgstr "특정 API 유형을 구현하는 하나 이상의 Web Bean이 있을 경우, 삽입 지점은 바인딩 어노테이션을 사용하여 어떤 Web Bean이 삽입되어야 할 지를 지정할 수 있습니다. 예를 들어, <literal>PaymentProcessor</literal>의 두 가지 구현이 있을 수 있습니다: "
#. Tag: programlisting
#: injection.xml:98
@@ -307,6 +310,8 @@
"Where <literal>@PayByCheque</literal> and <literal>@PayByCreditCard</"
"literal> are binding annotations:"
msgstr ""
+"여기서 <literal>@PayByCheque</literal> 및 <literal>@PayByCreditCard</"
+"literal>는 바인딩 어노테이션입니다: "
#. Tag: programlisting
#: injection.xml:105
@@ -348,7 +353,7 @@
#: injection.xml:112
#, no-c-format
msgid "Using field injection:"
-msgstr ""
+msgstr "영역 삽입 사용: "
#. Tag: programlisting
#: injection.xml:114
@@ -364,7 +369,7 @@
#: injection.xml:116
#, no-c-format
msgid "Using initializer method injection:"
-msgstr ""
+msgstr "초기화 방식 삽입 사용: "
#. Tag: programlisting
#: injection.xml:118
@@ -392,7 +397,7 @@
#: injection.xml:120
#, no-c-format
msgid "Or using constructor injection:"
-msgstr ""
+msgstr "생성자 삽입 사용: "
#. Tag: programlisting
#: injection.xml:122
@@ -418,13 +423,13 @@
#: injection.xml:125
#, no-c-format
msgid "Binding annotations with members"
-msgstr ""
+msgstr "멤버와 바인딩 어노테이션 "
#. Tag: para
#: injection.xml:127
#, no-c-format
msgid "Binding annotations may have members:"
-msgstr ""
+msgstr "바인딩 어노테이션은 멤버를 갖을 수 있습니다: "
#. Tag: programlisting
#: injection.xml:129
@@ -448,7 +453,7 @@
#: injection.xml:131
#, no-c-format
msgid "In which case, the member value is significant:"
-msgstr ""
+msgstr "이러한 경우, 멤버 값이 중요합니다: "
#. Tag: programlisting
#: injection.xml:133
@@ -472,13 +477,13 @@
#: injection.xml:141
#, no-c-format
msgid "Combinations of binding annnotations"
-msgstr ""
+msgstr "바인딩 어노테이션의 조합 "
#. Tag: para
#: injection.xml:143
#, no-c-format
msgid "An injection point may even specify multiple binding annotations:"
-msgstr ""
+msgstr "삽입 지점은 여러 바인딩 어노테이션을 지정할 수 도 있습니다: "
#. Tag: programlisting
#: injection.xml:145
@@ -498,13 +503,13 @@
#: injection.xml:153
#, no-c-format
msgid "Binding annotations and producer methods"
-msgstr ""
+msgstr "바인딩 어노테이션 및 생산자 방식 "
#. Tag: para
#: injection.xml:155
#, no-c-format
msgid "Even producer methods may specify binding annotations:"
-msgstr ""
+msgstr "생산자 방식은 바인딩 어노테이션을 지정할 수 도 있습니다: "
#. Tag: programlisting
#: injection.xml:157
@@ -528,7 +533,7 @@
#: injection.xml:162
#, no-c-format
msgid "The default binding type"
-msgstr ""
+msgstr "기본값 바인딩 유형 "
#. Tag: para
#: injection.xml:164
@@ -567,7 +572,7 @@
#: injection.xml:187
#, no-c-format
msgid "Deployment types"
-msgstr ""
+msgstr "배치 유형 "
#. Tag: para
#: injection.xml:189
Modified: doc/trunk/reference/ko-KR/specialization.po
===================================================================
--- doc/trunk/reference/ko-KR/specialization.po 2009-01-19 15:28:06 UTC (rev 1081)
+++ doc/trunk/reference/ko-KR/specialization.po 2009-01-19 15:45:09 UTC (rev 1082)
@@ -8,7 +8,7 @@
"Project-Id-Version: specialization\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-19 23:11+1000\n"
+"PO-Revision-Date: 2009-01-20 01:34+1000\n"
"Last-Translator: Eunju Kim <eukim(a)redhat.com>\n"
"Language-Team: Korean <ko(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -19,6 +19,7 @@
"\n"
"\n"
"\n"
+"\n"
#. Tag: title
#: specialization.xml:4
@@ -140,7 +141,7 @@
msgid ""
"the Web Bean that it attempts to override might declare a producer method, "
"disposal method or observer method."
-msgstr "덮어쓰기하려는 Web Bean은 생산자 방식, 폐기 방식 또는 옵저버 방식을 명시할 수 있습니다. "
+msgstr "덮어쓰기하려는 Web Bean은 생산자 방식, 폐지 방식 또는 옵저버 방식을 명시할 수 있습니다. "
#. Tag: para
#: specialization.xml:49
16 years, 8 months
[webbeans-commits] Webbeans SVN: r1081 - doc/trunk/reference/ko-KR.
by webbeans-commits@lists.jboss.org
Author: eukim
Date: 2009-01-19 10:28:06 -0500 (Mon, 19 Jan 2009)
New Revision: 1081
Modified:
doc/trunk/reference/ko-KR/events.po
Log:
updated
Modified: doc/trunk/reference/ko-KR/events.po
===================================================================
--- doc/trunk/reference/ko-KR/events.po 2009-01-19 15:08:50 UTC (rev 1080)
+++ doc/trunk/reference/ko-KR/events.po 2009-01-19 15:28:06 UTC (rev 1081)
@@ -8,7 +8,7 @@
"Project-Id-Version: events\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-20 01:08+1000\n"
+"PO-Revision-Date: 2009-01-20 01:27+1000\n"
"Last-Translator: Eunju Kim <eukim(a)redhat.com>\n"
"Language-Team: Korean <ko(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -565,7 +565,7 @@
"<literal>@AfterTransactionSuccess</literal> observers are called during the "
"after completion phase of the transaction, but only if the transaction "
"completes successfully"
-msgstr ""
+msgstr "트랜잭션의 완료 단계 이후 동안 트랜잭션이 성공적으로 완료했을 경우에만, <literal>@AfterTransactionSuccess</literal> 옵저버를 호출합니다. "
#. Tag: para
#: events.xml:216
@@ -574,7 +574,7 @@
"<literal>@AfterTransactionFailure</literal> observers are called during the "
"after completion phase of the transaction, but only if the transaction fails "
"to complete successfully"
-msgstr ""
+msgstr "트랜잭션의 완료 단계 이후 동안 트랜잭션이 성공적으로 완료하지 않을 경우에만, <literal>@AfterTransactionFailure</literal> 옵저버를 호출합니다. "
#. Tag: para
#: events.xml:221
@@ -582,7 +582,7 @@
msgid ""
"<literal>@AfterTransactionCompletion</literal> observers are called during "
"the after completion phase of the transaction"
-msgstr ""
+msgstr "트랜잭션의 완료 단계 이후 동안 <literal>@AfterTransactionCompletion</literal> 옵저버를 호출합니다 "
#. Tag: para
#: events.xml:225
@@ -590,7 +590,7 @@
msgid ""
"<literal>@BeforeTransactionCompletion</literal> observers are called during "
"the before completion phase of the transaction"
-msgstr ""
+msgstr "트랜잭션의 완료 단계 이전 동안 <literal>@BeforeTransactionCompletion</literal> 옵저버를 호출합니다 "
#. Tag: para
#: events.xml:230
@@ -605,7 +605,7 @@
#: events.xml:233
#, no-c-format
msgid "Imagine that we have cached a JPA query result set in the application scope:"
-msgstr ""
+msgstr "애플리케이션 범위에 있는 JPA 쿼리 결과 모음을 캐시했다고 가정합니다: "
#. Tag: programlisting
#: events.xml:235
@@ -657,7 +657,7 @@
"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 ""
+msgstr "때때로 <literal>Product</literal>는 생성 또는 삭제됩니다. 이러한 상황이 발생하면, <literal>Product</literal> 카탈로그를 새로고침해야 합니다. 하지만, 이러한 새로 고침을 실행하기 전 트랜젝션이 성공적으로 <emphasis>완료할 때</emphasis> 까지 기다리셔야 합니다! "
#. Tag: para
#: events.xml:242
@@ -665,7 +665,7 @@
msgid ""
"The Web Bean that creates and deletes <literal>Product</literal>s could "
"raise events, for example:"
-msgstr ""
+msgstr "<literal>Product</literal>를 생성 및 삭제하는 Web Bean은 이벤트를 제기할 수 있습니다, 예: "
#. Tag: programlisting
#: events.xml:245
@@ -717,7 +717,7 @@
msgid ""
"And now <literal>Catalog</literal> can observe the events after successful "
"completion of the transaction:"
-msgstr ""
+msgstr "<literal>Catalog</literal>는 트랜잭션을 성공적으로 완료한 후에 이벤트를 옵저버할 수 있습니다: "
#. Tag: programlisting
#: events.xml:250
16 years, 8 months
[webbeans-commits] Webbeans SVN: r1080 - doc/trunk/reference/ko-KR.
by webbeans-commits@lists.jboss.org
Author: eukim
Date: 2009-01-19 10:08:50 -0500 (Mon, 19 Jan 2009)
New Revision: 1080
Modified:
doc/trunk/reference/ko-KR/events.po
Log:
updated
Modified: doc/trunk/reference/ko-KR/events.po
===================================================================
--- doc/trunk/reference/ko-KR/events.po 2009-01-19 13:38:28 UTC (rev 1079)
+++ doc/trunk/reference/ko-KR/events.po 2009-01-19 15:08:50 UTC (rev 1080)
@@ -8,7 +8,7 @@
"Project-Id-Version: events\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-19 23:13+1000\n"
+"PO-Revision-Date: 2009-01-20 01:08+1000\n"
"Last-Translator: Eunju Kim <eukim(a)redhat.com>\n"
"Language-Team: Korean <ko(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -212,7 +212,7 @@
"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 ""
+msgstr "이벤트 객체는 와일드카드 유형 매개변수나 또는 유형 변수가 없는 Java 클래스의 인스턴스가 될 수 도 있습니다. 이벤트는 다음과 같은 사항을 갖는 모든 옵저버 방식에 전달됩니다: "
#. Tag: para
#: events.xml:83 events.xml:107 events.xml:126
@@ -234,7 +234,7 @@
"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 ""
+msgstr "Web Bean 관리자는 모든 옵저버 방식을 호출하여, 이벤트 매개 변수 값으로 이벤트 객체를 전달합니다. 옵저버 방식이 예외 처리를 넘기게 될 경우, Web Bean 관리자는 옵저버 방식 호출을 중단하고 예외 처리는 <literal>fire()</literal> 방식에 의해 다시 넘기게 됩니다. "
#. Tag: para
#: events.xml:95
@@ -261,7 +261,7 @@
"The helper class <literal>AnnotationLiteral</literal> makes it possible to "
"instantiate binding types inline, since this is otherwise difficult to do in "
"Java."
-msgstr ""
+msgstr "Java에서 실행하기 어려웠던 도우미 클래스 <literal>AnnotationLiteral</literal>은 바인딩 유형 인라인을 인스턴스화할 수 있게 합니다. "
#. Tag: para
#: events.xml:103
@@ -425,12 +425,11 @@
#. Tag: para
#: events.xml:169
#, no-c-format
-#, fuzzy
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 "다른 방법으로, 이벤트 바인딩 유형 멤버 값은 이벤트 생산자에 의해 동적으로 지정될 수 있습니다. <literal>AnnotationLiteral</literal>의 추상화 하부클래스를 작성하는"
+msgstr "다른 방법으로, 이벤트 바인딩 유형 멤버 값은 이벤트 생산자에 의해 동적으로 지정될 수 있습니다. <literal>AnnotationLiteral</literal>의 추상화 하부클래스를 작성하여 시작합니다: "
#. Tag: programlisting
#: events.xml:172
@@ -450,7 +449,7 @@
msgid ""
"The event producer passes an instance of this class to <literal>fire()</"
"literal>:"
-msgstr ""
+msgstr "이벤트 생산자는 이러한 클래스의 인스턴스를 <literal>fire()</literal>로 전달합니다: "
#. Tag: programlisting
#: events.xml:176
@@ -466,13 +465,13 @@
#: events.xml:181
#, no-c-format
msgid "Multiple event bindings"
-msgstr ""
+msgstr "여러 이벤트 바인딩 "
#. Tag: para
#: events.xml:183
#, no-c-format
msgid "Event binding types may be combined, for example:"
-msgstr ""
+msgstr "이벤트 바인딩 유형은 통합할 수 있습니다, 예: "
#. Tag: programlisting
#: events.xml:185
@@ -494,7 +493,7 @@
msgid ""
"When this event occurs, all of the following observer methods will be "
"notified:"
-msgstr ""
+msgstr "이러한 이벤트가 발생하면, 다음과 같은 옵저버 방식 모두가 통지되게 됩니다: "
#. Tag: programlisting
#: events.xml:189
@@ -530,7 +529,7 @@
#: events.xml:197
#, no-c-format
msgid "Transactional observers"
-msgstr ""
+msgstr "트랜잭션 옵저버 "
#. Tag: para
#: events.xml:199
@@ -557,7 +556,7 @@
#: events.xml:207
#, no-c-format
msgid "There are three kinds of transactional observers:"
-msgstr ""
+msgstr "세 가지 종류의 트랜잭션 옵저버가 있습니다: "
#. Tag: para
#: events.xml:211
16 years, 8 months
[webbeans-commits] Webbeans SVN: r1079 - ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event and 1 other directories.
by webbeans-commits@lists.jboss.org
Author: dallen6
Date: 2009-01-19 08:38:28 -0500 (Mon, 19 Jan 2009)
New Revision: 1079
Added:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/event/FiresBinding.java
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/EventManager.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/event/BananaSpider.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/event/BlueFacedParrotFinch.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/event/EventBusTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/event/OrangeCheekedWaxbill.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/event/PomeranianInterface.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/event/Terrier.java
Log:
Repaired most of the broken event tests except for 1.
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java 2009-01-19 13:14:04 UTC (rev 1078)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java 2009-01-19 13:38:28 UTC (rev 1079)
@@ -57,6 +57,7 @@
import org.jboss.webbeans.ejb.spi.EjbResolver;
import org.jboss.webbeans.event.EventManager;
import org.jboss.webbeans.injection.InjectionPointProvider;
+import org.jboss.webbeans.introspector.AnnotatedClass;
import org.jboss.webbeans.introspector.AnnotatedItem;
import org.jboss.webbeans.introspector.AnnotatedMethod;
import org.jboss.webbeans.introspector.jlr.AnnotatedClassImpl;
@@ -202,8 +203,28 @@
* @see javax.webbeans.manager.Manager#resolveObservers(java.lang.Object,
* java.lang.annotation.Annotation[])
*/
+ @SuppressWarnings("unchecked")
public <T> Set<Observer<T>> resolveObservers(T event, Annotation... bindings)
{
+ AnnotatedClass<T> element = AnnotatedClassImpl.of((Class<T>)event.getClass());
+ for (Annotation annotation : bindings)
+ {
+ if (!MetaDataCache.instance().getBindingTypeModel(annotation.annotationType()).isValid())
+ {
+ throw new IllegalArgumentException("Not a binding type " + annotation);
+ }
+ }
+ for (Type type : element.getActualTypeArguments())
+ {
+ if (type instanceof WildcardType)
+ {
+ throw new IllegalArgumentException("Cannot resolve an event type parameterized with a wildcard " + element);
+ }
+ if (type instanceof TypeVariable)
+ {
+ throw new IllegalArgumentException("Cannot resolve an event type parameterized with a type parameter " + element);
+ }
+ }
return eventManager.getObservers(event, bindings);
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/EventManager.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/EventManager.java 2009-01-19 13:14:04 UTC (rev 1078)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/EventManager.java 2009-01-19 13:38:28 UTC (rev 1079)
@@ -163,7 +163,6 @@
{
if (observer.isObserverInterested(bindings))
{
- // TODO Fix this!
@SuppressWarnings("unchecked")
Observer<T> o = (Observer<T>) observer.getObserver();
interestedObservers.add(o);
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/event/BananaSpider.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/event/BananaSpider.java 2009-01-19 13:14:04 UTC (rev 1078)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/event/BananaSpider.java 2009-01-19 13:38:28 UTC (rev 1079)
@@ -2,6 +2,7 @@
import java.util.Set;
+import javax.webbeans.Current;
import javax.webbeans.Observer;
import javax.webbeans.Observes;
import javax.webbeans.manager.Manager;
@@ -12,7 +13,7 @@
*/
class BananaSpider
{
- public void observeStringEvent(@Observes String someEvent, Manager manager)
+ public void observeStringEvent(@Observes String someEvent, @Current Manager manager)
{
assert someEvent != null;
assert manager != null;
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/event/BlueFacedParrotFinch.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/event/BlueFacedParrotFinch.java 2009-01-19 13:14:04 UTC (rev 1078)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/event/BlueFacedParrotFinch.java 2009-01-19 13:38:28 UTC (rev 1079)
@@ -23,4 +23,9 @@
}
});
}
+
+ public Event<String> getSimpleEvent()
+ {
+ return simpleEvent;
+ }
}
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/event/EventBusTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/event/EventBusTest.java 2009-01-19 13:14:04 UTC (rev 1078)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/event/EventBusTest.java 2009-01-19 13:38:28 UTC (rev 1079)
@@ -1,12 +1,16 @@
package org.jboss.webbeans.tck.tests.event;
import java.lang.annotation.Annotation;
+import java.util.ArrayList;
import java.util.Set;
import javax.webbeans.DefinitionException;
+import javax.webbeans.Dependent;
import javax.webbeans.DuplicateBindingTypeException;
+import javax.webbeans.Event;
import javax.webbeans.Observer;
import javax.webbeans.ObserverException;
+import javax.webbeans.Standard;
import javax.webbeans.TypeLiteral;
import javax.webbeans.manager.Bean;
@@ -43,6 +47,16 @@
}
}
+ public static class AListObserver implements Observer<ArrayList<String>>
+ {
+ public boolean wasNotified = false;
+
+ public void notify(ArrayList<String> event)
+ {
+ wasNotified = true;
+ }
+ }
+
public static class AnObserverWithException implements Observer<AnEventType>
{
public boolean wasNotified = false;
@@ -291,29 +305,29 @@
assert false;
}
- @Test(groups = { "broken", "events" })
+ @Test(groups = { "events" })
@SpecAssertion(section = "8.5")
public void testObserverMethodOnEnterpriseBeanIsBusinessMethodOrStatic()
{
deployBeans(Pomeranian.class);
Set<Bean<Object>> beans = manager.resolveByType(Object.class);
- assert beans.size() == 2 + BUILT_IN_BEANS;
+ assert beans.size() >= 2;
Set<Observer<String>> observers = manager.resolveObservers("An event");
assert observers.size() == 2;
}
- @Test(groups = { "broken", "events" })
+ @Test(groups = { "events" })
@SpecAssertion(section = "8.5")
public void testObserverMethodOnEnterpriseBeanNotBusinessMethodOrStaticFails()
{
deployBeans(TibetanTerrier.class);
Set<Bean<Object>> beans = manager.resolveByType(Object.class);
- assert beans.size() == 2 + BUILT_IN_BEANS;
+ assert beans.size() >= 2;
Set<Observer<String>> observers = manager.resolveObservers("An event");
assert observers.size() == 1;
}
- @Test(groups = { "broken", "events" })
+ @Test(groups = { "events" })
@SpecAssertion(section = "8.5")
public void testMultipleObserverMethodsOK()
{
@@ -328,7 +342,7 @@
public void testObserverMethodMustHaveOnlyOneEventParameter()
{
deployBeans(YorkshireTerrier.class);
-
+
Set<Bean<Object>> beans = manager.resolveByType(Object.class);
assert beans != null;
}
@@ -342,14 +356,14 @@
assert beans != null;
}
- @Test(groups = { "broken", "events" })
+ @Test(groups = { "events" })
@SpecAssertion(section = "8.5.1")
public void testObserverMethodWithoutBindingTypesObservesEventsWithoutBindingTypes()
{
// This observer has no binding types specified
deployBeans(Pomeranian.class);
Set<Bean<Object>> beans = manager.resolveByType(Object.class);
- assert beans.size() == 2 + BUILT_IN_BEANS;
+ assert beans.size() >= 2;
// Resolve registered observers with an event containing no binding types
Set<Observer<String>> resolvedObservers = manager.resolveObservers("A new event");
@@ -421,7 +435,7 @@
{
assert false;
}
-
+
@Test(groups = { "events" })
@SpecAssertion(section = "8.5.4")
public void testObserverMethodReceivesInjectionsOnNonObservesParameters()
@@ -444,14 +458,14 @@
manager.fireEvent("New string event");
// Should not be notified since bean is not instantiated yet
assert !RecluseSpider.isNotified();
-
+
// Now instantiate the bean and fire another event
try
{
activateDependentContext();
RecluseSpider bean = manager.getInstanceByType(RecluseSpider.class);
assert bean != null;
-
+
manager.fireEvent("Another event");
assert RecluseSpider.isNotified();
}
@@ -508,7 +522,7 @@
public void testObserverMethodRegistration()
{
// For now, this test is checking the registration of methods
- //TODO Check the called test to make sure it is still valid here
+ // TODO Check the called test to make sure it is still valid here
testObserverMethodOnEnterpriseBeanIsBusinessMethodOrStatic();
}
@@ -521,11 +535,11 @@
{
deployBeans(Pomeranian.class);
Set<Bean<Object>> beans = manager.resolveByType(Object.class);
- assert beans.size() == 1;
+ assert beans.size() >= 1;
String event = "A new event";
Set<Observer<String>> observers = manager.resolveObservers(event);
- assert observers.size() == 1;
-
+ assert observers.size() == 2;
+
manager.fireEvent(event);
assert Thread.currentThread().equals(Pomeranian.notificationThread);
}
@@ -537,7 +551,7 @@
assert false;
}
- @Test(groups = { "events" }, expectedExceptions={ TeaCupPomeranian.OversizedException.class })
+ @Test(groups = { "events" }, expectedExceptions = { TeaCupPomeranian.OversizedException.class })
@SpecAssertion(section = "8.5.7")
public void testNonTransactionalObserverThrownNonCheckedExceptionIsRethrown()
{
@@ -547,7 +561,7 @@
manager.fireEvent("Another event");
}
- @Test(groups = { "events" }, expectedExceptions={ ObserverException.class })
+ @Test(groups = { "events" }, expectedExceptions = { ObserverException.class })
@SpecAssertion(section = "8.5.7")
public void testNonTransactionalObserverThrownCheckedExceptionIsWrappedAndRethrown()
{
@@ -574,7 +588,7 @@
}
}
- @Test(groups = { "events" }, expectedExceptions={ DuplicateBindingTypeException.class })
+ @Test(groups = { "events" }, expectedExceptions = { DuplicateBindingTypeException.class })
@SpecAssertion(section = "8.6")
public void testDuplicateBindingsToObservesFails()
{
@@ -756,32 +770,92 @@
}
}
- @Test(groups = { "stub", "events" })
+ @Test(groups = { "events" })
@SpecAssertion(section = "8.6")
- public void testImplicitObserverBeanMatchesAPITypeOfInectionPoint()
+ public void testImplicitEventBeanMatchesAPITypeOfInectionPoint()
{
- assert false;
+ deployBeans(BlueFacedParrotFinch.class);
+ try
+ {
+ activateDependentContext();
+ BlueFacedParrotFinch bean = manager.getInstanceByType(BlueFacedParrotFinch.class);
+ assert bean != null;
+ // Retrieve the implicit event bean from the manager only by its API
+ // type
+ Set<?> eventBeans = manager.resolveByType(Event.class, new FiresBinding());
+ assert !eventBeans.isEmpty();
+ }
+ finally
+ {
+ deactivateDependentContext();
+ }
}
- @Test(groups = { "stub", "events" })
+ @Test(groups = { "events" })
@SpecAssertion(section = "8.6")
- public void testImplicitObserverBeanMatchesBindingAnnotationsOfInjectionPoint()
+ public void testImplicitEventBeanMatchesBindingAnnotationsOfInjectionPoint()
{
- assert false;
+ deployBeans(OrangeCheekedWaxbill.class);
+ try
+ {
+ activateDependentContext();
+ OrangeCheekedWaxbill bean = manager.getInstanceByType(OrangeCheekedWaxbill.class);
+ assert bean != null;
+ // Retrieve the implicit event bean from the manager by its binding
+ // types
+ Set<?> eventBeans = manager.resolveByType(Event.class, new FiresBinding(), new TameAnnotationLiteral());
+ assert !eventBeans.isEmpty();
+ }
+ finally
+ {
+ deactivateDependentContext();
+ }
}
- @Test(groups = { "stub", "events" })
+ @Test(groups = { "events" })
@SpecAssertion(section = "8.6")
- public void testImplicitObserverBeanHasStandardDeploymentType()
+ public void testImplicitEventBeanHasStandardDeploymentType()
{
- assert false;
+ deployBeans(BlueFacedParrotFinch.class);
+ try
+ {
+ activateDependentContext();
+ BlueFacedParrotFinch bean = manager.getInstanceByType(BlueFacedParrotFinch.class);
+ assert bean != null;
+ // Retrieve the implicit event bean from the manager only by its API
+ // type
+ Set<?> eventBeans = manager.resolveByType(Event.class, new FiresBinding());
+ assert eventBeans.size() == 1;
+ Bean<?> eventBean = (Bean<?>) eventBeans.iterator().next();
+ assert eventBean.getDeploymentType().equals(Standard.class);
+ }
+ finally
+ {
+ deactivateDependentContext();
+ }
}
- @Test(groups = { "stub", "events" })
+ @Test(groups = { "events" })
@SpecAssertion(section = "8.6")
- public void testImplicitObserverBeanHasDependentScope()
+ public void testImplicitEventBeanHasDependentScope()
{
- assert false;
+ deployBeans(BlueFacedParrotFinch.class);
+ try
+ {
+ activateDependentContext();
+ BlueFacedParrotFinch bean = manager.getInstanceByType(BlueFacedParrotFinch.class);
+ assert bean != null;
+ // Retrieve the implicit event bean from the manager only by its API
+ // type
+ Set<?> eventBeans = manager.resolveByType(Event.class, new FiresBinding());
+ assert eventBeans.size() == 1;
+ Bean<?> eventBean = (Bean<?>) eventBeans.iterator().next();
+ assert eventBean.getScopeType().equals(Dependent.class);
+ }
+ finally
+ {
+ deactivateDependentContext();
+ }
}
@Test(groups = { "stub", "events" })
@@ -847,25 +921,40 @@
assert false;
}
- @Test(groups = { "stub", "events" })
+ @Test(groups = { "events" }, expectedExceptions = { IllegalArgumentException.class })
@SpecAssertion(section = "8.7")
public void testNonBindingTypeAnnotationWhenResolvingFails()
{
- assert false;
+ AnObserver observer = new AnObserver();
+ manager.addObserver(observer, new TypeLiteral<AnEventType>()
+ {
+ });
+ Set<Observer<AnEventType>> resolvedObservers = manager.resolveObservers(new AnEventType(), new AnimalStereotypeAnnotationLiteral());
+ assert !resolvedObservers.isEmpty();
}
- @Test(groups = { "stub", "events" })
+ @Test(groups = { "events" })
@SpecAssertion(section = "8.7")
public void testResolvingChecksEventType()
{
- assert false;
+ Observer<AnEventType> observer = new AnObserver();
+ manager.addObserver(observer, AnEventType.class);
+ Set<Observer<AnEventType>> resolvedObservers = manager.resolveObservers(new AnEventType());
+ assert !resolvedObservers.isEmpty();
+ Set<?> emptyObserverSet = manager.resolveObservers("A string event");
+ assert emptyObserverSet.isEmpty();
}
@Test(groups = { "stub", "events" })
@SpecAssertion(section = "8.7")
public void testResolvingChecksTypeParameters()
{
- assert false;
+ AListObserver observer = new AListObserver();
+ manager.addObserver(observer, new TypeLiteral<ArrayList<String>>()
+ {
+ });
+ Set<Observer<ArrayList<String>>> resolvedObservers = manager.resolveObservers(new ArrayList<String>(), new AnimalStereotypeAnnotationLiteral());
+ assert !resolvedObservers.isEmpty();
}
@Test(groups = { "stub", "events" })
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/event/FiresBinding.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/event/FiresBinding.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/event/FiresBinding.java 2009-01-19 13:38:28 UTC (rev 1079)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.tck.tests.event;
+
+import javax.webbeans.AnnotationLiteral;
+import javax.webbeans.Fires;
+
+public class FiresBinding extends AnnotationLiteral<Fires> implements Fires
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/event/FiresBinding.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/event/OrangeCheekedWaxbill.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/event/OrangeCheekedWaxbill.java 2009-01-19 13:14:04 UTC (rev 1078)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/event/OrangeCheekedWaxbill.java 2009-01-19 13:38:28 UTC (rev 1079)
@@ -10,19 +10,25 @@
{
private Mess someMess;
+ private Event<Mess> injectedEvent;
public OrangeCheekedWaxbill()
{
}
@Initializer
- public void theInitializerMethod(@Fires Event<Mess> eventObject)
+ public void theInitializerMethod(@Fires @Tame Event<Mess> eventObject)
{
// Create a new mess and fire the event for it
someMess = new Mess();
eventObject.fire(someMess);
}
+ public Event<Mess> getInjectedEvent()
+ {
+ return injectedEvent;
+ }
+
public Mess getSomeMess()
{
return someMess;
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/event/PomeranianInterface.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/event/PomeranianInterface.java 2009-01-19 13:14:04 UTC (rev 1078)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/event/PomeranianInterface.java 2009-01-19 13:38:28 UTC (rev 1079)
@@ -1,6 +1,6 @@
package org.jboss.webbeans.tck.tests.event;
-interface PomeranianInterface
+public interface PomeranianInterface
{
}
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/event/Terrier.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/event/Terrier.java 2009-01-19 13:14:04 UTC (rev 1078)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/event/Terrier.java 2009-01-19 13:38:28 UTC (rev 1079)
@@ -3,7 +3,7 @@
import javax.ejb.Local;
@Local
-interface Terrier
+public interface Terrier
{
}
16 years, 8 months
[webbeans-commits] Webbeans SVN: r1078 - doc/trunk/reference/ko-KR.
by webbeans-commits@lists.jboss.org
Author: eukim
Date: 2009-01-19 08:14:04 -0500 (Mon, 19 Jan 2009)
New Revision: 1078
Modified:
doc/trunk/reference/ko-KR/events.po
doc/trunk/reference/ko-KR/ri.po
doc/trunk/reference/ko-KR/specialization.po
Log:
updated
Modified: doc/trunk/reference/ko-KR/events.po
===================================================================
--- doc/trunk/reference/ko-KR/events.po 2009-01-19 12:55:45 UTC (rev 1077)
+++ doc/trunk/reference/ko-KR/events.po 2009-01-19 13:14:04 UTC (rev 1078)
@@ -8,7 +8,7 @@
"Project-Id-Version: events\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-19 17:50+1000\n"
+"PO-Revision-Date: 2009-01-19 23:13+1000\n"
"Last-Translator: Eunju Kim <eukim(a)redhat.com>\n"
"Language-Team: Korean <ko(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -315,7 +315,7 @@
#: events.xml:138
#, no-c-format
msgid "Registering observers dynamically"
-msgstr ""
+msgstr "옵저버를 동적으로 등록 "
#. Tag: para
#: events.xml:140
@@ -325,7 +325,7 @@
"may implement the <literal>Observer</literal> interface and register an "
"instance with an event notifier by calling the <literal>observe()</literal> "
"method."
-msgstr ""
+msgstr "종종 이벤트 옵저버를 동적으로 등록하는 것이 유용합니다. 애플리케이션은 <literal>Observer</literal> 인터페이스를 구현하고 <literal>observe()</literal> 방식을 호출하여 이벤트 통지와 함께 인스턴스를 등록할 수 있습니다. "
#. Tag: programlisting
#: events.xml:144
@@ -345,6 +345,8 @@
"or by passing event binding type instances to the <literal>observe()</"
"literal> method:"
msgstr ""
+"이벤트 바인딩 유형은 인벤트 통지 삽입 지점에 의해 지정되거나 <literal>observe()</"
+"literal> 방식에 이벤트 바인딩 유형 인스턴스를 전달하여 지정할 수 있습니다: "
#. Tag: programlisting
#: events.xml:149
@@ -364,13 +366,13 @@
#: events.xml:154
#, no-c-format
msgid "Event bindings with members"
-msgstr ""
+msgstr "멤버와 이벤트 바인딩 "
#. Tag: para
#: events.xml:156
#, no-c-format
msgid "An event binding type may have annotation members:"
-msgstr ""
+msgstr "이벤트 바인딩 유형은 어노테이션 멤버를 갖을 수 있습니다: "
#. Tag: programlisting
#: events.xml:158
@@ -394,7 +396,7 @@
#: events.xml:160
#, no-c-format
msgid "The member value is used to narrow the messages delivered to the observer:"
-msgstr ""
+msgstr "멤버 값은 옵저버에게 전달되는 메세지의 범위를 좁히는데 사용됩니다: "
#. Tag: programlisting
#: events.xml:162
@@ -412,7 +414,7 @@
msgid ""
"Event binding type members may be specified statically by the event "
"producer, via annotations at the event notifier injection point:"
-msgstr ""
+msgstr "이벤트 바인딩 유형 멤버는 이벤트 통지 삽입 지점에 있는 어노테이션을 통해 이벤트 생산자에의해 정적으로 지정될 수 있습니다: "
#. Tag: programlisting
#: events.xml:167
@@ -423,11 +425,12 @@
#. Tag: para
#: events.xml:169
#, no-c-format
+#, fuzzy
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 ""
+msgstr "다른 방법으로, 이벤트 바인딩 유형 멤버 값은 이벤트 생산자에 의해 동적으로 지정될 수 있습니다. <literal>AnnotationLiteral</literal>의 추상화 하부클래스를 작성하는"
#. Tag: programlisting
#: events.xml:172
Modified: doc/trunk/reference/ko-KR/ri.po
===================================================================
--- doc/trunk/reference/ko-KR/ri.po 2009-01-19 12:55:45 UTC (rev 1077)
+++ doc/trunk/reference/ko-KR/ri.po 2009-01-19 13:14:04 UTC (rev 1078)
@@ -8,21 +8,21 @@
"Project-Id-Version: ri\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-18 16:31+0000\n"
-"PO-Revision-Date: 2009-01-08 11:09+1000\n"
+"PO-Revision-Date: 2009-01-19 22:26+1000\n"
"Last-Translator: Eunju Kim <eukim(a)redhat.com>\n"
"Language-Team: Korean <ko(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
-"Plural-Forms: nplurals=2; plural=(n!=1);\n"
+"Plural-Forms: nplurals=2; plural=(n!=1);\n\n"
"\n"
#. Tag: title
#: ri.xml:4
#, no-c-format
msgid "The Web Beans Reference Implementation"
-msgstr ""
+msgstr "Web Beans 참조 구현 "
#. Tag: para
#: ri.xml:6
@@ -179,8 +179,7 @@
#. Tag: para
#: ri.xml:93
#, no-c-format
-msgid ""
-"The build scripts for the examples offer a number of targets, these are:"
+msgid "The build scripts for the examples offer a number of targets, these are:"
msgstr ""
#. Tag: para
@@ -200,8 +199,7 @@
#. Tag: para
#: ri.xml:111
#, no-c-format
-msgid ""
-"<literal>ant deploy</literal> - deploy the example in compressed jar format"
+msgid "<literal>ant deploy</literal> - deploy the example in compressed jar format"
msgstr ""
#. Tag: para
@@ -846,7 +844,7 @@
#. Tag: programlisting
#: ri.xml:357
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"<![CDATA[<plugin>\n"
" <groupId>org.apache.maven.plugins</groupId>\n"
@@ -873,10 +871,6 @@
" <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>]]>"
@@ -1178,70 +1172,3 @@
"examples and translating this reference guide."
msgstr ""
-#~ 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 ""
-#~ "<![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>]]>"
-
-#~ 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 ""
-#~ "<![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>]]>"
Modified: doc/trunk/reference/ko-KR/specialization.po
===================================================================
--- doc/trunk/reference/ko-KR/specialization.po 2009-01-19 12:55:45 UTC (rev 1077)
+++ doc/trunk/reference/ko-KR/specialization.po 2009-01-19 13:14:04 UTC (rev 1078)
@@ -8,7 +8,7 @@
"Project-Id-Version: specialization\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-19 16:38+1000\n"
+"PO-Revision-Date: 2009-01-19 23:11+1000\n"
"Last-Translator: Eunju Kim <eukim(a)redhat.com>\n"
"Language-Team: Korean <ko(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -18,12 +18,13 @@
"Plural-Forms: nplurals=2; plural=(n!=1);\n\n"
"\n"
"\n"
+"\n"
#. Tag: title
#: specialization.xml:4
#, no-c-format
msgid "Specialization"
-msgstr "특수화 기능 "
+msgstr "특성화 "
#. Tag: para
#: specialization.xml:6
@@ -153,19 +154,18 @@
#. Tag: para
#: specialization.xml:52
#, no-c-format
-#, fuzzy
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 "Web Beans는 <emphasis>특수화</emphasis>라는 특별 기능을 제공하여, 개발자들이 이러한 함정에 빠지지 않도록 돕습니다. "
+msgstr "Web Beans는 <emphasis>특성화</emphasis>라는 특별 기능을 제공하여, 개발자들이 이러한 함정에 빠지지 않도록 돕습니다. 특성화 기능은 처음에는 조금 난해하게 보이지만, 익숙해 지면 사용하기 쉬우며 제공되는 추가 보안 기능에 만족하실 것입니다. "
#. Tag: title
#: specialization.xml:58
#, no-c-format
msgid "Using specialization"
-msgstr "특수화 기능 사용 "
+msgstr "특성화 기능 사용 "
#. Tag: para
#: specialization.xml:60
@@ -173,13 +173,13 @@
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 ""
+msgstr "특성화는 단순한 Web Beans 및 엔터프라이즈 Web Beans에만 있는 기능입니다. 특성화 기능을 사용하려면 높은 우선 순위의 Web Bean은 다음 사항을 따라야 합니다: "
#. Tag: para
#: specialization.xml:65
#, no-c-format
msgid "be a direct subclass of the Web Bean it overrides, and"
-msgstr ""
+msgstr "덮어쓰기할 Web Bean의 직접적인 하부 클래스가 되어야 합니다. "
#. Tag: para
#: specialization.xml:68
@@ -188,13 +188,13 @@
"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 ""
+msgstr "덮어쓰기할 Web Bean이 단순한 Web Bean일 경우 단순한 Web Bean이 되어야 하고 또는 덮어쓰기 할 Web Bean이 엔터프라이즈 Web Bean일 경우 엔터프라이즈 Web Bean이 되어야 합니다 "
#. Tag: para
#: specialization.xml:73
#, no-c-format
msgid "be annotated <literal>@Specializes</literal>."
-msgstr ""
+msgstr "<literal>@Specializes</literal>로 어노테이션되어야 합니다. "
#. Tag: programlisting
#: specialization.xml:77
@@ -218,19 +218,19 @@
msgid ""
"We say that the higher-priority Web Bean <emphasis>specializes</emphasis> "
"its superclass."
-msgstr ""
+msgstr "높은 우선 순위의 Web Bean이 해당 슈퍼클래스(superclass)를 <emphasis>특성화</emphasis>한다고 합니다. "
#. Tag: title
#: specialization.xml:85
#, no-c-format
msgid "Advantages of specialization"
-msgstr "특수화 기능 장점 "
+msgstr "특성화 기능의 장점 "
#. Tag: para
#: specialization.xml:87
#, no-c-format
msgid "When specialization is used:"
-msgstr "특수화 기능 사용시: "
+msgstr "특성화 기능 사용시: "
#. Tag: para
#: specialization.xml:91
@@ -239,6 +239,8 @@
"the binding types of the superclass are automatically inherited by the Web "
"Bean annotated <literal>@Specializes</literal>, and"
msgstr ""
+"슈퍼클래스의 바인딩 유형은 <literal>@Specializes</literal>로 어노테이션된 Web "
+"Bean에 의해 자동으로 상속됩니다 "
#. Tag: para
#: specialization.xml:95
@@ -247,6 +249,8 @@
"the Web Bean name of the superclass is automatically inherited by the Web "
"Bean annotated <literal>@Specializes</literal>, and"
msgstr ""
+"슈퍼클래스의 Web Bean 이름은 <literal>@Specializes</literal>로 어노테이션된 Web "
+"Bean에 의해 자동으로 상속됩니다 "
#. Tag: para
#: specialization.xml:99
@@ -255,7 +259,7 @@
"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 ""
+msgstr "슈퍼클래스에 의해 명시된 생산자 방식, 폐지 방식 및 옵저버 방식은 <literal>@Specializes</literal>로 어노테이션된 Web Bean 인스턴스를 호출합니다. "
#. Tag: para
#: specialization.xml:105
@@ -279,7 +283,7 @@
"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 ""
+msgstr "슈퍼클래스의 모든 API 유형은 <literal>@Specializes</literal>로 어노테이션된 Web Bean의 API 유형입니다 (슈퍼클래스 엔터프라이즈 bean의 모든 로컬 인터페이스는 하부클래스의 로컬 인터페이스도 됩니다) "
#. Tag: para
#: specialization.xml:119
@@ -288,13 +292,13 @@
"the deployment type of the Web Bean annotated <literal>@Specializes</"
"literal> has a higher precedence than the deployment type of the superclass, "
"and"
-msgstr ""
+msgstr "<literal>@Specializes</literal>로 어노테이션된 Web Bean의 배치 유형은 슈퍼클래스의 배치 유형보다 높은 우선 순위를 갖습니다 "
#. Tag: para
#: specialization.xml:124
#, no-c-format
msgid "there is no other enabled Web Bean that also specializes the superclass."
-msgstr ""
+msgstr "슈퍼클래스를 특성화하는 활성화된 Web Bean이 없습니다. "
#. Tag: para
#: specialization.xml:129
@@ -302,7 +306,7 @@
msgid ""
"If any of these conditions are violated, the Web Bean manager throws an "
"exception at initialization time."
-msgstr ""
+msgstr "이러한 조건을 위반할 경우, Web Bean 관리자는 초기화시 예외 처리를 넘기게 됩니다. "
#. Tag: para
#: specialization.xml:132
@@ -311,5 +315,5 @@
"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 ""
+msgstr "따라서, <literal>@Specializes</literal>라고 어노테이션된 Web Bean이 배치되어 활성화된 시스템의 어떤 배치에서도 슈퍼클래스는 <emphasis>절대로</emphasis> 호출되지 않음을 확인할 수 있습니다. "
16 years, 8 months
[webbeans-commits] Webbeans SVN: r1077 - tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/byname.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-01-19 07:55:45 -0500 (Mon, 19 Jan 2009)
New Revision: 1077
Modified:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/byname/ResolutionByNameTest.java
Log:
fixed testDuplicateNamedBeans()
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/byname/ResolutionByNameTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/byname/ResolutionByNameTest.java 2009-01-19 10:15:03 UTC (rev 1076)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/byname/ResolutionByNameTest.java 2009-01-19 12:55:45 UTC (rev 1077)
@@ -63,10 +63,11 @@
activateDependentContext();
Bean<Cod> codBean = createSimpleBean(Cod.class);
- Bean<Plaice> plaiceBean = createSimpleBean(Plaice.class);
+ Bean<Sole> soleBean = createSimpleBean(Sole.class);
manager.addBean(codBean);
- manager.addBean(plaiceBean);
+ manager.addBean(soleBean);
+ assert manager.resolveByName("whitefish").size() == 2;
manager.getInstanceByName("whitefish");
}
finally
16 years, 8 months
[webbeans-commits] Webbeans SVN: r1076 - tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/byname.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-01-19 05:15:03 -0500 (Mon, 19 Jan 2009)
New Revision: 1076
Modified:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/byname/ResolutionByNameTest.java
Log:
split out test
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/byname/ResolutionByNameTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/byname/ResolutionByNameTest.java 2009-01-19 09:59:38 UTC (rev 1075)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/byname/ResolutionByNameTest.java 2009-01-19 10:15:03 UTC (rev 1076)
@@ -4,6 +4,7 @@
import java.util.List;
import javax.webbeans.AmbiguousDependencyException;
+import javax.webbeans.UnsatisfiedDependencyException;
import javax.webbeans.manager.Bean;
import org.jboss.webbeans.tck.impl.SpecAssertion;
@@ -28,8 +29,6 @@
*
* � Identify the Web Bean by calling Manager.resolveByName(), passing the name.
* � If resolveByName() returned an empty set, return a null value.
- * � Otherwise, if resolveByName() returned more than one Web Bean, throw an
- * AmbiguousDependencyException.
* � Otherwise, if exactly one Web Bean was returned, obtain an instance of the
* Web Bean by calling Manager.getInstance(), passing the Bean instance representing
* the Web Bean
@@ -39,23 +38,9 @@
{
assert manager.getInstanceByName("nonexistant") == null;
- activateDependentContext();
try
{
- try
- {
- // Both Cod and Plaice are named "whitefish"
- Bean<Cod> codBean = createSimpleBean(Cod.class);
- Bean<Plaice> plaiceBean = createSimpleBean(Plaice.class);
- manager.addBean(codBean);
- manager.addBean(plaiceBean);
-
- // Should throw AmbiguousDependencyException because two beans have the same name
- manager.getInstanceByName("whitefish");
- assert false;
- }
- catch (AmbiguousDependencyException ex) { }
-
+ activateDependentContext();
Bean<Salmon> salmonBean = createSimpleBean(Salmon.class);
manager.addBean(salmonBean);
assert manager.getInstanceByName("salmon") instanceof Salmon;
@@ -65,6 +50,30 @@
deactivateDependentContext();
}
}
+
+ /**
+ * � Otherwise, if resolveByName() returned more than one Web Bean, throw an
+ * AmbiguousDependencyException.
+ */
+ @Test(expectedExceptions=AmbiguousDependencyException.class) @SpecAssertion(section="5.11")
+ public void testDuplicateNamedBeans()
+ {
+ try
+ {
+ activateDependentContext();
+
+ Bean<Cod> codBean = createSimpleBean(Cod.class);
+ Bean<Plaice> plaiceBean = createSimpleBean(Plaice.class);
+ manager.addBean(codBean);
+ manager.addBean(plaiceBean);
+
+ manager.getInstanceByName("whitefish");
+ }
+ finally
+ {
+ deactivateDependentContext();
+ }
+ }
@Test(groups={"stub", "el"}) @SpecAssertion(section="5.11.2")
public void testELResolverRegisteredWithJsf()
16 years, 8 months
[webbeans-commits] Webbeans SVN: r1075 - in tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup: typesafe and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-01-19 04:59:38 -0500 (Mon, 19 Jan 2009)
New Revision: 1075
Modified:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/byname/ResolutionByNameTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/typesafe/ResolutionByTypeTest.java
Log:
stub tests
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/byname/ResolutionByNameTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/byname/ResolutionByNameTest.java 2009-01-19 08:37:59 UTC (rev 1074)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/byname/ResolutionByNameTest.java 2009-01-19 09:59:38 UTC (rev 1075)
@@ -3,6 +3,7 @@
import java.lang.annotation.Annotation;
import java.util.List;
+import javax.webbeans.AmbiguousDependencyException;
import javax.webbeans.manager.Bean;
import org.jboss.webbeans.tck.impl.SpecAssertion;
@@ -22,10 +23,47 @@
return deploymentTypes;
}
+ /**
+ * The getInstanceByName() method must:
+ *
+ * � Identify the Web Bean by calling Manager.resolveByName(), passing the name.
+ * � If resolveByName() returned an empty set, return a null value.
+ * � Otherwise, if resolveByName() returned more than one Web Bean, throw an
+ * AmbiguousDependencyException.
+ * � Otherwise, if exactly one Web Bean was returned, obtain an instance of the
+ * Web Bean by calling Manager.getInstance(), passing the Bean instance representing
+ * the Web Bean
+ */
@Test(groups={"stub", "el"}) @SpecAssertion(section="5.11")
public void testELResolver()
- {
- assert false;
+ {
+ assert manager.getInstanceByName("nonexistant") == null;
+
+ activateDependentContext();
+ try
+ {
+ try
+ {
+ // Both Cod and Plaice are named "whitefish"
+ Bean<Cod> codBean = createSimpleBean(Cod.class);
+ Bean<Plaice> plaiceBean = createSimpleBean(Plaice.class);
+ manager.addBean(codBean);
+ manager.addBean(plaiceBean);
+
+ // Should throw AmbiguousDependencyException because two beans have the same name
+ manager.getInstanceByName("whitefish");
+ assert false;
+ }
+ catch (AmbiguousDependencyException ex) { }
+
+ Bean<Salmon> salmonBean = createSimpleBean(Salmon.class);
+ manager.addBean(salmonBean);
+ assert manager.getInstanceByName("salmon") instanceof Salmon;
+ }
+ finally
+ {
+ deactivateDependentContext();
+ }
}
@Test(groups={"stub", "el"}) @SpecAssertion(section="5.11.2")
@@ -84,10 +122,27 @@
assert manager.resolveByName("foo").size() == 0;
}
+ /**
+ * The following algorithm must be used by the Web Bean manager when resolving a Web Bean by name:
+ *
+ * � The Web Bean manager identifies the set of matching enabled Web Beans which have the given name.
+ * � Next, the Web Bean manager examines the deployment types of the matching Web Beans, as defined
+ * in Section 2.5.7, �Deployment type precedence�, and returns the set of Web Beans with the
+ * highest precedence deployment type that occurs in the set. If there are no matching Web Beans,
+ * an empty set is returned.
+ */
@Test(groups="stub") @SpecAssertion(section="5.11.1")
- public void testOnlyHigestPrecedenceResolved()
+ public void testOnlyHighestPrecedenceResolved()
{
- assert false;
+ // Both Cod and Plaice are named "whitefish" - Plaice has the highest deployment type (AnotherDeploymentType)
+ Bean<Cod> codBean = createSimpleBean(Cod.class);
+ Bean<Plaice> plaiceBean = createSimpleBean(Plaice.class);
+ manager.addBean(codBean);
+ manager.addBean(plaiceBean);
+
+ assert manager.resolveByName("whitefish").size() == 1;
+ assert !manager.resolveByName("whitefish").contains(codBean);
+ assert manager.resolveByName("whitefish").contains(plaiceBean);
}
/*
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/typesafe/ResolutionByTypeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/typesafe/ResolutionByTypeTest.java 2009-01-19 08:37:59 UTC (rev 1074)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/typesafe/ResolutionByTypeTest.java 2009-01-19 09:59:38 UTC (rev 1075)
@@ -150,7 +150,7 @@
}
@Test @SpecAssertion(section="5.9.2")
- public void testOnlyHighestEnabledPreecedenceWebBeansResolved() throws Exception
+ public void testOnlyHighestEnabledPrecedenceWebBeansResolved() throws Exception
{
Bean<Cod> codBean = createSimpleBean(Cod.class);
Bean<Sole> soleBean = createSimpleBean(Sole.class);
16 years, 8 months
[webbeans-commits] Webbeans SVN: r1074 - doc/trunk/reference/zh-TW.
by webbeans-commits@lists.jboss.org
Author: tchuang
Date: 2009-01-19 03:37:59 -0500 (Mon, 19 Jan 2009)
New Revision: 1074
Modified:
doc/trunk/reference/zh-TW/scopescontexts.po
Log:
Translation updated
Modified: doc/trunk/reference/zh-TW/scopescontexts.po
===================================================================
--- doc/trunk/reference/zh-TW/scopescontexts.po 2009-01-19 08:32:12 UTC (rev 1073)
+++ doc/trunk/reference/zh-TW/scopescontexts.po 2009-01-19 08:37:59 UTC (rev 1074)
@@ -8,7 +8,7 @@
"Project-Id-Version: scopescontexts\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-08 11:01+1000\n"
+"PO-Revision-Date: 2009-01-19 18:37+1000\n"
"Last-Translator: Terry Chuang <tchuang(a)redhat.com>\n"
"Language-Team: Traditional Chinese <zh(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -20,7 +20,7 @@
#: scopescontexts.xml:4
#, no-c-format
msgid "Scopes and contexts"
-msgstr ""
+msgstr "Scope 和 context"
#. Tag: para
#: scopescontexts.xml:6
@@ -37,7 +37,7 @@
#: scopescontexts.xml:14
#, no-c-format
msgid "When a new instance of any Web Bean with that scope is created"
-msgstr ""
+msgstr "任何含有該 scope 的 Web Bean 的新 instance 何時被建立"
#. Tag: para
#: scopescontexts.xml:17
@@ -61,13 +61,13 @@
"<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 ""
+msgstr "比方說若我們有個 session scope 的 Web Bean <literal>CurrentUser</literal>,那麼所有在相同 <literal>HttpSession</literal> 的 context 中被調用的 Web Bean 都會看見相同的 <literal>CurrentUser</literal> 的 instance。當 <literal>CurrentUser</literal> 在該 session 中第一次被需要時,這個 instance 就會自動地被建立,並且在這個 session 結束時被自動地刪除掉。"
#. Tag: title
#: scopescontexts.xml:32
#, no-c-format
msgid "Scope types"
-msgstr ""
+msgstr "Scope type"
#. Tag: para
#: scopescontexts.xml:34
16 years, 8 months
[webbeans-commits] Webbeans SVN: r1073 - doc/trunk/reference/zh-TW.
by webbeans-commits@lists.jboss.org
Author: tchuang
Date: 2009-01-19 03:32:12 -0500 (Mon, 19 Jan 2009)
New Revision: 1073
Modified:
doc/trunk/reference/zh-TW/injection.po
doc/trunk/reference/zh-TW/intro.po
doc/trunk/reference/zh-TW/ri.po
doc/trunk/reference/zh-TW/specialization.po
Log:
translation updated
Modified: doc/trunk/reference/zh-TW/injection.po
===================================================================
--- doc/trunk/reference/zh-TW/injection.po 2009-01-19 07:51:04 UTC (rev 1072)
+++ doc/trunk/reference/zh-TW/injection.po 2009-01-19 08:32:12 UTC (rev 1073)
@@ -8,7 +8,7 @@
"Project-Id-Version: injection\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-15 14:59+1000\n"
+"PO-Revision-Date: 2009-01-19 16:05+1000\n"
"Last-Translator: Terry Chuang <tchuang(a)redhat.com>\n"
"Language-Team: Traditional Chinese <zh(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -793,7 +793,7 @@
"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 ""
+msgstr "這項問題的解決方式就是利用各個 deployment type 的不同<emphasis>優先權</emphasis>。Deployment type 的優先權是透過它們出現在 <literal>web-beans.xml</literal> 中的順序來決定的。在我們的範例中,<literal>@Mock</literal> 出現的順序在 <literal>@Production</literal> 之後,因此它會有較高的優先權。"
#. Tag: para
#: injection.xml:264
@@ -806,7 +806,7 @@
"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 ""
+msgstr "每當管理員發現了多於一個 Web Bean 可滿足由某個注入點所指定的合同(API 類型加上綁定標記)時,它會考量到 Web Bean 的相關優先權。若有一方的優先權較高,它便會選擇優先權較高的那個 Web Bean 來注入。因此,在我們的範例中,當 Web Bean 管理員執行於我們的整合測試環境中的時候(這正是我們想要的),它將會注入 <literal>MockPaymentProcessor</literal>。"
#. Tag: para
#: injection.xml:271
@@ -822,7 +822,7 @@
"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 ""
+msgstr "和現今多人使用的管理員架構相較之下,這個功能相當地有趣。各種「lightweight」的 container 都允許存在 classpath 中的 class 的條件性建置,不過要被建置的 class 必須要明確、各別地列在配置程式碼或是一些 XML 配置檔案中。Web Bean 不支援透過 XML 的 Web Bean 定義與配置,不過在一般情況下當不需要複雜的配置時,deployment type 允許一整組 Web Bean 能夠透過 XML 中的一個單獨行列來被啟用。其間,瀏覽程式碼的開發人員能夠輕易地分辨出 Web Bean 將會使用哪種建置方案(deployment scenario)。"
#. Tag: title
#: injection.xml:284
@@ -834,7 +834,7 @@
#: injection.xml:286
#, no-c-format
msgid "Deployment types are useful for all kinds of things, here's some examples:"
-msgstr ""
+msgstr "Deployment type 針對於許多情況都相當便於使用,以下為一些範例:"
#. Tag: para
#: injection.xml:290
@@ -864,19 +864,19 @@
msgid ""
"<literal>@Standard</literal> for standard Web Beans defined by the Web Beans "
"specification"
-msgstr ""
+msgstr "<literal>@Standard</literal> 可用於以 Web Bean 規格所定義的標準 Web Bean"
#. Tag: para
#: injection.xml:306
#, no-c-format
msgid "I'm sure you can think of more applications..."
-msgstr "我們相信您還能想到更多應用程式..."
+msgstr "我們相信您還能夠聯想到更多應用程式..."
#. Tag: title
#: injection.xml:313
#, no-c-format
msgid "Fixing unsatisfied dependencies"
-msgstr ""
+msgstr "修正相依性不足(unsatisfied dependencies)的問題"
#. Tag: para
#: injection.xml:315
@@ -886,7 +886,7 @@
"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 ""
+msgstr "就所有實做某個注入點的 API 類型的 Web Bean 綁定標記和 deployment type 來講,若 Web Bean 管理員無法辨識出正好一個需被注入的 Web Bean 為何,那麼 typesafe 解析演算法便會失敗。"
#. Tag: para
#: injection.xml:320
@@ -894,7 +894,7 @@
msgid ""
"It's usually easy to fix an <literal>UnsatisfiedDependencyException</"
"literal> or <literal>AmbiguousDependencyException</literal>."
-msgstr ""
+msgstr "要修正一個 <literal>UnsatisfiedDependencyException</literal> 或 <literal>AmbiguousDependencyException</literal> 通常相當容易。"
#. Tag: para
#: injection.xml:323
@@ -904,7 +904,7 @@
"a Web Bean which implements the API type and has the binding types of the "
"injection point—or enable the deployment type of a Web Bean that "
"already implements the API type and has the binding types."
-msgstr ""
+msgstr "若要修正一項 <literal>UnsatisfiedDependencyException</literal>,只要提供一個實做 API 類型並且擁有注入點的綁定類型的 Web Bean 即可—或是啟用一個已實做 API 類型並且擁有綁定類型的 Web Bean 的 deployment type 即可。"
#. Tag: para
#: injection.xml:328
@@ -916,7 +916,7 @@
"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 ""
+msgstr "若要修正一項 <literal>AmbiguousDependencyException</literal>,您可加入一個綁定類型來在兩個 API 類型的實做之間進行分辨,或是更改其中一個實做的 deployment type,這樣一來 Web Bean 管理員便可透過使用 deployment type 優先權來在它們之間作選擇。<literal>AmbiguousDependencyException</literal> 只會在有兩個 Web Bean 共享一個綁定類型並擁有相同 deployment type 的情況下才會發生。"
#. Tag: para
#: injection.xml:335
@@ -938,7 +938,7 @@
msgid ""
"Clients of an injected Web Bean do not usually hold a direct reference to a "
"Web Bean instance."
-msgstr ""
+msgstr "一個已注入的 Web Bean 的客戶端通常不會持有一個 Web Bean instance 的直接參照。"
#. Tag: para
#: injection.xml:346
@@ -948,7 +948,7 @@
"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 ""
+msgstr "想像一個綁定至應用程式 scope 的 Web Bean 持有一個綁定至請求 scope 的 Web Bean 的直接參照。這個應用程式 scope 的 Web Bean 會在許多不同的請求之間被共享。不過,各個請求都應要看見一個不同的請求 scope Web Bean 的 instance!"
#. Tag: para
#: injection.xml:351
@@ -959,7 +959,7 @@
"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 ""
+msgstr "現在,請想像一個綁定至 session scope 的 Web Bean 持有一個綁定至應用程式 scope 的 Web Bean 的直接參照。有時,session context 會被序列化至磁碟中以便更有效率地使用記憶體。不過,應用程式 scope 的 Web Bean instance 不該和 session scope 的 Web Bean 一起被序列化!"
#. Tag: para
#: injection.xml:357
@@ -973,7 +973,7 @@
"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 ""
+msgstr "因此,除非有個 Web Bean 擁有預設的 <literal>@Dependent</literal> scope,否則 Web Bean 管理員便必須透過一個 proxy 物件來將所有注入的參照重新指向 Web Bean。這個 <emphasis>client proxy</emphasis> 負責確保收到 method 調用的 Web Bean instance 是個和目前 context 相聯的 instance。客戶端 proxy 亦可允許在不遞迴地序列化其它已注入的 Web Bean 的情況下也能讓綁定至 context(例如 session context)的 Web Bean 被序列化至磁碟。"
#. Tag: para
#: injection.xml:365
@@ -983,13 +983,13 @@
"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 ""
+msgstr "不巧的是,礙於 Java 語言的限制,有些 Java 類型無法被 Web Bean 管理員代理(proxied)。因此,若某個注入點的 type 無法被代理的話,Web Bean 管理員便會回傳一個 <literal>UnproxyableDependencyException</literal>。"
#. Tag: para
#: injection.xml:370
#, no-c-format
msgid "The following Java types cannot be proxied by the Web Bean manager:"
-msgstr ""
+msgstr "下列 Java 類型無法被 Web Bean 管理員代理:"
#. Tag: para
#: injection.xml:374
@@ -997,19 +997,19 @@
msgid ""
"classes which are declared <literal>final</literal> or have a "
"<literal>final</literal> method,"
-msgstr ""
+msgstr "所有被宣告 <literal>final</literal> 或是含有一個 <literal>final</literal> method 的 class、"
#. Tag: para
#: injection.xml:378
#, no-c-format
msgid "classes which have no non-private constructor with no parameters, and"
-msgstr ""
+msgstr "沒有非私密 constructor 的無參數 class,以及"
#. Tag: para
#: injection.xml:381
#, no-c-format
msgid "arrays and primitive types."
-msgstr ""
+msgstr "陣列(array)與基本型別(primitive type)。"
#. Tag: para
#: injection.xml:385
@@ -1019,13 +1019,13 @@
"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 ""
+msgstr "要修正 <literal>UnproxyableDependencyException</literal> 通常相當容易。只要將一個無參數的 constructor 附加至注入的 class、採用一個介面,或將已注入的 Web Bean 的 scope 更改為 <literal>@Dependent</literal> 即可。"
#. Tag: title
#: injection.xml:392
#, no-c-format
msgid "Obtaining a Web Bean by programatic lookup"
-msgstr ""
+msgstr "透過程式性的搜尋來取得一個 Web Bean"
#. Tag: para
#: injection.xml:394
@@ -1033,7 +1033,7 @@
msgid ""
"The application may obtain an instance of the interface <literal>Manager</"
"literal> by injection:"
-msgstr ""
+msgstr "應用程式可透過注入來取得 <literal>Manager</literal> 這個介面的一個 instance:"
#. Tag: programlisting
#: injection.xml:397
@@ -1066,7 +1066,7 @@
"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 ""
+msgstr "綁定標記能被透過建立 helper class 的 subclass <literal>AnnotationLiteral</literal> 來指定,否則在 Java 中很難例示一個標記類型。"
#. Tag: programlisting
#: injection.xml:408
@@ -1156,7 +1156,7 @@
"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 ""
+msgstr "企業級和基本的 Web Bean 皆支援使用 <literal>@Resource</literal>、<literal>@EJB</literal> 和 <literal>@PersistenceContext</literal> 來相應地注入 Java EE 資源、EJB 和 JPA 的 persistence context。基本的 Web Bean 不支援使用 <literal>@PersistenceContext(type=EXTENDED)</literal>。"
#. Tag: para
#: injection.xml:434
@@ -1164,7 +1164,7 @@
msgid ""
"The <literal>@PostConstruct</literal> callback always occurs after all "
"dependencies have been injected."
-msgstr ""
+msgstr "<literal>@PostConstruct</literal> callback 一定會在所有相依性都被注入後才會發生。"
#. Tag: title
#: injection.xml:440
@@ -1180,7 +1180,7 @@
"<literal>@Dependent</literal>—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 ""
+msgstr "有幾種特定相依物件—含有 <literal>@Dependent</literal> 這個 scope 的 Web Bean—需要知道有關於物件或是它們被注入的注入點相關資訊才能進行它們本應進行的工作。比方說:"
#. Tag: para
#: injection.xml:448
@@ -1188,7 +1188,7 @@
msgid ""
"The log category for a <literal>Logger</literal> depends upon the class of "
"the object that owns it."
-msgstr ""
+msgstr "<literal>Logger</literal> 的 log category 取決於擁有它的物件的 class。"
#. Tag: para
#: injection.xml:452
@@ -1196,7 +1196,7 @@
msgid ""
"Injection of a HTTP parameter or header value depends upon what parameter or "
"header name was specified at the injection point."
-msgstr ""
+msgstr "HTTP 參數或是 header value 的注入取決於在注入點所指定的參數或標頭名稱。"
#. Tag: para
#: injection.xml:456
@@ -1204,7 +1204,7 @@
msgid ""
"Injection of the result of an EL expression evaluation depends upon the "
"expression that was specified at the injection point."
-msgstr ""
+msgstr "EL 運算式評估(expression evaluation)結果的注入取決於在注入點所指定的運算式。"
#. Tag: para
#: injection.xml:461
@@ -1213,7 +1213,7 @@
"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 ""
+msgstr "含有 <literal>@Dependent</literal> 這個 scope 的 Web Bean 能夠注入一個 <literal>InjectionPoint</literal> instance 並存取和它所屬的注入點相關的 metadata。"
#. Tag: para
#: injection.xml:465
Modified: doc/trunk/reference/zh-TW/intro.po
===================================================================
--- doc/trunk/reference/zh-TW/intro.po 2009-01-19 07:51:04 UTC (rev 1072)
+++ doc/trunk/reference/zh-TW/intro.po 2009-01-19 08:32:12 UTC (rev 1073)
@@ -7,8 +7,8 @@
msgstr ""
"Project-Id-Version: intro\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-01-18 16:31+0000\n"
-"PO-Revision-Date: 2009-01-16 12:50+1000\n"
+"POT-Creation-Date: 2009-01-06 11:30+0000\n"
+"PO-Revision-Date: 2009-01-19 18:17+1000\n"
"Last-Translator: Terry Chuang <tchuang(a)redhat.com>\n"
"Language-Team: Traditional Chinese <zh(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -31,11 +31,7 @@
"specification will make you jump through! The good news is that you've "
"probably already written and used hundreds, perhaps thousands of Web Beans. "
"You might not even remember the first Web Bean you wrote."
-msgstr ""
-"您是否已準備好開始編寫您的第一個 Web Bean 了呢?或是您針對於 Web Bean 本身的"
-"規格還是存有著一些疑問呢?不過好消息就是您從以前到現在可能早就已經編寫並使用"
-"了上百甚至是上千個 Web Bean 了。您可能根本已經不記得您所編寫的第一個 Web "
-"Bean 為何了。"
+msgstr "您是否已準備好開始編寫您的第一個 Web Bean 了呢?或是您針對於 Web Bean 本身的規格還是存有著一些疑問呢?不過好消息就是您從以前到現在可能早就已經編寫並使用了上百甚至是上千個 Web Bean 了。您可能根本已經不記得您所編寫的第一個 Web Bean 為何了。"
#. Tag: title
#: intro.xml:13
@@ -56,7 +52,7 @@
"into other Web Beans, configuring them via the Web Beans XML configuration "
"facility, even adding interceptors and decorators to them—without "
"touching your existing code."
-msgstr ""
+msgstr "我們能夠很明確地告訴您,在絕大部分的情況下,所有含有不接受參數的 constructor 的 java class 都是個 Web Bean。這包含了所有的 JavaBean。另外,所有 EJB 3-style 的 session bean 也都屬於 Web Bean。當然,您先前所編寫的 JavaBean 和 EJB 皆無法有效利用 Web Bean 規格所定義的新服務,不過您卻可將它們全部作為 Web Bean 來使用—將它們注入其它 Web Bean 中,透過 Web Bean XML 配置功能來配置它們,甚至是加入攔截器(interceptor)與裝飾器(decorator)—無須變動到您現有的程式碼。"
#. Tag: para
#: intro.xml:25
@@ -65,7 +61,7 @@
"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 ""
+msgstr "假設我們目前有兩個使用於各種應用程式中多年的 Java class。第一個 class 會將一個字串剖析入一列句子中:"
#. Tag: programlisting
#: intro.xml:29
@@ -86,7 +82,7 @@
"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 ""
+msgstr "第二個 class 則是個外部系統的無狀態 session bean 前端,並且它可將句子由一種語言翻譯成另一種語言:"
#. Tag: programlisting
#: intro.xml:35
@@ -106,7 +102,7 @@
#: intro.xml:37
#, no-c-format
msgid "Where <literal>Translator</literal> is the local interface:"
-msgstr ""
+msgstr "<literal>Translator</literal> 為本地介面:"
#. Tag: programlisting
#: intro.xml:39
@@ -128,7 +124,7 @@
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 ""
+msgstr "不巧的是,我們沒有一個可翻譯整個文字文件的現有 class。所以讓我們來編寫一個能夠完成這項工作的 Web Bean 吧:"
#. Tag: programlisting
#: intro.xml:44
@@ -184,7 +180,7 @@
msgid ""
"We may obtain an instance of <literal>TextTranslator</literal> by injecting "
"it into a Web Bean, Servlet or EJB:"
-msgstr ""
+msgstr "我們能夠藉由將注入一個 <literal>TextTranslator</literal> 的 instance 注入 Web Bean、Servlet 或是 EJB 中來取得這個 instance:"
#. Tag: programlisting
#: intro.xml:49
@@ -206,7 +202,7 @@
msgid ""
"Alternatively, we may obtain an instance by directly calling a method of the "
"Web Bean manager:"
-msgstr ""
+msgstr "另外,我們也可藉由直接調用 Web Bean 管理員的一個 method 來取得一個 instance:"
#. Tag: programlisting
#: intro.xml:54
@@ -226,11 +222,11 @@
"no parameters! Is it still a Web Bean? Well, a class that does not have a "
"constructor with no parameters can still be a Web Bean if it has a "
"constructor annotated <literal>@Initializer</literal>."
-msgstr ""
+msgstr "不過請稍等:<literal>TextTranslator</literal> 並沒有一個無參數的 constructor!這樣它還是個 Web Bean 嗎?一個沒有無參數 constructor 的 class 若有個被標記了 <literal>@Initializer</literal> 的 constructor 的話,它還是能夠是個 Web Bean。"
#. Tag: para
#: intro.xml:61
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"As you've guessed, the <literal>@Initializer</literal> annotation has "
"something to do with dependency injection! <literal>@Initializer</literal> "
@@ -238,7 +234,7 @@
"Bean manager to call that constructor or method when instantiating the Web "
"Bean. The Web Bean manager will inject other Web Beans to the parameters of "
"the constructor or method."
-msgstr "依賴注入"
+msgstr "就如您所猜測地,<literal>@Initializer</literal> 這個標記和依賴注入有關係!<literal>@Initializer</literal> 可套用至一個 Web Bean 的 constructor 或是 method 來指示 Web Bean 管理員在例示 Web Bean 時去調用該 constructor 或 method。Web Bean 管理員會將其它 Web Bean 注入至該 constructor 或 method 的參數中。"
#. Tag: para
#: intro.xml:68
@@ -252,19 +248,19 @@
"<literal>UnsatisfiedDependencyException</literal>. If more than one "
"implementation of <literal>Translator</literal> was available, the Web Bean "
"manager would throw an <literal>AmbiguousDependencyException</literal>."
-msgstr ""
+msgstr "當系統初始化時,Web Bean 管理員必須驗證是否有正好一個滿足所有注入點的 Web Bean 存在。在我們的範例中,若沒有可用的 <literal>Translator</literal> 實做—若 <literal>SentenceTranslator</literal> EJB 沒有被建置—Web Bean 管理員便會回傳一個 <literal>UnsatisfiedDependencyException</literal>。若有超過一個可使用的 <literal>Translator</literal> 實做,那麼 Web Bean 管理員便會回傳一個 <literal>AmbiguousDependencyException</literal>。"
#. Tag: title
#: intro.xml:80
#, no-c-format
msgid "What is a Web Bean?"
-msgstr ""
+msgstr "Web Bean 是什麼?"
#. Tag: para
#: intro.xml:82
#, no-c-format
msgid "So what, <emphasis>exactly</emphasis>, is a Web Bean?"
-msgstr ""
+msgstr "所以 Web Bean <emphasis>到底</emphasis>是什麼?"
#. Tag: para
#: intro.xml:84
@@ -276,7 +272,7 @@
"Beans are managed automatically by the Web Bean manager. Most Web Beans are "
"<emphasis>stateful</emphasis> and <emphasis>contextual</emphasis>. The "
"lifecycle of a Web Bean is always managed by the Web Bean manager."
-msgstr ""
+msgstr "Web Bean 是個包含了商業邏輯的應用程式 class。Web Bean 可由 Java 程式碼被直接地調用,或是它亦可透過 Unified EL 來引動。Web Bean 可存取交易性的資源。Web Bean 之間的相依性是透過 Web Bean 管理員來自動管理的。大部分的 Web Bean 都屬於 <emphasis>stateful(有狀態)</emphasis> 和 <emphasis>contextual(語意式)</emphasis> 的。Web Bean 的生命週期(lifecycle)總是透過 Web Bean 管理員來管理的。"
#. Tag: para
#: intro.xml:91
@@ -289,7 +285,7 @@
"singleton beans), different clients of a Web Bean see the Web Bean in "
"different states. The client-visible state depends upon which instance of "
"the Web Bean the client has a reference to."
-msgstr ""
+msgstr "讓我們向後看,「contextual(語意式)」到底代表什麼意思?因為 Web Bean 能夠是有狀態的,而最重要的是我們有<emphasis>哪個</emphasis> bean instance。和無狀態的元件模型(例如無狀態的 session bean)或單元件模型(例如 servlet 或是單獨的 bean)不同的是,對於不同的 Web Bean 客戶端而言,它們會看見不同狀態的 Web Bean。客戶端可看見的狀態基於客戶端參照的是 Web Bean 的哪個 instance。"
#. Tag: para
#: intro.xml:98
@@ -299,24 +295,24 @@
"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 ""
+msgstr "不過,就和無狀態或是單獨的模型一樣,並與有狀態的 session bean <emphasis>不同</emphasis>,客戶端無法藉由明確建立和刪除 instance 來控制 instance 的生命週期。反之,Web Bean 的 <emphasis>scope</emphasis> 可決定:"
#. Tag: para
#: intro.xml:105
#, no-c-format
msgid "the lifecycle of each instance of the Web Bean and"
-msgstr ""
+msgstr "Web Bean 的各個 instance 的生命週期以及"
#. Tag: para
#: intro.xml:108
#, no-c-format
-msgid ""
-"which clients share a reference to a particular instance of the Web Bean."
-msgstr ""
+msgid "which clients share a reference to a particular instance of the Web Bean."
+msgstr "哪些客戶端共享 Web Bean 的特定 instance 的參照。"
#. Tag: para
#: intro.xml:113
#, no-c-format
+#, fuzzy
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 "
@@ -324,7 +320,7 @@
"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 ""
+msgstr "Web Bean 應用程式中的某個執行緒"
#. Tag: para
#: intro.xml:119
@@ -333,7 +329,7 @@
"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 ""
+msgstr "相同 context 的客戶端(例如其它 Web Bean)將會看見相同的 Web Bean instance。不過不同 context 的客戶端則會看見不同的 instance。"
#. Tag: para
#: intro.xml:123
@@ -345,19 +341,19 @@
"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 ""
+msgstr "Contextual model 的其中一個主要優點就是它允許有狀態的 Web Bean 能被視為是一項服務!客戶端不需要擔心如何管理它所使用的 Web Bean 的生命週期,<emphasis>它甚至不需要知道這個生命週期為何。</emphasis>Web Bean 會透過傳送訊息來進行互動,並且 Web Bean 的實做也能定義它們自己的狀態的生命週期。Web Bean 為鬆散耦合(loosely coupled)的,因為:"
#. Tag: para
#: intro.xml:132
#, no-c-format
msgid "they interact via well-defined public APIs"
-msgstr ""
+msgstr "它們透過了定義明確的公用 API 來進行互動"
#. Tag: para
#: intro.xml:135
#, no-c-format
msgid "their lifecycles are completely decoupled"
-msgstr ""
+msgstr "它們的生命週期已被完全地 decouple 了"
#. Tag: para
#: intro.xml:139
@@ -368,7 +364,7 @@
"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 ""
+msgstr "我們能夠在不影響其它 Web Bean 實做的情況下將一個 Web Bean 取代為另一個實做相同 API 並有不同生命週期(不同 scope)的 Web Bean。事實上,Web Bean 可在建置時定義一項用來置換 Web Bean 實做的複雜功能,就如我們將在 <xref linkend=\"deploymenttypes\"/> 中所見。"
#. Tag: para
#: intro.xml:145
@@ -377,7 +373,7 @@
"Note that not all clients of a Web Bean are Web Beans. Other objects such as "
"Servlets or Message-Driven Beans—which are by nature not injectable, "
"contextual objects—may also obtain references to Web Beans by injection."
-msgstr ""
+msgstr "請注意,並非所有 Web Bean 的客戶端都是 Web Bean。像是 Servlet 或訊息導向的 Bean 之類的其它物件—無法被注入,並屬於 contextual object—也能透過注入來取得 Web Bean 的參照。"
#. Tag: para
#: intro.xml:149
@@ -389,55 +385,55 @@
#: intro.xml:153
#, no-c-format
msgid "A Web Bean comprises:"
-msgstr ""
+msgstr "Web Bean 包含著:"
#. Tag: para
#: intro.xml:156
#, no-c-format
msgid "A (nonempty) set of API types"
-msgstr ""
+msgstr "一組(非空的)API 類型(API type)"
#. Tag: para
#: intro.xml:157
#, no-c-format
msgid "A (nonempty) set of binding annotation types"
-msgstr ""
+msgstr "一組(非空的)綁定標記類型(binding annotation type)"
#. Tag: para
#: intro.xml:158
#, no-c-format
msgid "A scope"
-msgstr ""
+msgstr "一個 scope"
#. Tag: para
#: intro.xml:159
#, no-c-format
msgid "A deployment type"
-msgstr ""
+msgstr "一個建置類型(deployment type)"
#. Tag: para
#: intro.xml:160
#, no-c-format
msgid "Optionally, a Web Bean name"
-msgstr ""
+msgstr "亦可選擇性地包含著一組 Web Bean 名稱"
#. Tag: para
#: intro.xml:161
#, no-c-format
msgid "A set of interceptor binding types"
-msgstr ""
+msgstr "一組攔截器綁定類型(interceptor binding type)"
#. Tag: para
#: intro.xml:162
#, no-c-format
msgid "A Web Bean implementation"
-msgstr ""
+msgstr "一個 Web Bean 實做(Web Bean implementation)"
#. Tag: para
#: intro.xml:167
#, no-c-format
msgid "Let's see what some of these terms mean, to the Web Bean developer."
-msgstr ""
+msgstr "讓我們來看看這些術語對 Web Bean 開發人員來說代表什麼。"
#. Tag: title
#: intro.xml:170
@@ -447,24 +443,24 @@
#. Tag: para
#: intro.xml:172
-#, fuzzy, no-c-format
+#, 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 "依賴注入"
+msgstr "Web Bean 通常會透過依賴注入(dependency injection)來取得其它 Web Bean 的參照。任何被注入的屬性都會指定一個「合同(contract)」,該合同必須被 Web Bean 滿足才可被注入。這個合同為:"
#. Tag: para
#: intro.xml:177
#, no-c-format
msgid "an API type, together with"
-msgstr ""
+msgstr "一個 API 類型,以及"
#. Tag: para
#: intro.xml:178
#, no-c-format
msgid "a set of binding types."
-msgstr ""
+msgstr "一組綁定類型。"
#. Tag: para
#: intro.xml:181
@@ -475,7 +471,7 @@
"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 ""
+msgstr "API 是個用戶定義的 class 或介面。(若 Web Bean 是個 EJB session bean 的話,那麼 API 類形便是 <literal>@Local</literal> 介面或是 bean-class 的 local view)。綁定類型代表一些客戶端可見的語意,這些語意可藉由一些 API 實做來滿足。"
#. Tag: para
#: intro.xml:186
@@ -485,7 +481,7 @@
"themselves annotated <literal>@BindingType</literal>. For example, the "
"following injection point has API type <literal>PaymentProcessor</literal> "
"and binding type <literal>@CreditCard</literal>:"
-msgstr ""
+msgstr "綁定類型是透過用戶定義、本身已被標記為 <literal>@BindingType</literal> 的標記來表示的。比方說,以下注入點含有一個 <literal>PaymentProcessor</literal> API 類型以及 <literal>@CreditCard</literal> 綁定類型:"
#. Tag: programlisting
#: intro.xml:191
@@ -499,7 +495,7 @@
msgid ""
"If no binding type is explicitly specified at an injection point, the "
"default binding type <literal>@Current</literal> is assumed."
-msgstr ""
+msgstr "若在注入點沒有綁定類型被明確指定的話,那麼預設的綁定類型 <literal>@Current</literal> 就會被假設。"
#. Tag: para
#: intro.xml:196
@@ -508,7 +504,7 @@
"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 ""
+msgstr "Web Bean 管理員會針對於各個注入點搜尋滿足合同(實做 API 並擁有所有綁定類型)的 Web Bean,然後將該 Web Bean 注入。"
#. Tag: para
#: intro.xml:200
@@ -517,7 +513,7 @@
"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 ""
+msgstr "下列 Web Bean 的綁定類型為 <literal>@CreditCard</literal> 並且實做了 <literal>PaymentProcessor</literal> 這個 API 類型。因此它可被注入至範例的注入點中:"
#. Tag: programlisting
#: intro.xml:204
@@ -538,7 +534,7 @@
"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 ""
+msgstr "若 Web Bean 不明確指定一組綁定類型的話,它便會只有一個綁定類型:也就是預設的綁定類型 <literal>@Current</literal>。"
#. Tag: para
#: intro.xml:209
@@ -548,13 +544,13 @@
"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 ""
+msgstr "Web Bean 會定義一個複雜不過不難理解的 <emphasis>resolution algorithm(解析運算法)</emphasis>,它可在有超過一個滿足特定合同的 Web Bean 存在的情況下協助 container 決定該怎麼作。我們將在 <xref linkend=\"injection\"/> 中詳細討論。"
#. Tag: title
#: intro.xml:217
#, no-c-format
msgid "Deployment types"
-msgstr ""
+msgstr "建置類型(Deployment type)"
#. Tag: para
#: intro.xml:219
@@ -567,7 +563,7 @@
"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 ""
+msgstr "<emphasis>Deployment type</emphasis> 可讓我們透過建置方案(deployment scenario)來為我們的 Web Bean 歸類。建置類型是個表示特定建置方案的標記,例如 <literal>@Mock</literal>、<literal>@Staging</literal> 或 <literal>@AustralianTaxLaw</literal>。我們會將標記套用至應透過該方案來建置的 Web Bean 中。建置類型能透過單行的配置來允許整組 Web Bean 被條件性地建置。"
#. Tag: para
#: intro.xml:226
@@ -577,7 +573,7 @@
"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 ""
+msgstr "許多 Web Bean 只使用預設的建置類型 <literal>@Production</literal>,在此情況下無須明確地指定建置類型。我們範例中的所有三個 Web Bean 都擁有 <literal>@Production</literal> 這個建置類型。"
#. Tag: para
#: intro.xml:230
@@ -585,7 +581,7 @@
msgid ""
"In a testing environment, we might want to replace the "
"<literal>SentenceTranslator</literal> Web Bean with a \"mock object\":"
-msgstr ""
+msgstr "在測試環境中,我們可能會希望將 <literal>SentenceTranslator</literal> 這個 Web Bean 替換為一個「mock 物件」:"
#. Tag: programlisting
#: intro.xml:233
@@ -726,8 +722,7 @@
#. Tag: para
#: intro.xml:284
#, no-c-format
-msgid ""
-"It's even easier to just let the name be defaulted by the Web Bean manager:"
+msgid "It's even easier to just let the name be defaulted by the Web Bean manager:"
msgstr ""
#. Tag: programlisting
@@ -889,7 +884,8 @@
#. Tag: para
#: intro.xml:360
-#, fuzzy, no-c-format
+#, no-c-format
+#, fuzzy
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 "
@@ -1078,8 +1074,7 @@
#. Tag: para
#: intro.xml:437
#, no-c-format
-msgid ""
-"The result of a producer method is injected just like any other Web Bean."
+msgid "The result of a producer method is injected just like any other Web Bean."
msgstr ""
#. Tag: programlisting
@@ -1166,3 +1161,4 @@
"objects required to send messages to queues and topics. We'll discuss JMS "
"endpoints in <xref linkend=\"jms\"/>."
msgstr ""
+
Modified: doc/trunk/reference/zh-TW/ri.po
===================================================================
--- doc/trunk/reference/zh-TW/ri.po 2009-01-19 07:51:04 UTC (rev 1072)
+++ doc/trunk/reference/zh-TW/ri.po 2009-01-19 08:32:12 UTC (rev 1073)
@@ -8,7 +8,7 @@
"Project-Id-Version: ri\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-18 16:31+0000\n"
-"PO-Revision-Date: 2009-01-16 12:56+1000\n"
+"PO-Revision-Date: 2009-01-19 18:21+1000\n"
"Last-Translator: Terry Chuang <tchuang(a)redhat.com>\n"
"Language-Team: Traditional Chinese <zh(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -203,8 +203,7 @@
#. Tag: para
#: ri.xml:93
#, no-c-format
-msgid ""
-"The build scripts for the examples offer a number of targets, these are:"
+msgid "The build scripts for the examples offer a number of targets, these are:"
msgstr "這些範例的建置 script 提供了一些目標,它們包含了:"
#. Tag: para
@@ -219,14 +218,12 @@
msgid ""
"<literal>ant explode</literal> - update an exploded example, without "
"restarting the deployment"
-msgstr ""
-"<literal>ant explode</literal> - 在不重新建置的情況下更新一個已分解的範例"
+msgstr "<literal>ant explode</literal> - 在不重新建置的情況下更新一個已分解的範例"
#. Tag: para
#: ri.xml:111
#, no-c-format
-msgid ""
-"<literal>ant deploy</literal> - deploy the example in compressed jar format"
+msgid "<literal>ant deploy</literal> - deploy the example in compressed jar format"
msgstr "<literal>ant deploy</literal> - 以 jar 格式來建置範例"
#. Tag: para
@@ -658,8 +655,7 @@
msgid ""
"There is also the <literal>@MaxNumber</literal> binding type, used for "
"injecting the maximum number that can be injected:"
-msgstr ""
-"還有個用來注入可注入之最大號碼的 <literal>@MaxNumber</literal> 綁定類型:"
+msgstr "還有個用來注入可注入之最大號碼的 <literal>@MaxNumber</literal> 綁定類型:"
#. Tag: programlisting
#: ri.xml:300
@@ -1003,8 +999,7 @@
msgid ""
"EJB 3.1 and Jave EE 6 allow you to package EJBs in a war, which will make "
"this structure much simpler!"
-msgstr ""
-"EJB 3.1 和 Jave EE 6 能讓您將 EJB 封裝為 war,並使得該結構變得更為簡樸!"
+msgstr "EJB 3.1 和 Jave EE 6 能讓您將 EJB 封裝為 war,並使得該結構變得更為簡樸!"
#. Tag: para
#: ri.xml:351
@@ -1227,7 +1222,7 @@
#. Tag: para
#: ri.xml:401
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"We've saved the most interesting bit to last, the code! The project has two "
"simple beans, <literal>SentenceParser</literal> and <literal>TextTranslator</"
@@ -1236,11 +1231,8 @@
"quite familiar with what a Web Bean looks like by now, so we'll just "
"highlight the most interesting bits here."
msgstr ""
-"我們將最有趣的部份保留到了最後,那就是程式碼!該專案含有兩個基本的 bean,"
-"<literal>SentenceParser</literal> 和 <literal>TextTranslator</literal>,以及"
-"兩個企業級的 bean,<literal>TanslatorControllerBean</literal> 和 "
-"<literal>SentenceTranslator</literal>。到了現在您應該已經很熟悉 Web Bean 的長"
-"相如何了,因此我們在此將只著重於其它的部份。"
+"我們將最有趣的部份保留到了最後,那就是程式碼!該專案含有兩個基本的 bean,<literal>SentenceParser</literal> 和 <literal>TextTranslator</literal>,以及兩個企業級的 bean,<literal>TranslatorControllerBean</literal> 和 "
+"<literal>SentenceTranslator</literal>。到了現在您應該已經很熟悉 Web Bean 長得如何了,因此我們在此將只著重於其它較有趣的部份。"
#. Tag: para
#: ri.xml:411
@@ -1384,3 +1376,4 @@
msgstr ""
"我們在所有層面都需要協助 - 錯誤修正、編寫新功能、編寫範例,以及翻譯此參照指"
"南。"
+
Modified: doc/trunk/reference/zh-TW/specialization.po
===================================================================
--- doc/trunk/reference/zh-TW/specialization.po 2009-01-19 07:51:04 UTC (rev 1072)
+++ doc/trunk/reference/zh-TW/specialization.po 2009-01-19 08:32:12 UTC (rev 1073)
@@ -8,7 +8,7 @@
"Project-Id-Version: specialization\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-18 16:31+0000\n"
-"PO-Revision-Date: 2009-01-15 12:18+1000\n"
+"PO-Revision-Date: 2009-01-19 18:30+1000\n"
"Last-Translator: Terry Chuang <tchuang(a)redhat.com>\n"
"Language-Team: Traditional Chinese <zh(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -20,17 +20,17 @@
#: specialization.xml:4
#, no-c-format
msgid "Specialization"
-msgstr ""
+msgstr "專門化"
#. Tag: para
#: specialization.xml:6
-#, fuzzy, no-c-format
+#, 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 "依賴注入"
+msgstr "我們已經看過了 Web Bean 的依賴注入模型如何讓我們在建置時<emphasis>置換</emphasis>一個 API 的實做了。比方說,下列企業級的 Web Bean 在生產時提供了 <literal>PaymentProcessor</literal> 這個 API 的一個實做:"
#. Tag: programlisting
#: specialization.xml:11
@@ -54,7 +54,7 @@
msgid ""
"But in our staging environment, we override that implementation of "
"<literal>PaymentProcessor</literal> with a different Web Bean:"
-msgstr ""
+msgstr "不過在我們的中繼環境(staging environment)中,我們利用了不同的 Web Bean 來置換了 <literal>PaymentProcessor</literal> 的實做:"
#. Tag: programlisting
#: specialization.xml:16
@@ -82,7 +82,7 @@
"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 ""
+msgstr "我們嘗試要對 <literal>StagingCreditCardPaymentProcessor</literal> 進行的就是在系統的某個特定的 deployment 中完全地替換掉 <literal>AsyncPaymentProcessor</literal>。在該 deployment 中,<literal>@Staging</literal> 這個 deployment type 將會擁有比 <literal>@Production</literal> 這個預設 deployment type 還要高的優先權,因此含有下列注入點的客戶端:"
#. Tag: programlisting
#: specialization.xml:24
@@ -96,13 +96,13 @@
msgid ""
"Would receive an instance of <literal>StagingCreditCardPaymentProcessor</"
"literal>."
-msgstr ""
+msgstr "將會收到 <literal>StagingCreditCardPaymentProcessor</literal> 的一個 instance。"
#. Tag: para
#: specialization.xml:28
#, no-c-format
msgid "Unfortunately, there are several traps we can easily fall into:"
-msgstr ""
+msgstr "不過我們有幾點需要小心:"
#. Tag: para
#: specialization.xml:32
@@ -287,8 +287,7 @@
#. Tag: para
#: specialization.xml:124
#, no-c-format
-msgid ""
-"there is no other enabled Web Bean that also specializes the superclass."
+msgid "there is no other enabled Web Bean that also specializes the superclass."
msgstr ""
#. Tag: para
@@ -307,3 +306,4 @@
"emphasis> be called in any deployment of the system where the Web Bean "
"annotated <literal>@Specializes</literal> is deployed and enabled."
msgstr ""
+
16 years, 8 months