[webbeans-commits] Webbeans SVN: r1523 - doc/trunk/reference/de-DE.
by webbeans-commits@lists.jboss.org
Author: jdimanos
Date: 2009-02-15 04:40:57 -0500 (Sun, 15 Feb 2009)
New Revision: 1523
Modified:
doc/trunk/reference/de-DE/intro.po
Log:
update
Modified: doc/trunk/reference/de-DE/intro.po
===================================================================
--- doc/trunk/reference/de-DE/intro.po 2009-02-15 08:11:41 UTC (rev 1522)
+++ doc/trunk/reference/de-DE/intro.po 2009-02-15 09:40:57 UTC (rev 1523)
@@ -7,7 +7,7 @@
"Project-Id-Version: intro\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-10 14:18+0000\n"
-"PO-Revision-Date: 2009-01-27 07:18+1100\n"
+"PO-Revision-Date: 2009-02-15 20:40+1100\n"
"Last-Translator: \n"
"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -520,7 +520,7 @@
msgid ""
"If no binding type is explicitly specified at an injection point, the "
"default binding type <literal>@Current</literal> is assumed."
-msgstr ""
+msgstr "Wird an einem Einspeisungspunkt kein Binding-Typ explizit festgelegt, so wird vom standardmäßigen Binding-Typ <literal>@Current</literal> ausgegangen."
#. Tag: para
#: intro.xml:196
@@ -754,7 +754,7 @@
#: intro.xml:284
#, no-c-format
msgid "It's even easier to just let the name be defaulted by the Web Bean manager:"
-msgstr ""
+msgstr "Es ist sogar noch einfacher den Name vom Web Bean Manager standardisieren zu lassen:"
#. Tag: programlisting
#: intro.xml:287
@@ -769,10 +769,13 @@
#. Tag: para
#: intro.xml:289
#, no-c-format
+#, fuzzy
msgid ""
"In this case, the name defaults to <literal>shoppingCart</literal> — the "
"unqualified class name, with the first character changed to lowercase."
msgstr ""
+"In diesem Fall wird der Name standardmäßig zu <literal>shoppingCart</literal> — dem nicht vollständigen Klassennamen "
+"unqualified class name, with the first character changed to lowercase."
#. Tag: title
#: intro.xml:295
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1522 - doc/trunk/reference/de-DE.
by webbeans-commits@lists.jboss.org
Author: jdimanos
Date: 2009-02-15 03:11:41 -0500 (Sun, 15 Feb 2009)
New Revision: 1522
Modified:
doc/trunk/reference/de-DE/interceptors.po
Log:
update
Modified: doc/trunk/reference/de-DE/interceptors.po
===================================================================
--- doc/trunk/reference/de-DE/interceptors.po 2009-02-15 04:59:32 UTC (rev 1521)
+++ doc/trunk/reference/de-DE/interceptors.po 2009-02-15 08:11:41 UTC (rev 1522)
@@ -7,7 +7,7 @@
"Project-Id-Version: interceptors\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-10 14:18+0000\n"
-"PO-Revision-Date: 2009-01-24 15:26+1100\n"
+"PO-Revision-Date: 2009-02-15 19:11+1100\n"
"Last-Translator: \n"
"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -27,13 +27,13 @@
msgid ""
"Web Beans re-uses the basic interceptor architecture of EJB 3.0, extending "
"the functionality in two directions:"
-msgstr ""
+msgstr "Web Beans verwenden die grundlegende Interzeptor-Architektur von EJB 3.0, wobei die Funktionalität in zwei Richtungen erweitert wird:"
#. Tag: para
#: interceptors.xml:11
#, no-c-format
msgid "Any Web Bean may have interceptors, not just session beans."
-msgstr ""
+msgstr "Jedes Web Bean kann Interzeptoren besitzen, nicht nur Session Beans."
#. Tag: para
#: interceptors.xml:14
@@ -41,25 +41,25 @@
msgid ""
"Web Beans features a more sophisticated annotation-based approach to binding "
"interceptors to Web Beans."
-msgstr ""
+msgstr "Web Beans bieten eine fortgeschrittenere auf Annotationen basierende Vorgehensweise bei der Bindung von Interzeptoren an Web Beans."
#. Tag: para
#: interceptors.xml:22
#, no-c-format
msgid "The EJB specification defines two kinds of interception points:"
-msgstr ""
+msgstr "Die EJB-Spezifikation definiert zwei Arten von Abfangpunkten (sog. \"Interception Points\"):"
#. Tag: para
#: interceptors.xml:26
#, no-c-format
msgid "business method interception, and"
-msgstr ""
+msgstr "Business Methoden Interception und"
#. Tag: para
#: interceptors.xml:29
#, no-c-format
msgid "lifecycle callback interception."
-msgstr ""
+msgstr "Lebenszyklus-Callback Interception."
#. Tag: para
#: interceptors.xml:33
@@ -67,7 +67,7 @@
msgid ""
"A <emphasis>business method interceptor</emphasis> applies to invocations of "
"methods of the Web Bean by clients of the Web Bean:"
-msgstr ""
+msgstr "Ein <emphasis>Business Methoden Interzeptor</emphasis> gilt für Aufrufe von Methoden des Web Beans durch Clients des Web Beans:"
#. Tag: programlisting
#: interceptors.xml:36
@@ -89,7 +89,7 @@
msgid ""
"A <emphasis>lifecycle callback interceptor</emphasis> applies to invocations "
"of lifecycle callbacks by the container:"
-msgstr ""
+msgstr "Ein <emphasis>Lebenszyklus Callback-Interzeptor</emphasis> gilt für Aufrufe von Lebenszyklus Callbacks durch den Container:"
#. Tag: programlisting
#: interceptors.xml:41
@@ -111,7 +111,7 @@
msgid ""
"An interceptor class may intercept both lifecycle callbacks and business "
"methods."
-msgstr ""
+msgstr "Eine Interzeptorklasse kann sowohl Lebenszyklus-Callbacks als auch Business-Methoden abfangen."
#. Tag: title
#: interceptors.xml:49
@@ -126,7 +126,7 @@
"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 ""
+msgstr "Nehmen wir an, wir wollten deklarieren, dass einige unserer Web Beans transaktional sind. Das erste, was wir benötigen ist eine <emphasis>Interzeptor bindende Annotation</emphasis>, um festzulegen, für welches Web Bean wir uns interessieren:"
#. Tag: programlisting
#: interceptors.xml:55
@@ -148,7 +148,7 @@
msgid ""
"Now we can easily specify that our <literal>ShoppingCart</literal> is a "
"transactional object:"
-msgstr ""
+msgstr "Jetzt können wir ganz leicht unser <literal>ShoppingCart</literal> als ein transaktionales Objekt festlegen:"
#. Tag: programlisting
#: interceptors.xml:60
@@ -164,7 +164,7 @@
#: interceptors.xml:62
#, no-c-format
msgid "Or, if we prefer, we can specify that just one method is transactional:"
-msgstr ""
+msgstr "Oder, falls uns das lieber ist, können wir festlegen, dass nur eine Methode transaktional ist:"
#. Tag: programlisting
#: interceptors.xml:64
@@ -193,6 +193,9 @@
"All we need to do is create a standard EJB interceptor, and annotate it "
"<literal>@Interceptor</literal> and <literal>@Transactional</literal>."
msgstr ""
+"Das ist toll, aber irgendwann müssen wir den den Managementaspekt dieser Transaktion liefert, implementieren. "
+"Wir müssen nur einen standardmäßigen EJB-Interzeptor erstellen und ihn mit "
+"<literal>@Interceptor</literal> und <literal>@Transactional</literal> annotieren."
#. Tag: programlisting
#: interceptors.xml:76
@@ -216,7 +219,7 @@
msgid ""
"All Web Beans interceptors are simple Web Beans, and can take advantage of "
"dependency injection and contextual lifecycle management."
-msgstr ""
+msgstr "Bei allen Web Beans Interzeptoren handelt es sich um einfache Web Beans und sie können \"Dependency\"-Einspeisung und kontextuelles Lebenszyklus-Management nutzen."
#. Tag: programlisting
#: interceptors.xml:81
@@ -246,13 +249,13 @@
#: interceptors.xml:83
#, no-c-format
msgid "Multiple interceptors may use the same interceptor binding type."
-msgstr ""
+msgstr "Mehrere Interzeptoren können denselben Interzeptor Binding-Typ verwenden."
#. Tag: title
#: interceptors.xml:88
#, no-c-format
msgid "Enabling interceptors"
-msgstr ""
+msgstr "Interzeptoren aktivieren"
#. Tag: para
#: interceptors.xml:90
@@ -260,7 +263,7 @@
msgid ""
"Finally, we need to <emphasis>enable</emphasis> our interceptor in "
"<literal>web-beans.xml</literal>."
-msgstr ""
+msgstr "Schließlich müssen wir unseren Interzeptor in <literal>web-beans.xml</literal> <emphasis>aktivieren</emphasis>."
#. Tag: programlisting
#: interceptors.xml:93
@@ -278,13 +281,13 @@
#: interceptors.xml:95
#, no-c-format
msgid "Whoah! Why the angle bracket stew?"
-msgstr ""
+msgstr "Puh! Warum diese Suppe an Klammern?"
#. Tag: para
#: interceptors.xml:97
#, no-c-format
msgid "Well, the XML declaration solves two problems:"
-msgstr ""
+msgstr "Nun, die XML-Deklaration löst zwei Probleme:"
#. Tag: para
#: interceptors.xml:101
@@ -292,13 +295,13 @@
msgid ""
"it enables us to specify a total ordering for all the interceptors in our "
"system, ensuring deterministic behavior, and"
-msgstr ""
+msgstr "Sie ermöglicht es uns, eine totale Reihenfolge für alle Interzeptoren in unserem System festzulegen, wodurch deterministisches Verhalten festgelegt wird und "
#. Tag: para
#: interceptors.xml:105
#, no-c-format
msgid "it lets us enable or disable interceptor classes at deployment time."
-msgstr ""
+msgstr "Interzeptor-Klassen zum Zeitpunkt des Deployments aktiviert oder deaktiviert werden können."
#. Tag: para
#: interceptors.xml:109
@@ -307,6 +310,8 @@
"For example, we could specify that our security interceptor runs before our "
"<literal>TransactionInterceptor</literal>."
msgstr ""
+"Zum Beispiel könnten wir festlegen, dass unser Sicherheitsinterzeptor vor unserem "
+"<literal>TransactionInterceptor</literal> ausgeführt wird."
#. Tag: programlisting
#: interceptors.xml:112
@@ -326,13 +331,13 @@
#: interceptors.xml:114
#, no-c-format
msgid "Or we could turn them both off in our test environment!"
-msgstr ""
+msgstr "Oder wir könnten sie beide in unserer Testumgebung abschalten!"
#. Tag: title
#: interceptors.xml:119
#, no-c-format
msgid "Interceptor bindings with members"
-msgstr ""
+msgstr "Interzeptor-Bindings mit Mitgliedern"
#. Tag: para
#: interceptors.xml:121
@@ -340,7 +345,7 @@
msgid ""
"Suppose we want to add some extra information to our "
"<literal>@Transactional</literal> annotation:"
-msgstr ""
+msgstr "Nehmen wir an, wir wollten unserer <literal>@Transactional</literal>-Annotation weitere Informationen hinzufügen:"
#. Tag: programlisting
#: interceptors.xml:124
@@ -367,7 +372,7 @@
"Web Beans will use the value of <literal>requiresNew</literal> to choose "
"between two different interceptors, <literal>TransactionInterceptor</"
"literal> and <literal>RequiresNewTransactionInterceptor</literal>."
-msgstr ""
+msgstr "Web Beans verwendet den Wert von <literal>requiresNew</literal> zur Auswahl zwischen zwei verschiedenen Interzeptoren <literal>TransactionInterceptor</literal> und <literal>RequiresNewTransactionInterceptor</literal> auszuwählen."
#. Tag: programlisting
#: interceptors.xml:130
@@ -391,7 +396,7 @@
msgid ""
"Now we can use <literal>RequiresNewTransactionInterceptor</literal> like "
"this:"
-msgstr ""
+msgstr "Jetzt können wir <literal>RequiresNewTransactionInterceptor</literal> wie folgt verwenden:"
#. Tag: programlisting
#: interceptors.xml:134
@@ -410,7 +415,7 @@
"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 ""
+msgstr "Was aber, wenn wir über nur einen Interzeptor verfügen und wir wollen, dass der Manager bei der Bindung der Interzeptoren den Wert von <literal>requiresNew</literal> ignoriert? Wir können die <literal>@NonBinding</literal>-Annotation verwenden:"
#. Tag: programlisting
#: interceptors.xml:140
@@ -434,7 +439,7 @@
#: interceptors.xml:145
#, no-c-format
msgid "Multiple interceptor binding annotations"
-msgstr ""
+msgstr "Multiple Interzeptor bindende Annotationen"
#. Tag: para
#: interceptors.xml:147
@@ -445,6 +450,8 @@
"used to bind <literal>TransactionInterceptor</literal> and "
"<literal>SecurityInterceptor</literal> to the same Web Bean:"
msgstr ""
+"In der Regel verwenden wir Kombinationen von Interzeptor-Binding-Typen, um mehrere Interzeptoren an ein Web Bean zu binden. Folgende Deklaration etwa würde verwendet, um <literal>TransactionInterceptor</literal> und "
+"<literal>SecurityInterceptor</literal> an dasselbe Web Bean zu binden:"
#. Tag: programlisting
#: interceptors.xml:152
@@ -462,7 +469,7 @@
msgid ""
"However, in very complex cases, an interceptor itself may specify some "
"combination of interceptor binding types:"
-msgstr ""
+msgstr "In sehr komplexen Fällen aber kann ein Interzeptor selbst eine Kombination von Interzeptor-Binding-Typen festlegen:"
#. Tag: programlisting
#: interceptors.xml:157
@@ -480,7 +487,7 @@
msgid ""
"Then this interceptor could be bound to the <literal>checkout()</literal> "
"method using any one of the following combinations:"
-msgstr ""
+msgstr "Dann könnte dieser Interzeptor an die <literal>checkout()</literal>-Methode gebunden werden, indem eine der folgenden Kombinationen verwendet wird:"
#. Tag: programlisting
#: interceptors.xml:162
@@ -540,7 +547,7 @@
#: interceptors.xml:173
#, no-c-format
msgid "Interceptor binding type inheritance"
-msgstr ""
+msgstr "Vererbung von Interzeptor-Binding-Typen"
#. Tag: para
#: interceptors.xml:175
@@ -549,7 +556,7 @@
"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 ""
+msgstr "Eine Einschränkung des Java Sprach-Supports für Annotationen ist das Fehlen von Annotationsvererbung. Eigentlich sollten Annotationen eine eingebaute Wiederverwendung besitzen, damit diese Art von Sache funktioniert:"
#. Tag: programlisting
#: interceptors.xml:179
@@ -566,7 +573,7 @@
"types. The interceptor bindings are transitive — any Web Bean with the "
"first interceptor binding inherits the interceptor bindings declared as meta-"
"annotations."
-msgstr ""
+msgstr "Nun, zum Glück umgeht Web Beans dieses fehlende Feature von Java. Wir können einen Interzeptor Binding-Typ mit anderen Interzeptor Binding-Typen annotieren. Die Interzeptor-Bindings sind transitive — jedes Web Bean mit demselben Interzeptor-Binding erbt die als Meta-Annotationen deklarierten Interzeptor-Bindings."
#. Tag: programlisting
#: interceptors.xml:186
@@ -593,12 +600,14 @@
"literal>. (And even <literal>TransactionalSecureInterceptor</literal>, if it "
"exists.)"
msgstr ""
+"Jedes mit <literal>@Action</literal> annotierte Web Bean wird sowohl an <literal>TransactionInterceptor</literal> als auch <literal>SecurityInterceptor</"
+"literal> gebunden. (Und sogar an <literal>TransactionalSecureInterceptor</literal>, falls es existiert)."
#. Tag: title
#: interceptors.xml:195
#, no-c-format
msgid "Use of <literal>@Interceptors</literal>"
-msgstr ""
+msgstr "Verwendung von <literal>@Interceptors</literal>"
#. Tag: para
#: interceptors.xml:197
@@ -607,7 +616,7 @@
"The <literal>@Interceptors</literal> annotation defined by the EJB "
"specification is supported for both enterprise and simple Web Beans, for "
"example:"
-msgstr ""
+msgstr "Die durch die EJB-Spezifikation definierte <literal>@Interceptors</literal>-Annotation wird sowohl für Enterprise als auch einfache Web Beans unterstützt, zum Beispiel:"
#. Tag: programlisting
#: interceptors.xml:200
@@ -629,19 +638,19 @@
#: interceptors.xml:202
#, no-c-format
msgid "However, this approach suffers the following drawbacks:"
-msgstr ""
+msgstr "Allerdings besitzt diese Vorgehensweise folgende Nachteile:"
#. Tag: para
#: interceptors.xml:206
#, no-c-format
msgid "the interceptor implementation is hardcoded in business code,"
-msgstr ""
+msgstr "Die Interzeptorimplementierung ist im Business Code hardkodiert,"
#. Tag: para
#: interceptors.xml:209
#, no-c-format
msgid "interceptors may not be easily disabled at deployment time, and"
-msgstr ""
+msgstr "Interzeptoren können zum Deployment-Zeitpunkt nicht einfach deaktiviert werden und "
#. Tag: para
#: interceptors.xml:212
@@ -649,11 +658,11 @@
msgid ""
"the interceptor ordering is non-global — it is determined by the order in "
"which interceptors are listed at the class level."
-msgstr ""
+msgstr "Die Interzeptorreihenfolge ist nicht allgemeingültig — sie wird durch die Reihenfolge, in der Interzeptoren auf Klassenebene aufgeführt sind, festgelegt."
#. Tag: para
#: interceptors.xml:217
#, no-c-format
msgid "Therefore, we recommend the use of Web Beans-style interceptor bindings."
-msgstr ""
+msgstr "Daher empfehlen wir die Verwendung von Interzeptor-Bindings im Web Beans Stil."
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1521 - doc/trunk/reference/de-DE.
by webbeans-commits@lists.jboss.org
Author: jdimanos
Date: 2009-02-14 23:59:32 -0500 (Sat, 14 Feb 2009)
New Revision: 1521
Modified:
doc/trunk/reference/de-DE/injection.po
Log:
update
Modified: doc/trunk/reference/de-DE/injection.po
===================================================================
--- doc/trunk/reference/de-DE/injection.po 2009-02-15 00:16:40 UTC (rev 1520)
+++ doc/trunk/reference/de-DE/injection.po 2009-02-15 04:59:32 UTC (rev 1521)
@@ -7,7 +7,7 @@
"Project-Id-Version: injection\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-10 14:18+0000\n"
-"PO-Revision-Date: 2009-02-14 13:09+1100\n"
+"PO-Revision-Date: 2009-02-15 15:56+1100\n"
"Last-Translator: \n"
"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -216,6 +216,9 @@
"<literal>UnsatisfiedDependencyException</literal> or "
"<literal>AmbiguousDependencyException</literal>."
msgstr ""
+"Die Web Beans Spezifikation definiert eine Prozedur namens <emphasis>typesicherer Auflösungsalgorithmus</emphasis> (sog. typesafe resolution algorithm), den der Web Bean "
+"Manager bei der Identifizierung des an einem Einspeisungspunkt einzuspeisenden Web Beans folgt. Dieser Algorithmus sieht auf den ersten Blick recht komplex aus, ist es aber nach kurzer Eingewöhnung nicht. Typensichere Auflösung wird zum Initialisierungszeitpunkt des Systems durchgeführt, was bedeutet, dass der Manager den Benutzer sofort darüber informiert, falls die Abhängigkeiten eines Web Beans nicht erfüllt werden können - dies erfolgt durch Meldung von <literal>UnsatisfiedDependencyException</literal> oder "
+"<literal>AmbiguousDependencyException</literal>."
#. Tag: para
#: injection.xml:67
@@ -814,7 +817,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 "Findet der Manager mehr als ein Web Bean, das den von einem Einspeisungspunkt festgelegten Vertrag erfüllt (API-Typ plus Binding-Annotationen), so gilt die relative Präzedenz der Web Beans. Besitzt eines eine höhere Präzedenz als andere, so wird es für die Einspeisung gewählt. In unserem Beispiel speist der Web Bean Manager also <literal>MockPaymentProcessor</literal> bei der Ausführung unserer Integrationstestumgebung aus (und das ist es auch, was wir möchten)."
#. Tag: para
#: injection.xml:271
@@ -831,6 +834,8 @@
"browsing the code can easily identify what deployment scenarios the Web Bean "
"will be used in."
msgstr ""
+"Es ist interessant dies mit den heutzutage beliebten Manager Architekturen zu vergleichen. Verschiedene \"leichtgewichtige\" Container gestatten uns auch das bedingte Deployment von im Klassenpfad existierenden Klassen, aber Klassen, die deployt werden sollen müssen explizit, individuell im Konfigurationscode oder einer XML-Konfigurationsdatei aufgeführt sein. Web Beans unterstützt die Web Bean "
+"Definition und Konfiguration via XML, aber im gängigen Fall, in dem keine komplexe Konfiguration erforderlich ist, gestatten Deployment-Types die Aktivierung eines gesamten Satzes von Web Beans mittels einer einzigen XML-Zeile. Währenddessen kann ein den Code durchsehender Entwickler leicht einsehen, in welchen Deployment-Szenarien das Web Bean eingesetzt wird."
#. Tag: title
#: injection.xml:284
@@ -884,7 +889,7 @@
#: injection.xml:313
#, no-c-format
msgid "Fixing unsatisfied dependencies"
-msgstr ""
+msgstr "Unbefriedigende Abhängigkeiten beheben"
#. Tag: para
#: injection.xml:315
@@ -894,7 +899,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 "Der typensichere Auflösungsalgorithmus schlägt fehl, wenn - nach Betrachtung der Binding-Annotationen und der Deployment-Typen aller den API-Typ implementierender Web Beans eines Einspeisungspunktes - der Web Bean Manager nicht dazu in der Lage ist, ein einzuspeisendes Web Bean zu identifizieren."
#. Tag: para
#: injection.xml:320
@@ -926,7 +931,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 "Um eine <literal>AmbiguousDependencyException</literal> zu beheben, führen Sie einen Binding-Typ ein, um zwischen den beiden Implementierungen des API-Typs zu unterscheiden oder ändern Sie den Deployment-Typ einer der Implementierungen damit der Web Bean Manager Deployment-Typ Präzedenz zur Auswahl zwischen den beiden verwenden kann. Eine <literal>AmbiguousDependencyException</literal> kann nur vorkommen, wenn zwei Web Beans sich einen Binding-Typ teilen und genau denselben Deployment-Typ besitzen."
#. Tag: para
#: injection.xml:335
@@ -960,7 +965,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 "Stellen wir uns vor, ein an den Geltungsbereich der Anwendung gebundenes Web Bean hielte einen direkten Verweis auf ein an den Geltungsbereich der Anfrage gebundenes Web Bean. Das an den Geltungsbereich der Anwendung gebundene Web Bean wird von vielen verschiedenen Anfragen geteilt. Jedoch sollte jede Anfrage eine andere Instanz des an den Geltungsbereich der Anfrage gebundenen Web Beans sehen!"
#. Tag: para
#: injection.xml:351
@@ -971,7 +976,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 "Stellen Sie sich nun vor das an den Geltungsbereich der Session gebundene Web Bean hielte einen direkten Verweis auf ein an den Geltungsbereich der Anwendung gebundenes Web Bean. FVon Zeit zu Zeit wird der Session Kontext auf Disk serialisiert, um den Speicher effizienter zu nutzen. Die durch den Geltungsbereich der Anwendung begrenzte Instanz des Web Beans sollte jedoch nicht mit dem durch den Geltungsbereich der Session begrenzetn Web Bean serialisiert werden!"
#. Tag: para
#: injection.xml:357
@@ -986,6 +991,10 @@
"context to be serialized to disk without recursively serializing other "
"injected Web Beans."
msgstr ""
+"Daher muss der Web Bean Manageralle eingespeisten Verweise auf das Web Bean durch ein Proxy-Objekt einleiten, wenn das Web Bean nicht den Standard-Geltungsbereich <literal>@Dependent</"
+"literal> besitzt. Dieser <emphasis>Client-Proxy</emphasis> ist verantwortlich dafür sicher zu stellen, dass die einen Methodenaufruf erhaltende Web Bean Instanz, die mit dem aktuellen Kontext assoziierte ist. Der "
+"Client-Proxy gestattet außerdem die Serialisierung auf Disk von an Kontexte gebundenen Web Beans, ohne dass"
+"rekursiv andere eingespeiste Web Beans serialisiert werden."
#. Tag: para
#: injection.xml:365
@@ -995,7 +1004,7 @@
"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 "Leider können aufgrund von Einschränkungen von Java einige Java-Typen nicht vom Web Bean Manager geproxiet werden. Daher meldet der Web Bean Manager eine <literal>UnproxyableDependencyException</literal>, wenn der Typ eines Einspeisungspunkts nicht geproxiet werden kann."
#. Tag: para
#: injection.xml:370
@@ -1155,7 +1164,7 @@
"specification: <literal>@PostConstruct</literal>, <literal>@PreDestroy</"
"literal>, <literal>@PrePassivate</literal> and <literal>@PostActivate</"
"literal>."
-msgstr ""
+msgstr "Enterprise Web Beans unterstützen alle durch die EJB-Spezifikation definierten Lebenszyklus-Callbacks: <literal>@PostConstruct</literal>, <literal>@PreDestroy</literal>, <literal>@PrePassivate</literal> und <literal>@PostActivate</literal>."
#. Tag: para
#: injection.xml:426
@@ -1164,6 +1173,8 @@
"Simple Web Beans support only the <literal>@PostConstruct</literal> and "
"<literal>@PreDestroy</literal> callbacks."
msgstr ""
+"Einfache Web Beans unterstützen nur die <literal>@PostConstruct</literal> und "
+"<literal>@PreDestroy</literal> Callbacks."
#. Tag: para
#: injection.xml:429
@@ -1175,6 +1186,9 @@
"respectively. Simple Web Beans do not support the use of "
"<literal>@PersistenceContext(type=EXTENDED)</literal>."
msgstr ""
+"Sowohl Enterprise als auch einfache Web Beans unterstützen den Gebrauch von <literal>@Resource</"
+"literal>, <literal>@EJB</literal> und <literal>@PersistenceContext</literal> "
+"zur Einspeisung von Java EE Ressourcen bzw. EJBs und JPA-Persistenzkontexten. Einfache Web Beans unterstützen den Gebrauch von <literal>@PersistenceContext(type=EXTENDED)</literal> nicht."
#. Tag: para
#: injection.xml:434
@@ -1182,13 +1196,13 @@
msgid ""
"The <literal>@PostConstruct</literal> callback always occurs after all "
"dependencies have been injected."
-msgstr ""
+msgstr "Der <literal>@PostConstruct</literal>-Callback erfolgt immer, nachdem alle Abhängigkeiten eingespeist wurden."
#. Tag: title
#: injection.xml:440
#, no-c-format
msgid "The <literal>InjectionPoint</literal> object"
-msgstr ""
+msgstr "Das <literal>InjectionPoint</literal>-Objekt"
#. Tag: para
#: injection.xml:442
@@ -1199,6 +1213,8 @@
"object or injection point into which they are injected in order to be able "
"to do what they do. For example:"
msgstr ""
+"Es gibt bestimmte Arten abhängiger Objekte — Web Beans mit Geltungsbereich "
+"<literal>@Dependent</literal> — die etwas über das Objekt oder den Einspeisungspunkt in die sie eingespeist werden wissen müssen, um ihre Aufgabe zu erledigen. Zum Beispiel: "
#. Tag: para
#: injection.xml:448
@@ -1206,7 +1222,7 @@
msgid ""
"The log category for a <literal>Logger</literal> depends upon the class of "
"the object that owns it."
-msgstr ""
+msgstr "Die Protokollkategorie für einen <literal>Logger</literal> hängt von der Klasse des sie besitzenden Objekts ab."
#. Tag: para
#: injection.xml:452
@@ -1214,7 +1230,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 "Die Einspeisung eines HTTP-Parameters oder Header-Werts hängt davon ab, welcher Parameter oder Header-Name am Einspeisungspunkt festgelegt wurde."
#. Tag: para
#: injection.xml:456
@@ -1222,7 +1238,7 @@
msgid ""
"Injection of the result of an EL expression evaluation depends upon the "
"expression that was specified at the injection point."
-msgstr ""
+msgstr "Einspeisung als Ergebnis der Evaluierung eines EL-Ausdrucks hängt von vom am Einspeisungspunkt festgelegten Ausdruck ab."
#. Tag: para
#: injection.xml:461
@@ -1231,7 +1247,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 "Ein Web Bean mit Geltungsbereich <literal>@Dependent</literal> kann eine Instanz von <literal>InjectionPoint</literal> einspeisen und auf Metadaten zugreifen, die mit dem zugehörigen Einspeisungspunkt zu tun haben."
#. Tag: para
#: injection.xml:465
@@ -1239,7 +1255,7 @@
msgid ""
"Let's look at an example. The following code is verbose, and vulnerable to "
"refactoring problems:"
-msgstr ""
+msgstr "Sehen wir uns ein Beispiel an. Der folgende Code ist umfangreich und empfänglich für Refaktorierungsprobleme:"
#. Tag: programlisting
#: injection.xml:468
@@ -1254,6 +1270,8 @@
"This clever little producer method lets you inject a JDK <literal>Logger</"
"literal> without explicitly specifying the log category:"
msgstr ""
+"Diese schlaue kleine Producer-Methode gestattet die Einspeisung eines JDK <literal>Logger</"
+"literal>, ohne dass explizit eine Protokollkategorie festgelegt werden müsste:"
#. Tag: programlisting
#: injection.xml:473
@@ -1295,7 +1313,7 @@
msgid ""
"Not convinced? Then here's a second example. To inject HTTP parameters, we "
"need to define a binding type:"
-msgstr ""
+msgstr "Sie sind noch nicht ganz überzeugt? Dann sehen Sie sich ein weiteres Beispiel an. Zur Einspeisung von HTTP-Parametern müssen wir einen Binding-Typ festlegen:"
#. Tag: programlisting
#: injection.xml:482
@@ -1319,7 +1337,7 @@
#: injection.xml:484
#, no-c-format
msgid "We would use this binding type at injection points as follows:"
-msgstr ""
+msgstr "Wir würden diesen Binding-Typ an Einspeisungspunkten wie folgt verwenden:"
#. Tag: programlisting
#: injection.xml:486
@@ -1369,6 +1387,8 @@
"literal> annotation is ignored by the Web Bean manager since it is annotated "
"<literal>@NonBinding.</literal>)"
msgstr ""
+"(Beachten Sie, dass das <literal>value()</literal>-Mitglied der <literal>HttpParam</"
+"literal>-Annotation vom Web Bean Manager wird, da es mit <literal>@NonBinding.</literal> annotiert ist)"
#. Tag: para
#: injection.xml:495
@@ -1376,7 +1396,7 @@
msgid ""
"The Web Bean manager provides a built-in Web Bean that implements the "
"<literal>InjectionPoint</literal> interface:"
-msgstr ""
+msgstr "Der Web Bean Manager liefert ein eingebautes Web Bean, das das <literal>InjectionPoint</literal>-Interface implementiert:"
#. Tag: programlisting
#: injection.xml:498
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1520 - ri/trunk/jboss-tck-runner/src/main/java/org/jboss/webbeans/tck/integration/jbossas and 5 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-02-14 19:16:40 -0500 (Sat, 14 Feb 2009)
New Revision: 1520
Modified:
ri/trunk/jboss-tck-runner/pom.xml
ri/trunk/jboss-tck-runner/src/main/java/org/jboss/webbeans/tck/integration/jbossas/AbstractContainersImpl.java
ri/trunk/jboss-tck-runner/src/main/java/org/jboss/webbeans/tck/integration/jbossas/JBossTestServicesContainersImpl.java
tck/trunk/api/pom.xml
tck/trunk/api/src/main/java/org/jboss/jsr299/tck/api/Configuration.java
tck/trunk/api/src/main/java/org/jboss/jsr299/tck/api/TestLauncher.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/ConfigurationImpl.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/PropertiesBasedConfigurationImpl.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/runner/servlet/ServletTestLauncher.java
Log:
General tidy up
Modified: ri/trunk/jboss-tck-runner/pom.xml
===================================================================
--- ri/trunk/jboss-tck-runner/pom.xml 2009-02-14 23:53:22 UTC (rev 1519)
+++ ri/trunk/jboss-tck-runner/pom.xml 2009-02-15 00:16:40 UTC (rev 1520)
@@ -119,10 +119,10 @@
<profiles>
<profile>
- <id>incontainer</id>
+ <id>incontainer-debug</id>
<activation>
<property>
- <name>incontainer</name>
+ <name>incontainer-debug</name>
</property>
</activation>
<build>
@@ -158,10 +158,10 @@
</build>
</profile>
<profile>
- <id>incontainer-restart</id>
+ <id>incontainer</id>
<activation>
<property>
- <name>incontainer-restart</name>
+ <name>incontainer</name>
</property>
</activation>
<build>
Modified: ri/trunk/jboss-tck-runner/src/main/java/org/jboss/webbeans/tck/integration/jbossas/AbstractContainersImpl.java
===================================================================
--- ri/trunk/jboss-tck-runner/src/main/java/org/jboss/webbeans/tck/integration/jbossas/AbstractContainersImpl.java 2009-02-14 23:53:22 UTC (rev 1519)
+++ ri/trunk/jboss-tck-runner/src/main/java/org/jboss/webbeans/tck/integration/jbossas/AbstractContainersImpl.java 2009-02-15 00:16:40 UTC (rev 1520)
@@ -115,13 +115,14 @@
}
else
{
- log.info("JBoss Home set to " + jbossHome);
+ log.info("Using JBoss instance in " + jbossHome + " at URL " + configuration.getHost());
}
this.bootTimeout = Long.getLong(JBOSS_BOOT_TIMEOUT_PROPERTY_NAME, 120000);
if (Boolean.getBoolean(FORCE_RESTART_PROPERTY_NAME))
{
if (isJBossUp())
{
+ log.info("Shutting down JBoss instance as in force-restart mode");
shutDownJBoss();
try
{
@@ -137,7 +138,7 @@
{
jbossWasStarted = true;
launch(jbossHome, "run", "");
- log.info("Starting JBoss AS");
+ log.info("Starting JBoss instance");
// Wait for JBoss to come up
long timeoutTime = System.currentTimeMillis() + bootTimeout;
boolean interrupted = false;
@@ -145,12 +146,12 @@
{
if (isJBossUp())
{
- log.info("Started JBoss AS");
+ log.info("Started JBoss instance");
return;
}
try
{
- Thread.sleep(500);
+ Thread.sleep(200);
}
catch (InterruptedException e)
{
@@ -162,9 +163,9 @@
Thread.currentThread().interrupt();
}
// If we got this far something went wrong
- log.warn("Unable to connect to JBoss after " + bootTimeout + "ms, giving up!");
+ log.warn("Unable to connect to JBoss instance after " + bootTimeout + "ms, giving up!");
launch(jbossHome, "shutdown", "-S");
- throw new IllegalStateException("Error connecting to JBoss AS at " + jbossHttpUrl);
+ throw new IllegalStateException("Error connecting to JBoss instance");
}
else
{
@@ -176,15 +177,13 @@
{
if (jbossWasStarted)
{
- log.info("Shutting down JBoss AS");
- launch(jbossHome, "shutdown", "-S");
- log.info("Shut down JBoss AS");
+ log.info("Shutting down JBoss instance");
+ shutDownJBoss();
}
}
private void shutDownJBoss() throws IOException
{
- log.info("Shutting down JBoss AS");
launch(jbossHome, "shutdown", "-S");
log.info("Shut down JBoss AS");
}
Modified: ri/trunk/jboss-tck-runner/src/main/java/org/jboss/webbeans/tck/integration/jbossas/JBossTestServicesContainersImpl.java
===================================================================
--- ri/trunk/jboss-tck-runner/src/main/java/org/jboss/webbeans/tck/integration/jbossas/JBossTestServicesContainersImpl.java 2009-02-14 23:53:22 UTC (rev 1519)
+++ ri/trunk/jboss-tck-runner/src/main/java/org/jboss/webbeans/tck/integration/jbossas/JBossTestServicesContainersImpl.java 2009-02-15 00:16:40 UTC (rev 1520)
@@ -51,15 +51,6 @@
{
throw new DeploymentException("Error deploying " + name, e);
}
- try
- {
- // Give the app a chance to undeploy
- Thread.sleep(1000);
- }
- catch (InterruptedException e)
- {
- Thread.currentThread().interrupt();
- }
}
private String getTmpArchiveName(String name)
Modified: tck/trunk/api/pom.xml
===================================================================
--- tck/trunk/api/pom.xml 2009-02-14 23:53:22 UTC (rev 1519)
+++ tck/trunk/api/pom.xml 2009-02-15 00:16:40 UTC (rev 1520)
@@ -38,19 +38,6 @@
<groupId>org.jboss.webbeans</groupId>
<artifactId>webbeans-api</artifactId>
</dependency>
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <classifier>jdk15</classifier>
- <optional>true</optional>
- <exclusions>
- <exclusion>
- <artifactId>jnuit</artifactId>
- <groupId>junit</groupId>
- </exclusion>
- </exclusions>
- </dependency>
-
</dependencies>
<build>
Modified: tck/trunk/api/src/main/java/org/jboss/jsr299/tck/api/Configuration.java
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/jsr299/tck/api/Configuration.java 2009-02-14 23:53:22 UTC (rev 1519)
+++ tck/trunk/api/src/main/java/org/jboss/jsr299/tck/api/Configuration.java 2009-02-15 00:16:40 UTC (rev 1520)
@@ -17,10 +17,9 @@
public static final String OUTPUT_DIRECTORY_PROPERTY_NAME = "org.jboss.jsr299.tck.outputDirectory";
public static final String STANDALONE_PROPERTY_NAME = "org.jboss.jsr299.tck.standalone";
public static final String RUN_INTEGRATION_TESTS_PROPERTY_NAME = "org.jboss.jsr299.tck.runIntegrationTests";
- public static final String CONNECT_DELAY_PROPERTY_NAME = "org.jboss.jsr299.tck.connectDelay";
+ public static final String CONNECT_TIMEOUT_PROPERTY_NAME = "org.jboss.jsr299.tck.connectTimeout";
public static final String LIBRARY_DIRECTORY_PROPERTY_NAME = "org.jboss.jsr299.tck.libraryDirectory";
public static final String HOST_PROPERTY_NAME = "org.jboss.jsr299.tck.host";
- public static final String CONNECT_RETRIES_PROPERTY_NAME = "org.jboss.jsr299.tck.connectRetries";
public static final String TEST_CLASS_PROPERTY_NAME = "org.jboss.jsr299.tck.testClass";
public static final String DEFAULT_OUTPUT_DIRECTORY = System.getProperty("java.io.tmpdir") + "/jsr-299-tck/";
@@ -36,10 +35,8 @@
public boolean isStandalone();
- public int getConnectDelay();
+ public int getConnectTimeout();
- public int getConnectRetries();
-
public String getLibraryDirectory();
public TestLauncher getInContainerTestLauncher();
@@ -58,9 +55,7 @@
public void setStandalone(boolean standalone);
- public void setConnectDelay(int connectDelay);
-
- public void setConnectRetries(int connectRetries);
+ public void setConnectTimeout(int connectTimeout);
public void setLibraryDirectory(String libraryDir);
Modified: tck/trunk/api/src/main/java/org/jboss/jsr299/tck/api/TestLauncher.java
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/jsr299/tck/api/TestLauncher.java 2009-02-14 23:53:22 UTC (rev 1519)
+++ tck/trunk/api/src/main/java/org/jboss/jsr299/tck/api/TestLauncher.java 2009-02-15 00:16:40 UTC (rev 1520)
@@ -9,6 +9,6 @@
public static final String PROPERTY_NAME = TestLauncher.class.getName();
- public TestResult launchTest(Configuration configuration, Method method) throws IOException;
+ public TestResult launchTest(Method method) throws IOException;
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java 2009-02-14 23:53:22 UTC (rev 1519)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java 2009-02-15 00:16:40 UTC (rev 1520)
@@ -4,6 +4,7 @@
import java.lang.reflect.Method;
import java.util.Set;
+import org.apache.log4j.Logger;
import org.jboss.jsr299.tck.api.DeploymentException;
import org.jboss.jsr299.tck.api.TestResult;
import org.jboss.jsr299.tck.api.TestResult.Status;
@@ -23,9 +24,11 @@
public abstract class AbstractDeclarativeTest extends AbstractTest implements IHookable
{
+ private static Logger log = Logger.getLogger(AbstractDeclarativeTest.class);
private static final Class<?>[] EMPTY_CLASS_ARRAY = new Class<?>[0];
private static boolean inContainer = false;
+ private static int numberOfTestsRunInContainer = 0;
public static boolean isInContainer()
{
@@ -158,6 +161,7 @@
@AfterSuite(alwaysRun=true)
public void afterSuite() throws Exception
{
+ log.info("Ran " + numberOfTestsRunInContainer + " tests in the container");
if (isSuiteDeployingTestsToContainer())
{
getCurrentConfiguration().getContainers().cleanup();
@@ -212,7 +216,8 @@
{
try
{
- TestResult result = getCurrentConfiguration().getInContainerTestLauncher().launchTest(getCurrentConfiguration(), testResult.getMethod().getMethod());
+ numberOfTestsRunInContainer++;
+ TestResult result = getCurrentConfiguration().getInContainerTestLauncher().launchTest(testResult.getMethod().getMethod());
if (result.getStatus().equals(Status.FAILED) || result.getStatus().equals(Status.SKIPPED))
{
testResult.setThrowable(result.getThrowable());
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/ConfigurationImpl.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/ConfigurationImpl.java 2009-02-14 23:53:22 UTC (rev 1519)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/ConfigurationImpl.java 2009-02-15 00:16:40 UTC (rev 1520)
@@ -34,8 +34,7 @@
private String outputDirectory;
private boolean standalone;
private boolean runIntegrationTests;
- private int connectDelay;
- private int connectRetries;
+ private int connectTimeout;
private String libraryDirectory;
private TestLauncher testLauncher;
private Beans beans;
@@ -59,7 +58,7 @@
this.outputDirectory = configuration.getOutputDirectory();
this.standalone = configuration.isStandalone();
this.runIntegrationTests = configuration.isRunIntegrationTests();
- this.connectDelay = configuration.getConnectDelay();
+ this.connectTimeout = configuration.getConnectTimeout();
this.libraryDirectory = configuration.getLibraryDirectory();
this.testLauncher = configuration.getInContainerTestLauncher();
this.beans = configuration.getBeans();
@@ -69,7 +68,6 @@
this.el = configuration.getEl();
this.standaloneContainers = configuration.getStandaloneContainers();
this.host = configuration.getHost();
- this.connectRetries = configuration.getConnectRetries();
this.testClass = configuration.getTestClass();
}
@@ -95,14 +93,14 @@
this.unitTestPackageNames = null;
}
- public int getConnectDelay()
+ public int getConnectTimeout()
{
- return connectDelay;
+ return connectTimeout;
}
- public void setConnectDelay(int deploymentDelay)
+ public void setConnectTimeout(int deploymentDelay)
{
- this.connectDelay = deploymentDelay;
+ this.connectTimeout = deploymentDelay;
}
public String getLibraryDirectory()
@@ -241,20 +239,8 @@
public void setTestLauncher(TestLauncher testLauncher)
{
this.testLauncher = testLauncher;
- }
+ }
- public int getConnectRetries()
- {
- return connectRetries;
- }
-
- public void setConnectRetries(int connectRetries)
- {
- this.connectRetries = connectRetries;
- }
-
-
-
@Override
public String toString()
{
@@ -264,8 +250,7 @@
configuration.append("\tBeans: ").append(getBeans()).append("\n");
configuration.append("\tContainers: ").append(getContainers()).append("\n");
configuration.append("\tContexts: ").append(getContexts()).append("\n");
- configuration.append("\tConnect Delay: ").append(getConnectDelay()).append("\n");
- configuration.append("\tConnect Retries: ").append(getConnectRetries()).append("\n");
+ configuration.append("\tConnect Timeout: ").append(getConnectTimeout()).append("\n");
configuration.append("\tEL: ").append(getEl()).append("\n");
configuration.append("\tHost: ").append(getHost()).append("\n");
configuration.append("\tIn Container Tests Package Names: ").append(getInContainerTestPackageNames()).append("\n");
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/PropertiesBasedConfigurationImpl.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/PropertiesBasedConfigurationImpl.java 2009-02-14 23:53:22 UTC (rev 1519)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/PropertiesBasedConfigurationImpl.java 2009-02-15 00:16:40 UTC (rev 1520)
@@ -24,8 +24,7 @@
setOutputDirectory(deploymentProperties.getStringValue(OUTPUT_DIRECTORY_PROPERTY_NAME, DEFAULT_OUTPUT_DIRECTORY, false));
setStandalone(deploymentProperties.getBooleanValue(STANDALONE_PROPERTY_NAME, DEFAULT_STANDALONE, false));
setRunIntegrationTests(deploymentProperties.getBooleanValue(RUN_INTEGRATION_TESTS_PROPERTY_NAME, DEFAULT_RUN_INTEGRATION_TESTS, false));
- setConnectDelay(deploymentProperties.getIntValue(CONNECT_DELAY_PROPERTY_NAME, DEFAULT_CONNECT_DELAY, false));
- setConnectRetries(deploymentProperties.getIntValue(CONNECT_RETRIES_PROPERTY_NAME, DEFAULT_CONNECT_RETRIES, false));
+ setConnectTimeout(deploymentProperties.getIntValue(CONNECT_TIMEOUT_PROPERTY_NAME, DEFAULT_CONNECT_DELAY, false));
setLibraryDirectory(deploymentProperties.getStringValue(LIBRARY_DIRECTORY_PROPERTY_NAME, DEFAULT_LIBRARY_DIRECTORY, false));
setHost(deploymentProperties.getStringValue(HOST_PROPERTY_NAME, DEFAULT_HOST, false));
setTestClass(deploymentProperties.getClassValue(TEST_CLASS_PROPERTY_NAME, null, false));
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/runner/servlet/ServletTestLauncher.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/runner/servlet/ServletTestLauncher.java 2009-02-14 23:53:22 UTC (rev 1519)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/runner/servlet/ServletTestLauncher.java 2009-02-15 00:16:40 UTC (rev 1520)
@@ -7,19 +7,29 @@
import java.net.URL;
import java.net.URLConnection;
+import org.jboss.jsr299.tck.api.Configurable;
import org.jboss.jsr299.tck.api.Configuration;
import org.jboss.jsr299.tck.api.TestLauncher;
import org.jboss.jsr299.tck.api.TestResult;
import org.jboss.jsr299.tck.impl.runner.TestResultImpl;
-public class ServletTestLauncher implements TestLauncher
+public class ServletTestLauncher implements TestLauncher, Configurable
{
- public TestResultImpl launchTest(Configuration configuration, Method method) throws IOException
+ private Configuration configuration;
+
+ public void setConfiguration(Configuration configuration)
{
+ this.configuration = configuration;
+ }
+
+ public TestResultImpl launchTest(Method method) throws IOException
+ {
Class<?> testClass = method.getDeclaringClass();
String url = "http://" + configuration.getHost() + "/" + testClass.getName() + "/?outputMode=serializedObject&methodName=" + method.getName();
- for (int i = 0; i < configuration.getConnectRetries(); i++)
+ long timeoutTime = System.currentTimeMillis() + configuration.getConnectTimeout();
+ boolean interrupted = false;
+ while (timeoutTime > System.currentTimeMillis())
{
URLConnection connection = new URL(url).openConnection();
if (!(connection instanceof HttpURLConnection))
@@ -59,11 +69,11 @@
}
try
{
- Thread.sleep(configuration.getConnectDelay());
+ Thread.sleep(200);
}
catch (InterruptedException e)
{
- Thread.currentThread().interrupt();
+ interrupted = true;
}
}
finally
@@ -71,6 +81,10 @@
httpConnection.disconnect();
}
}
+ if (interrupted)
+ {
+ Thread.currentThread().interrupt();
+ }
throw new IllegalStateException("Error launching test " + testClass.getName() + " at " + url + ". Kept on getting 404s.");
}
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1518 - ri/trunk/jboss-tck-runner.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-02-14 18:35:49 -0500 (Sat, 14 Feb 2009)
New Revision: 1518
Modified:
ri/trunk/jboss-tck-runner/pom.xml
Log:
minor
Modified: ri/trunk/jboss-tck-runner/pom.xml
===================================================================
--- ri/trunk/jboss-tck-runner/pom.xml 2009-02-14 23:34:26 UTC (rev 1517)
+++ ri/trunk/jboss-tck-runner/pom.xml 2009-02-14 23:35:49 UTC (rev 1518)
@@ -134,12 +134,6 @@
<suiteXmlFiles>
<suiteXmlFile>${project.build.directory}/dependency/jsr299-tck-impl-suite.xml</suiteXmlFile>
</suiteXmlFiles>
- <properties>
- <property>
- <name>listener</name>
- <value>org.jboss.jsr299.tck.impl.testng.AlwaysRunAnnotationTransformer</value>
- </property>
- </properties>
<systemProperties>
<property>
<name>org.jboss.jsr299.tck.standalone</name>
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1517 - tck/trunk/impl/src/main/resources.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-02-14 18:34:26 -0500 (Sat, 14 Feb 2009)
New Revision: 1517
Modified:
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
Fix xsd
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-14 23:26:41 UTC (rev 1516)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-14 23:34:26 UTC (rev 1517)
@@ -1,5 +1,7 @@
<specification xmlns="http://jboss.com/products/webbeans/tck/audit"
- name="JSR-299: Java Contexts and Dependency Injection"
+ name="JSR-299: Java Contexts and Dependency Injection"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.com/products/webbeans/tck/audit http://snapshots.jboss.org/maven2/org/hibernate/tck-utils-api/0.9-SNAPSHO..."
version="Revised Public Review Draft">
<section id="2" title="Bean definition">
@@ -1151,11 +1153,11 @@
<WebServiceRef> element. For a web service, a JNDI name or mapped name must be specified using the <name> or <mappedName> child elements of the <WebServiceRef> element. Optionally, a URL pointing to a WSDL document may be specified using the <wsdlLocation> child element</text>
</assertion>
- <assertion name="k">
+ <assertion id="k">
<text>The JNDI name specified by the <name> element must be a name in the global java:global or application java:app naming context</text>
</assertion>
- <assertion name="l">
+ <assertion id="l">
<text>Optionally, one or more bindings may be specified for resources in XML. If no binding is explicitly specified, the default binding @Current is assumed.</text>
</assertion>
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1516 - tck/trunk/impl.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-02-14 18:26:41 -0500 (Sat, 14 Feb 2009)
New Revision: 1516
Modified:
tck/trunk/impl/pom.xml
Log:
minor
Modified: tck/trunk/impl/pom.xml
===================================================================
--- tck/trunk/impl/pom.xml 2009-02-14 23:22:34 UTC (rev 1515)
+++ tck/trunk/impl/pom.xml 2009-02-14 23:26:41 UTC (rev 1516)
@@ -196,6 +196,20 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-clean-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>auto-clean</id>
+ <phase>initialize</phase>
+ <goals>
+ <goal>clean</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
</plugins>
</build>
</profile>
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1515 - tck/trunk/impl.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-02-14 18:22:34 -0500 (Sat, 14 Feb 2009)
New Revision: 1515
Modified:
tck/trunk/impl/pom.xml
Log:
minor
Modified: tck/trunk/impl/pom.xml
===================================================================
--- tck/trunk/impl/pom.xml 2009-02-14 23:19:09 UTC (rev 1514)
+++ tck/trunk/impl/pom.xml 2009-02-14 23:22:34 UTC (rev 1515)
@@ -115,11 +115,6 @@
<type>xml</type>
<classifier>audit</classifier>
</artifact>
- <artifact>
- <file>${basedir}/src/main/resources/tck-audit.xsd</file>
- <type>xsd</type>
- <classifier>audit</classifier>
- </artifact>
</artifacts>
</configuration>
</execution>
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1514 - ri/trunk/jboss-tck-runner/src/main/java/org/jboss/webbeans/tck/integration/jbossas and 12 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-02-14 18:19:09 -0500 (Sat, 14 Feb 2009)
New Revision: 1514
Added:
tck/trunk/api/src/main/java/org/jboss/jsr299/tck/api/DeploymentException.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/ExpectedException.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ExpectedDeploymentException.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/testng/DisableIntegrationTestsMethodSelector.java
tck/trunk/impl/src/main/resources/tck-audit.xml
tck/trunk/impl/src/main/resources/tck-tests.xml
Removed:
tck/trunk/impl/ri.classpath
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ExpectedDeploymentExceptions.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/testng/ForwardingITestNGMethod.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/testng/ForwardingITestResult.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/testng/SaneITestNGMethod.java
tck/trunk/impl/src/main/resources/tck-unit-tests.xml
tck/trunk/impl/tck-audit.xml
tck/trunk/impl/tck-audit.xsd
Modified:
ri/trunk/jboss-tck-runner/pom.xml
ri/trunk/jboss-tck-runner/src/main/java/org/jboss/webbeans/tck/integration/jbossas/JBossTestServicesContainersImpl.java
ri/trunk/porting-package/src/main/java/org/jboss/webbeans/tck/StandaloneContainersImpl.java
tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/Containers.java
tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/StandaloneContainers.java
tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/helpers/ForwardingContainers.java
tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/helpers/ForwardingStandaloneContainers.java
tck/trunk/impl/pom.xml
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ArtifactDescriptor.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ArtifactGenerator.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/broken/BrokenDeploymentTypeTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/broken/tooMany/TooManyDeploymentTypesTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java
Log:
WBTCK-19, and support deployment exceptions (JBoss AS runner is throwing the wrong exception still), and add a selector to disable integration tests when they aren't requested
Modified: ri/trunk/jboss-tck-runner/pom.xml
===================================================================
--- ri/trunk/jboss-tck-runner/pom.xml 2009-02-14 02:10:10 UTC (rev 1513)
+++ ri/trunk/jboss-tck-runner/pom.xml 2009-02-14 23:19:09 UTC (rev 1514)
@@ -55,10 +55,6 @@
</dependencies>
- <properties>
- <restartJBoss>false</restartJBoss>
- </properties>
-
<build>
<plugins>
<plugin>
@@ -138,6 +134,12 @@
<suiteXmlFiles>
<suiteXmlFile>${project.build.directory}/dependency/jsr299-tck-impl-suite.xml</suiteXmlFile>
</suiteXmlFiles>
+ <properties>
+ <property>
+ <name>listener</name>
+ <value>org.jboss.jsr299.tck.impl.testng.AlwaysRunAnnotationTransformer</value>
+ </property>
+ </properties>
<systemProperties>
<property>
<name>org.jboss.jsr299.tck.standalone</name>
Modified: ri/trunk/jboss-tck-runner/src/main/java/org/jboss/webbeans/tck/integration/jbossas/JBossTestServicesContainersImpl.java
===================================================================
--- ri/trunk/jboss-tck-runner/src/main/java/org/jboss/webbeans/tck/integration/jbossas/JBossTestServicesContainersImpl.java 2009-02-14 02:10:10 UTC (rev 1513)
+++ ri/trunk/jboss-tck-runner/src/main/java/org/jboss/webbeans/tck/integration/jbossas/JBossTestServicesContainersImpl.java 2009-02-14 23:19:09 UTC (rev 1514)
@@ -1,8 +1,10 @@
package org.jboss.webbeans.tck.integration.jbossas;
import java.io.File;
+import java.io.IOException;
import java.io.InputStream;
import org.apache.log4j.Logger;
+import org.jboss.jsr299.tck.api.DeploymentException;
import org.jboss.test.JBossTestServices;
@@ -24,19 +26,33 @@
tmpdir.deleteOnExit();
}
- public void deploy(InputStream archiveStream, String name) throws Exception
+ public void deploy(InputStream archiveStream, String name) throws DeploymentException, IOException
{
File archive = new File(tmpdir, name);
archive.deleteOnExit();
copy(archiveStream, archive);
- testServices.deploy(getTmpArchiveName(name));
+ try
+ {
+ testServices.deploy(getTmpArchiveName(name));
+ }
+ catch (Exception e)
+ {
+ throw new DeploymentException("Error deploying " + name, e);
+ }
}
- public void undeploy(String name) throws Exception
+ public void undeploy(String name) throws DeploymentException, IOException
{
- testServices.undeploy(getTmpArchiveName(name));
try
{
+ testServices.undeploy(getTmpArchiveName(name));
+ }
+ catch (Exception e)
+ {
+ throw new DeploymentException("Error deploying " + name, e);
+ }
+ try
+ {
// Give the app a chance to undeploy
Thread.sleep(1000);
}
Modified: ri/trunk/porting-package/src/main/java/org/jboss/webbeans/tck/StandaloneContainersImpl.java
===================================================================
--- ri/trunk/porting-package/src/main/java/org/jboss/webbeans/tck/StandaloneContainersImpl.java 2009-02-14 02:10:10 UTC (rev 1513)
+++ ri/trunk/porting-package/src/main/java/org/jboss/webbeans/tck/StandaloneContainersImpl.java 2009-02-14 23:19:09 UTC (rev 1514)
@@ -5,6 +5,7 @@
import javax.inject.manager.Manager;
+import org.jboss.jsr299.tck.api.DeploymentException;
import org.jboss.jsr299.tck.spi.StandaloneContainers;
import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.mock.MockBootstrap;
@@ -13,20 +14,27 @@
public class StandaloneContainersImpl implements StandaloneContainers
{
- public Manager deploy(List<Class<? extends Annotation>> enabledDeploymentTypes, Class<?>... classes)
+ public Manager deploy(List<Class<? extends Annotation>> enabledDeploymentTypes, Class<?>... classes) throws DeploymentException
{
- MockBootstrap bootstrap = new MockBootstrap();
- ManagerImpl manager = bootstrap.getManager();
- if (enabledDeploymentTypes != null)
+ try
{
- manager.setEnabledDeploymentTypes(enabledDeploymentTypes);
+ MockBootstrap bootstrap = new MockBootstrap();
+ ManagerImpl manager = bootstrap.getManager();
+ if (enabledDeploymentTypes != null)
+ {
+ manager.setEnabledDeploymentTypes(enabledDeploymentTypes);
+ }
+ bootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(classes));
+ bootstrap.boot();
+ return manager;
}
- bootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(classes));
- bootstrap.boot();
- return manager;
+ catch (Exception e)
+ {
+ throw new DeploymentException("Error deploying beans", e);
+ }
}
- public Manager deploy(java.lang.Class<?>... classes)
+ public Manager deploy(java.lang.Class<?>... classes) throws DeploymentException
{
return deploy(null, classes);
}
Added: tck/trunk/api/src/main/java/org/jboss/jsr299/tck/api/DeploymentException.java
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/jsr299/tck/api/DeploymentException.java (rev 0)
+++ tck/trunk/api/src/main/java/org/jboss/jsr299/tck/api/DeploymentException.java 2009-02-14 23:19:09 UTC (rev 1514)
@@ -0,0 +1,32 @@
+package org.jboss.jsr299.tck.api;
+
+/**
+ * Wraps the deployment exception, which can be obtained using
+ * {@link #getCause()}
+ * @author Pete Muir
+ *
+ */
+public class DeploymentException extends Exception
+{
+
+ public DeploymentException()
+ {
+ super();
+ }
+
+ public DeploymentException(String arg0, Throwable arg1)
+ {
+ super(arg0, arg1);
+ }
+
+ public DeploymentException(String arg0)
+ {
+ super(arg0);
+ }
+
+ public DeploymentException(Throwable arg0)
+ {
+ super(arg0);
+ }
+
+}
Property changes on: tck/trunk/api/src/main/java/org/jboss/jsr299/tck/api/DeploymentException.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/Containers.java
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/Containers.java 2009-02-14 02:10:10 UTC (rev 1513)
+++ tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/Containers.java 2009-02-14 23:19:09 UTC (rev 1514)
@@ -3,6 +3,8 @@
import java.io.IOException;
import java.io.InputStream;
+import org.jboss.jsr299.tck.api.DeploymentException;
+
public interface Containers
{
@@ -16,9 +18,9 @@
* @param archive
* @return
*/
- public void deploy(InputStream archive, String name) throws Exception, IOException;
+ public void deploy(InputStream archive, String name) throws DeploymentException, IOException;
- public void undeploy(String name) throws Exception, IOException;
+ public void undeploy(String name) throws DeploymentException, IOException;
public void setup() throws IOException;
Modified: tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/StandaloneContainers.java
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/StandaloneContainers.java 2009-02-14 02:10:10 UTC (rev 1513)
+++ tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/StandaloneContainers.java 2009-02-14 23:19:09 UTC (rev 1514)
@@ -5,6 +5,8 @@
import javax.inject.manager.Manager;
+import org.jboss.jsr299.tck.api.DeploymentException;
+
/**
* Standalone container related operations
*
@@ -40,7 +42,7 @@
* @param classes the classes to deploy
* @return the manager created as a result of initializing the container
*/
- public Manager deploy(List<Class<? extends Annotation>> enabledDeploymentTypes, Class<?>...classes);
+ public Manager deploy(List<Class<? extends Annotation>> enabledDeploymentTypes, Class<?>...classes) throws DeploymentException;
- public Manager deploy(Class<?>...classes);
+ public Manager deploy(Class<?>...classes) throws DeploymentException;
}
Modified: tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/helpers/ForwardingContainers.java
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/helpers/ForwardingContainers.java 2009-02-14 02:10:10 UTC (rev 1513)
+++ tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/helpers/ForwardingContainers.java 2009-02-14 23:19:09 UTC (rev 1514)
@@ -3,6 +3,7 @@
import java.io.IOException;
import java.io.InputStream;
+import org.jboss.jsr299.tck.api.DeploymentException;
import org.jboss.jsr299.tck.spi.Containers;
public abstract class ForwardingContainers implements Containers
@@ -10,12 +11,12 @@
protected abstract Containers delegate();
- public void deploy(InputStream archive, String name) throws IOException, Exception
+ public void deploy(InputStream archive, String name) throws IOException, DeploymentException
{
delegate().deploy(archive, name);
}
- public void undeploy(String name) throws IOException, Exception
+ public void undeploy(String name) throws IOException, DeploymentException
{
delegate().undeploy(name);
}
Modified: tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/helpers/ForwardingStandaloneContainers.java
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/helpers/ForwardingStandaloneContainers.java 2009-02-14 02:10:10 UTC (rev 1513)
+++ tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/helpers/ForwardingStandaloneContainers.java 2009-02-14 23:19:09 UTC (rev 1514)
@@ -5,6 +5,7 @@
import javax.inject.manager.Manager;
+import org.jboss.jsr299.tck.api.DeploymentException;
import org.jboss.jsr299.tck.spi.StandaloneContainers;
public abstract class ForwardingStandaloneContainers implements StandaloneContainers
@@ -12,12 +13,12 @@
protected abstract StandaloneContainers delegate();
- public Manager deploy(List<Class<? extends Annotation>> enabledDeploymentTypes, Class<?>... classes)
+ public Manager deploy(List<Class<? extends Annotation>> enabledDeploymentTypes, Class<?>... classes) throws DeploymentException
{
return delegate().deploy(enabledDeploymentTypes, classes);
}
- public Manager deploy(Class<?>... classes)
+ public Manager deploy(Class<?>... classes) throws DeploymentException
{
return delegate().deploy(classes);
}
Modified: tck/trunk/impl/pom.xml
===================================================================
--- tck/trunk/impl/pom.xml 2009-02-14 02:10:10 UTC (rev 1513)
+++ tck/trunk/impl/pom.xml 2009-02-14 23:19:09 UTC (rev 1514)
@@ -106,10 +106,20 @@
<configuration>
<artifacts>
<artifact>
- <file>${basedir}/src/main/resources/tck-unit-tests.xml</file>
+ <file>${basedir}/src/main/resources/tck-tests.xml</file>
<type>xml</type>
<classifier>suite</classifier>
</artifact>
+ <artifact>
+ <file>${basedir}/src/main/resources/tck-audit.xml</file>
+ <type>xml</type>
+ <classifier>audit</classifier>
+ </artifact>
+ <artifact>
+ <file>${basedir}/src/main/resources/tck-audit.xsd</file>
+ <type>xsd</type>
+ <classifier>audit</classifier>
+ </artifact>
</artifacts>
</configuration>
</execution>
@@ -169,7 +179,7 @@
<configuration>
<source>1.6</source>
<target>1.6</target>
- <compilerArgument>-AauditXml=${basedir}/tck-audit.xml</compilerArgument>
+ <compilerArgument>-AauditXml=${basedir}/src/main/resources/tck-audit.xml</compilerArgument>
</configuration>
</plugin>
<plugin>
Deleted: tck/trunk/impl/ri.classpath
===================================================================
--- tck/trunk/impl/ri.classpath 2009-02-14 02:10:10 UTC (rev 1513)
+++ tck/trunk/impl/ri.classpath 2009-02-14 23:19:09 UTC (rev 1514)
@@ -1,10 +0,0 @@
- <!-- Add these entries to your tck eclipse classpath to allow you to run RI tests from the TCK eclipse project -->
-
- <classpathentry kind="lib" path="/org.jboss.webbeans.webbeans-ri/target/test-classes"/>
- <classpathentry kind="lib" path="/org.jboss.webbeans.webbeans-ri/src/test/resources"/>
- <classpathentry kind="lib" path="/org.jboss.webbeans.webbeans-ri-spi/target/classes"/>
- <classpathentry kind="lib" path="/org.jboss.webbeans.webbeans-ri/target/classes"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.0.5.GA/jboss-logging-log4j-2.0.5.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/google/collections/google-collections/0.8/google-collections-0.8.jar" sourcepath="M2_REPO/com/google/collections/google-collections/0.8/google-collections-0.8-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/javassist/javassist/3.9.0.GA/javassist-3.9.0.GA.jar" sourcepath="M2_REPO/javassist/javassist/3.9.0.GA/javassist-3.9.0.GA-sources.jar"/>
-
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java 2009-02-14 02:10:10 UTC (rev 1513)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java 2009-02-14 23:19:09 UTC (rev 1514)
@@ -4,12 +4,14 @@
import java.lang.reflect.Method;
import java.util.Set;
+import org.jboss.jsr299.tck.api.DeploymentException;
import org.jboss.jsr299.tck.api.TestResult;
import org.jboss.jsr299.tck.api.TestResult.Status;
import org.jboss.jsr299.tck.impl.packaging.ArtifactGenerator;
import org.jboss.jsr299.tck.impl.packaging.jsr299.TCKArtifactDescriptor;
import org.testng.IHookCallBack;
import org.testng.IHookable;
+import org.testng.ITestContext;
import org.testng.ITestResult;
import org.testng.annotations.AfterClass;
import org.testng.annotations.AfterMethod;
@@ -36,6 +38,7 @@
}
private TCKArtifactDescriptor artifact;
+ private DeploymentException deploymentException;
private boolean isSuiteDeployingTestsToContainer()
{
@@ -69,9 +72,8 @@
return !isInContainer() && artifact != null && ((getCurrentConfiguration().isStandalone() && !artifact.isUnit()) || !getCurrentConfiguration().isStandalone());
}
- private void deployArtifact() throws Throwable
+ private void deployArtifact()
{
- Throwable throwable = null;
try
{
if (isDeployToContainerNeeded())
@@ -92,22 +94,29 @@
}
}
}
- catch (Throwable e)
+ catch (IOException e)
{
- throwable = e;
+ throw new RuntimeException("Error connecting to the container", e);
}
+ catch (DeploymentException e)
+ {
+ deploymentException = e;
+ }
if (artifact != null && artifact.getExpectedDeploymentException() != null)
{
- if (isThrowablePresent(artifact.getExpectedDeploymentException(), throwable))
+ if (deploymentException != null)
{
- // Correct, so swallow
- return;
+ if (isThrowablePresent(artifact.getExpectedDeploymentException(), deploymentException.getCause()))
+ {
+ // We expect this exception, so ignore it
+ deploymentException = null;
+ }
}
+ else
+ {
+ this.deploymentException = new DeploymentException(new ExpectedException("Expected exception " + artifact.getExpectedDeploymentException() + " but none was thrown"));
+ }
}
- if (throwable != null)
- {
- throw throwable;
- }
}
private void undeployArtifact() throws Exception
@@ -131,12 +140,12 @@
}
if (!assertionsEnabled)
{
- throw new IllegalArgumentException("Assertions must be enabled!");
+ throw new IllegalStateException("Assertions must be enabled!");
}
}
- @BeforeSuite
- public void beforeSuite() throws Exception
+ @BeforeSuite(alwaysRun=true)
+ public void beforeSuite(ITestContext context) throws Exception
{
if (isSuiteDeployingTestsToContainer())
{
@@ -146,7 +155,7 @@
}
- @AfterSuite
+ @AfterSuite(alwaysRun=true)
public void afterSuite() throws Exception
{
if (isSuiteDeployingTestsToContainer())
@@ -155,7 +164,7 @@
}
}
- @BeforeClass
+ @BeforeClass(alwaysRun=true)
public final void beforeClass() throws Throwable
{
generateArtifact();
@@ -163,14 +172,15 @@
}
- @AfterClass
+ @AfterClass(alwaysRun=true)
public void afterClass() throws Exception
{
undeployArtifact();
this.artifact = null;
+ this.deploymentException = null;
}
- @BeforeMethod
+ @BeforeMethod(alwaysRun=true)
public final void beforeMethod(Method method)
{
if (!isInContainer() && artifact == null)
@@ -181,7 +191,7 @@
setCurrentManager(getCurrentConfiguration().getManagers().getManager());
}
- @AfterMethod
+ @AfterMethod(alwaysRun=true)
public void afterMethod()
{
setCurrentManager(null);
@@ -190,7 +200,11 @@
public void run(IHookCallBack callback, ITestResult testResult)
{
- if (!isDeployToContainerNeeded())
+ if (deploymentException != null)
+ {
+ testResult.setThrowable(deploymentException.getCause());
+ }
+ else if (!isDeployToContainerNeeded())
{
callback.runTestMethod(testResult);
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractTest.java 2009-02-14 02:10:10 UTC (rev 1513)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractTest.java 2009-02-14 23:19:09 UTC (rev 1514)
@@ -21,6 +21,7 @@
import javax.inject.manager.Manager;
import org.jboss.jsr299.tck.api.Configuration;
+import org.jboss.jsr299.tck.api.DeploymentException;
import org.jboss.jsr299.tck.impl.ConfigurationImpl;
import org.jboss.jsr299.tck.impl.util.MockCreationalContext;
@@ -107,11 +108,39 @@
if (getEnabledDeploymentTypes().size() > 0)
{
- getCurrentConfiguration().getStandaloneContainers().deploy(getEnabledDeploymentTypes(), classes);
+ try
+ {
+ getCurrentConfiguration().getStandaloneContainers().deploy(getEnabledDeploymentTypes(), classes);
+ }
+ catch (DeploymentException e)
+ {
+ if (e.getCause() instanceof RuntimeException)
+ {
+ throw (RuntimeException) e.getCause();
+ }
+ else
+ {
+ throw new RuntimeException(e.getCause());
+ }
+ }
}
else
{
- getCurrentConfiguration().getStandaloneContainers().deploy(classes);
+ try
+ {
+ getCurrentConfiguration().getStandaloneContainers().deploy(classes);
+ }
+ catch (DeploymentException e)
+ {
+ if (e.getCause() instanceof RuntimeException)
+ {
+ throw (RuntimeException) e.getCause();
+ }
+ else
+ {
+ throw new RuntimeException(e.getCause());
+ }
+ }
}
setCurrentManager(getCurrentConfiguration().getManagers().getManager());
}
@@ -204,13 +233,13 @@
protected static boolean isThrowablePresent(Class<? extends Throwable> throwableType, Throwable throwable)
{
- if (throwableType.isAssignableFrom(throwableType.getClass()))
+ if (throwable == null)
{
- return true;
+ return false;
}
- else if (throwable.getClass().equals(Throwable.class))
+ else if (throwableType.isAssignableFrom(throwable.getClass()))
{
- return false;
+ return true;
}
else
{
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/ExpectedException.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/ExpectedException.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/ExpectedException.java 2009-02-14 23:19:09 UTC (rev 1514)
@@ -0,0 +1,34 @@
+package org.jboss.jsr299.tck;
+
+/**
+ * Thrown if an exception was expected, but non occurred
+ *
+ * @author Pete Muir
+ *
+ */
+public class ExpectedException extends RuntimeException
+{
+
+ public ExpectedException()
+ {
+ super();
+ }
+
+ public ExpectedException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public ExpectedException(String message)
+ {
+ super(message);
+ }
+
+ public ExpectedException(Throwable cause)
+ {
+ super(cause);
+ }
+
+
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/ExpectedException.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ArtifactDescriptor.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ArtifactDescriptor.java 2009-02-14 02:10:10 UTC (rev 1513)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ArtifactDescriptor.java 2009-02-14 23:19:09 UTC (rev 1514)
@@ -1,8 +1,5 @@
package org.jboss.jsr299.tck.impl.packaging;
-import static org.jboss.jsr299.tck.impl.packaging.PackagingType.EAR;
-import static org.jboss.jsr299.tck.impl.packaging.PackagingType.UNSPECIFIED;
-import static org.jboss.jsr299.tck.impl.packaging.PackagingType.WAR;
import static org.jboss.jsr299.tck.impl.util.Reflections.loadClass;
import static org.jboss.jsr299.tck.impl.util.Reflections.loadResourceAsStream;
import static org.jboss.jsr299.tck.impl.util.Reflections.loadResources;
@@ -13,22 +10,15 @@
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.FileOutputStream;
-import java.io.FilenameFilter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
import java.net.URLClassLoader;
import java.net.URLDecoder;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
import java.util.Enumeration;
import java.util.HashSet;
-import java.util.List;
import java.util.Random;
import java.util.Set;
import java.util.zip.ZipEntry;
@@ -37,9 +27,6 @@
import java.util.zip.ZipOutputStream;
import org.apache.log4j.Logger;
-import org.jboss.jsr299.tck.impl.packaging.jsr299.BeansXml;
-import org.jboss.jsr299.tck.impl.packaging.jsr299.TCKArtifactDescriptor;
-import org.jboss.jsr299.tck.impl.packaging.war.WarArtifactDescriptor;
import org.jboss.jsr299.tck.impl.util.Files;
public class ArtifactDescriptor
@@ -212,204 +199,7 @@
}
}
-
- private static class DeclarativeArtifact
- {
-
- private static final Logger log = Logger.getLogger(DeclarativeArtifact.class);
-
- private final boolean unit;
- private final boolean ejbs;
- private final boolean addDeclaringPackage;
- private final String beansXml;
- private final PackagingType packagingType;
- private final Collection<ResourceDescriptor> resources;
- private final Collection<Class<?>> classes;
- private final Set<ResourceDescriptor> extraLibraries;
- private final Class<? extends Throwable> expectedDeploymentException;
-
- private final Class<?> declaringClass;
- private final boolean standalone;
-
- public DeclarativeArtifact(Class<?> declaringClass, boolean standalone, String extraLibrariesDirectory)
- {
- this.standalone = standalone;
- this.declaringClass = declaringClass;
-
- if (declaringClass.isAnnotationPresent(Artifact.class))
- {
- this.addDeclaringPackage = declaringClass.getAnnotation(Artifact.class).addCurrentPackage();
- this.ejbs = false;
- }
- else if (declaringClass.isAnnotationPresent(EjbArtifact.class))
- {
- this.addDeclaringPackage = declaringClass.getAnnotation(EjbArtifact.class).addCurrentPackage();
- this.ejbs = true;
- }
- else
- {
- throw new IllegalStateException("Unable to find @Artifact on " + declaringClass);
- }
-
- if (declaringClass.isAnnotationPresent(BeansXml.class))
- {
- this.beansXml = asAbsolutePath(declaringClass.getAnnotation(BeansXml.class).value());
- }
- else
- {
- this.beansXml = null;
- }
-
- if (declaringClass.isAnnotationPresent(Packaging.class))
- {
- this.packagingType = declaringClass.getAnnotation(Packaging.class).value();
- }
- else
- {
- this.packagingType = UNSPECIFIED;
- }
-
- if (declaringClass.isAnnotationPresent(IntegrationTest.class))
- {
- this.unit = false;
- }
- else
- {
- this.unit = true;
- }
-
- if (unit && (packagingType.equals(WAR) || packagingType.equals(EAR)))
- {
- throw new IllegalArgumentException("Cannot specify @Packaging(WAR) or @Packaging(EAR) if @Integration test is not present");
- }
-
- if (declaringClass.isAnnotationPresent(Resources.class))
- {
- this.resources = asResourceDescriptors(declaringClass.getAnnotation(Resources.class).value());
- }
- else
- {
- this.resources = Collections.emptyList();
- }
-
- if (declaringClass.isAnnotationPresent(Classes.class))
- {
- this.classes = Arrays.asList(declaringClass.getAnnotation(Classes.class).value());
- }
- else
- {
- this.classes = Collections.emptyList();
- }
- if (declaringClass.isAnnotationPresent(ExpectedDeploymentExceptions.class))
- {
- this.expectedDeploymentException = declaringClass.getAnnotation(ExpectedDeploymentExceptions.class).value();
- }
- else
- {
- this.expectedDeploymentException = null;
- }
- if (extraLibrariesDirectory != null)
- {
- File directory = new File(extraLibrariesDirectory);
- this.extraLibraries = new HashSet<ResourceDescriptor>();
- if (directory.isDirectory())
- {
- for (File file : directory.listFiles(new FilenameFilter()
- {
-
- public boolean accept(File dir, String name)
- {
- return name.endsWith(".jar");
- }
-
- }))
- {
- try
- {
- this.extraLibraries.add(new ResourceDescriptor(file.getName(), new FileInputStream(file)));
- }
- catch (FileNotFoundException e)
- {
- log.warn("Unable to load extra library", e);
- }
- }
- }
- }
- else
- {
- this.extraLibraries = Collections.emptySet();
- }
- }
-
- public TCKArtifactDescriptor createArtifact()
- {
- final TCKArtifactDescriptor artifact = newArtifact(packagingType, declaringClass, beansXml, standalone, ejbs, addDeclaringPackage);
- artifact.setEjbs(ejbs);
- artifact.setUnit(unit);
- artifact.setExpectedDeploymentException(expectedDeploymentException);
- artifact.getClasses().addAll(classes);
- artifact.getResources().addAll(resources);
- artifact.getLibraries().addAll(extraLibraries);
- return artifact;
- }
-
- private Collection<ResourceDescriptor> asResourceDescriptors(Resource[] resources)
- {
- List<ResourceDescriptor> resourceDescriptors = new ArrayList<ResourceDescriptor>();
- for (Resource resource : resources)
- {
- resourceDescriptors.add(new ResourceDescriptor(resource.destination(), asAbsolutePath(resource.source())));
- }
- return resourceDescriptors;
- }
-
- private String asAbsolutePath(String path)
- {
- if (path.startsWith("/"))
- {
- return path.substring(1);
- }
- else
- {
- return declaringClass.getPackage().getName().replace(".", "/") + "/" + path;
- }
- }
-
- public static TCKArtifactDescriptor newArtifact(PackagingType packagingType, Class<?> declaringClass, String beansXml, boolean standalone, boolean ejbs, boolean addDeclaringPackage)
- {
- TCKArtifactDescriptor artifact;
- if (packagingType.equals(WAR))
- {
- artifact = new WarArtifactDescriptor(declaringClass, beansXml);
- }
- else if (packagingType.equals(EAR))
- {
- throw new UnsupportedOperationException();
- }
- else if (!standalone && ejbs)
- {
- throw new UnsupportedOperationException();
- }
- else if (!standalone)
- {
- artifact = new WarArtifactDescriptor(declaringClass, beansXml);
- }
- else
- {
- artifact = new TCKArtifactDescriptor(declaringClass, beansXml);
- }
-
- if (addDeclaringPackage)
- {
- artifact.addPackage(declaringClass.getPackage());
- }
- return artifact;
- }
-
- }
-
-
public static final Random random = new Random(System.currentTimeMillis());
private final Set<Class<?>> classes;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ArtifactGenerator.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ArtifactGenerator.java 2009-02-14 02:10:10 UTC (rev 1513)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ArtifactGenerator.java 2009-02-14 23:19:09 UTC (rev 1514)
@@ -38,8 +38,10 @@
private final PackagingType packagingType;
private final Collection<ResourceDescriptor> resources;
private final Collection<Class<?>> classes;
+ private final Class<? extends Throwable> expectedDeploymentException;
private final Set<ResourceDescriptor> extraLibraries;
+
private final Class<?> declaringClass;
private final boolean standalone;
@@ -112,6 +114,14 @@
{
this.classes = Collections.emptyList();
}
+ if (declaringClass.isAnnotationPresent(ExpectedDeploymentException.class))
+ {
+ this.expectedDeploymentException = declaringClass.getAnnotation(ExpectedDeploymentException.class).value();
+ }
+ else
+ {
+ this.expectedDeploymentException = null;
+ }
if (extraLibrariesDirectory != null)
{
File directory = new File(extraLibrariesDirectory);
@@ -150,6 +160,7 @@
final TCKArtifactDescriptor artifact = newArtifact(packagingType, declaringClass, beansXml, standalone, ejbs, addDeclaringPackage);
artifact.setEjbs(ejbs);
artifact.setUnit(unit);
+ artifact.setExpectedDeploymentException(expectedDeploymentException);
artifact.getClasses().addAll(classes);
artifact.getResources().addAll(resources);
artifact.getLibraries().addAll(extraLibraries);
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ExpectedDeploymentException.java (from rev 1511, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ExpectedDeploymentExceptions.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ExpectedDeploymentException.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ExpectedDeploymentException.java 2009-02-14 23:19:09 UTC (rev 1514)
@@ -0,0 +1,25 @@
+package org.jboss.jsr299.tck.impl.packaging;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Mark this artifact as expecting to fail a deployment with the given exception
+ * or some subtype of it.
+ *
+ * @author Pete Muir
+ *
+ */
+@Documented
+@Retention(RUNTIME)
+@Target(TYPE)
+public @interface ExpectedDeploymentException
+{
+
+ Class<? extends Throwable> value();
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ExpectedDeploymentException.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ExpectedDeploymentExceptions.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ExpectedDeploymentExceptions.java 2009-02-14 02:10:10 UTC (rev 1513)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ExpectedDeploymentExceptions.java 2009-02-14 23:19:09 UTC (rev 1514)
@@ -1,25 +0,0 @@
-package org.jboss.jsr299.tck.impl.packaging;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Mark this artifact as expecting to fail a deployment with the given exception
- * or some subtype of it.
- *
- * @author Pete Muir
- *
- */
-@Documented
-@Retention(RUNTIME)
-@Target(TYPE)
-public @interface ExpectedDeploymentExceptions
-{
-
- Class<? extends Throwable> value();
-
-}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/testng/DisableIntegrationTestsMethodSelector.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/testng/DisableIntegrationTestsMethodSelector.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/testng/DisableIntegrationTestsMethodSelector.java 2009-02-14 23:19:09 UTC (rev 1514)
@@ -0,0 +1,31 @@
+package org.jboss.jsr299.tck.impl.testng;
+
+import java.util.List;
+
+import org.jboss.jsr299.tck.impl.ConfigurationImpl;
+import org.jboss.jsr299.tck.impl.packaging.IntegrationTest;
+import org.testng.IMethodSelector;
+import org.testng.IMethodSelectorContext;
+import org.testng.ITestNGMethod;
+
+public class DisableIntegrationTestsMethodSelector implements IMethodSelector
+{
+
+ public boolean includeMethod(IMethodSelectorContext context, ITestNGMethod method, boolean isTestMethod)
+ {
+ if (!ConfigurationImpl.get().isRunIntegrationTests() && method.getMethod().getDeclaringClass().isAnnotationPresent(IntegrationTest.class))
+ {
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+
+ public void setTestMethods(List<ITestNGMethod> testMethods)
+ {
+
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/testng/DisableIntegrationTestsMethodSelector.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/testng/ForwardingITestNGMethod.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/testng/ForwardingITestNGMethod.java 2009-02-14 02:10:10 UTC (rev 1513)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/testng/ForwardingITestNGMethod.java 2009-02-14 23:19:09 UTC (rev 1514)
@@ -1,277 +0,0 @@
-package org.jboss.jsr299.tck.impl.testng;
-
-import java.lang.reflect.Method;
-
-import org.testng.IClass;
-import org.testng.IRetryAnalyzer;
-import org.testng.ITestClass;
-import org.testng.ITestNGMethod;
-
-public abstract class ForwardingITestNGMethod implements ITestNGMethod
-{
-
- private static final long serialVersionUID = 2534386487509877598L;
-
- protected abstract ITestNGMethod delegate();
-
- @Override
- public ITestNGMethod clone()
- {
- return delegate().clone();
- }
-
- public void addMethodDependedUpon(String methodName)
- {
- delegate().addMethodDependedUpon(methodName);
- }
-
- public boolean canRunFromClass(IClass testClass)
- {
- return delegate().canRunFromClass(testClass);
- }
-
- public String[] getAfterGroups()
- {
- return delegate().getAfterGroups();
- }
-
- public String[] getBeforeGroups()
- {
- return delegate().getBeforeGroups();
- }
-
- public int getCurrentInvocationCount()
- {
- return delegate().getCurrentInvocationCount();
- }
-
- public long getDate()
- {
- return delegate().getDate();
- }
-
- public String getDescription()
- {
- return delegate().getDescription();
- }
-
- public String[] getGroups()
- {
- return delegate().getGroups();
- }
-
- public String[] getGroupsDependedUpon()
- {
- return delegate().getGroupsDependedUpon();
- }
-
- public String getId()
- {
- return delegate().getId();
- }
-
- public long[] getInstanceHashCodes()
- {
- return delegate().getInstanceHashCodes();
- }
-
- public Object[] getInstances()
- {
- return delegate().getInstances();
- }
-
- public int getInvocationCount()
- {
- return delegate().getInvocationCount();
- }
-
- public Method getMethod()
- {
- return delegate().getMethod();
- }
-
- public String getMethodName()
- {
- return delegate().getMethodName();
- }
-
- public String[] getMethodsDependedUpon()
- {
- return delegate().getMethodsDependedUpon();
- }
-
- public String getMissingGroup()
- {
- return delegate().getMissingGroup();
- }
-
- public int getParameterInvocationCount()
- {
- return delegate().getParameterInvocationCount();
- }
-
- @SuppressWarnings("unchecked")
- public Class getRealClass()
- {
- return delegate().getRealClass();
- }
-
- public IRetryAnalyzer getRetryAnalyzer()
- {
- return delegate().getRetryAnalyzer();
- }
-
- public int getSuccessPercentage()
- {
- return delegate().getSuccessPercentage();
- }
-
- public ITestClass getTestClass()
- {
- return delegate().getTestClass();
- }
-
- public int getThreadPoolSize()
- {
- return delegate().getThreadPoolSize();
- }
-
- public long getTimeOut()
- {
- return delegate().getTimeOut();
- }
-
- public void incrementCurrentInvocationCount()
- {
- delegate().incrementCurrentInvocationCount();
- }
-
- public boolean isAfterClassConfiguration()
- {
- return delegate().isAfterClassConfiguration();
- }
-
- public boolean isAfterGroupsConfiguration()
- {
- return delegate().isAfterGroupsConfiguration();
- }
-
- public boolean isAfterMethodConfiguration()
- {
- return delegate().isAfterMethodConfiguration();
- }
-
- public boolean isAfterSuiteConfiguration()
- {
- return delegate().isAfterSuiteConfiguration();
- }
-
- public boolean isAfterTestConfiguration()
- {
- return delegate().isAfterTestConfiguration();
- }
-
- public boolean isAlwaysRun()
- {
- return delegate().isAlwaysRun();
- }
-
- public boolean isBeforeClassConfiguration()
- {
- return delegate().isBeforeClassConfiguration();
- }
-
- public boolean isBeforeGroupsConfiguration()
- {
- return delegate().isBeforeGroupsConfiguration();
- }
-
- public boolean isBeforeMethodConfiguration()
- {
- return delegate().isBeforeMethodConfiguration();
- }
-
- public boolean isBeforeSuiteConfiguration()
- {
- return delegate().isBeforeSuiteConfiguration();
- }
-
- public boolean isBeforeTestConfiguration()
- {
- return delegate().isBeforeTestConfiguration();
- }
-
- public boolean isTest()
- {
- return delegate().isTest();
- }
-
- public void setDate(long date)
- {
- delegate().setDate(date);
- }
-
- public void setId(String id)
- {
- delegate().setId(id);
- }
-
- public void setInvocationCount(int count)
- {
- delegate().setInvocationCount(count);
- }
-
- public void setMissingGroup(String group)
- {
- delegate().setMissingGroup(group);
- }
-
- public void setParameterInvocationCount(int n)
- {
- delegate().setParameterInvocationCount(n);
- }
-
- public void setRetryAnalyzer(IRetryAnalyzer retryAnalyzer)
- {
- delegate().setRetryAnalyzer(retryAnalyzer);
- }
-
- public void setSkipFailedInvocations(boolean skip)
- {
- delegate().setSkipFailedInvocations(skip);
- }
-
- public void setTestClass(ITestClass cls)
- {
- delegate().setTestClass(cls);
- }
-
- public void setThreadPoolSize(int threadPoolSize)
- {
- delegate().setThreadPoolSize(threadPoolSize);
- }
-
- public boolean skipFailedInvocations()
- {
- return delegate().skipFailedInvocations();
- }
-
- @SuppressWarnings("unchecked")
- public int compareTo(Object arg0)
- {
- return delegate().compareTo(arg0);
- }
-
- @Override
- public boolean equals(Object obj)
- {
- return delegate().equals(obj);
- }
-
- @Override
- public int hashCode()
- {
- return delegate().hashCode();
- }
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/testng/ForwardingITestResult.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/testng/ForwardingITestResult.java 2009-02-14 02:10:10 UTC (rev 1513)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/testng/ForwardingITestResult.java 2009-02-14 23:19:09 UTC (rev 1514)
@@ -1,82 +0,0 @@
-package org.jboss.jsr299.tck.impl.testng;
-
-import org.testng.IClass;
-import org.testng.ITestNGMethod;
-import org.testng.ITestResult;
-
-public abstract class ForwardingITestResult implements ITestResult
-{
-
- protected abstract ITestResult delegate();
-
- public long getEndMillis()
- {
- return delegate().getEndMillis();
- }
-
- public String getHost()
- {
- return delegate().getHost();
- }
-
- public ITestNGMethod getMethod()
- {
- return new SaneITestNGMethod(delegate().getMethod());
- }
-
- public String getName()
- {
- return delegate().getName();
- }
-
- public Object[] getParameters()
- {
- return delegate().getParameters();
- }
-
- public long getStartMillis()
- {
- return delegate().getStartMillis();
- }
-
- public int getStatus()
- {
- return delegate().getStatus();
- }
-
- public IClass getTestClass()
- {
- return delegate().getTestClass();
- }
-
- public Throwable getThrowable()
- {
- return delegate().getThrowable();
- }
-
- public boolean isSuccess()
- {
- return delegate().isSuccess();
- }
-
- public void setEndMillis(long millis)
- {
- delegate().setEndMillis(millis);
- }
-
- public void setParameters(Object[] parameters)
- {
- delegate().setParameters(parameters);
- }
-
- public void setStatus(int status)
- {
- delegate().setStatus(status);
- }
-
- public void setThrowable(Throwable throwable)
- {
- delegate().setThrowable(throwable);
- }
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/testng/SaneITestNGMethod.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/testng/SaneITestNGMethod.java 2009-02-14 02:10:10 UTC (rev 1513)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/testng/SaneITestNGMethod.java 2009-02-14 23:19:09 UTC (rev 1514)
@@ -1,49 +0,0 @@
-/**
- *
- */
-package org.jboss.jsr299.tck.impl.testng;
-
-import org.testng.ITestNGMethod;
-
-public class SaneITestNGMethod extends ForwardingITestNGMethod
-{
- private final ITestNGMethod method;
-
- public SaneITestNGMethod(ITestNGMethod method)
- {
- this.method = method;
- }
-
- @Override
- protected ITestNGMethod delegate()
- {
- return method;
- }
-
- @Override
- public boolean equals(Object obj)
- {
- if (obj instanceof ITestNGMethod && method != null)
- {
- ITestNGMethod other = (ITestNGMethod) method;
- return method.getMethodName().equals(other.getMethodName()) && method.getTestClass().equals(other.getTestClass());
- }
- else
- {
- return false;
- }
- }
-
- @Override
- public int hashCode()
- {
- if (method != null && method.getMethodName() != null)
- {
- return method.getMethodName().hashCode();
- }
- else
- {
- return 0;
- }
- }
-}
\ No newline at end of file
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/broken/BrokenDeploymentTypeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/broken/BrokenDeploymentTypeTest.java 2009-02-14 02:10:10 UTC (rev 1513)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/broken/BrokenDeploymentTypeTest.java 2009-02-14 23:19:09 UTC (rev 1514)
@@ -2,14 +2,15 @@
import javax.inject.DeploymentException;
+import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractDeclarativeTest;
-import org.hibernate.tck.annotations.SpecAssertion;
import org.testng.annotations.Test;
/**
*
* Spec version: PRD2
*/
+@Test(alwaysRun=true)
public class BrokenDeploymentTypeTest extends AbstractDeclarativeTest
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/broken/tooMany/TooManyDeploymentTypesTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/broken/tooMany/TooManyDeploymentTypesTest.java 2009-02-14 02:10:10 UTC (rev 1513)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/broken/tooMany/TooManyDeploymentTypesTest.java 2009-02-14 23:19:09 UTC (rev 1514)
@@ -22,14 +22,14 @@
import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.jboss.jsr299.tck.impl.packaging.Artifact;
-import org.jboss.jsr299.tck.impl.packaging.ExpectedDeploymentExceptions;
+import org.jboss.jsr299.tck.impl.packaging.ExpectedDeploymentException;
import org.testng.annotations.Test;
/**
* Single test for a bean with too many deployment types.
*/
@Artifact
-(a)ExpectedDeploymentExceptions(DefinitionException.class)
+(a)ExpectedDeploymentException(DefinitionException.class)
public class TooManyDeploymentTypesTest extends AbstractDeclarativeTest
{
/**
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java 2009-02-14 02:10:10 UTC (rev 1513)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java 2009-02-14 23:19:09 UTC (rev 1514)
@@ -6,8 +6,8 @@
import javax.inject.DefinitionException;
import javax.inject.manager.Bean;
+import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractDeclarativeTest;
-import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.impl.util.MockCreationalContext;
import org.jboss.jsr299.tck.unit.implementation.simple.OuterBean_Broken.InnerBean_Broken;
import org.jboss.jsr299.tck.unit.implementation.simple.OuterBean_Broken.StaticInnerBean_Broken;
Copied: tck/trunk/impl/src/main/resources/tck-audit.xml (from rev 1513, tck/trunk/impl/tck-audit.xml)
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml (rev 0)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-14 23:19:09 UTC (rev 1514)
@@ -0,0 +1,1654 @@
+<specification xmlns="http://jboss.com/products/webbeans/tck/audit"
+ name="JSR-299: Java Contexts and Dependency Injection"
+ version="Revised Public Review Draft">
+
+ <section id="2" title="Bean definition">
+
+ <assertion id="a">
+ <text>A bean comprises of a (nonempty) set of bean types</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>A bean comprises of a (nonempty) set of bindings</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>A bean comprises of a scope</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>A bean comprises of a deployment type</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>A bean comprises of an optional bean name</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>A bean comprises of a set of interceptor bindings</text>
+ </assertion>
+
+ <assertion id="g">
+ <text>A bean comprises of a bean implementation</text>
+ </assertion>
+ </section>
+
+ <section id="2.2" title="Bean types">
+
+ <assertion id="a">
+ <text>A bean may have multiple bean types</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>A bean type may be a parameterized type with an actual type parameter. For the purposes of the typesafe resolution algorithm defined in Section 5.9, "Typesafe resolution algorithm", parameterized bean types are considered identical by the container only if both the type and the type parameters (if any) are identical</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>Bean types may not declare a type variable or wildcard. If the type of an injection point is a parameterized type with a type variable or wildcard, a DefinitionException is thrown by the container at deployment time.</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>A bean type may be an interface</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>A bean type may be a concrete class</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>A bean type may be an abstract class</text>
+ </assertion>
+
+ <assertion id="g">
+ <text>A bean type may be declared final</text>
+ </assertion>
+
+ <assertion id="h">
+ <text>A bean type may have final methods</text>
+ </assertion>
+
+ <assertion id="i">
+ <text>A bean type may be an array type. Two array types are considered identical only if the element type is identical</text>
+ </assertion>
+
+ <assertion id="j">
+ <text>A bean type may be a primitive types. Primitive types are considered to be identical to their corresponding wrapper types in java.lang.</text>
+ </assertion>
+
+ <assertion id="k">
+ <text>All beans have the bean type java.lang.Object</text>
+ </assertion>
+
+ <assertion id="l">
+ <text>A client of a bean may typecast its reference to any instance of the bean to any bean type of the bean</text>
+ </assertion>
+
+ </section>
+
+ <section id="2.3.1" title="Default binding type">
+
+ <assertion id="a">
+ <text>If a bean does not explicitly declare a binding, the bean has exactly one binding, of type @javax.inject.Current</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>The default binding is also assumed for any injection point that does not explicitly declare a binding</text>
+ </assertion>
+ </section>
+
+ <section id="2.3.2" title="Defining new binding types">
+ <assertion id="a">
+ <text>A binding type is a Java annotation defined as @Target({METHOD, FIELD, PARAMETER, TYPE}) and @Retention(RUNTIME).</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>A binding type may be declared by specifying the @javax.inject.BindingType meta-annotation</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>The @BindingType meta-annotation may be omitted, and the binding type may be declared in beans.xml</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>A binding type may define annotation members</text>
+ </assertion>
+ </section>
+
+ <section id="2.3.3" title="Declaring the bindings of a bean using annotations">
+
+ <assertion id="a">
+ <text>A bean's bindings are declared by annotating the bean class or producer method or field with the binding types</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>Any bean may declare multiple binding types</text>
+ </assertion>
+ </section>
+
+ <section id="2.3.4" title="Declaring the bindings of a bean using XML">
+
+ <assertion id="a">
+ <text>If a bean is declared in beans.xml, bindings may be specified using the binding type names</text>
+ </assertion>
+
+ </section>
+
+ <section id="2.3.5" title="Specifying bindings of an injected field">
+
+ <assertion id="a">
+ <text>Binding types may be applied to injected fields (see Section 3.8, "Injected fields") to determine the bean that is injected, according to the typesafe resolution algorithm defined in Section 5.9, "Typesafe resolution algorithm".</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>A bean may only be injected to an injection point if it has all the bindings of the injection point</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>For a bean defined in XML, the bindings of a field may be specified using XML</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>When the bindings of a field are specified using XML, any binding annotations of the field are ignored</text>
+ </assertion>
+ </section>
+
+ <section id="2.3.6" title="Specifying bindings of a method or constructor parameter">
+ <assertion id="a">
+ <text>Binding types may be applied to parameters of producer methods, initializer methods, disposal methods or bean constructors (see Chapter 3, Bean implementation) to determine the bean instance that is passed when the method is called by the container</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>For a bean defined in XML, the bindings of a method parameter may be specified using XML</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>When the bindings of a parameter are specified using XML, any binding annotations of the parameter are ignored</text>
+ </assertion>
+ </section>
+
+ <section id="2.4" title="Scopes">
+
+ <assertion id="a">
+ <text>All beans have a scope</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>A scope type is represented by an annotation type.</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>The set of scope types is extensible</text>
+ </assertion>
+
+ </section>
+
+ <section id="2.5.1" title="Built-in deployment types">
+
+ <assertion id="a">
+ <text>All standard beans defined by this specification, and provided by the container, are defined using the @Standard deployment type</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>No bean may be declared with the @Standard deployment type unless explicitly required by this specification</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>Application beans may be defined using the @Production deployment type</text>
+ </assertion>
+
+ </section>
+
+ <section id="2.5.2" title="Defining new deployment types">
+
+ <assertion id="a">
+ <text>A deployment type is a Java annotation defined as @Target({TYPE, METHOD, FIELD})</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>A deployment type is a Java annotation defined with @Retention(RUNTIME)</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>All deployment types must also specify the @javax.inject.DeploymentType meta-annotation.</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>Applications and third-party frameworks may define their own deployment types</text>
+ </assertion>
+
+ </section>
+
+ <section id="2.5.3" title="Declaring the deployment type of a bean using annotations">
+
+ <assertion id="a">
+ <text>The deployment type of the bean is declared by annotating the bean class or producer method or field</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>An bean class or producer method or field may specify at most one deployment type. If multiple deployment type annotations are specified, a DefinitionException is thrown by the container at deployment time.</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>By default, if no deployment type annotation is explicitly specified, a producer method or field inherits the deployment type of the bean in which it is defined.</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>a deployment type may be specified using a stereotype annotation, as defined in Section 2.7.2, "Declaring the stereotypes for a bean using annotations".</text>
+ </assertion>
+
+ </section>
+
+ <section id="2.5.4" title="Declaring the deployment type of a bean using XML">
+ <assertion id="a">
+ <text>When a bean is declared in beans.xml, the deployment type may be specified using a tag with the annotation type name</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>If more than one deployment type is specified in XML, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>A deployment type may be specified using a stereotype declared in XML, as defined in Section 2.7.3, "Declaring the stereotypes for a bean using XML".</text>
+ </assertion>
+ </section>
+
+ <section id="2.5.5" title="Default deployment type">
+
+ <assertion id="a">
+ <text>The default deployment type for a bean which does not explicitly declare a deployment type depends upon its declared stereotypes - if a bean does not declare any stereotype with a declared default deployment type, then the default deployment type is
+@Production</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>Otherwise, the default deployment type for the bean is the highest-precedence default deployment type declared by any stereotype declared by the bean</text>
+ <note>This assertion relates to assertion 2.5.5.b</note>
+ </assertion>
+
+ <assertion id="c">
+ <text>If a bean explicitly declares a deployment type, any default deployment type declared by stereotypes are ignored.</text>
+ </assertion>
+ </section>
+
+ <section id="2.5.6" title="Enabled deployment types">
+
+ <assertion id="a">
+ <text>Beans declared with a deployment type that is not enabled are not available to the resolution algorithms defined in Chapter 5, Lookup, dependency injection and EL resolution.</text>
+ </assertion>
+
+ </section>
+
+ <section id="2.6" title="Bean names">
+
+ <assertion id="a">
+ <text>A valid bean name is a period-separated list of valid EL identifiers</text>
+ </assertion>
+ </section>
+
+ <section id="2.6.1" title="Declaring the bean name using annotations">
+
+ <assertion id="a">
+ <text>To specify the name of a bean, the @javax.annotation.Named annotation is applied to the bean class or producer method or field.</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>If the @Named annotation does not specify the value member, the default name is assumed</text>
+ </assertion>
+ </section>
+
+ <section id="2.6.2" title="Declaring the bean name using XML">
+
+ <assertion id="a">
+ <text>If the bean is declared in beans.xml, the name may be specified using <Named></text>
+ </assertion>
+
+ <assertion id="b">
+ <text>If the <Named> element is empty, the default name is assumed</text>
+ </assertion>
+ </section>
+
+ <section id="2.6.3" title="Default bean names">
+
+ <assertion id="a">
+ <text>A default name must be assigned by the container when a bean class or producer method or field of a bean defined using annotations declares a @Named annotation and no name is explicitly specified by the value member</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>A default name must be assigned by the container when an empty <Named> element is specified by a bean defined in XML</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>A default name must be assigned by the container when a bean declares a stereotype that declares an empty @Named annotation, and the bean does not explicitly specify a name.</text>
+ </assertion>
+ </section>
+
+ <section id="2.6.4" title="Beans with no name">
+
+ <assertion id="a">
+ <text>If neither <Named> nor @Named is specified, by the bean or its stereotypes, a bean has no name</text>
+ </assertion>
+ </section>
+
+ <section id="2.7" title="Stereotypes">
+
+ <assertion id="a">
+ <text>A stereotype may also specify that all beans with the stereotype have defaulted bean names</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>A bean may declare zero, one or multiple stereotypes</text>
+ </assertion>
+
+ </section>
+
+ <section id="3" title="Bean Implementation">
+
+ </section>
+
+ <section id="3.1" title="Restriction upon bean instantiation">
+ <assertion id="a">
+ <text>The bean class is a concrete class and is not required to implement any special interface or extend any special superclass</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>If the application calls a producer method directly, instead of letting the container call it, the returned object is not a contextual instance and the capabilities listed in Section 2.1, "Functionality provided by the container to the bean" will not be available to the returned object.</text>
+ </assertion>
+ </section>
+
+ <section id="3.2" title="Simple beans">
+ <assertion id="a">
+ <text>The bean class of a simple bean may not be a non-static inner class or a parameterized type</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>The bean class of a simple bean may not be an abstract class, unless the simple bean is a decorator</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If the bean class of a simple bean is annotated with both the @Interceptor and @Decorator stereotypes, a DefinitionException is thrown by the container at deployment time.</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>Multiple simple beans may share the same bean class. This occurs when beans are defined using XML. Only one simple bean per bean class may be defined using annotations.</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>If a simple bean has a public field, it must have scope @Dependent. If a simple bean with a public field declares any scope other than @Dependent, a DefinitionException is thrown by the container at deployment time.</text>
+ </assertion>
+
+ </section>
+
+ <section id="3.2.1" title="Which Java classes are beans?">
+ <assertion id="a">
+ <text>A top-level Java class is not a simple bean if it is a parameterized type</text>
+ </assertion>
+ <assertion id="b">
+ <text>A top-level Java class is not a simple bean if it is a non-static inner class</text>
+ </assertion>
+ <assertion id="c">
+ <text>A top-level Java class is only a simple bean if it is a concrete class, or annotated @Decorator.</text>
+ </assertion>
+ <assertion id="d">
+ <text>A top-level Java class is not a simple bean if it is annotated with the JPA @Entity annotation</text>
+ </assertion>
+ <assertion id="e">
+ <text>A top-level Java class is not a simple bean if it is annotated with any of the EJB component-defining annotations</text>
+ </assertion>
+ <assertion id="f">
+ <text>A top-level Java class is not a simple bean if it implements the javax.servlet.Servlet interface</text>
+ </assertion>
+ <assertion id="g">
+ <text>A top-level Java class is not a simple bean if it implements the javax.servlet.Filter interface</text>
+ </assertion>
+ <assertion id="h">
+ <text>A top-level Java class is not a simple bean if it implements the javax.servlet.ServletContextListener interface</text>
+ </assertion>
+ <assertion id="i">
+ <text>A top-level Java class is not a simple bean if it implements the javax.servlet.http.HttpSessionListener interface</text>
+ </assertion>
+ <assertion id="j">
+ <text>A top-level Java class is not a simple bean if it implements the javax.servlet.ServletRequestListener interface</text>
+ </assertion>
+ <assertion id="k">
+ <text>A top-level Java class is not a simple bean if it implements the javax.ejb.EnterpriseBean interface</text>
+ </assertion>
+ <assertion id="l">
+ <text>A top-level Java class is not a simple bean if it extends javax.faces.component.UIComponent</text>
+ </assertion>
+ <assertion id="m">
+ <text>A top-level Java class is not a simple bean if it is declared as an EJB bean class in ejb-jar.xml</text>
+ </assertion>
+ <assertion id="n">
+ <text>A top-level Java class is not a simple bean if it is declared as a JPA entity in orm.xml</text>
+ </assertion>
+ <assertion id="o">
+ <text>A top-level Java class is only a simple bean if it has an appropriate constructor - either a constructor with no parameters, or declares a constructor annotated @Initializer</text>
+ </assertion>
+ <assertion id="p">
+ <text>Additional simple beans with the same bean class may be defined using XML, by specifying the class in beans.xml.</text>
+ </assertion>
+
+ </section>
+
+ <section id="3.2.2" title="Bean types of a simple bean">
+ <assertion id="a">
+ <text>The set of bean types for a simple bean contains the bean class, every superclass and all interfaces it implements directly or indirectly.</text>
+ </assertion>
+ </section>
+
+ <section id="3.2.3" title="Declaring a simple bean using annotations">
+ <assertion id="a">
+ <text>A simple bean with a constructor that takes no parameters does not require any special annotations</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>A bean class may also specify a scope, name, deployment type, stereotypes and/or bindings</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>A simple bean may extend another simple bean</text>
+ </assertion>
+ </section>
+
+ <section id="3.2.4" title="Declaring a simple bean using XML">
+ <assertion id="a">
+ <text>Simple beans may be declared in beans.xml using the bean class name</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>A simple bean may even be declared at any injection point declared in XML, as defined in Section 9.9, "Inline bean declarations", in which case no bindings are specified.</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If the bean class of a simple bean defined in XML is a parameterized type or a non-static inner class, a DefinitionException is thrown by the container at deployment time.</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>If the bean class of a simple bean defined in XML is an abstract class, and the simple bean is not a decorator, a DefinitionException
+is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>If the bean class of a simple bean defined in XML is annotated @Interceptor, then the bean must be explicitly declared as an interceptor in XML, as defined in Section A.3.5.2, "Declaring an interceptor using XML". If a simple bean defined in XML has a bean class annotated @Interceptor and is not declared as an interceptor in XML, a DefinitionException is
+thrown by the container at deployment time.</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>If the bean class of a simple bean defined in XML is annotated @Interceptor, then the bean must be explicitly declared as an interceptor in XML, as defined in Section A.3.5.2, "Declaring an interceptor using XML". If a simple bean defined in XML has a bean class annotated @Interceptor and is not declared as an interceptor in XML, a DefinitionException is
+thrown by the container at deployment time.</text>
+ </assertion>
+ </section>
+
+ <section id="3.2.5" title="Simple beans with the @New binding">
+ <assertion id="a">
+ <text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
+Additionally, for each such simple bean, a second simple bean exists which has the same bean class</text>
+ </assertion>
+ <assertion id="b">
+ <text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
+Additionally, for each such simple bean, a second simple bean exists which has the same bean constructor, initializer methods and injected fields defined by annotations</text>
+ </assertion>
+ <assertion id="c">
+ <text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
+Additionally, for each such simple bean, a second simple bean exists which has the same interceptor bindings defined by annotations</text>
+ </assertion>
+ <assertion id="d">
+ <text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
+Additionally, for each such simple bean, a second simple bean exists which has scope @Dependent</text>
+ </assertion>
+ <assertion id="e">
+ <text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
+Additionally, for each such simple bean, a second simple bean exists which has deployment type @Standard</text>
+ </assertion>
+ <assertion id="f">
+ <text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
+Additionally, for each such simple bean, a second simple bean exists which has @javax.inject.New as the only binding</text>
+ </assertion>
+ <assertion id="g">
+ <text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
+Additionally, for each such simple bean, a second simple bean exists which has no bean name</text>
+ </assertion>
+ <assertion id="h">
+ <text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
+Additionally, for each such simple bean, a second simple bean exists which has no stereotypes</text>
+ </assertion>
+ <assertion id="i">
+ <text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
+Additionally, for each such simple bean, a second simple bean exists which has no observer methods, producer methods or fields or disposal methods</text>
+ </assertion>
+ </section>
+
+ <section id="3.2.6" title="Bean constructors">
+ <assertion id="a">
+ <text>When the container instantiates a simple bean, it calls the bean constructor. The bean constructor is a constructor of the bean class</text>
+ </assertion>
+ <assertion id="b">
+ <text>The application may call bean constructors directly. However, if the application directly instantiates the bean, no parameters are passed to the constructor by the container; the returned object is not bound to any context; no dependencies are injected by the container; and the lifecycle of the new instance is not managed by the container</text>
+ </assertion>
+ </section>
+
+ <section id="3.2.6.1" title="Declaring a bean constructor using annotations">
+ <assertion id="a">
+ <text>The bean constructor may be identified by annotating the constructor @Initializer</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>If a simple bean defined using annotations does not explicitly declare a constructor using @Initializer, the constructor that accepts no parameters is the bean constructor</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If a simple bean defined using annotations has more than one constructor annotated @Initializer, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>If a bean constructor has a parameter annotated @Disposes, or @Observes, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ </section>
+
+ <section id="3.2.6.2" title="Declaring a bean constructor using XML">
+
+ <assertion id="a">
+ <text>For a simple bean defined using XML, the bean constructor may be specified by listing the parameter types of the constructer, in order, as direct children of the element that declares the bean</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>If a simple bean defined using XML does not explicitly declare constructor parameters in XML, the constructor that accepts no parameters is the bean constructor</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If a simple bean declared in XML does not have a constructor with the parameter types declared in XML, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>When a bean constructor is declared in XML, the container ignores binding annotations applied to Java constructor parameters</text>
+ </assertion>
+
+ </section>
+
+ <section id="3.2.6.3" title="Bean constructor parameters">
+ <assertion id="a">
+ <text>If the bean constructor has parameters, the container calls the method Manager.getInstanceToInject() defined in Section 5.7.1, "Resolving dependencies" to determine a value for each parameter and calls the constructor with those parameter values.</text>
+ </assertion>
+ </section>
+
+ <section id="3.2.7" title="Specializing a simple bean">
+ <assertion id="a">
+ <text>If a bean class of a simple bean X defined using annotations is annotated @Specializes, then the bean class of X must directly extend the bean class of another simple bean Y defined using annotations. Then X inherits all bindings of Y, and if Y has a name, X has the same name as Y.</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>We say that X directly specializes Y, and we can be certain that Y will never be instantiated or called by the container if X is enabled.</text>
+ <note>This assertion relates to specialized beans declared using annotations</note>
+ </assertion>
+
+ <assertion id="c">
+ <text>If the bean class of X does not directly extend the bean class of another simple bean, a DefinitionException is thrown by the container at deployment time.</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>If a simple bean X defined in XML declares the <Specializes> element, then the bean class of X must be the bean class of another simple bean Y defined using annotations. Then X inherits all bindings of Y, and if Y has a name, X has the same name as Y</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>We say that X directly specializes Y, and we can be certain that Y will never be instantiated or called by the container if X is enabled</text>
+ <note>This assertion relates to specialized beans declared in XML</note>
+ </assertion>
+ </section>
+
+ <section id="3.2.8" title="Default name for a simple bean">
+ <assertion id="a">
+ <text>The default name for a simple bean is the unqualified class name of the bean class, after converting the first character to lower case</text>
+ </assertion>
+ </section>
+
+ <section id="3.3" title="Session beans">
+ <assertion id="a">
+ <text>A session bean is a bean that is implemented by an EJB 3-style session bean</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>A stateless session bean must belong to the @Dependent pseudo-scope</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>A singleton bean must belong to either the @ApplicationScoped scope or to the @Dependent pseudo-scope</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>If a session bean specifies an illegal scope, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>Note that multiple session beans may share the same bean class. This occurs when beans are defined using XML</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>If the bean class of a session bean is annotated @Interceptor or @Decorator, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+ </section>
+
+ <section id="3.3.1" title="EJB remove methods of session beans">
+ <assertion id="a">
+ <text>If a session bean is a stateful session bean, and the scope is @Dependent, the application may call any EJB remove method of an instance of the session bean.</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>If a session bean is a stateful session bean, and the scope is not @Dependent, the application may not directly call any EJB remove method of any instance of the session bean</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If the application directly calls an EJB remove method of an instance of a session bean that is a stateful session bean and declares any scope other than @Dependent, an UnsupportedOperationException is thrown</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>If the application directly calls an EJB remove method of an instance of a session bean that is a stateful session bean and has scope @Dependent then no parameters are passed to the method by the container. Furthermore, the container ignores the instance instead of destroying it when Bean.destroy() is called, as defined in Section 6.5, "Lifecycle of stateful session beans"</text>
+ </assertion>
+
+ </section>
+
+ <section id="3.3.2" title="Which EJBs are beans?">
+ <assertion id="a">
+ <text>All session beans exposing an EJB 3.x client view and declared via an EJB component defining annotation on the EJB bean class are beans, and thus no special declaration is required. Additional beans for these EJBs may be defined using XML, by specifying the bean class in beans.xml</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>All session beans exposing an EJB 3.x client view and declared in ejb-jar.xml are also beans. Additional beans for these EJBs may be defined using XML, by specifying the bean class and EJB name in beans.xml</text>
+ </assertion>
+ </section>
+
+ <section id="3.3.3" title="Bean types of a session bean">
+
+ <assertion id="a">
+ <text>The set of bean types for a session bean contains all local interfaces of the bean that do not have wildcard type parameters or type variables and their superinterfaces.</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>If the EJB has a bean class local view and the bean class is not a parameterized
+type, the set of bean types contains the bean class and all superclasses.</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>java.lang.Object is a bean type of every session bean</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>Remote interfaces are not included in the set of bean types</text>
+ </assertion>
+ </section>
+
+ <section id="3.3.4" title="Declaring a session bean using annotations">
+ <assertion id="a">
+ <text>A session bean does not require any special annotations</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>A bean class may also specify a scope, name, deployment type, stereotypes and/or bindings</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>A session bean class may extend another bean class</text>
+ </assertion>
+ </section>
+
+ <section id="3.3.5" title="Declaring a session bean using XML">
+ <assertion id="a">
+ <text>Session beans may be declared in beans.xml using the bean class name (for EJBs defined using a component-defining annotation) or bean class and EJB name (for EJBs defined in ejb-jar.xml)</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>The ejbName attribute declares the EJB name of an EJB defined in ejb-jar.xml</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If an entity or message-driven bean class is declared in XML, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+ </section>
+
+ <section id="3.3.6" title="Session beans with the @New binding">
+
+ <assertion id="a">
+ <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
+Additionally, for each such session bean, a second bean exists which has the same bean class</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
+Additionally, for each such session bean, a second bean exists which has the initializer methods and injected fields defined by annotations</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
+Additionally, for each such session bean, a second bean exists which has the same interceptor bindings defined by annotations</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
+Additionally, for each such session bean, a second bean exists which has scope @Dependent,</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
+Additionally, for each such session bean, a second bean exists which has deployment type @Standard</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
+Additionally, for each such session bean, a second bean exists which has @javax.inject.New as the only binding</text>
+ </assertion>
+
+ <assertion id="g">
+ <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
+Additionally, for each such session bean, a second bean exists which has no bean name</text>
+ </assertion>
+
+ <assertion id="h">
+ <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
+Additionally, for each such session bean, a second bean exists which has no stereotypes</text>
+ </assertion>
+
+ <assertion id="i">
+ <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
+Additionally, for each such session bean, a second bean exists which has no observer methods, producer methods or fields or disposal methods</text>
+ </assertion>
+ </section>
+
+ <section id="3.3.7" title="Specializing a session bean">
+
+ <assertion id="a">
+ <text>If a bean class of a session bean X defined using annotations is annotated @Specializes, then the bean class of X must directly extend the bean class of another session bean Y defined using annotations. Then X inherits all bindings of Y, and if Y has a name, X has the same name as Y. Also, X must support all local interfaces supported by Y, and
+if Y supports a bean-class local view, X must also support a bean-class local view.
+Otherwise, a DefinitionException is thrown by the container at deployment time.</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>We say that X directly specializes Y, and we can be certain that Y will never be instantiated or called by the container if X is enabled</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If the bean class of X does not directly extend the bean class of another session bean, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>If a session bean X defined in XML declares the <Specializes> element, then the bean class of X must be the bean class of another session bean Y defined using annotations. Then X inherits all bindings of Y, and if Y has a name, X has the same name as Y.</text>
+ </assertion>
+ </section>
+
+ <section id="3.3.8" title="Default name for a session bean">
+ <assertion id="a">
+ <text>The default name for a session bean is the unqualified class name of the bean class, after converting the first character to lower case</text>
+ </assertion>
+ </section>
+
+ <section id="3.3.9" title="Session bean proxies">
+ <assertion id="a">
+ <text>EJB local object references do not implement all local interfaces of the EJB. A local object reference may not be typecast to different local interface type, as required by Section 2.2, "Bean types". Therefore, the container proxies the local object reference. A session bean proxy implements all local interfaces of the EJB.</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>All session bean proxies must be serializable</text>
+ </assertion>
+ </section>
+
+ <section id="3.4" title="Producer methods">
+ <assertion id="a">
+ <text>A producer method must be a method of a simple bean class or session bean class</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>A producer method may be either static or non-static</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If the bean is a session bean, the producer method must be either a business method of the EJB or a static method of the bean class</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>If a producer method sometimes returns a null value, then the producer method must have scope @Dependent</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>If a producer method returns a null value at runtime, and the producer method declares any other scope, an IllegalProductException is thrown by the container. This restriction allows the container to use a client proxy, as defined in Section 5.4, "Client proxies".</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>If the producer method return type is a parameterized type, it must specify actual type parameters for each type parameter</text>
+ </assertion>
+
+ <assertion id="g">
+ <text>If a producer method return type contains a wildcard type parameter or type variable, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="h">
+ <text>The application may call producer methods directly. However, if the application calls a producer method directly, no parameters will be passed to the producer method by the container; the returned object is not bound to any context; and its lifecycle is not managed by the container</text>
+ </assertion>
+
+ <assertion id="i">
+ <text>A bean may declare multiple producer methods</text>
+ </assertion>
+ </section>
+
+ <section id="3.4.1" title="Bean types of a producer method">
+
+ <assertion id="a">
+ <text>If the return type of a producer method is an interface, the set of bean types contains the return type, all interfaces it extends directly or indirectly and java.lang.Object</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>If a return type of a producer method is primitive or is a Java array type, the set of bean types contains exactly two types: the method return type and java.lang.Object</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If the return type of a producer method is a class, the set of bean types contains the return type, every superclass and all interfaces it implements directly or indirectly</text>
+ </assertion>
+ </section>
+
+ <section id="3.4.2" title="Declaring a producer method using annotations">
+
+ <assertion id="a">
+ <text>A producer method may be declared by annotating a method with the @javax.inject.Produces annotation</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>A producer method may also specify scope, name, deployment type, stereotypes and/or bindings</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If a producer method is annotated @Initializer, has a parameter annotated @Disposes, or has a parameter annotated @Observes, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>If a non-static method of a session bean class is annotated @Produces, and the method is not a business method of the EJB, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+ </section>
+
+ <section id="3.4.3" title="Declaring a producer method using XML">
+
+ <assertion id="a">
+ <text>For a bean defined in XML, a producer method may be declared using the method name, the <Produces> element, the return type, and the parameter types of the method</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>When a producer method is declared in XML, the container ignores binding annotations applied to the Java method or method parameters</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If the bean class of a bean declared in XML does not have a method with the name and parameter types declared in XML, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+ </section>
+
+ <section id="3.4.4" title="Producer method parameters">
+ <assertion id="a">
+ <text>If the producer method has parameters, the container calls the method Manager.getInstanceToInject() defined in Section 5.7.1, "Resolving dependencies" to determine a value for each parameter and calls the producer method with those parameter values</text>
+ </assertion>
+ </section>
+
+ <section id="3.4.5" title="Specializing a producer method">
+
+ <assertion id="a">
+ <text>If a producer method X is annotated @Specializes, then it must be non-static and directly override another producer method Y. Then X inherits all bindings of Y, and if Y has a name, X has the same name as Y.</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>If the method is static or does not directly override another producer method, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+ </section>
+
+ <section id="3.4.6" title="Disposal methods">
+
+ <assertion id="a">
+ <text>A disposal method must be a method of a simple bean class or session bean class.</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>A disposal method may be either static or non-static</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If the bean is a session bean, the disposal method must be a business method of the EJB or a static method of the bean class</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>A bean may declare multiple disposal methods</text>
+ </assertion>
+ </section>
+
+ <section id="3.4.7" title="Disposed parameter of a disposal method">
+
+ <assertion id="a">
+ <text>Each disposal method must have exactly one disposed parameter, of the same type as the corresponding producer method return type</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>When searching for disposal methods for a producer method, the container considers the type and bindings of the disposed parameter. If a disposed parameter resolves to a producer method according to the typesafe resolution algorithm, the container must call this method when destroying an instance returned by that producer method</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If the disposed parameter does not resolve to any producer method according to the typesafe resolution algorithm, an UnsatisfiedDependencyException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>If a disposed parameter resolves to a producer method according to the typesafe resolution algorithm, the container must call this method when destroying an instance returned by that producer method</text>
+ </assertion>
+ </section>
+
+ <section id="3.4.8" title="Declaring a disposal method using annotations">
+
+ <assertion id="a">
+ <text>A disposal method may be declared using annotations by annotating a parameter @javax.inject.Disposes. That parameter is the disposed parameter</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>If a method has more than one parameter annotated @Disposes, a DefinitionException is thrown by the container</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If a disposal method is annotated @Produces, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>If a disposal method is annotated @Initializer, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>If a disposal method has a parameter annotated @Observes, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>If a non-static method of a session bean class has a parameter annotated @Disposes, and the method is not a business method of the EJB, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+ </section>
+
+ <section id="3.4.9" title="Declaring a disposal method using XML">
+
+ <assertion id="a">
+ <text>For a bean defined in XML, a disposal method may be declared using the method name, the <Disposes> element, and the parameter types of the method</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>When a disposal method is declared in XML, the container ignores binding annotations applied to the Java method parameter</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If the bean class of a bean declared in XML does not have a method with the name and parameter types declared in XML, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+ </section>
+
+ <section id="3.4.10" title="Disposal method parameters">
+
+ <assertion id="a">
+ <text>In addition to the disposed parameter, a disposal method may declare additional parameters, which may also specify bindings. The container calls Manager.getInstanceToInject() to determine a value for each parameter of a disposal method and calls the disposal method with those parameter values</text>
+ </assertion>
+ </section>
+
+ <section id="3.4.11" title="Disposal method resolution">
+
+ <assertion id="a">
+ <text>When searching for disposal methods for a producer method, the container searches for disposal methods which are declared by an enabled bean, and for which the disposed parameter must resolve to the producer method, according to the typesafe resolution algorithm</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>If there are multiple disposal methods for a producer method, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+ </section>
+
+ <section id="3.4.12" title="Default name for a producer method">
+
+ <assertion id="a">
+ <text>The default name for a producer method is the method name, unless the method follows the JavaBeans property getter naming convention, in which case the default name is the JavaBeans property name</text>
+ </assertion>
+ </section>
+
+ <section id="3.5" title="Producer fields">
+
+ <assertion id="a">
+ <text>A producer field must be a field of a simple bean class or session bean class</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>A producer field may be either static or nonstatic</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If a producer field sometimes contains a null value when accessed, then the producer field must have scope @Dependent</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>If a producer method contains a null value at runtime, and the producer field declares any other scope, an IllegalProductException is thrown by the container. This restriction allows the container to use a client proxy, as defined in Section 5.4, "Client proxies"</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>If the producer field return type is a parameterized type, it must specify actual type parameters for each type parameter</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>If a producer field return type contains a wildcard type parameter or type variable, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="g">
+ <text>The application may access producer fields directly. However, if the application accesses a producer field directly, the returned object is not bound to any context; and its lifecycle is not managed by the container</text>
+ </assertion>
+
+ <assertion id="h">
+ <text>A bean may declare multiple producer fields</text>
+ </assertion>
+ </section>
+
+ <section id="3.5.1" title="Bean types of a producer field">
+
+ <assertion id="a">
+ <text>The bean types of a producer field depend upon the field type. If the field type is an interface, the set of bean types contains the field type, all interfaces it extends directly or indirectly and java.lang.Object</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>The bean types of a producer field depend upon the field type. If a field type is primitive or is a Java array type, the set of bean types contains exactly two types: the field type and java.lang.Object</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>The bean types of a producer field depend upon the field type. If the field type is a class, the set of bean types contains the field type, every superclass and all interfaces it implements directly or indirectly</text>
+ </assertion>
+ </section>
+
+ <section id="3.5.2" title="Declaring a producer field using annotations">
+
+ <assertion id="a">
+ <text>A producer field may be declared by annotating a field with the @javax.inject.Produces annotation</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>A producer field may also specify scope, name, deployment type, stereotypes and/or bindings</text>
+ </assertion>
+ </section>
+
+ <section id="3.5.3" title="Declaring a producer field using XML">
+
+ <assertion id="a">
+ <text>For a bean defined in XML, a producer field may be declared using the field name, the <Produces> element, and the type</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>When a producer field is declared in XML, the container ignores binding annotations applied to the Java field</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If the bean class of a bean declared in XML does not have a field with the name and type declared in XML, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ </section>
+
+ <section id="3.5.4" title="Default name for a producer field">
+ <assertion id="a">
+ <text>The default name for a producer field is the field name</text>
+ </assertion>
+ </section>
+
+ <section id="3.6" title="Resources">
+ <assertion id="a">
+ <text>Resources may be declared in beans.xml, allowing direct injection of an EE resource, entity manager, entity manager factory, EJB remote object or web service reference</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>The lifecycle of an injected reference is identical to the semantics of Java EE injection using @Resource, @PersistenceContext, @PersistenceUnit, @EJB or @WebServiceRef</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>A resource always has scope @Dependent</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>A resource may not declare a bean name</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>Resources are always declared using XML</text>
+ </assertion>
+ </section>
+
+ <section id="3.6.1" title="Declaring a resource using XML">
+
+ <assertion id="a">
+ <text>A resource may be declared in beans.xml using an element that represents the Java type of the resource. For a Java EE resource, the EE resource type must be specified - for example javax.sql.Datasource for a JDBC datasource. The bean type of the resource is this specified type</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>A resource may be declared in beans.xml using an element that represents the Java type of the resource. For a persistence context, javax.persistence.EntityManager must be specified. The bean type of the resource is this specified type</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>A resource may be declared in beans.xml using an element that represents the Java type of the resource. For a persistence unit, javax.persistence.EntityManagerFactory must be specified. The bean type of the resource is this specified type</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>A resource may be declared in beans.xml using an element that represents the Java type of the resource. For a remote EJB, an EJB remote interface type must be specified. The bean type of the resource is this specified type</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>A resource may be declared in beans.xml using an element that represents the Java type of the resource. For a web service, a web service type must be specified. The bean type of the resource is this specified type</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>Each resource declaration must contain a child <Resource>, <PersistenceContext>, <PersistenceUnit>, <EJB> or
+<WebServiceRef> element. For a Java EE resource, a JNDI name or mapped name must be specified using the <name> or <mappedName> child elements
+of the <Resource> element</text>
+ </assertion>
+
+ <assertion id="g">
+ <text>Each resource declaration must contain a child <Resource>, <PersistenceContext>, <PersistenceUnit>, <EJB> or
+<WebServiceRef> element. For a persistence context, a persistence unit name must be specified using the <unitName> child element of the <PersistenceContext> element</text>
+ </assertion>
+
+ <assertion id="h">
+ <text>Each resource declaration must contain a child <Resource>, <PersistenceContext>, <PersistenceUnit>, <EJB> or
+<WebServiceRef> element. For a persistence unit, a persistence unit name must be specified using the <unitName> child element of the <PersistenceUnit> element</text>
+ </assertion>
+
+ <assertion id="i">
+ <text>Each resource declaration must contain a child <Resource>, <PersistenceContext>, <PersistenceUnit>, <EJB> or
+<WebServiceRef> element. For a remote EJB, a JNDI name, mapped name or EJB link must be specified using the <name>, <mappedName> or <ejbLink> child elements of the <EJB> element</text>
+ </assertion>
+
+ <assertion id="j">
+ <text>Each resource declaration must contain a child <Resource>, <PersistenceContext>, <PersistenceUnit>, <EJB> or
+<WebServiceRef> element. For a web service, a JNDI name or mapped name must be specified using the <name> or <mappedName> child elements of the <WebServiceRef> element. Optionally, a URL pointing to a WSDL document may be specified using the <wsdlLocation> child element</text>
+ </assertion>
+
+ <assertion name="k">
+ <text>The JNDI name specified by the <name> element must be a name in the global java:global or application java:app naming context</text>
+ </assertion>
+
+ <assertion name="l">
+ <text>Optionally, one or more bindings may be specified for resources in XML. If no binding is explicitly specified, the default binding @Current is assumed.</text>
+ </assertion>
+
+ </section>
+
+ <section id="3.7" title="JMS resources">
+ <assertion id="a">
+ <text>JMS resources may be declared in beans.xml</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>JMS queue resources must allow the direct injection of the Queue, QueueConnection, QueueSession, QueueReceiver and/or QueueSender</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>JMS topic resources must allow the direct injection of the Topic, TopicConnection, TopicSession, TopicSubscriber and/or TopicPublisher</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>The lifecycles of the injected objects are managed by the container, and therefore the application need not explicitly close() any injected JMS object. If the application calls close() on an instance of a JMS resource, an UnsupportedOperationException is thrown by the container.</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>A JMS resource always has scope @Dependent</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>A JMS resource may not declare a bean name</text>
+ </assertion>
+
+ <assertion id="g">
+ <text>JMS resources are always declared using XML</text>
+ </assertion>
+ </section>
+
+ <section id="3.7.1" title="Bean types of a JMS resource">
+
+ <assertion id="a">
+ <text>For JMS resources that represent a queue, the bean types are Queue, QueueConnection, QueueSession and QueueSender</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>For JMS resources that represent a topic, the bean types are Topic, TopicConnection, TopicSession and TopicPublisher</text>
+ </assertion>
+ </section>
+
+ <section id="3.7.2" title="Declaring a JMS resource using XML">
+
+ <assertion id="a">
+ <text>A JMS resource may be declared using the <Topic> or <Queue> elements in beans.xml</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>Each JMS resource declaration must contain a child <Resource> element. A JNDI name or mapped name must be specified using the <name> or <mappedName> child elements of the <Resource> element</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>One or more bindings may be specified. If no binding is explicitly specified, the default binding @Current is assumed</text>
+ </assertion>
+ </section>
+
+ <section id="3.8" title="Injected fields">
+
+ <assertion id="a">
+ <text>An injected field is a non-static, non-final field of a bean class, of a servlet, or of any EJB session or message driven bean class.</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>Injected fields are initialized by the container immediately after instantiation and before any methods of the instance are invoked. The container calls the method Manager.getInstanceToInject() defined in Section 5.7.1, "Resolving dependencies" to determine a value for each injected field</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>Any EJB session or message driven bean may declare injected fields and have those fields injected by the container</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>If a field is a producer field or a decorator delegate attribute, it is not an injected field</text>
+ </assertion>
+ </section>
+
+ <section id="3.8.1" title="Declaring an injected field using annotations">
+
+ <assertion id="a">
+ <text>An injected field may be declared by annotating the field with any binding type</text>
+ </assertion>
+ </section>
+
+ <section id="3.8.2" title="Declaring an injected field using XML">
+ <assertion id="a">
+ <text>For bean defined in XML, an injected field may be declared using the field name and a child element representing the type of the field</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>When an injected field is declared in XML, the container ignores binding annotations applied to the Java field</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If the type element does not declare any binding, the default binding @Current is assumed</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>If the bean class of a bean declared in XML does not have a field with the name and type declared in XML, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+ </section>
+
+ <section id="3.9" title="Initializer methods">
+ <assertion id="a">
+ <text>An initializer method is a non-static method of a bean class, of a servlet, or of any EJB session or message driven bean class.</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>Initializer methods are called by the container immediately after injected fields have been initialized by the container and before any other methods of the instance are invoked.</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If the bean is a session bean, the initializer method is not required to be a business method of the session bean</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>Method interceptors are never called when the container calls an initializer method</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>A bean class may declare multiple (or zero) initializer methods</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>The application may call initializer methods directly, but then no parameters will be passed to the method by the container</text>
+ </assertion>
+
+ <assertion id="g">
+ <text>Any EJB session or message driven bean may declare initializer methods and have the methods called by the container</text>
+ </assertion>
+ </section>
+
+ <section id="3.9.1" title="Declaring an initializer method using annotations">
+ <assertion id="a">
+ <text>An initializer method may be declared by annotating the method @javax.inject.Initializer</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>If an initializer method is annotated @Produces, has a parameter annotated @Disposes, or has a parameter annotated @Observes, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ </section>
+
+ <section id="3.9.2" title="Declaring an initializer method using XML">
+
+ <assertion id="a">
+ <text>For a bean defined in XML, an initializer method may be declared using the method name, the <Initializer> element and the parameter types of the method</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>When an initializer method is declared in XML, the container ignores binding annotations applied to the Java method parameters</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If the bean class of a bean declared in XML does not have a method with the name and parameter types declared in XML, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+ </section>
+
+ <section id="3.9.3" title="Initializer method parameters">
+ <assertion id="a">
+ <text>An initializer method may have any number of parameters. If the initializer method has parameters, the container calls Manager.getInstanceToInject() to determine a value for each parameter and calls the initializer method with those parameter values</text>
+ </assertion>
+ </section>
+
+ <section id="3.10" title="Support for Common Annotations">
+ <assertion id="a">
+ <text>Dependency injection via @EJB, @Resource, @PersistenceUnit and @PersistenceContext is provided by the container when annotations are applied to the bean class of a simple bean</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>@PostConstruct and @PreDestroy callbacks are provided by the container when annotations are applied to the bean class of a simple bean</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>Interception, as defined in javax.interceptor is provided by the container when annotations are applied to the bean class of a simple bean</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>@PersistenceContext(type=EXTENDED) is not supported for simple beans</text>
+ </assertion>
+ </section>
+
+ <section id="3.11" title="The Bean object for a bean">
+ <assertion id="a">
+ <text>Concrete subclasses of Bean must implement the operations defined by the Contextual interface defined in Section 6.1, "The Contextual interface".</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>An instance of Bean exists for every enabled bean in a deployment</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>An application or third party framework may add support for new kinds of beans beyond those defined by the this specification (simple beans, session beans, producer methods and fields, resources and JMS resources) by extending Bean and registering beans with the container, using the mechanism defined in Section 11.3, "Bean registration".</text>
+ </assertion>
+ </section>
+
+ <section id="4" title="Inheritance, specialization and realization">
+
+ </section>
+
+ <section id="4.1" title="Inheritance of type-level metadata">
+
+ <assertion id="a">
+ <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X is annotated with a binding type, stereotype or interceptor binding type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares an annotation of type Z.</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X is annotated with a scope type Z then Y inherits the annotation if and only if Z declares the @Inherited metaannotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares a scope type.</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X is annotated with a deployment type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares a deployment type.</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, the scope types and deployment types explicitly declared by and inherited from the class X take precedence over default scopes and deployment types declared by stereotypes.</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X is annotated with a binding type, stereotype or interceptor binding type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and Y does not explicitly declare an annotation of type Z using XML.</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X is annotated with a scope type Z then Y inherits the annotation if and only if Z declares the @Inherited metaannotation and Y does not explicitly declare a scope type using XML.</text>
+ </assertion>
+
+ <assertion id="g">
+ <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X is annotated with a deployment type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and Y does not explicitly declare a deployment type using XML.</text>
+ </assertion>
+
+ <assertion id="h">
+ <text>For class X which is the bean class of a simple or session bean Y declared using XML, the scope types and deployment types explicitly declared by and inherited from the class X take precedence over default scope and deployment types declared by stereotypes.</text>
+ </assertion>
+
+ <assertion id="i">
+ <text>For annotations defined by the bean specification, all built-in scope types are declared @Inherited</text>
+ </assertion>
+
+ <assertion id="j">
+ <text>For annotations defined by the bean specification, all built-in stereotypes are declared @Inherited</text>
+ </assertion>
+
+ <assertion id="k">
+ <text>For annotations defined by the bean specification, no built-in binding type is declared @Inherited</text>
+ </assertion>
+
+ <assertion id="l">
+ <text>For annotations defined by the bean specification, the built-in deployment type is not declared @Inherited</text>
+ </assertion>
+
+ <assertion id="m">
+ <text>the @Named annotation is not declared @Inherited and bean names are not inherited unless specialization is used</text>
+ </assertion>
+
+ </section>
+
+ <section id="4.2" title="Inheritance of member-level metadata">
+ <assertion id="a">
+ <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X declares an injected field x then Y inherits x.</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X declares an initializer method, @PostConstruct method or @PreDestroy method x() then Y inherits x() if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x()</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X declares a non-static method x() annotated with an interceptor binding type Z then Y inherits the binding if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x().</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X declares a non-static producer, disposal, or observer method x() then Y does not inherit this method unless Y is explicitly declared to specialize or realize X</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X declares a non-static producer field x then Y does not inherit this field unless Y is explicitly declared to specialize or realize X.</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if Y is a decorator and X declares a delegate attribute x then Y inherits x if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y defines a delegate attribute</text>
+ </assertion>
+
+ <assertion id="g">
+ <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X declares an injected field x then Y inherits x, unless Y explicitly declares x using XML.</text>
+ </assertion>
+
+ <assertion id="h">
+ <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X declares an initializer method, @PostConstruct method or @PreDestroy method x() then Y inherits x(), unless Y explicitly declares x() using XML</text>
+ </assertion>
+
+ <assertion id="i">
+ <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X declares a non-static method x() annotated with an interceptor binding type Z then Y inherits the binding, unless Y explicitly declares x() using XML.</text>
+ </assertion>
+
+ <assertion id="j">
+ <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X declares a non-static producer, disposal, or observer method x() then Y does not inherit this method, unless Y is explicitly declared to specialize or realize X.</text>
+ </assertion>
+
+ <assertion id="k">
+ <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X declares a non-static producer field x then Y does not inherit this method, unless Y is explicitly declared to specialize or realize X.</text>
+ </assertion>
+
+ <assertion id="l">
+ <text>For class X which is the bean class of a simple or session bean Y declared using XML, if Y is a decorator and X declares a delegate attribute x then Y inherits x, unless Y explicitly declares a delegate attribute using XML.</text>
+ </assertion>
+ </section>
+
+ <section id="4.3" title="Specialization">
+
+ <assertion id="a">
+ <text>If two beans both support a certain bean type, and share at least one binding, then they are both eligible for injection to any injection point with that declared type and binding. The container will choose the bean with the highest priority enabled deployment type.</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>If the bean with the lower priority deployment type declares a binding that is not declared by the bean with the higher priority deployment type, then the bean with the higher priority deployment type will not be eligible for injection to an injection point with that binding.</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>The only way one bean can completely override a lower-priority bean at all injection points is if it implements all the bean types and declares all the bindings of the lower-priority bean. However, if the lower-priority bean declares a producer method, then even this is not enough to ensure that the lower-priority bean is never called</text>
+ </assertion>
+
+ </section>
+
+ <section id="4.3.1" title="Using specialization">
+
+ <assertion id="a">
+ <text>A bean declared using annotations may declare that it specializes a lower-priority bean using the @Specializes annotation</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>A bean declared using XML may declare that it specializes a lower-priority bean using the <Specializes> element</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>The bindings of a bean X that specializes a lower-priority bean Y include all bindings of Y, together with all bindings declared explicitly by X.</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>If a bean X specializes a lower-priority bean Y with a name, the name of X is the same as the name of Y. If X declares a name explicitly, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>When an enabled bean specializes a lower-priority bean, we can be certain that the lower-priority bean is never instantiated or called by the container. Even if the lower-priority bean defines a producer method, the method will be called upon an instance of the first bean</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>Specialization applies only to simple beans, as defined in Section 3.2.7, "Specializing a simple bean", session beans, as defined in Section 3.3.7, "Specializing a session bean" and producer methods, as defined in Section 3.4.5, "Specializing a producer method".</text>
+ </assertion>
+ </section>
+
+ <section id="4.3.2" title="Direct and indirect specialization">
+ <assertion id="a">
+ <text>The @javax.inject.Specializes annotation or <Specializes> XML element is used to indicate that one bean directly specializes another bean</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>A bean X is said to specialize another bean Y if X directly specializes Y, or a bean Z exists, such that X directly specializes Z and Z specializes Y</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>Any non-static producer methods (see Section 3.4, "Producer methods"), producer fields (see Section 3.5, "Producer fields"), disposal methods (see Section 3.4.6, "Disposal methods") or observer methods (see Section 7.5, "Observer methods") of any bean are invoked upon an instance of the most specialized enabled bean that specializes the bean, as defined by Section 6.7, "Lifecycle of producer methods", Section 6.8, "Lifecycle of producer fields" and Section 7.4, "Observer notification".</text>
+ </assertion>
+ </section>
+
+ <section id="4.3.3" title="Inconsistent specialization">
+ <assertion id="a">
+ <text>If, in a particular deployment, either some enabled bean X specializes another enabled bean Y and X does not have a higher precedence than Y, or more than one enabled bean directly specializes the same bean we say that inconsistent specialization exists, and an InconsistentSpecializationException is thrown by the container at deployment time</text>
+ </assertion>
+ </section>
+
+ <section id="4.4" title="Realization">
+ <assertion id="a">
+ <text>Any bean that extends a generic class may directly extend the generic class, in the case of a bean declared using annotations</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>Any bean that extends a generic class may declare that the generic class is the bean class, in the case of a bean declared using XML, and then explicitly declare that it realizes the generic class.</text>
+ </assertion>
+
+ </section>
+
+ <section id="4.4.1" title="Using realization">
+ <assertion id="a">
+ <text>A bean declared using annotations may declare that it realizes a generic class by annotating the bean class with the @javax.inject.Realizes annotation</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>A bean declared using XML may declare that it realizes a generic class using the <Realizes> element.</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If a generic class Y declares a non-static producer method or field with a certain combination of scope, stereotypes, bindings and interceptor bindings, then every bean X that realizes Y also has a producer method or field with the same scope, stereotypes and interceptor bindings. The bindings for this inherited producer method or field consist of all bindings declared by the producer method or field of Y, excluding all bindings of Y, together with the bindings declared explicitly by X. The deployment type of the inherited producer method or field is the deployment type of X</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>If a generic class Y declares a non-static disposal method with a disposed parameter with a certain combination of bindings, then every bean X that realizes Y also has a disposal method. The bindings of the disposed parameter of this
+inherited disposal method consist of all bindings declared by the disposed parameter of the disposal method of Y, excluding all bindings of Y, together with the bindings declared explicitly by X.</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>If a generic class Y declares a non-static observer method with an event parameter with a certain combination of event bindings, then every bean X that realizes Y also has an observer method. The event bindings of the event parameter of
+this inherited observer method consist of all event bindings declared by the event parameter of the observer method of Y.</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>Realization applies only to simple beans and session beans</text>
+ </assertion>
+ </section>
+
+ <section id="5" title="Lookup, dependency injection and EL resolution">
+ <assertion id="a">
+ <text>The container is required to ensure that any injected reference to a contextual instance of a bean may be cast to any bean type of the bean.</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>The container is required to support circularities in the bean dependency graph</text>
+ </assertion>
+ </section>
+
+ <section id="5.1" title="Unsatisfied and ambiguous dependencies">
+ <assertion id="a">
+ <text>The container must validate all injection points of all enabled beans at deployment time to ensure that there are no unsatisfied or ambiguous dependencies. If an unsatisfied or ambiguous dependency exists, an UnsatisfiedDependencyException
+or AmbiguousDependencyException is thrown by the container at deployment time, as defined in Section 5.7.1, "Resolving dependencies".</text>
+ </assertion>
+ </section>
+
+ <section id="5.2" title="Primitive types and null values">
+ <assertion id="a">
+ <text>If an injection point of primitive type resolves to a bean that may be null, such as a producer method with a nonprimitive return type or a producer field with a non-primitive type, a NullableDependencyException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>The method Bean.isNullable() may be used to detect if a bean has null values</text>
+ </assertion>
+ </section>
+
+ <section id="5.3" title="Injected reference validity">
+ <assertion id="a">
+ <text>Any reference to a bean with a normal scope is valid as long as the application maintains a hard reference to it. However, it may only be invoked when the context associated with the normal scope is active. If it is invoked when the context is inactive, a ContextNotActiveException is thrown by the container</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>Any reference to a bean with a pseudo-scope (such as @Dependent) is valid until the bean instance to which it refers is destroyed. It may be invoked even if the context associated with the pseudo-scope is not active. If the application invokes a method of a reference to an instance that has already been destroyed, the behavior is undefined</text>
+ </assertion>
+ </section>
+
+ <section id="5.4" title="Client proxies">
+
+ </section>
+
+ <section id="5.4.1" title="Unproxyable bean types">
+
+ </section>
+
+ <section id="5.4.2" title="Client proxy invocation">
+
+ </section>
+
+ <section id="5.5" title="The default binding at injection points">
+
+ </section>
+
+ <section id="5.6" title="Injection point metadata">
+
+ </section>
+
+ <section id="5.6.1" title="Injecting InjectionPoint">
+
+ </section>
+
+ <section id="5.7" title="The Manager object">
+
+ </section>
+
+ <section id="5.7.1" title="Resolving dependencies">
+
+ </section>
+
+ <section id="5.7.2" title="Obtaining contextual instances">
+
+ </section>
+
+ <section id="5.8" title="Dynamic lookup">
+
+ </section>
+
+ <section id="5.9" title="Typesafe resolution algorithm">
+
+ </section>
+
+
+
+
+</specification>
Copied: tck/trunk/impl/src/main/resources/tck-tests.xml (from rev 1513, tck/trunk/impl/src/main/resources/tck-unit-tests.xml)
===================================================================
--- tck/trunk/impl/src/main/resources/tck-tests.xml (rev 0)
+++ tck/trunk/impl/src/main/resources/tck-tests.xml 2009-02-14 23:19:09 UTC (rev 1514)
@@ -0,0 +1,46 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
+
+<suite name="JSR-299 TCK" verbose="2" >
+ <test name="JSR-299 TCK" >
+ <method-selectors>
+ <method-selector>
+ <selector-class name="org.jboss.jsr299.tck.impl.testng.DisableIntegrationTestsMethodSelector" />
+ </method-selector>
+ </method-selectors>
+ <groups >
+ <run>
+<!--
+ <exclude name="specialization" />
+ <exclude name="deployment" />
+ <exclude name="disposalMethod" />
+
+ <exclude name="observerMethod" />
+ <exclude name="deferredEvent" />
+ <exclude name="ejb3" />
+ <exclude name="webservice" />
+ <exclude name="annotationDefinition" />
+ <exclude name="webbeansxml" />
+ <exclude name="el" />
+ <exclude name="jms" />
+ <exclude name="interceptors" />
+ <exclude name="decorators" />
+ <exclude name="servlet" />
+
+ <exclude name="passivation" />
+ <exclude name="singletons" />
+ <exclude name="ejbjarxml" />
+ <exclude name="beanDestruction" />
+ <exclude name="commonAnnotations" />
+-->
+ <exclude name="stub" />
+ <exclude name="broken" />
+ <exclude name="underInvestigation" />
+ </run>
+ </groups>
+ <packages>
+ <package name="org.jboss.jsr299.tck.unit" />
+ <package name="org.jboss.jsr299.tck.integration" />
+ </packages>
+ </test>
+
+</suite>
\ No newline at end of file
Deleted: tck/trunk/impl/src/main/resources/tck-unit-tests.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-unit-tests.xml 2009-02-14 02:10:10 UTC (rev 1513)
+++ tck/trunk/impl/src/main/resources/tck-unit-tests.xml 2009-02-14 23:19:09 UTC (rev 1514)
@@ -1,42 +0,0 @@
-<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
-
-<suite name="JSR-299 TCK" verbose="2" >
-
- <test name="JSR-299 TCK" >
- <groups >
- <run>
-<!--
- <exclude name="specialization" />
- <exclude name="deployment" />
- <exclude name="disposalMethod" />
-
- <exclude name="observerMethod" />
- <exclude name="deferredEvent" />
- <exclude name="ejb3" />
- <exclude name="webservice" />
- <exclude name="annotationDefinition" />
- <exclude name="webbeansxml" />
- <exclude name="el" />
- <exclude name="jms" />
- <exclude name="interceptors" />
- <exclude name="decorators" />
- <exclude name="servlet" />
-
- <exclude name="passivation" />
- <exclude name="singletons" />
- <exclude name="ejbjarxml" />
- <exclude name="beanDestruction" />
- <exclude name="commonAnnotations" />
--->
- <exclude name="stub" />
- <exclude name="broken" />
- <exclude name="underInvestigation" />
- </run>
- </groups>
- <packages>
- <package name="org.jboss.jsr299.tck.unit" />
- <package name="org.jboss.jsr299.tck.integration" />
- </packages>
- </test>
-
-</suite>
\ No newline at end of file
Deleted: tck/trunk/impl/tck-audit.xml
===================================================================
--- tck/trunk/impl/tck-audit.xml 2009-02-14 02:10:10 UTC (rev 1513)
+++ tck/trunk/impl/tck-audit.xml 2009-02-14 23:19:09 UTC (rev 1514)
@@ -1,1654 +0,0 @@
-<specification xmlns="http://jboss.com/products/webbeans/tck/audit"
- name="JSR-299: Java Contexts and Dependency Injection"
- version="Revised Public Review Draft">
-
- <section id="2" title="Bean definition">
-
- <assertion id="a">
- <text>A bean comprises of a (nonempty) set of bean types</text>
- </assertion>
-
- <assertion id="b">
- <text>A bean comprises of a (nonempty) set of bindings</text>
- </assertion>
-
- <assertion id="c">
- <text>A bean comprises of a scope</text>
- </assertion>
-
- <assertion id="d">
- <text>A bean comprises of a deployment type</text>
- </assertion>
-
- <assertion id="e">
- <text>A bean comprises of an optional bean name</text>
- </assertion>
-
- <assertion id="f">
- <text>A bean comprises of a set of interceptor bindings</text>
- </assertion>
-
- <assertion id="g">
- <text>A bean comprises of a bean implementation</text>
- </assertion>
- </section>
-
- <section id="2.2" title="Bean types">
-
- <assertion id="a">
- <text>A bean may have multiple bean types</text>
- </assertion>
-
- <assertion id="b">
- <text>A bean type may be a parameterized type with an actual type parameter. For the purposes of the typesafe resolution algorithm defined in Section 5.9, "Typesafe resolution algorithm", parameterized bean types are considered identical by the container only if both the type and the type parameters (if any) are identical</text>
- </assertion>
-
- <assertion id="c">
- <text>Bean types may not declare a type variable or wildcard. If the type of an injection point is a parameterized type with a type variable or wildcard, a DefinitionException is thrown by the container at deployment time.</text>
- </assertion>
-
- <assertion id="d">
- <text>A bean type may be an interface</text>
- </assertion>
-
- <assertion id="e">
- <text>A bean type may be a concrete class</text>
- </assertion>
-
- <assertion id="f">
- <text>A bean type may be an abstract class</text>
- </assertion>
-
- <assertion id="g">
- <text>A bean type may be declared final</text>
- </assertion>
-
- <assertion id="h">
- <text>A bean type may have final methods</text>
- </assertion>
-
- <assertion id="i">
- <text>A bean type may be an array type. Two array types are considered identical only if the element type is identical</text>
- </assertion>
-
- <assertion id="j">
- <text>A bean type may be a primitive types. Primitive types are considered to be identical to their corresponding wrapper types in java.lang.</text>
- </assertion>
-
- <assertion id="k">
- <text>All beans have the bean type java.lang.Object</text>
- </assertion>
-
- <assertion id="l">
- <text>A client of a bean may typecast its reference to any instance of the bean to any bean type of the bean</text>
- </assertion>
-
- </section>
-
- <section id="2.3.1" title="Default binding type">
-
- <assertion id="a">
- <text>If a bean does not explicitly declare a binding, the bean has exactly one binding, of type @javax.inject.Current</text>
- </assertion>
-
- <assertion id="b">
- <text>The default binding is also assumed for any injection point that does not explicitly declare a binding</text>
- </assertion>
- </section>
-
- <section id="2.3.2" title="Defining new binding types">
- <assertion id="a">
- <text>A binding type is a Java annotation defined as @Target({METHOD, FIELD, PARAMETER, TYPE}) and @Retention(RUNTIME).</text>
- </assertion>
-
- <assertion id="b">
- <text>A binding type may be declared by specifying the @javax.inject.BindingType meta-annotation</text>
- </assertion>
-
- <assertion id="c">
- <text>The @BindingType meta-annotation may be omitted, and the binding type may be declared in beans.xml</text>
- </assertion>
-
- <assertion id="d">
- <text>A binding type may define annotation members</text>
- </assertion>
- </section>
-
- <section id="2.3.3" title="Declaring the bindings of a bean using annotations">
-
- <assertion id="a">
- <text>A bean's bindings are declared by annotating the bean class or producer method or field with the binding types</text>
- </assertion>
-
- <assertion id="b">
- <text>Any bean may declare multiple binding types</text>
- </assertion>
- </section>
-
- <section id="2.3.4" title="Declaring the bindings of a bean using XML">
-
- <assertion id="a">
- <text>If a bean is declared in beans.xml, bindings may be specified using the binding type names</text>
- </assertion>
-
- </section>
-
- <section id="2.3.5" title="Specifying bindings of an injected field">
-
- <assertion id="a">
- <text>Binding types may be applied to injected fields (see Section 3.8, "Injected fields") to determine the bean that is injected, according to the typesafe resolution algorithm defined in Section 5.9, "Typesafe resolution algorithm".</text>
- </assertion>
-
- <assertion id="b">
- <text>A bean may only be injected to an injection point if it has all the bindings of the injection point</text>
- </assertion>
-
- <assertion id="c">
- <text>For a bean defined in XML, the bindings of a field may be specified using XML</text>
- </assertion>
-
- <assertion id="d">
- <text>When the bindings of a field are specified using XML, any binding annotations of the field are ignored</text>
- </assertion>
- </section>
-
- <section id="2.3.6" title="Specifying bindings of a method or constructor parameter">
- <assertion id="a">
- <text>Binding types may be applied to parameters of producer methods, initializer methods, disposal methods or bean constructors (see Chapter 3, Bean implementation) to determine the bean instance that is passed when the method is called by the container</text>
- </assertion>
-
- <assertion id="b">
- <text>For a bean defined in XML, the bindings of a method parameter may be specified using XML</text>
- </assertion>
-
- <assertion id="c">
- <text>When the bindings of a parameter are specified using XML, any binding annotations of the parameter are ignored</text>
- </assertion>
- </section>
-
- <section id="2.4" title="Scopes">
-
- <assertion id="a">
- <text>All beans have a scope</text>
- </assertion>
-
- <assertion id="b">
- <text>A scope type is represented by an annotation type.</text>
- </assertion>
-
- <assertion id="c">
- <text>The set of scope types is extensible</text>
- </assertion>
-
- </section>
-
- <section id="2.5.1" title="Built-in deployment types">
-
- <assertion id="a">
- <text>All standard beans defined by this specification, and provided by the container, are defined using the @Standard deployment type</text>
- </assertion>
-
- <assertion id="b">
- <text>No bean may be declared with the @Standard deployment type unless explicitly required by this specification</text>
- </assertion>
-
- <assertion id="c">
- <text>Application beans may be defined using the @Production deployment type</text>
- </assertion>
-
- </section>
-
- <section id="2.5.2" title="Defining new deployment types">
-
- <assertion id="a">
- <text>A deployment type is a Java annotation defined as @Target({TYPE, METHOD, FIELD})</text>
- </assertion>
-
- <assertion id="b">
- <text>A deployment type is a Java annotation defined with @Retention(RUNTIME)</text>
- </assertion>
-
- <assertion id="c">
- <text>All deployment types must also specify the @javax.inject.DeploymentType meta-annotation.</text>
- </assertion>
-
- <assertion id="d">
- <text>Applications and third-party frameworks may define their own deployment types</text>
- </assertion>
-
- </section>
-
- <section id="2.5.3" title="Declaring the deployment type of a bean using annotations">
-
- <assertion id="a">
- <text>The deployment type of the bean is declared by annotating the bean class or producer method or field</text>
- </assertion>
-
- <assertion id="b">
- <text>An bean class or producer method or field may specify at most one deployment type. If multiple deployment type annotations are specified, a DefinitionException is thrown by the container at deployment time.</text>
- </assertion>
-
- <assertion id="c">
- <text>By default, if no deployment type annotation is explicitly specified, a producer method or field inherits the deployment type of the bean in which it is defined.</text>
- </assertion>
-
- <assertion id="d">
- <text>a deployment type may be specified using a stereotype annotation, as defined in Section 2.7.2, "Declaring the stereotypes for a bean using annotations".</text>
- </assertion>
-
- </section>
-
- <section id="2.5.4" title="Declaring the deployment type of a bean using XML">
- <assertion id="a">
- <text>When a bean is declared in beans.xml, the deployment type may be specified using a tag with the annotation type name</text>
- </assertion>
-
- <assertion id="b">
- <text>If more than one deployment type is specified in XML, a DefinitionException is thrown by the container at deployment time</text>
- </assertion>
-
- <assertion id="c">
- <text>A deployment type may be specified using a stereotype declared in XML, as defined in Section 2.7.3, "Declaring the stereotypes for a bean using XML".</text>
- </assertion>
- </section>
-
- <section id="2.5.5" title="Default deployment type">
-
- <assertion id="a">
- <text>The default deployment type for a bean which does not explicitly declare a deployment type depends upon its declared stereotypes - if a bean does not declare any stereotype with a declared default deployment type, then the default deployment type is
-@Production</text>
- </assertion>
-
- <assertion id="b">
- <text>Otherwise, the default deployment type for the bean is the highest-precedence default deployment type declared by any stereotype declared by the bean</text>
- <note>This assertion relates to assertion 2.5.5.b</note>
- </assertion>
-
- <assertion id="c">
- <text>If a bean explicitly declares a deployment type, any default deployment type declared by stereotypes are ignored.</text>
- </assertion>
- </section>
-
- <section id="2.5.6" title="Enabled deployment types">
-
- <assertion id="a">
- <text>Beans declared with a deployment type that is not enabled are not available to the resolution algorithms defined in Chapter 5, Lookup, dependency injection and EL resolution.</text>
- </assertion>
-
- </section>
-
- <section id="2.6" title="Bean names">
-
- <assertion id="a">
- <text>A valid bean name is a period-separated list of valid EL identifiers</text>
- </assertion>
- </section>
-
- <section id="2.6.1" title="Declaring the bean name using annotations">
-
- <assertion id="a">
- <text>To specify the name of a bean, the @javax.annotation.Named annotation is applied to the bean class or producer method or field.</text>
- </assertion>
-
- <assertion id="b">
- <text>If the @Named annotation does not specify the value member, the default name is assumed</text>
- </assertion>
- </section>
-
- <section id="2.6.2" title="Declaring the bean name using XML">
-
- <assertion id="a">
- <text>If the bean is declared in beans.xml, the name may be specified using <Named></text>
- </assertion>
-
- <assertion id="b">
- <text>If the <Named> element is empty, the default name is assumed</text>
- </assertion>
- </section>
-
- <section id="2.6.3" title="Default bean names">
-
- <assertion id="a">
- <text>A default name must be assigned by the container when a bean class or producer method or field of a bean defined using annotations declares a @Named annotation and no name is explicitly specified by the value member</text>
- </assertion>
-
- <assertion id="b">
- <text>A default name must be assigned by the container when an empty <Named> element is specified by a bean defined in XML</text>
- </assertion>
-
- <assertion id="c">
- <text>A default name must be assigned by the container when a bean declares a stereotype that declares an empty @Named annotation, and the bean does not explicitly specify a name.</text>
- </assertion>
- </section>
-
- <section id="2.6.4" title="Beans with no name">
-
- <assertion id="a">
- <text>If neither <Named> nor @Named is specified, by the bean or its stereotypes, a bean has no name</text>
- </assertion>
- </section>
-
- <section id="2.7" title="Stereotypes">
-
- <assertion id="a">
- <text>A stereotype may also specify that all beans with the stereotype have defaulted bean names</text>
- </assertion>
-
- <assertion id="b">
- <text>A bean may declare zero, one or multiple stereotypes</text>
- </assertion>
-
- </section>
-
- <section id="3" title="Bean Implementation">
-
- </section>
-
- <section id="3.1" title="Restriction upon bean instantiation">
- <assertion id="a">
- <text>The bean class is a concrete class and is not required to implement any special interface or extend any special superclass</text>
- </assertion>
-
- <assertion id="b">
- <text>If the application calls a producer method directly, instead of letting the container call it, the returned object is not a contextual instance and the capabilities listed in Section 2.1, "Functionality provided by the container to the bean" will not be available to the returned object.</text>
- </assertion>
- </section>
-
- <section id="3.2" title="Simple beans">
- <assertion id="a">
- <text>The bean class of a simple bean may not be a non-static inner class or a parameterized type</text>
- </assertion>
-
- <assertion id="b">
- <text>The bean class of a simple bean may not be an abstract class, unless the simple bean is a decorator</text>
- </assertion>
-
- <assertion id="c">
- <text>If the bean class of a simple bean is annotated with both the @Interceptor and @Decorator stereotypes, a DefinitionException is thrown by the container at deployment time.</text>
- </assertion>
-
- <assertion id="d">
- <text>Multiple simple beans may share the same bean class. This occurs when beans are defined using XML. Only one simple bean per bean class may be defined using annotations.</text>
- </assertion>
-
- <assertion id="e">
- <text>If a simple bean has a public field, it must have scope @Dependent. If a simple bean with a public field declares any scope other than @Dependent, a DefinitionException is thrown by the container at deployment time.</text>
- </assertion>
-
- </section>
-
- <section id="3.2.1" title="Which Java classes are beans?">
- <assertion id="a">
- <text>A top-level Java class is not a simple bean if it is a parameterized type</text>
- </assertion>
- <assertion id="b">
- <text>A top-level Java class is not a simple bean if it is a non-static inner class</text>
- </assertion>
- <assertion id="c">
- <text>A top-level Java class is only a simple bean if it is a concrete class, or annotated @Decorator.</text>
- </assertion>
- <assertion id="d">
- <text>A top-level Java class is not a simple bean if it is annotated with the JPA @Entity annotation</text>
- </assertion>
- <assertion id="e">
- <text>A top-level Java class is not a simple bean if it is annotated with any of the EJB component-defining annotations</text>
- </assertion>
- <assertion id="f">
- <text>A top-level Java class is not a simple bean if it implements the javax.servlet.Servlet interface</text>
- </assertion>
- <assertion id="g">
- <text>A top-level Java class is not a simple bean if it implements the javax.servlet.Filter interface</text>
- </assertion>
- <assertion id="h">
- <text>A top-level Java class is not a simple bean if it implements the javax.servlet.ServletContextListener interface</text>
- </assertion>
- <assertion id="i">
- <text>A top-level Java class is not a simple bean if it implements the javax.servlet.http.HttpSessionListener interface</text>
- </assertion>
- <assertion id="j">
- <text>A top-level Java class is not a simple bean if it implements the javax.servlet.ServletRequestListener interface</text>
- </assertion>
- <assertion id="k">
- <text>A top-level Java class is not a simple bean if it implements the javax.ejb.EnterpriseBean interface</text>
- </assertion>
- <assertion id="l">
- <text>A top-level Java class is not a simple bean if it extends javax.faces.component.UIComponent</text>
- </assertion>
- <assertion id="m">
- <text>A top-level Java class is not a simple bean if it is declared as an EJB bean class in ejb-jar.xml</text>
- </assertion>
- <assertion id="n">
- <text>A top-level Java class is not a simple bean if it is declared as a JPA entity in orm.xml</text>
- </assertion>
- <assertion id="o">
- <text>A top-level Java class is only a simple bean if it has an appropriate constructor - either a constructor with no parameters, or declares a constructor annotated @Initializer</text>
- </assertion>
- <assertion id="p">
- <text>Additional simple beans with the same bean class may be defined using XML, by specifying the class in beans.xml.</text>
- </assertion>
-
- </section>
-
- <section id="3.2.2" title="Bean types of a simple bean">
- <assertion id="a">
- <text>The set of bean types for a simple bean contains the bean class, every superclass and all interfaces it implements directly or indirectly.</text>
- </assertion>
- </section>
-
- <section id="3.2.3" title="Declaring a simple bean using annotations">
- <assertion id="a">
- <text>A simple bean with a constructor that takes no parameters does not require any special annotations</text>
- </assertion>
-
- <assertion id="b">
- <text>A bean class may also specify a scope, name, deployment type, stereotypes and/or bindings</text>
- </assertion>
-
- <assertion id="c">
- <text>A simple bean may extend another simple bean</text>
- </assertion>
- </section>
-
- <section id="3.2.4" title="Declaring a simple bean using XML">
- <assertion id="a">
- <text>Simple beans may be declared in beans.xml using the bean class name</text>
- </assertion>
-
- <assertion id="b">
- <text>A simple bean may even be declared at any injection point declared in XML, as defined in Section 9.9, "Inline bean declarations", in which case no bindings are specified.</text>
- </assertion>
-
- <assertion id="c">
- <text>If the bean class of a simple bean defined in XML is a parameterized type or a non-static inner class, a DefinitionException is thrown by the container at deployment time.</text>
- </assertion>
-
- <assertion id="d">
- <text>If the bean class of a simple bean defined in XML is an abstract class, and the simple bean is not a decorator, a DefinitionException
-is thrown by the container at deployment time</text>
- </assertion>
-
- <assertion id="e">
- <text>If the bean class of a simple bean defined in XML is annotated @Interceptor, then the bean must be explicitly declared as an interceptor in XML, as defined in Section A.3.5.2, "Declaring an interceptor using XML". If a simple bean defined in XML has a bean class annotated @Interceptor and is not declared as an interceptor in XML, a DefinitionException is
-thrown by the container at deployment time.</text>
- </assertion>
-
- <assertion id="f">
- <text>If the bean class of a simple bean defined in XML is annotated @Interceptor, then the bean must be explicitly declared as an interceptor in XML, as defined in Section A.3.5.2, "Declaring an interceptor using XML". If a simple bean defined in XML has a bean class annotated @Interceptor and is not declared as an interceptor in XML, a DefinitionException is
-thrown by the container at deployment time.</text>
- </assertion>
- </section>
-
- <section id="3.2.5" title="Simple beans with the @New binding">
- <assertion id="a">
- <text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such simple bean, a second simple bean exists which has the same bean class</text>
- </assertion>
- <assertion id="b">
- <text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such simple bean, a second simple bean exists which has the same bean constructor, initializer methods and injected fields defined by annotations</text>
- </assertion>
- <assertion id="c">
- <text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such simple bean, a second simple bean exists which has the same interceptor bindings defined by annotations</text>
- </assertion>
- <assertion id="d">
- <text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such simple bean, a second simple bean exists which has scope @Dependent</text>
- </assertion>
- <assertion id="e">
- <text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such simple bean, a second simple bean exists which has deployment type @Standard</text>
- </assertion>
- <assertion id="f">
- <text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such simple bean, a second simple bean exists which has @javax.inject.New as the only binding</text>
- </assertion>
- <assertion id="g">
- <text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such simple bean, a second simple bean exists which has no bean name</text>
- </assertion>
- <assertion id="h">
- <text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such simple bean, a second simple bean exists which has no stereotypes</text>
- </assertion>
- <assertion id="i">
- <text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such simple bean, a second simple bean exists which has no observer methods, producer methods or fields or disposal methods</text>
- </assertion>
- </section>
-
- <section id="3.2.6" title="Bean constructors">
- <assertion id="a">
- <text>When the container instantiates a simple bean, it calls the bean constructor. The bean constructor is a constructor of the bean class</text>
- </assertion>
- <assertion id="b">
- <text>The application may call bean constructors directly. However, if the application directly instantiates the bean, no parameters are passed to the constructor by the container; the returned object is not bound to any context; no dependencies are injected by the container; and the lifecycle of the new instance is not managed by the container</text>
- </assertion>
- </section>
-
- <section id="3.2.6.1" title="Declaring a bean constructor using annotations">
- <assertion id="a">
- <text>The bean constructor may be identified by annotating the constructor @Initializer</text>
- </assertion>
-
- <assertion id="b">
- <text>If a simple bean defined using annotations does not explicitly declare a constructor using @Initializer, the constructor that accepts no parameters is the bean constructor</text>
- </assertion>
-
- <assertion id="c">
- <text>If a simple bean defined using annotations has more than one constructor annotated @Initializer, a DefinitionException is thrown by the container at deployment time</text>
- </assertion>
-
- <assertion id="d">
- <text>If a bean constructor has a parameter annotated @Disposes, or @Observes, a DefinitionException is thrown by the container at deployment time</text>
- </assertion>
-
- </section>
-
- <section id="3.2.6.2" title="Declaring a bean constructor using XML">
-
- <assertion id="a">
- <text>For a simple bean defined using XML, the bean constructor may be specified by listing the parameter types of the constructer, in order, as direct children of the element that declares the bean</text>
- </assertion>
-
- <assertion id="b">
- <text>If a simple bean defined using XML does not explicitly declare constructor parameters in XML, the constructor that accepts no parameters is the bean constructor</text>
- </assertion>
-
- <assertion id="c">
- <text>If a simple bean declared in XML does not have a constructor with the parameter types declared in XML, a DefinitionException is thrown by the container at deployment time</text>
- </assertion>
-
- <assertion id="d">
- <text>When a bean constructor is declared in XML, the container ignores binding annotations applied to Java constructor parameters</text>
- </assertion>
-
- </section>
-
- <section id="3.2.6.3" title="Bean constructor parameters">
- <assertion id="a">
- <text>If the bean constructor has parameters, the container calls the method Manager.getInstanceToInject() defined in Section 5.7.1, "Resolving dependencies" to determine a value for each parameter and calls the constructor with those parameter values.</text>
- </assertion>
- </section>
-
- <section id="3.2.7" title="Specializing a simple bean">
- <assertion id="a">
- <text>If a bean class of a simple bean X defined using annotations is annotated @Specializes, then the bean class of X must directly extend the bean class of another simple bean Y defined using annotations. Then X inherits all bindings of Y, and if Y has a name, X has the same name as Y.</text>
- </assertion>
-
- <assertion id="b">
- <text>We say that X directly specializes Y, and we can be certain that Y will never be instantiated or called by the container if X is enabled.</text>
- <note>This assertion relates to specialized beans declared using annotations</note>
- </assertion>
-
- <assertion id="c">
- <text>If the bean class of X does not directly extend the bean class of another simple bean, a DefinitionException is thrown by the container at deployment time.</text>
- </assertion>
-
- <assertion id="d">
- <text>If a simple bean X defined in XML declares the <Specializes> element, then the bean class of X must be the bean class of another simple bean Y defined using annotations. Then X inherits all bindings of Y, and if Y has a name, X has the same name as Y</text>
- </assertion>
-
- <assertion id="e">
- <text>We say that X directly specializes Y, and we can be certain that Y will never be instantiated or called by the container if X is enabled</text>
- <note>This assertion relates to specialized beans declared in XML</note>
- </assertion>
- </section>
-
- <section id="3.2.8" title="Default name for a simple bean">
- <assertion id="a">
- <text>The default name for a simple bean is the unqualified class name of the bean class, after converting the first character to lower case</text>
- </assertion>
- </section>
-
- <section id="3.3" title="Session beans">
- <assertion id="a">
- <text>A session bean is a bean that is implemented by an EJB 3-style session bean</text>
- </assertion>
-
- <assertion id="b">
- <text>A stateless session bean must belong to the @Dependent pseudo-scope</text>
- </assertion>
-
- <assertion id="c">
- <text>A singleton bean must belong to either the @ApplicationScoped scope or to the @Dependent pseudo-scope</text>
- </assertion>
-
- <assertion id="d">
- <text>If a session bean specifies an illegal scope, a DefinitionException is thrown by the container at deployment time</text>
- </assertion>
-
- <assertion id="e">
- <text>Note that multiple session beans may share the same bean class. This occurs when beans are defined using XML</text>
- </assertion>
-
- <assertion id="f">
- <text>If the bean class of a session bean is annotated @Interceptor or @Decorator, a DefinitionException is thrown by the container at deployment time</text>
- </assertion>
- </section>
-
- <section id="3.3.1" title="EJB remove methods of session beans">
- <assertion id="a">
- <text>If a session bean is a stateful session bean, and the scope is @Dependent, the application may call any EJB remove method of an instance of the session bean.</text>
- </assertion>
-
- <assertion id="b">
- <text>If a session bean is a stateful session bean, and the scope is not @Dependent, the application may not directly call any EJB remove method of any instance of the session bean</text>
- </assertion>
-
- <assertion id="c">
- <text>If the application directly calls an EJB remove method of an instance of a session bean that is a stateful session bean and declares any scope other than @Dependent, an UnsupportedOperationException is thrown</text>
- </assertion>
-
- <assertion id="d">
- <text>If the application directly calls an EJB remove method of an instance of a session bean that is a stateful session bean and has scope @Dependent then no parameters are passed to the method by the container. Furthermore, the container ignores the instance instead of destroying it when Bean.destroy() is called, as defined in Section 6.5, "Lifecycle of stateful session beans"</text>
- </assertion>
-
- </section>
-
- <section id="3.3.2" title="Which EJBs are beans?">
- <assertion id="a">
- <text>All session beans exposing an EJB 3.x client view and declared via an EJB component defining annotation on the EJB bean class are beans, and thus no special declaration is required. Additional beans for these EJBs may be defined using XML, by specifying the bean class in beans.xml</text>
- </assertion>
-
- <assertion id="b">
- <text>All session beans exposing an EJB 3.x client view and declared in ejb-jar.xml are also beans. Additional beans for these EJBs may be defined using XML, by specifying the bean class and EJB name in beans.xml</text>
- </assertion>
- </section>
-
- <section id="3.3.3" title="Bean types of a session bean">
-
- <assertion id="a">
- <text>The set of bean types for a session bean contains all local interfaces of the bean that do not have wildcard type parameters or type variables and their superinterfaces.</text>
- </assertion>
-
- <assertion id="b">
- <text>If the EJB has a bean class local view and the bean class is not a parameterized
-type, the set of bean types contains the bean class and all superclasses.</text>
- </assertion>
-
- <assertion id="c">
- <text>java.lang.Object is a bean type of every session bean</text>
- </assertion>
-
- <assertion id="d">
- <text>Remote interfaces are not included in the set of bean types</text>
- </assertion>
- </section>
-
- <section id="3.3.4" title="Declaring a session bean using annotations">
- <assertion id="a">
- <text>A session bean does not require any special annotations</text>
- </assertion>
-
- <assertion id="b">
- <text>A bean class may also specify a scope, name, deployment type, stereotypes and/or bindings</text>
- </assertion>
-
- <assertion id="c">
- <text>A session bean class may extend another bean class</text>
- </assertion>
- </section>
-
- <section id="3.3.5" title="Declaring a session bean using XML">
- <assertion id="a">
- <text>Session beans may be declared in beans.xml using the bean class name (for EJBs defined using a component-defining annotation) or bean class and EJB name (for EJBs defined in ejb-jar.xml)</text>
- </assertion>
-
- <assertion id="b">
- <text>The ejbName attribute declares the EJB name of an EJB defined in ejb-jar.xml</text>
- </assertion>
-
- <assertion id="c">
- <text>If an entity or message-driven bean class is declared in XML, a DefinitionException is thrown by the container at deployment time</text>
- </assertion>
- </section>
-
- <section id="3.3.6" title="Session beans with the @New binding">
-
- <assertion id="a">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such session bean, a second bean exists which has the same bean class</text>
- </assertion>
-
- <assertion id="b">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such session bean, a second bean exists which has the initializer methods and injected fields defined by annotations</text>
- </assertion>
-
- <assertion id="c">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such session bean, a second bean exists which has the same interceptor bindings defined by annotations</text>
- </assertion>
-
- <assertion id="d">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such session bean, a second bean exists which has scope @Dependent,</text>
- </assertion>
-
- <assertion id="e">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such session bean, a second bean exists which has deployment type @Standard</text>
- </assertion>
-
- <assertion id="f">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such session bean, a second bean exists which has @javax.inject.New as the only binding</text>
- </assertion>
-
- <assertion id="g">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such session bean, a second bean exists which has no bean name</text>
- </assertion>
-
- <assertion id="h">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such session bean, a second bean exists which has no stereotypes</text>
- </assertion>
-
- <assertion id="i">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such session bean, a second bean exists which has no observer methods, producer methods or fields or disposal methods</text>
- </assertion>
- </section>
-
- <section id="3.3.7" title="Specializing a session bean">
-
- <assertion id="a">
- <text>If a bean class of a session bean X defined using annotations is annotated @Specializes, then the bean class of X must directly extend the bean class of another session bean Y defined using annotations. Then X inherits all bindings of Y, and if Y has a name, X has the same name as Y. Also, X must support all local interfaces supported by Y, and
-if Y supports a bean-class local view, X must also support a bean-class local view.
-Otherwise, a DefinitionException is thrown by the container at deployment time.</text>
- </assertion>
-
- <assertion id="b">
- <text>We say that X directly specializes Y, and we can be certain that Y will never be instantiated or called by the container if X is enabled</text>
- </assertion>
-
- <assertion id="c">
- <text>If the bean class of X does not directly extend the bean class of another session bean, a DefinitionException is thrown by the container at deployment time</text>
- </assertion>
-
- <assertion id="d">
- <text>If a session bean X defined in XML declares the <Specializes> element, then the bean class of X must be the bean class of another session bean Y defined using annotations. Then X inherits all bindings of Y, and if Y has a name, X has the same name as Y.</text>
- </assertion>
- </section>
-
- <section id="3.3.8" title="Default name for a session bean">
- <assertion id="a">
- <text>The default name for a session bean is the unqualified class name of the bean class, after converting the first character to lower case</text>
- </assertion>
- </section>
-
- <section id="3.3.9" title="Session bean proxies">
- <assertion id="a">
- <text>EJB local object references do not implement all local interfaces of the EJB. A local object reference may not be typecast to different local interface type, as required by Section 2.2, "Bean types". Therefore, the container proxies the local object reference. A session bean proxy implements all local interfaces of the EJB.</text>
- </assertion>
-
- <assertion id="b">
- <text>All session bean proxies must be serializable</text>
- </assertion>
- </section>
-
- <section id="3.4" title="Producer methods">
- <assertion id="a">
- <text>A producer method must be a method of a simple bean class or session bean class</text>
- </assertion>
-
- <assertion id="b">
- <text>A producer method may be either static or non-static</text>
- </assertion>
-
- <assertion id="c">
- <text>If the bean is a session bean, the producer method must be either a business method of the EJB or a static method of the bean class</text>
- </assertion>
-
- <assertion id="d">
- <text>If a producer method sometimes returns a null value, then the producer method must have scope @Dependent</text>
- </assertion>
-
- <assertion id="e">
- <text>If a producer method returns a null value at runtime, and the producer method declares any other scope, an IllegalProductException is thrown by the container. This restriction allows the container to use a client proxy, as defined in Section 5.4, "Client proxies".</text>
- </assertion>
-
- <assertion id="f">
- <text>If the producer method return type is a parameterized type, it must specify actual type parameters for each type parameter</text>
- </assertion>
-
- <assertion id="g">
- <text>If a producer method return type contains a wildcard type parameter or type variable, a DefinitionException is thrown by the container at deployment time</text>
- </assertion>
-
- <assertion id="h">
- <text>The application may call producer methods directly. However, if the application calls a producer method directly, no parameters will be passed to the producer method by the container; the returned object is not bound to any context; and its lifecycle is not managed by the container</text>
- </assertion>
-
- <assertion id="i">
- <text>A bean may declare multiple producer methods</text>
- </assertion>
- </section>
-
- <section id="3.4.1" title="Bean types of a producer method">
-
- <assertion id="a">
- <text>If the return type of a producer method is an interface, the set of bean types contains the return type, all interfaces it extends directly or indirectly and java.lang.Object</text>
- </assertion>
-
- <assertion id="b">
- <text>If a return type of a producer method is primitive or is a Java array type, the set of bean types contains exactly two types: the method return type and java.lang.Object</text>
- </assertion>
-
- <assertion id="c">
- <text>If the return type of a producer method is a class, the set of bean types contains the return type, every superclass and all interfaces it implements directly or indirectly</text>
- </assertion>
- </section>
-
- <section id="3.4.2" title="Declaring a producer method using annotations">
-
- <assertion id="a">
- <text>A producer method may be declared by annotating a method with the @javax.inject.Produces annotation</text>
- </assertion>
-
- <assertion id="b">
- <text>A producer method may also specify scope, name, deployment type, stereotypes and/or bindings</text>
- </assertion>
-
- <assertion id="c">
- <text>If a producer method is annotated @Initializer, has a parameter annotated @Disposes, or has a parameter annotated @Observes, a DefinitionException is thrown by the container at deployment time</text>
- </assertion>
-
- <assertion id="d">
- <text>If a non-static method of a session bean class is annotated @Produces, and the method is not a business method of the EJB, a DefinitionException is thrown by the container at deployment time</text>
- </assertion>
- </section>
-
- <section id="3.4.3" title="Declaring a producer method using XML">
-
- <assertion id="a">
- <text>For a bean defined in XML, a producer method may be declared using the method name, the <Produces> element, the return type, and the parameter types of the method</text>
- </assertion>
-
- <assertion id="b">
- <text>When a producer method is declared in XML, the container ignores binding annotations applied to the Java method or method parameters</text>
- </assertion>
-
- <assertion id="c">
- <text>If the bean class of a bean declared in XML does not have a method with the name and parameter types declared in XML, a DefinitionException is thrown by the container at deployment time</text>
- </assertion>
- </section>
-
- <section id="3.4.4" title="Producer method parameters">
- <assertion id="a">
- <text>If the producer method has parameters, the container calls the method Manager.getInstanceToInject() defined in Section 5.7.1, "Resolving dependencies" to determine a value for each parameter and calls the producer method with those parameter values</text>
- </assertion>
- </section>
-
- <section id="3.4.5" title="Specializing a producer method">
-
- <assertion id="a">
- <text>If a producer method X is annotated @Specializes, then it must be non-static and directly override another producer method Y. Then X inherits all bindings of Y, and if Y has a name, X has the same name as Y.</text>
- </assertion>
-
- <assertion id="b">
- <text>If the method is static or does not directly override another producer method, a DefinitionException is thrown by the container at deployment time</text>
- </assertion>
- </section>
-
- <section id="3.4.6" title="Disposal methods">
-
- <assertion id="a">
- <text>A disposal method must be a method of a simple bean class or session bean class.</text>
- </assertion>
-
- <assertion id="b">
- <text>A disposal method may be either static or non-static</text>
- </assertion>
-
- <assertion id="c">
- <text>If the bean is a session bean, the disposal method must be a business method of the EJB or a static method of the bean class</text>
- </assertion>
-
- <assertion id="d">
- <text>A bean may declare multiple disposal methods</text>
- </assertion>
- </section>
-
- <section id="3.4.7" title="Disposed parameter of a disposal method">
-
- <assertion id="a">
- <text>Each disposal method must have exactly one disposed parameter, of the same type as the corresponding producer method return type</text>
- </assertion>
-
- <assertion id="b">
- <text>When searching for disposal methods for a producer method, the container considers the type and bindings of the disposed parameter. If a disposed parameter resolves to a producer method according to the typesafe resolution algorithm, the container must call this method when destroying an instance returned by that producer method</text>
- </assertion>
-
- <assertion id="c">
- <text>If the disposed parameter does not resolve to any producer method according to the typesafe resolution algorithm, an UnsatisfiedDependencyException is thrown by the container at deployment time</text>
- </assertion>
-
- <assertion id="d">
- <text>If a disposed parameter resolves to a producer method according to the typesafe resolution algorithm, the container must call this method when destroying an instance returned by that producer method</text>
- </assertion>
- </section>
-
- <section id="3.4.8" title="Declaring a disposal method using annotations">
-
- <assertion id="a">
- <text>A disposal method may be declared using annotations by annotating a parameter @javax.inject.Disposes. That parameter is the disposed parameter</text>
- </assertion>
-
- <assertion id="b">
- <text>If a method has more than one parameter annotated @Disposes, a DefinitionException is thrown by the container</text>
- </assertion>
-
- <assertion id="c">
- <text>If a disposal method is annotated @Produces, a DefinitionException is thrown by the container at deployment time</text>
- </assertion>
-
- <assertion id="d">
- <text>If a disposal method is annotated @Initializer, a DefinitionException is thrown by the container at deployment time</text>
- </assertion>
-
- <assertion id="e">
- <text>If a disposal method has a parameter annotated @Observes, a DefinitionException is thrown by the container at deployment time</text>
- </assertion>
-
- <assertion id="f">
- <text>If a non-static method of a session bean class has a parameter annotated @Disposes, and the method is not a business method of the EJB, a DefinitionException is thrown by the container at deployment time</text>
- </assertion>
- </section>
-
- <section id="3.4.9" title="Declaring a disposal method using XML">
-
- <assertion id="a">
- <text>For a bean defined in XML, a disposal method may be declared using the method name, the <Disposes> element, and the parameter types of the method</text>
- </assertion>
-
- <assertion id="b">
- <text>When a disposal method is declared in XML, the container ignores binding annotations applied to the Java method parameter</text>
- </assertion>
-
- <assertion id="c">
- <text>If the bean class of a bean declared in XML does not have a method with the name and parameter types declared in XML, a DefinitionException is thrown by the container at deployment time</text>
- </assertion>
- </section>
-
- <section id="3.4.10" title="Disposal method parameters">
-
- <assertion id="a">
- <text>In addition to the disposed parameter, a disposal method may declare additional parameters, which may also specify bindings. The container calls Manager.getInstanceToInject() to determine a value for each parameter of a disposal method and calls the disposal method with those parameter values</text>
- </assertion>
- </section>
-
- <section id="3.4.11" title="Disposal method resolution">
-
- <assertion id="a">
- <text>When searching for disposal methods for a producer method, the container searches for disposal methods which are declared by an enabled bean, and for which the disposed parameter must resolve to the producer method, according to the typesafe resolution algorithm</text>
- </assertion>
-
- <assertion id="b">
- <text>If there are multiple disposal methods for a producer method, a DefinitionException is thrown by the container at deployment time</text>
- </assertion>
- </section>
-
- <section id="3.4.12" title="Default name for a producer method">
-
- <assertion id="a">
- <text>The default name for a producer method is the method name, unless the method follows the JavaBeans property getter naming convention, in which case the default name is the JavaBeans property name</text>
- </assertion>
- </section>
-
- <section id="3.5" title="Producer fields">
-
- <assertion id="a">
- <text>A producer field must be a field of a simple bean class or session bean class</text>
- </assertion>
-
- <assertion id="b">
- <text>A producer field may be either static or nonstatic</text>
- </assertion>
-
- <assertion id="c">
- <text>If a producer field sometimes contains a null value when accessed, then the producer field must have scope @Dependent</text>
- </assertion>
-
- <assertion id="d">
- <text>If a producer method contains a null value at runtime, and the producer field declares any other scope, an IllegalProductException is thrown by the container. This restriction allows the container to use a client proxy, as defined in Section 5.4, "Client proxies"</text>
- </assertion>
-
- <assertion id="e">
- <text>If the producer field return type is a parameterized type, it must specify actual type parameters for each type parameter</text>
- </assertion>
-
- <assertion id="f">
- <text>If a producer field return type contains a wildcard type parameter or type variable, a DefinitionException is thrown by the container at deployment time</text>
- </assertion>
-
- <assertion id="g">
- <text>The application may access producer fields directly. However, if the application accesses a producer field directly, the returned object is not bound to any context; and its lifecycle is not managed by the container</text>
- </assertion>
-
- <assertion id="h">
- <text>A bean may declare multiple producer fields</text>
- </assertion>
- </section>
-
- <section id="3.5.1" title="Bean types of a producer field">
-
- <assertion id="a">
- <text>The bean types of a producer field depend upon the field type. If the field type is an interface, the set of bean types contains the field type, all interfaces it extends directly or indirectly and java.lang.Object</text>
- </assertion>
-
- <assertion id="b">
- <text>The bean types of a producer field depend upon the field type. If a field type is primitive or is a Java array type, the set of bean types contains exactly two types: the field type and java.lang.Object</text>
- </assertion>
-
- <assertion id="c">
- <text>The bean types of a producer field depend upon the field type. If the field type is a class, the set of bean types contains the field type, every superclass and all interfaces it implements directly or indirectly</text>
- </assertion>
- </section>
-
- <section id="3.5.2" title="Declaring a producer field using annotations">
-
- <assertion id="a">
- <text>A producer field may be declared by annotating a field with the @javax.inject.Produces annotation</text>
- </assertion>
-
- <assertion id="b">
- <text>A producer field may also specify scope, name, deployment type, stereotypes and/or bindings</text>
- </assertion>
- </section>
-
- <section id="3.5.3" title="Declaring a producer field using XML">
-
- <assertion id="a">
- <text>For a bean defined in XML, a producer field may be declared using the field name, the <Produces> element, and the type</text>
- </assertion>
-
- <assertion id="b">
- <text>When a producer field is declared in XML, the container ignores binding annotations applied to the Java field</text>
- </assertion>
-
- <assertion id="c">
- <text>If the bean class of a bean declared in XML does not have a field with the name and type declared in XML, a DefinitionException is thrown by the container at deployment time</text>
- </assertion>
-
- </section>
-
- <section id="3.5.4" title="Default name for a producer field">
- <assertion id="a">
- <text>The default name for a producer field is the field name</text>
- </assertion>
- </section>
-
- <section id="3.6" title="Resources">
- <assertion id="a">
- <text>Resources may be declared in beans.xml, allowing direct injection of an EE resource, entity manager, entity manager factory, EJB remote object or web service reference</text>
- </assertion>
-
- <assertion id="b">
- <text>The lifecycle of an injected reference is identical to the semantics of Java EE injection using @Resource, @PersistenceContext, @PersistenceUnit, @EJB or @WebServiceRef</text>
- </assertion>
-
- <assertion id="c">
- <text>A resource always has scope @Dependent</text>
- </assertion>
-
- <assertion id="d">
- <text>A resource may not declare a bean name</text>
- </assertion>
-
- <assertion id="e">
- <text>Resources are always declared using XML</text>
- </assertion>
- </section>
-
- <section id="3.6.1" title="Declaring a resource using XML">
-
- <assertion id="a">
- <text>A resource may be declared in beans.xml using an element that represents the Java type of the resource. For a Java EE resource, the EE resource type must be specified - for example javax.sql.Datasource for a JDBC datasource. The bean type of the resource is this specified type</text>
- </assertion>
-
- <assertion id="b">
- <text>A resource may be declared in beans.xml using an element that represents the Java type of the resource. For a persistence context, javax.persistence.EntityManager must be specified. The bean type of the resource is this specified type</text>
- </assertion>
-
- <assertion id="c">
- <text>A resource may be declared in beans.xml using an element that represents the Java type of the resource. For a persistence unit, javax.persistence.EntityManagerFactory must be specified. The bean type of the resource is this specified type</text>
- </assertion>
-
- <assertion id="d">
- <text>A resource may be declared in beans.xml using an element that represents the Java type of the resource. For a remote EJB, an EJB remote interface type must be specified. The bean type of the resource is this specified type</text>
- </assertion>
-
- <assertion id="e">
- <text>A resource may be declared in beans.xml using an element that represents the Java type of the resource. For a web service, a web service type must be specified. The bean type of the resource is this specified type</text>
- </assertion>
-
- <assertion id="f">
- <text>Each resource declaration must contain a child <Resource>, <PersistenceContext>, <PersistenceUnit>, <EJB> or
-<WebServiceRef> element. For a Java EE resource, a JNDI name or mapped name must be specified using the <name> or <mappedName> child elements
-of the <Resource> element</text>
- </assertion>
-
- <assertion id="g">
- <text>Each resource declaration must contain a child <Resource>, <PersistenceContext>, <PersistenceUnit>, <EJB> or
-<WebServiceRef> element. For a persistence context, a persistence unit name must be specified using the <unitName> child element of the <PersistenceContext> element</text>
- </assertion>
-
- <assertion id="h">
- <text>Each resource declaration must contain a child <Resource>, <PersistenceContext>, <PersistenceUnit>, <EJB> or
-<WebServiceRef> element. For a persistence unit, a persistence unit name must be specified using the <unitName> child element of the <PersistenceUnit> element</text>
- </assertion>
-
- <assertion id="i">
- <text>Each resource declaration must contain a child <Resource>, <PersistenceContext>, <PersistenceUnit>, <EJB> or
-<WebServiceRef> element. For a remote EJB, a JNDI name, mapped name or EJB link must be specified using the <name>, <mappedName> or <ejbLink> child elements of the <EJB> element</text>
- </assertion>
-
- <assertion id="j">
- <text>Each resource declaration must contain a child <Resource>, <PersistenceContext>, <PersistenceUnit>, <EJB> or
-<WebServiceRef> element. For a web service, a JNDI name or mapped name must be specified using the <name> or <mappedName> child elements of the <WebServiceRef> element. Optionally, a URL pointing to a WSDL document may be specified using the <wsdlLocation> child element</text>
- </assertion>
-
- <assertion name="k">
- <text>The JNDI name specified by the <name> element must be a name in the global java:global or application java:app naming context</text>
- </assertion>
-
- <assertion name="l">
- <text>Optionally, one or more bindings may be specified for resources in XML. If no binding is explicitly specified, the default binding @Current is assumed.</text>
- </assertion>
-
- </section>
-
- <section id="3.7" title="JMS resources">
- <assertion id="a">
- <text>JMS resources may be declared in beans.xml</text>
- </assertion>
-
- <assertion id="b">
- <text>JMS queue resources must allow the direct injection of the Queue, QueueConnection, QueueSession, QueueReceiver and/or QueueSender</text>
- </assertion>
-
- <assertion id="c">
- <text>JMS topic resources must allow the direct injection of the Topic, TopicConnection, TopicSession, TopicSubscriber and/or TopicPublisher</text>
- </assertion>
-
- <assertion id="d">
- <text>The lifecycles of the injected objects are managed by the container, and therefore the application need not explicitly close() any injected JMS object. If the application calls close() on an instance of a JMS resource, an UnsupportedOperationException is thrown by the container.</text>
- </assertion>
-
- <assertion id="e">
- <text>A JMS resource always has scope @Dependent</text>
- </assertion>
-
- <assertion id="f">
- <text>A JMS resource may not declare a bean name</text>
- </assertion>
-
- <assertion id="g">
- <text>JMS resources are always declared using XML</text>
- </assertion>
- </section>
-
- <section id="3.7.1" title="Bean types of a JMS resource">
-
- <assertion id="a">
- <text>For JMS resources that represent a queue, the bean types are Queue, QueueConnection, QueueSession and QueueSender</text>
- </assertion>
-
- <assertion id="b">
- <text>For JMS resources that represent a topic, the bean types are Topic, TopicConnection, TopicSession and TopicPublisher</text>
- </assertion>
- </section>
-
- <section id="3.7.2" title="Declaring a JMS resource using XML">
-
- <assertion id="a">
- <text>A JMS resource may be declared using the <Topic> or <Queue> elements in beans.xml</text>
- </assertion>
-
- <assertion id="b">
- <text>Each JMS resource declaration must contain a child <Resource> element. A JNDI name or mapped name must be specified using the <name> or <mappedName> child elements of the <Resource> element</text>
- </assertion>
-
- <assertion id="c">
- <text>One or more bindings may be specified. If no binding is explicitly specified, the default binding @Current is assumed</text>
- </assertion>
- </section>
-
- <section id="3.8" title="Injected fields">
-
- <assertion id="a">
- <text>An injected field is a non-static, non-final field of a bean class, of a servlet, or of any EJB session or message driven bean class.</text>
- </assertion>
-
- <assertion id="b">
- <text>Injected fields are initialized by the container immediately after instantiation and before any methods of the instance are invoked. The container calls the method Manager.getInstanceToInject() defined in Section 5.7.1, "Resolving dependencies" to determine a value for each injected field</text>
- </assertion>
-
- <assertion id="c">
- <text>Any EJB session or message driven bean may declare injected fields and have those fields injected by the container</text>
- </assertion>
-
- <assertion id="d">
- <text>If a field is a producer field or a decorator delegate attribute, it is not an injected field</text>
- </assertion>
- </section>
-
- <section id="3.8.1" title="Declaring an injected field using annotations">
-
- <assertion id="a">
- <text>An injected field may be declared by annotating the field with any binding type</text>
- </assertion>
- </section>
-
- <section id="3.8.2" title="Declaring an injected field using XML">
- <assertion id="a">
- <text>For bean defined in XML, an injected field may be declared using the field name and a child element representing the type of the field</text>
- </assertion>
-
- <assertion id="b">
- <text>When an injected field is declared in XML, the container ignores binding annotations applied to the Java field</text>
- </assertion>
-
- <assertion id="c">
- <text>If the type element does not declare any binding, the default binding @Current is assumed</text>
- </assertion>
-
- <assertion id="d">
- <text>If the bean class of a bean declared in XML does not have a field with the name and type declared in XML, a DefinitionException is thrown by the container at deployment time</text>
- </assertion>
- </section>
-
- <section id="3.9" title="Initializer methods">
- <assertion id="a">
- <text>An initializer method is a non-static method of a bean class, of a servlet, or of any EJB session or message driven bean class.</text>
- </assertion>
-
- <assertion id="b">
- <text>Initializer methods are called by the container immediately after injected fields have been initialized by the container and before any other methods of the instance are invoked.</text>
- </assertion>
-
- <assertion id="c">
- <text>If the bean is a session bean, the initializer method is not required to be a business method of the session bean</text>
- </assertion>
-
- <assertion id="d">
- <text>Method interceptors are never called when the container calls an initializer method</text>
- </assertion>
-
- <assertion id="e">
- <text>A bean class may declare multiple (or zero) initializer methods</text>
- </assertion>
-
- <assertion id="f">
- <text>The application may call initializer methods directly, but then no parameters will be passed to the method by the container</text>
- </assertion>
-
- <assertion id="g">
- <text>Any EJB session or message driven bean may declare initializer methods and have the methods called by the container</text>
- </assertion>
- </section>
-
- <section id="3.9.1" title="Declaring an initializer method using annotations">
- <assertion id="a">
- <text>An initializer method may be declared by annotating the method @javax.inject.Initializer</text>
- </assertion>
-
- <assertion id="b">
- <text>If an initializer method is annotated @Produces, has a parameter annotated @Disposes, or has a parameter annotated @Observes, a DefinitionException is thrown by the container at deployment time</text>
- </assertion>
-
- </section>
-
- <section id="3.9.2" title="Declaring an initializer method using XML">
-
- <assertion id="a">
- <text>For a bean defined in XML, an initializer method may be declared using the method name, the <Initializer> element and the parameter types of the method</text>
- </assertion>
-
- <assertion id="b">
- <text>When an initializer method is declared in XML, the container ignores binding annotations applied to the Java method parameters</text>
- </assertion>
-
- <assertion id="c">
- <text>If the bean class of a bean declared in XML does not have a method with the name and parameter types declared in XML, a DefinitionException is thrown by the container at deployment time</text>
- </assertion>
- </section>
-
- <section id="3.9.3" title="Initializer method parameters">
- <assertion id="a">
- <text>An initializer method may have any number of parameters. If the initializer method has parameters, the container calls Manager.getInstanceToInject() to determine a value for each parameter and calls the initializer method with those parameter values</text>
- </assertion>
- </section>
-
- <section id="3.10" title="Support for Common Annotations">
- <assertion id="a">
- <text>Dependency injection via @EJB, @Resource, @PersistenceUnit and @PersistenceContext is provided by the container when annotations are applied to the bean class of a simple bean</text>
- </assertion>
-
- <assertion id="b">
- <text>@PostConstruct and @PreDestroy callbacks are provided by the container when annotations are applied to the bean class of a simple bean</text>
- </assertion>
-
- <assertion id="c">
- <text>Interception, as defined in javax.interceptor is provided by the container when annotations are applied to the bean class of a simple bean</text>
- </assertion>
-
- <assertion id="d">
- <text>@PersistenceContext(type=EXTENDED) is not supported for simple beans</text>
- </assertion>
- </section>
-
- <section id="3.11" title="The Bean object for a bean">
- <assertion id="a">
- <text>Concrete subclasses of Bean must implement the operations defined by the Contextual interface defined in Section 6.1, "The Contextual interface".</text>
- </assertion>
-
- <assertion id="b">
- <text>An instance of Bean exists for every enabled bean in a deployment</text>
- </assertion>
-
- <assertion id="c">
- <text>An application or third party framework may add support for new kinds of beans beyond those defined by the this specification (simple beans, session beans, producer methods and fields, resources and JMS resources) by extending Bean and registering beans with the container, using the mechanism defined in Section 11.3, "Bean registration".</text>
- </assertion>
- </section>
-
- <section id="4" title="Inheritance, specialization and realization">
-
- </section>
-
- <section id="4.1" title="Inheritance of type-level metadata">
-
- <assertion id="a">
- <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X is annotated with a binding type, stereotype or interceptor binding type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares an annotation of type Z.</text>
- </assertion>
-
- <assertion id="b">
- <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X is annotated with a scope type Z then Y inherits the annotation if and only if Z declares the @Inherited metaannotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares a scope type.</text>
- </assertion>
-
- <assertion id="c">
- <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X is annotated with a deployment type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares a deployment type.</text>
- </assertion>
-
- <assertion id="d">
- <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, the scope types and deployment types explicitly declared by and inherited from the class X take precedence over default scopes and deployment types declared by stereotypes.</text>
- </assertion>
-
- <assertion id="e">
- <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X is annotated with a binding type, stereotype or interceptor binding type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and Y does not explicitly declare an annotation of type Z using XML.</text>
- </assertion>
-
- <assertion id="f">
- <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X is annotated with a scope type Z then Y inherits the annotation if and only if Z declares the @Inherited metaannotation and Y does not explicitly declare a scope type using XML.</text>
- </assertion>
-
- <assertion id="g">
- <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X is annotated with a deployment type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and Y does not explicitly declare a deployment type using XML.</text>
- </assertion>
-
- <assertion id="h">
- <text>For class X which is the bean class of a simple or session bean Y declared using XML, the scope types and deployment types explicitly declared by and inherited from the class X take precedence over default scope and deployment types declared by stereotypes.</text>
- </assertion>
-
- <assertion id="i">
- <text>For annotations defined by the bean specification, all built-in scope types are declared @Inherited</text>
- </assertion>
-
- <assertion id="j">
- <text>For annotations defined by the bean specification, all built-in stereotypes are declared @Inherited</text>
- </assertion>
-
- <assertion id="k">
- <text>For annotations defined by the bean specification, no built-in binding type is declared @Inherited</text>
- </assertion>
-
- <assertion id="l">
- <text>For annotations defined by the bean specification, the built-in deployment type is not declared @Inherited</text>
- </assertion>
-
- <assertion id="m">
- <text>the @Named annotation is not declared @Inherited and bean names are not inherited unless specialization is used</text>
- </assertion>
-
- </section>
-
- <section id="4.2" title="Inheritance of member-level metadata">
- <assertion id="a">
- <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X declares an injected field x then Y inherits x.</text>
- </assertion>
-
- <assertion id="b">
- <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X declares an initializer method, @PostConstruct method or @PreDestroy method x() then Y inherits x() if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x()</text>
- </assertion>
-
- <assertion id="c">
- <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X declares a non-static method x() annotated with an interceptor binding type Z then Y inherits the binding if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x().</text>
- </assertion>
-
- <assertion id="d">
- <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X declares a non-static producer, disposal, or observer method x() then Y does not inherit this method unless Y is explicitly declared to specialize or realize X</text>
- </assertion>
-
- <assertion id="e">
- <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X declares a non-static producer field x then Y does not inherit this field unless Y is explicitly declared to specialize or realize X.</text>
- </assertion>
-
- <assertion id="f">
- <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if Y is a decorator and X declares a delegate attribute x then Y inherits x if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y defines a delegate attribute</text>
- </assertion>
-
- <assertion id="g">
- <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X declares an injected field x then Y inherits x, unless Y explicitly declares x using XML.</text>
- </assertion>
-
- <assertion id="h">
- <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X declares an initializer method, @PostConstruct method or @PreDestroy method x() then Y inherits x(), unless Y explicitly declares x() using XML</text>
- </assertion>
-
- <assertion id="i">
- <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X declares a non-static method x() annotated with an interceptor binding type Z then Y inherits the binding, unless Y explicitly declares x() using XML.</text>
- </assertion>
-
- <assertion id="j">
- <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X declares a non-static producer, disposal, or observer method x() then Y does not inherit this method, unless Y is explicitly declared to specialize or realize X.</text>
- </assertion>
-
- <assertion id="k">
- <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X declares a non-static producer field x then Y does not inherit this method, unless Y is explicitly declared to specialize or realize X.</text>
- </assertion>
-
- <assertion id="l">
- <text>For class X which is the bean class of a simple or session bean Y declared using XML, if Y is a decorator and X declares a delegate attribute x then Y inherits x, unless Y explicitly declares a delegate attribute using XML.</text>
- </assertion>
- </section>
-
- <section id="4.3" title="Specialization">
-
- <assertion id="a">
- <text>If two beans both support a certain bean type, and share at least one binding, then they are both eligible for injection to any injection point with that declared type and binding. The container will choose the bean with the highest priority enabled deployment type.</text>
- </assertion>
-
- <assertion id="b">
- <text>If the bean with the lower priority deployment type declares a binding that is not declared by the bean with the higher priority deployment type, then the bean with the higher priority deployment type will not be eligible for injection to an injection point with that binding.</text>
- </assertion>
-
- <assertion id="c">
- <text>The only way one bean can completely override a lower-priority bean at all injection points is if it implements all the bean types and declares all the bindings of the lower-priority bean. However, if the lower-priority bean declares a producer method, then even this is not enough to ensure that the lower-priority bean is never called</text>
- </assertion>
-
- </section>
-
- <section id="4.3.1" title="Using specialization">
-
- <assertion id="a">
- <text>A bean declared using annotations may declare that it specializes a lower-priority bean using the @Specializes annotation</text>
- </assertion>
-
- <assertion id="b">
- <text>A bean declared using XML may declare that it specializes a lower-priority bean using the <Specializes> element</text>
- </assertion>
-
- <assertion id="c">
- <text>The bindings of a bean X that specializes a lower-priority bean Y include all bindings of Y, together with all bindings declared explicitly by X.</text>
- </assertion>
-
- <assertion id="d">
- <text>If a bean X specializes a lower-priority bean Y with a name, the name of X is the same as the name of Y. If X declares a name explicitly, a DefinitionException is thrown by the container at deployment time</text>
- </assertion>
-
- <assertion id="e">
- <text>When an enabled bean specializes a lower-priority bean, we can be certain that the lower-priority bean is never instantiated or called by the container. Even if the lower-priority bean defines a producer method, the method will be called upon an instance of the first bean</text>
- </assertion>
-
- <assertion id="f">
- <text>Specialization applies only to simple beans, as defined in Section 3.2.7, "Specializing a simple bean", session beans, as defined in Section 3.3.7, "Specializing a session bean" and producer methods, as defined in Section 3.4.5, "Specializing a producer method".</text>
- </assertion>
- </section>
-
- <section id="4.3.2" title="Direct and indirect specialization">
- <assertion id="a">
- <text>The @javax.inject.Specializes annotation or <Specializes> XML element is used to indicate that one bean directly specializes another bean</text>
- </assertion>
-
- <assertion id="b">
- <text>A bean X is said to specialize another bean Y if X directly specializes Y, or a bean Z exists, such that X directly specializes Z and Z specializes Y</text>
- </assertion>
-
- <assertion id="c">
- <text>Any non-static producer methods (see Section 3.4, "Producer methods"), producer fields (see Section 3.5, "Producer fields"), disposal methods (see Section 3.4.6, "Disposal methods") or observer methods (see Section 7.5, "Observer methods") of any bean are invoked upon an instance of the most specialized enabled bean that specializes the bean, as defined by Section 6.7, "Lifecycle of producer methods", Section 6.8, "Lifecycle of producer fields" and Section 7.4, "Observer notification".</text>
- </assertion>
- </section>
-
- <section id="4.3.3" title="Inconsistent specialization">
- <assertion id="a">
- <text>If, in a particular deployment, either some enabled bean X specializes another enabled bean Y and X does not have a higher precedence than Y, or more than one enabled bean directly specializes the same bean we say that inconsistent specialization exists, and an InconsistentSpecializationException is thrown by the container at deployment time</text>
- </assertion>
- </section>
-
- <section id="4.4" title="Realization">
- <assertion id="a">
- <text>Any bean that extends a generic class may directly extend the generic class, in the case of a bean declared using annotations</text>
- </assertion>
-
- <assertion id="b">
- <text>Any bean that extends a generic class may declare that the generic class is the bean class, in the case of a bean declared using XML, and then explicitly declare that it realizes the generic class.</text>
- </assertion>
-
- </section>
-
- <section id="4.4.1" title="Using realization">
- <assertion id="a">
- <text>A bean declared using annotations may declare that it realizes a generic class by annotating the bean class with the @javax.inject.Realizes annotation</text>
- </assertion>
-
- <assertion id="b">
- <text>A bean declared using XML may declare that it realizes a generic class using the <Realizes> element.</text>
- </assertion>
-
- <assertion id="c">
- <text>If a generic class Y declares a non-static producer method or field with a certain combination of scope, stereotypes, bindings and interceptor bindings, then every bean X that realizes Y also has a producer method or field with the same scope, stereotypes and interceptor bindings. The bindings for this inherited producer method or field consist of all bindings declared by the producer method or field of Y, excluding all bindings of Y, together with the bindings declared explicitly by X. The deployment type of the inherited producer method or field is the deployment type of X</text>
- </assertion>
-
- <assertion id="d">
- <text>If a generic class Y declares a non-static disposal method with a disposed parameter with a certain combination of bindings, then every bean X that realizes Y also has a disposal method. The bindings of the disposed parameter of this
-inherited disposal method consist of all bindings declared by the disposed parameter of the disposal method of Y, excluding all bindings of Y, together with the bindings declared explicitly by X.</text>
- </assertion>
-
- <assertion id="e">
- <text>If a generic class Y declares a non-static observer method with an event parameter with a certain combination of event bindings, then every bean X that realizes Y also has an observer method. The event bindings of the event parameter of
-this inherited observer method consist of all event bindings declared by the event parameter of the observer method of Y.</text>
- </assertion>
-
- <assertion id="f">
- <text>Realization applies only to simple beans and session beans</text>
- </assertion>
- </section>
-
- <section id="5" title="Lookup, dependency injection and EL resolution">
- <assertion id="a">
- <text>The container is required to ensure that any injected reference to a contextual instance of a bean may be cast to any bean type of the bean.</text>
- </assertion>
-
- <assertion id="b">
- <text>The container is required to support circularities in the bean dependency graph</text>
- </assertion>
- </section>
-
- <section id="5.1" title="Unsatisfied and ambiguous dependencies">
- <assertion id="a">
- <text>The container must validate all injection points of all enabled beans at deployment time to ensure that there are no unsatisfied or ambiguous dependencies. If an unsatisfied or ambiguous dependency exists, an UnsatisfiedDependencyException
-or AmbiguousDependencyException is thrown by the container at deployment time, as defined in Section 5.7.1, "Resolving dependencies".</text>
- </assertion>
- </section>
-
- <section id="5.2" title="Primitive types and null values">
- <assertion id="a">
- <text>If an injection point of primitive type resolves to a bean that may be null, such as a producer method with a nonprimitive return type or a producer field with a non-primitive type, a NullableDependencyException is thrown by the container at deployment time</text>
- </assertion>
-
- <assertion id="b">
- <text>The method Bean.isNullable() may be used to detect if a bean has null values</text>
- </assertion>
- </section>
-
- <section id="5.3" title="Injected reference validity">
- <assertion id="a">
- <text>Any reference to a bean with a normal scope is valid as long as the application maintains a hard reference to it. However, it may only be invoked when the context associated with the normal scope is active. If it is invoked when the context is inactive, a ContextNotActiveException is thrown by the container</text>
- </assertion>
-
- <assertion id="b">
- <text>Any reference to a bean with a pseudo-scope (such as @Dependent) is valid until the bean instance to which it refers is destroyed. It may be invoked even if the context associated with the pseudo-scope is not active. If the application invokes a method of a reference to an instance that has already been destroyed, the behavior is undefined</text>
- </assertion>
- </section>
-
- <section id="5.4" title="Client proxies">
-
- </section>
-
- <section id="5.4.1" title="Unproxyable bean types">
-
- </section>
-
- <section id="5.4.2" title="Client proxy invocation">
-
- </section>
-
- <section id="5.5" title="The default binding at injection points">
-
- </section>
-
- <section id="5.6" title="Injection point metadata">
-
- </section>
-
- <section id="5.6.1" title="Injecting InjectionPoint">
-
- </section>
-
- <section id="5.7" title="The Manager object">
-
- </section>
-
- <section id="5.7.1" title="Resolving dependencies">
-
- </section>
-
- <section id="5.7.2" title="Obtaining contextual instances">
-
- </section>
-
- <section id="5.8" title="Dynamic lookup">
-
- </section>
-
- <section id="5.9" title="Typesafe resolution algorithm">
-
- </section>
-
-
-
-
-</specification>
Deleted: tck/trunk/impl/tck-audit.xsd
===================================================================
--- tck/trunk/impl/tck-audit.xsd 2009-02-14 02:10:10 UTC (rev 1513)
+++ tck/trunk/impl/tck-audit.xsd 2009-02-14 23:19:09 UTC (rev 1514)
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- targetNamespace="http://jboss.com/products/webbeans/tck/audit"
- xmlns:audit="http://jboss.com/products/webbeans/tck/audit">
-
- <xs:element name="specification">
- <xs:annotation>
- <xs:documentation> The specification tag is the root element for tck-audit.xml. </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="audit:section"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
-
- <xs:element name="section">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" maxOccurs="unbounded" ref="audit:assertion"/>
- </xs:sequence>
- <xs:attributeGroup ref="audit:attlist.section"/>
- </xs:complexType>
- </xs:element>
-
- <xs:attributeGroup name="attlist.section">
- <xs:attribute name="id" type="xs:string"/>
- <xs:attribute name="title" type="xs:string"/>
- </xs:attributeGroup>
-
- <xs:element name="assertion">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" ref="audit:text"/>
- <xs:element minOccurs="0" maxOccurs="1" ref="audit:note"/>
- </xs:sequence>
- <xs:attributeGroup ref="audit:attlist.assertion"/>
- </xs:complexType>
- </xs:element>
-
- <xs:attributeGroup name="attlist.assertion">
- <xs:attribute name="id" type="xs:string"/>
- </xs:attributeGroup>
-
- <xs:element name="text">
- <xs:complexType>
- <xs:simpleContent>
- <xs:extension base="xs:string"/>
- </xs:simpleContent>
- </xs:complexType>
- </xs:element>
-
- <xs:element name="note">
- <xs:complexType>
- <xs:simpleContent>
- <xs:extension base="xs:string"/>
- </xs:simpleContent>
- </xs:complexType>
- </xs:element>
-
-</xs:schema>
\ No newline at end of file
17 years, 1 month