[webbeans-commits] Webbeans SVN: r3052 - in tck/trunk/doc/reference/en-US: images and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-07-15 00:20:28 -0400 (Wed, 15 Jul 2009)
New Revision: 3052
Added:
tck/trunk/doc/reference/en-US/eclipse-debugging.xml
tck/trunk/doc/reference/en-US/eclipse-running.xml
tck/trunk/doc/reference/en-US/images/
tck/trunk/doc/reference/en-US/images/in-container-execution.png
Modified:
tck/trunk/doc/reference/en-US/Book_Preface.xml
tck/trunk/doc/reference/en-US/configuration.xml
tck/trunk/doc/reference/en-US/executing.xml
tck/trunk/doc/reference/en-US/installation.xml
tck/trunk/doc/reference/en-US/introduction.xml
tck/trunk/doc/reference/en-US/part1-background.xml
tck/trunk/doc/reference/en-US/part2-setup.xml
tck/trunk/doc/reference/en-US/part3-execution.xml
Log:
rough draft
Modified: tck/trunk/doc/reference/en-US/Book_Preface.xml
===================================================================
--- tck/trunk/doc/reference/en-US/Book_Preface.xml 2009-07-14 18:32:29 UTC (rev 3051)
+++ tck/trunk/doc/reference/en-US/Book_Preface.xml 2009-07-15 04:20:28 UTC (rev 3052)
@@ -2,31 +2,43 @@
<!-- This document was created with Syntext Serna Free. --><!DOCTYPE preface PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
<preface id="book-preface">
<title>Preface</title>
- <para>This guide describes how to install, configure, and run the Technology Compatibility Kit (TCK) that is used to verify the compatibility of a licensee's implementation of the JSR-299: Context and Dependency Injection for Java EE specification.</para>
- <para>The JSR-299 TCK is built atop the JBoss Test Harness, a portable and configurable automated test suite for authoring unit and integration tests against Java EE artifacts. The JSR-299 TCK 1.0 uses the JBoss Test Harness version 1.0.0 to execute the test suite.</para>
+ <para>This guide describes how to download, install, configure, and run the Technology Compatibility Kit (TCK) used to verify the compatibility of a licensee's implementation of the JSR-299: Context and Dependency Injection for Java EE specification.</para>
+ <para>The JSR-299 TCK is built atop the JBoss Test Harness, a portable and configurable automated test suite for authoring unit and integration tests in a Java EE environment. The JSR-299 TCK 1.0.0 uses the JBoss Test Harness version 1.0.0.BETA3 to execute the test suite.</para>
<section id="target-audience">
<title>Who Should Use This Book</title>
<para>This guide is for licensees of the Context and Dependency Injection for Java EE 1.0 (JSR-299) technology to assist in running the test suite that verifies the compatibility of their implementation.</para>
</section>
<section id="before-reading">
<title>Before You Read This Book</title>
- <para>Before reading this guide, you should familiarize yourself with the Java EE programming model, specifically the Enterprise JavaBeans (EJB) 3.0 and the Contexts and Dependency Injection (CDI) for Java EE 1.0 specifications. A good resource for the Java EE programming model is the <ulink url="http://jcp.org">JCP</ulink> web site.</para>
+ <para>Before reading this guide, you should familiarize yourself with the Java EE programming model, specifically the Enterprise JavaBeans (EJB) 3.0 and the Contexts and Dependency Injection for Java EE 1.0 specifications. A good resource for the Java EE programming model is the <ulink url="http://jcp.org">JCP</ulink> web site.</para>
<para>The JSR-299 TCK is based on the Context and Dependency Injection for Java EE technology specification 1.0 (JSR-299). Information about the specification, including links to the specification documents, can be found on the <ulink url="http://jcp.org/en/jsr/detail?id=299">JSR-299 JCP page</ulink>.</para>
- <para>Before running the tests in the JSR-299 TCK, read and become familiar with the JBoss Test Harness Reference Guide, which describes how the test harness functions.</para>
+ <para>Before running the tests in the JSR-299 TCK, read and become familiar with the JBoss Test Harness Reference Guide (pending), which describes how the test harness functions.</para>
</section>
<section id="book-organization">
<title>How This Book Is Organized</title>
<para>If you are running the JSR-299 TCK for the first time, read Chapter 1 and Chapter 2 completely for the necessary background information about the TCK and its purpose. Once you have reviewed that material, perform the steps outlined in the remaining chapters.</para>
<itemizedlist>
<listitem>
- <para>Chapter 1 gives an overview of the principles that apply generally to all Technology Compatibility Kits (TCKs) and describes the JSR-299 TCK. This chapter also includes a broad listing of the steps for starting and running the JSR-299 TCK.</para>
+ <para>Chapter 1 gives an overview of the principles that apply generally to all Technology Compatibility Kits (TCKs) and describes the JSR-299 TCK architecture and components. It also includes a broad overview of how the TCK is executed and lists the platforms on which the TCK has been tested and verified.</para>
</listitem>
<listitem>
- <para>Chapter 2 describes the conformance testing procedure and testing requirements.</para>
+ <para>Chapter 2 explains where to obtain the required software and how to install it. It covers both the primary TCK components as well as tools useful for troubleshooting tests.</para>
</listitem>
<listitem>
- <para>Chapter 3 explains...</para>
+ <para>Chapter 3 details the configuration of the JBoss Test Harness, how to create a TCK runner for the TCK test suite and the mechanics of how an in-container test is conducted.</para>
</listitem>
+ <listitem>
+ <para>Chapter 4 documents how the TCK test suite is executed. It covers both modes supported by the TCK, standalone and in-container, and shows how to dump the generated test artifacts to disk.</para>
+ </listitem>
+ <listitem>
+ <para>Chapter 5 shows how to run individual tests in Eclipse and advices the best way to setup your Eclipse workspace for running the tests.</para>
+ </listitem>
+ <listitem>
+ <para>Chapter 6 builds on chapter 5 by detailing how to debug individual tests in Eclipse.</para>
+ </listitem>
+ <listitem>
+ <para>Chapter 7 (pending) explains the test reports that are generated by the TCK test suite and introduces the TCK audit report as a tool for measure a licensee's progress in passing the TCK.</para>
+ </listitem>
</itemizedlist>
</section>
</preface>
Modified: tck/trunk/doc/reference/en-US/configuration.xml
===================================================================
--- tck/trunk/doc/reference/en-US/configuration.xml 2009-07-14 18:32:29 UTC (rev 3051)
+++ tck/trunk/doc/reference/en-US/configuration.xml 2009-07-15 04:20:28 UTC (rev 3052)
@@ -1,14 +1,14 @@
<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
<chapter id="configuration">
<title>Configuration</title>
- <para>This chapter examples...</para>
+ <para>This chapter lays out how to configure the JBoss Test Harness by specifying the SPI implementation classes, defining the target container connection information, and various other switches. You then learn how to setup a TCK runner project that executes the the TCK test suite, putting these settings into practice. Finally, a detailed account of how the JBoss Test Harness negotiates the execution of the tests in the container is given.</para>
<section>
<title>JBoss Test Harness Properties</title>
<para>The JBoss Test Harness allows the test suite to be launched in a pluggable fashion. In order to execute the TCK, the JBoss Test Harness must be configured by specifying implementations of the test launcher and container APIs. All the required configuration that pertains to the JBoss Test Harness is applicable to the TCK as well.</para>
- <para>System properties and/or the resource META-INF/jboss-test-harness.properties, a Java properties file, are used to configure the JBoss Test Harness. The bootstrap configuration builder looks to the property <literal>org.jboss.testharness.api.ConfigurationBuilder</literal>, the first property listed in table X.X, for the fully qualified class name of a concreate configuration builder implementation. This implementation loads the remaining configuration settings and produces a JBoss Test Harness configuration.</para>
- <para>For you convenience, a default configuration builder implementation is provided, <literal>org.jboss.testharness.impl.PropertiesBasedConfigurationBuilder</literal>, which retrieves all the JBoss Test Harness configuration settings from Java properties. It does so by aggregating the system properties and the properties defined in the META-INF/jboss-test-harness.properties resource in any classpath entry under a single properties map, allowing you to segment the configuration settings as needed.</para>
- <para>A complete list of configuration properties for the JBoss Test Harness is itemized in table X.X, along with the default value (if any) and a description for each property.</para>
+ <para>System properties and/or the resource META-INF/jboss-test-harness.properties, a Java properties file, are used to configure the JBoss Test Harness. The bootstrap configuration builder looks to the property <literal>org.jboss.testharness.api.ConfigurationBuilder</literal>, the first property listed in table 2.1.1, for the fully qualified class name (FQCN) of a concreate configuration builder implementation to get started. This implementation loads the remaining configuration settings and produces a JBoss Test Harness configuration.</para>
+ <para>For you convenience, the default configuration builder implementation <literal>org.jboss.testharness.impl.PropertiesBasedConfigurationBuilder</literal> is provided, which collects all the JBoss Test Harness configuration settings from Java properties. It does so by aggregating the system properties with the properties defined in the META-INF/jboss-test-harness.properties resource in any classpath entry under a single properties map, allowing you to partition the configuration settings as needed.</para>
+ <para>A complete list of configuration properties for the JBoss Test Harness has been itemized in table 2.1.1, accompanied by the default value (if any) and a description for each property.</para>
<table frame="all">
<title/>
<tgroup cols="2">
@@ -123,7 +123,7 @@
</tbody>
</tgroup>
</table>
- <para>The general TCK porting package is also configured using the Java properties file META-INF/jboss-test-harness.properties or system properties. Each implementation of the Porting Package SPI should be specified using the fully-qualified domain name (FQDN) of the interface as the property value. The properties which must be satisified are listed in table X.XX.</para>
+ <para>The TCK also relies on implementations of the interfaces in the porting package. These implementations are also specified using system properties or the classpath resource META-INF/jboss-test-harness.properties. The implementation of each porting package SPI must be specified using the fully-qualified domain name (FQDN) of the interface mapped to a Java property. The properties that correspond to the interface which must be implemented are listed in table 2.1.2.</para>
<table frame="all">
<title/>
<tgroup cols="2">
@@ -164,4 +164,143 @@
</tgroup>
</table>
</section>
+ <section>
+ <title>Setting up the TCK runner project</title>
+ <para>The TCK runner project is the magic that makes everything come together and allows you to execute the TCK against a JSR-299 implementation. If you fully understand how the JBoss Test Harness functions, and have a good grasp on Maven 2, then it's not to difficult to understand how the TCK runner project works. Regardless of your background, this guide covers what you need to know to get up and running by studying the TCK runner that tests the JSR-299 RI.</para>
+ <para>The TCK runner for the JSR-299 RI can be found in the jboss-tck-runner directory in the Web Beans distribution. The dependencies of the TCK runner project for the JSR-299 RI are listed in table 2.2.3.</para>
+ <table frame="all">
+ <title/>
+ <tgroup cols="3">
+ <colspec colname="c1"/>
+ <colspec colname="c2"/>
+ <colspec colname="c3"/>
+ <thead>
+ <row>
+ <entry>Group ID</entry>
+ <entry>Artifact ID</entry>
+ <entry>Version</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>org.jboss.webbeans</entry>
+ <entry>jsr299-api</entry>
+ <entry>1.0.0-SNAPSHOT</entry>
+ </row>
+ <row>
+ <entry>org.jboss.jsr299.tck</entry>
+ <entry>jsr299-tck-api</entry>
+ <entry>1.0.0-SNAPSHOT</entry>
+ </row>
+ <row>
+ <entry>org.jboss.jsr299.tck</entry>
+ <entry>jsr299-tck-impl</entry>
+ <entry>1.0.0-SNAPSHOT</entry>
+ </row>
+ <row>
+ <entry>org.jboss.webbeans</entry>
+ <entry>webbeans-core</entry>
+ <entry>1.0.0-SNAPSHOT</entry>
+ </row>
+ <row>
+ <entry>org.jboss.webbeans</entry>
+ <entry>webbeans-porting-package</entry>
+ <entry>1.0.0-SNAPSHOT</entry>
+ </row>
+ <row>
+ <entry>org.testng</entry>
+ <entry>testng (classifier: jdk15)</entry>
+ <entry>5.8</entry>
+ </row>
+ <row>
+ <entry>org.jboss.test-harness</entry>
+ <entry>jboss-test-harness-jboss-as-51</entry>
+ <entry>1.0.0.BETA3</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>You can install these dependencies manually into your local Maven respository using the following command template:</para>
+ <programlisting>mvn install:install-file \
+-Dfile=jsr299-tck-api.jar \
+-DgroupId=org.jboss.jsr299.tck \
+-DartifactId=jsr29-tck-api \
+-Dversion=1.0.0-SNAPSHOT \
+-Dpackaging=jar</programlisting>
+ <para>You should substituate the webbeans-core and webbeans-porting-package artifacts from table 2.2.3 if you are running the TCK against your JSR-299 implementation. You'll also need to replace the jboss-test-harness-jboss-as-51 artifact if you are not testing your implementation on JBoss AS 5.1. The jboss-test-harness-jboss-as-51 artifact contains implementations of the <literal>Containers</literal> SPI for the JBoss Test Harness.</para>
+ <note>
+ <para>When running the TCK in the in-container mode, the tests will run against the JSR-299 implementation installed in the container. The version of the implementation declared as a Maven dependency is only used when running the TCK in standalone mode.</para>
+ </note>
+ <para>The TestNG test suite for the TCK is also retrieved from the local Maven repository (groupId=org.jboss.jsr299.tck, artifactId=jsr299-tck-impl, classifier=suite, type=xml, version=1.0.0-SNAPSHOT), but it's not declared as a regular Maven dependency. That's because the test suite must be available to both the client JVM and the container JVM. The maven-dependency-plugin is used to copy it to the target/dependencies/lib directory. Any JARs in this folder are added to any test artifact that is generated. The Maven plugin execution is defined in the TCK runner project as follows:</para>
+ <programlisting><plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <stripVersion>true</stripVersion>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.jboss.jsr299.tck</groupId>
+ <artifactId>jsr299-tck-impl</artifactId>
+ <type>xml</type>
+ <classifier>suite</classifier>
+ <overWrite>true</overWrite>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.jboss.webbeans</groupId>
+ <artifactId>
+ webbeans-porting-package
+ </artifactId>
+ <overWrite>true</overWrite>
+ <outputDirectory>
+ ${project.build.directory}/dependency/lib
+ </outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.jboss.webbeans</groupId>
+ <artifactId>webbeans-core-test</artifactId>
+ <overWrite>true</overWrite>
+ <outputDirectory>
+ ${project.build.directory}/dependency/lib
+ </outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>javax.el</groupId>
+ <artifactId>el-ri</artifactId>
+ <overWrite>true</overWrite>
+ <outputDirectory>
+ ${project.build.directory}/dependency/lib
+ </outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+</plugin></programlisting>
+ <para>The target folder is declared as the JBoss Test Harness library directory so that the JARs are added to the test artifact using the following property assignment:</para>
+ <programlisting>org.jboss.testharness.libraryDirectory=target/dependency/lib</programlisting>
+ <para>The TCK is executed using the Maven TestNG plugin. Maven 2 profiles are used to control the properties that are set at the time of the execution. For instance, the <literal>incontainer</literal> profile enables integration tests and disables standalone mode, changing the default settings.</para>
+ <para>The jboss-tck-runner project also defines the JBoss Test Harness extra configuration directory using the following property:</para>
+ <programlisting>org.jboss.testharness.container.extraConfigurationDir=../jboss-as</programlisting>
+ <para>The JBoss Test Harness looks in this directory for either a build.properties or local.build.properties file that declare additional configuration properties. In particular, the JBoss AS Containers implementation looks here to find the <literal>jboss.home</literal> property for starting and stopping JBoss AS.</para>
+ </section>
+ <section>
+ <title>Negotiating the execution of an in-container test</title>
+ <para>The basic procedure of an in-container test is as follows. The JBoss Test Harness produces a deployable artifact from an <literal>@Artifact</literal> test class and any declared dependent classes, descriptors or other resources. Then it deploys the artifact to the container using the <literal>Containers</literal> SPI, negotiates with the container to execute the test and return the result and, lastly, undeploys the artifact. TestNG collects the results of all the tests run in the typical way and produces a report.</para>
+ <graphic fileref="images/in-container-execution.png" align="center"/>
+ <para>The question is, how does the JBoss Test Harness negotiate with the container to execute the test when TestNG is being invoked locally? Technially the mechanism is pluggable, but JBoss Test Harness provides a default implementation that uses HTTP communication that you will likely use. Here's how the default implementation works works.</para>
+ <para>The artifact generator bundles and registers (in the web.xml descriptor) an <literal>HttpServlet</literal>, <literal>org.jboss.testharness.impl.runner.servlet.ServletTestRunner</literal>, that responds to test execution GET requests. TestNG running on the client side delegates to a test launcher (more on that in a moment) which originates these text execution requests to transfer control to the container JVM. The name of the test method to be executed is specified in a request parameter named <literal>methodName</literal>.</para>
+ <para>When the test execution request is received, the servlet delegates to an instance of <literal>org.jboss.testharness.impl.runner.TestRunner</literal>, passing it the name of the test method. <literal>TestRunner</literal> reads the name of the test class from the resource META-INF/jboss-test-harness.properties, which is bundled in the artifact by the artifact generator. It then combines the class name with the method name to produce a TestNG test suite and runs the suite (in the context of the container).</para>
+ <para>TestNG returns the results of the run as an <literal>ITestResult</literal> object. <literal>ServletTestRunner</literal> translates this object into a <literal>org.jboss.testharness.api.TestResult</literal> and passes it back to the test launcher on the client side by encoding the translated object into the response. The object gets encoded as either html or a serialized object, depending on the value of the <literal>outputMode</literal> request parameter that was passed to the servlet. Once the result has been transfered to the client-side TestNG, TestNG wraps up the run of the test as though it had been executed in the same JVM.</para>
+ <para>There's one piece missing. How does TestNG on the client side know to submit a request to the <literal>ServletTestRunner</literal> servlet to get TestNG to execute the test in the container JVM? That's the role of the test launcher.</para>
+ <para>The test launcher is the API that allows test suite to launch the test in a pluggable fashion. <literal>AbstractTest</literal>, the super class of <literal>AbtractJSR299Test</literal>, implements <literal>IHookable</literal>, a TestNG interface which allows the execution of the test method to be intercepted. Using that mechanism, AbstractTest delegates execution of the test method (a method annotated with <literal>@Test</literal> in an <literal>@Artifact</literal> class) to an implementation of <literal>org.jboss.testharness.api.TestLauncher</literal> if the tests are being executed in-container. As you might anticipate, the implementation is specified using a property with the same name as the interface in a META-INF/jboss-test-launcher.properties resource. The JBoss Test Harness provides a default implementation, <literal>org.jboss.testharness.impl.runner.servlet.ServletTestLauncher</literal>, that hooks into the HTTP communication infrastructure described above!
. It invokes the <literal>ServletTestRunner</literal> servlet for each method annotated with <literal>@Test</literal> in the <literal>@Artifact</literal> that is not otherwise disabled.</para>
+ <para>If you wish to implement the runner yourself, you must return a <literal>TestResult</literal> as a result of executing the method in the container. You must also ensure that any exception which occurs during deployment is wrapped as a <literal>org.jboss.testharness.api.DeploymentException</literal>, and that any communication problem is rethrown as an <literal>IOException</literal>. The deployment exception may be transformed by an implementation of the <literal>org.jboss.testharness.api.DeploymentExceptionTransformer</literal> interface, which is specified using the <literal>org.jboss.testharness.container.deploymentExceptionTransformer</literal> property. The default implementation passes on the original exception unchanged.</para>
+ <para>So in short, JBoss Test Harness takes care of all the interfaces you need to execute tests in-container except for the implementation of the <literal>Containers</literal> SPI. That is, unless you are deploying to one of the containers supported by the JBoss Test Harness.</para>
+ </section>
</chapter>
Added: tck/trunk/doc/reference/en-US/eclipse-debugging.xml
===================================================================
--- tck/trunk/doc/reference/en-US/eclipse-debugging.xml (rev 0)
+++ tck/trunk/doc/reference/en-US/eclipse-debugging.xml 2009-07-15 04:20:28 UTC (rev 3052)
@@ -0,0 +1,55 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
+<chapter id="eclipse-debugging">
+ <title>Debugging Tests in Eclipse</title>
+ <para>This chapter explains how to debug standalone tests and integration tests from the TCK test suite in Eclipse. You should be able to use the lessons learned here to debug tests in an alternate IDE.</para>
+ <section>
+ <title>Debugging a standalone test</title>
+ <para>There is almost no difference in how you debug a standalone test from how you run it. With the test class open in the Eclipse editor, simply right click in the editor view and select TestNG > Debug as test. Eclipse will stop at any breakpoints you set just like it would with any other local debug process.</para>
+ <para>If you plan to step into a class in a JSR-299 implementation (or any other dependent library), you must ensure that the source is properly associated with the library. Below are the steps to follow to associate the source of the JSR-299 RI with the TestNG debug configuration: </para>
+ <orderedlist>
+ <listitem>
+ <para>Select the Run > Debug Configurations... menu from the main menubar</para>
+ </listitem>
+ <listitem>
+ <para>Select the name of the test class in the TestNG category</para>
+ </listitem>
+ <listitem>
+ <para>Select the Source tab</para>
+ </listitem>
+ <listitem>
+ <para>Click the Add... button on the right</para>
+ </listitem>
+ <listitem>
+ <para>Select Java Project</para>
+ </listitem>
+ <listitem>
+ <para>Check the project the contains the class you want to debug (e.g., webbeans-core)</para>
+ </listitem>
+ <listitem>
+ <para>Click OK on the Project Selection window</para>
+ </listitem>
+ <listitem>
+ <para>Click Close on the Debug Configurations window</para>
+ </listitem>
+ </orderedlist>
+ <para>You'll have to complete those steps for any test class you are debugging, though you only have to do it once (the debug configuration hangs around indefinitely).</para>
+ <para>Again, running a test in standalone isn't enough to pass the TCK and cannot be used to run or debug an integration test. Let's look at how to debug a test running in the context of the container.</para>
+ </section>
+ <section>
+ <title>Debugging an integration test</title>
+ <para>In order to debug an integration test, or any test run in in-container mode, the test must be configured to run in-container, as described in section 6.4, and you must attach the IDE debugger to the container. That puts the debugger on both sides of the fence, so to speak.</para>
+ <para>Since setting up a test to run in-container has already been covered, we'll look at how to attach the IDE debugger to the container, and then move on launching the test in debug mode.</para>
+ <section>
+ <title>Attaching the IDE debugger to the container</title>
+ <para>There are two ways to attach the IDE debugger to the container. You can either start the container in debug mode from within the IDE, or you can attach the debugger over a socket connection to a standalone container running with JPDA enabled.</para>
+ <para>The Eclipse Server Tools, a subproject of the Eclipse Web Tools Project (WTP), has support for launching most major application servers, including JBoss AS 5. However, if you are using JBoss AS, you should consider using JBoss Tools instead, which offers tighter integration with JBoss technologies. See either the <ulink url="http://www.eclipse.org/webtools/server/server.php">Server Tools documentation</ulink> or the <ulink url="http://docs.jboss.org/tools/3.0.1.GA/en/as/html/index.html">JBoss Tools documentation</ulink> for how to setup a container and start it in debug mode.</para>
+ <para>See <ulink url="http://maverikpro.wordpress.com/2007/11/26/remote-debug-a-web-application...">this blog entry</ulink> to learn how to start JBoss with JPDA enabled and how to get the Eclipse debugger to connect to the remote process.</para>
+ </section>
+ <section>
+ <title>Launching the test in the debugger</title>
+ <para>Once Eclipse is debugging the container, you can set a breakpoint in the test and debug it just like a standalone test. Open a test annotated with <literal>@IntegrationTest</literal> in the Eclipse editor, right click in the editor view, and select TestNG > Debug as test. The only difference is that when the IDE hits the breakpoint this time, it halts the JVM thread of the container rather than the thread that launched the test.</para>
+ <para>Remember that if you need to debug into dependent libraries, the source code for those libraries needs to be registered with the TestNG debug configuration as described in the first section in this chapter.</para>
+ </section>
+ </section>
+</chapter>
Added: tck/trunk/doc/reference/en-US/eclipse-running.xml
===================================================================
--- tck/trunk/doc/reference/en-US/eclipse-running.xml (rev 0)
+++ tck/trunk/doc/reference/en-US/eclipse-running.xml 2009-07-15 04:20:28 UTC (rev 3052)
@@ -0,0 +1,154 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
+<chapter id="eclipse-running">
+ <title>Running Tests in Eclipse</title>
+ <para>This chapter explains how to run individual tests using the Eclipse TestNG plugin. It covers running non-integration tests in standalone mode and integration tests (as well as non-integration tests) in in-container mode. You should be able to use the lessons learned here to debug tests in an alternate IDE.</para>
+ <section>
+ <title>Leveraging Eclipse's plugin ecosystem</title>
+ <para>The primary motivation for building the test harness on top of an existing testing framework is to allow the tests to be executed and debugged in an Integrated Development Environment (IDE) using availalbe plugins. It's also the easiest way to execute a test class in isolation.</para>
+ <para>The TCK can be executed in any IDE for which there is a TestNG plugin available. Running a test in Eclipse is almost as simple as running the test with the Eclipse TestNG plugin. You can also use the plugin to debug a test, which is described in the next chapter.</para>
+ <para>Before running a test from the TCK test suite in Eclipse, you must have the Eclipse <ulink url="http://testng.org">TestNG plugin</ulink> and the m2eclipse plugin installed. Refer to section 2.2.2 for more information on these plugins.</para>
+ <para>With the m2eclipse plugin installed, Eclipse should recognize the JSR-299 TCK projects as valid Eclipse projects (or any Web Beans project for that matter). Import them into the Eclipse workspace at this time. You should also import the JSR-299 RI projects if you want to debug into that code, which is covered later.</para>
+ </section>
+ <section>
+ <title>Readying the Eclipse workspace</title>
+ <para>When setting up your Ecilpse workspace, I recommend creating three workings sets: one for the JSR-299 RI (Web Beans), one for the JSR-299 TCK and one for the JBoss TCK Runner. The dependencies between the projects will be established automatically by the m2eclipse plugin based on the dependency information in the pom.xml files. Your workspace should appear as follows:</para>
+ <programlisting>JSR-299 RI
+ jsr299-api
+ webbeans-api
+ webbeans-core
+ webbeans-core-test
+ webbeans-logging
+ webbeans-parent
+ webbeans-spi
+ webbeans-version-matrix
+JSR-299 TCK
+ jsr299-tck-api
+ jsr299-tck-impl
+ parent
+Web Beans JBoss TCK Runner
+ webbeans-jboss-tck-runner
+ webbeans-porting-package</programlisting>
+ <para>The tests in the TCK test suite are located in the jsr299-tck-impl project. You'll be working within this project in Eclipse when you are developing tests. However, you learned earlier, there are no references to a JSR-299 implementation in the TCK. So how can you execute an individual test in Eclipse? The secret is that you need to establish a link in Eclipse (not in Maven) between the jsr299-tck-impl project and your TCK runner project, which in this case is webbeans-jboss-tck-runner. Here are the steps to establish the link:</para>
+ <orderedlist>
+ <listitem>
+ <para>Right click on the jsr299-tck-impl project</para>
+ </listitem>
+ <listitem>
+ <para>Select Build Path > Configure Build Path...</para>
+ </listitem>
+ <listitem>
+ <para>Click on the Projects tab</para>
+ </listitem>
+ <listitem>
+ <para>Click the Add... button on the right</para>
+ </listitem>
+ <listitem>
+ <para>Check the TCK runner project (e.g., webbeans-jboss-tck-runner)</para>
+ </listitem>
+ <listitem>
+ <para>Click the OK button on the Required Project Selection dialog window</para>
+ </listitem>
+ <listitem>
+ <para>Click the OK button on the Java Build Path window</para>
+ </listitem>
+ </orderedlist>
+ <para>The TCK runner project should pull in the JSR-299 implementation, the TCK porting package and any additional properties that must be defined to execute the TCK test suite.</para>
+ </section>
+ <section>
+ <title>Running a test in standalone mode</title>
+ <para>Your now ready to execute an individual test class (a class which extends AbstractJSR299Test and is annotated with @Artifact). Select a test class that is <emphasis role="italic">not</emphasis> annotated with <literal>@IntegrationTest</literal> and open it in the Eclipse editor. Right click in the editor view and select TestNG > Run as test. The TestNG view should pop out and you should see all the tests pass (hopefully).</para>
+ <note>
+ <para>If the TCK complains that there is a property missing, close all the projects, open them again, and rebuild. The m2eclipse plugin can be finicky getting everything built correctly the first time.</para>
+ </note>
+ <para>So far you have executed a test in standalone mode. That's not sufficient to pass the TCK. The test must be executed in in-container mode. Using in-container mode also the only way to execute a test annotated with <literal>@IntegrationTest</literal> as it requires container resources. So let's see what has to be done to execute an integration test. This will result in the artifact being deployed to the container, which is JBoss AS 5.1 if you are using the JBoss TCK runner.</para>
+ </section>
+ <section>
+ <title>Running integration tests</title>
+ <para>As you have learned, the JBoss test harness determines how to behave based on the values of numerous system properties or properties defined in META-INF/jboss-test-harness.properties classpath resources. If the property named <literal>org.jboss.testharness.standalone</literal> is not defined, the harness assumes that the test is to be run in standalone mode. In order to run the tests in the container, you need to add a properties file to the classpath that sets the standalone property to false and provides values for other properties required to run an in-container test.</para>
+ <para>The JBoss TCK runner project conveniently provides the properties file src/test/debug-resources/META-INF/jboss-test-harness.properties that contains all of the necessary properties. You may have to tune the <literal>org.jboss.testharness.container.extraConfigurationDir</literal> and <literal>org.jboss.testharness.libraryDirectory</literal> properties to point to the relative location of the related projects. The properties should be defined as follows:</para>
+ <itemizedlist>
+ <listitem>
+ <para><literal>org.jboss.testharness.container.extraConfigurationDir</literal> - the relative path from the jboss-tck-impl project to a directory that contains a build.properties or local.build.properties file defining the location of a JBoss AS 5.1 installation in the <literal>jboss.home</literal> property</para>
+ </listitem>
+ <listitem>
+ <para><literal>org.jboss.testharness.libraryDirectory</literal> - the relative path from the jboss-tck-impl project to the target/dependency/lib directory in the TCK runner project.</para>
+ </listitem>
+ </itemizedlist>
+ <para>The other properties in that file are defined as follows:</para>
+ <programlisting>org.jboss.testharness.standalone=false
+orjboss.testharness.container.forceRestart=false
+orjboss.testharness.runIntegrationTests=true</programlisting>
+ <para>You're now ready to execute an integration test. Select an integration test (a class that extends <literal>AbstractJSR299Test</literal> and is annotated with both <literal>@Artifact</literal> and <literal>@IntegrationTest</literal>) and open it in your Eclipse editor. Follow these steps to execute the class with the TestNG plugin:</para>
+ <orderedlist>
+ <listitem>
+ <para>Right click in the editor view and select TestNG > Run as test</para>
+ </listitem>
+ <listitem>
+ <para>Observe the test fail because of missing dependencies</para>
+ </listitem>
+ <listitem>
+ <para>Select the Run > Run Configurations... menu from the main menubar</para>
+ </listitem>
+ <listitem>
+ <para>Select the name of the test class under the TestNG category</para>
+ </listitem>
+ <listitem>
+ <para>Select the Classpath tab</para>
+ </listitem>
+ <listitem>
+ <para>Select User Entries in the tree</para>
+ </listitem>
+ <listitem>
+ <para>Click the Advanced... button on the right</para>
+ </listitem>
+ <listitem>
+ <para>Select Add Folders and click the OK button</para>
+ </listitem>
+ <listitem>
+ <para>Select the webbeans-jboss-tck-runner/src/test/debug-resources folder</para>
+ </listitem>
+ <listitem>
+ <para>Click the OK button on the Folder Selection dialog window</para>
+ </listitem>
+ <listitem>
+ <para>Click on the webbeans-jboss-tck-runner entry</para>
+ </listitem>
+ <listitem>
+ <para>Move the webbeans-jboss-tck-runner to the first entry using the Up button</para>
+ </listitem>
+ <listitem>
+ <para>Click the Run button on the Run Configurations dialog window</para>
+ </listitem>
+ </orderedlist>
+ <para>When you run the test this time, it should pass. If you get a failure that the container (e.g., JBoss AS 5.1) must be run with assertions enabled, you need to stop the container and start it with the -ea flag (or just leave it stopped and the test will start it appropriately). </para>
+ <para>You can simply right click and select TestNG > Run as test for all subsequent runs for the reason cited earlier, the run configuration for a class is retained indefinitely.</para>
+ <para>Alternatively, you can configure TestNG to execute all tests in-container by default by adding the properties file in the debug-resources folder to the project's classpath as follows:</para>
+ <orderedlist>
+ <listitem>
+ <para>Right click on the jsr299-tck-impl project</para>
+ </listitem>
+ <listitem>
+ <para>Select Build Path > Configure Build Path...</para>
+ </listitem>
+ <listitem>
+ <para>Click on the Libraries tab</para>
+ </listitem>
+ <listitem>
+ <para>Click the Add Class Folder... button on the right</para>
+ </listitem>
+ <listitem>
+ <para>Check the webbeans-jboss-tck-runner/src/test/debug-resources folder</para>
+ </listitem>
+ <listitem>
+ <para>Click the OK button on the Class Folder Selection dialog window</para>
+ </listitem>
+ <listitem>
+ <para>Click the OK button on the Java Build Path window</para>
+ </listitem>
+ </orderedlist>
+ <para>Now you don't have to do any special configuration for each test class.</para>
+ <para>You can stop the individual tests from running in-container by reversing the steps above to remove the debug-resources folder from the Eclipse classpath. </para>
+ <para>You have now mastered running the JSR-299 TCK against the JSR-299 RI using both Maven 2 and within Eclipse. Now you're likely interested in how to debug a test so that you can efficiently investigate test failures.</para>
+ </section>
+</chapter>
Modified: tck/trunk/doc/reference/en-US/executing.xml
===================================================================
--- tck/trunk/doc/reference/en-US/executing.xml 2009-07-14 18:32:29 UTC (rev 3051)
+++ tck/trunk/doc/reference/en-US/executing.xml 2009-07-15 04:20:28 UTC (rev 3052)
@@ -1,41 +1,194 @@
<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
<chapter id="executing">
- <title>Executing Tests</title>
- <para>This chapter explains how to execute the TCK against the JSR-299 RI as well as your own implementation. The JSR-299 TCK uses the Maven 2 TestNG plugin and the JBoss Test Harness to execute the tests in the test suite. For detailed instructions that explain how to use the JBoss Test Harness, see the JBoss Test Harness documentation.</para>
+ <title>Executing the Test Suite</title>
+ <para>This chapter explains how to run the TCK on the JSR-299 RI as well as your own implementation. The JSR-299 TCK uses the Maven 2 TestNG plugin and the JBoss Test Harness to execute the test suite. Learning to execute the test suite from Maven 2 is prerequisite knowlege for running the tests in an IDE, such as Eclipse.</para>
<section>
- <title>Launching the Test Suite</title>
- <para>Each test class is treated as an individual artifact (hence the <literal>@Artifact</literal> annotation on the class). All test methods (i.e., methods annotated with <literal>@Test</literal>) in the same class are run in a single environment, meaning bean discovery occurs exactly once per artifact and the same BeanManager is used by each test method in the class.</para>
- <para>The test suite is executed by the TestNG plugin for Maven 2 during the test phase of the Maven 2 life cycle. The execution happens within a TCK runner project (as opposed to the TCK project itself). Web Beans includes a TCK runner project that executes the JSR-299 TCK against the JSR-299 RI (Web Beans) on JBoss AS 5.1. To execute the JSR-299 TCK against your own JSR-299 implementation, you must modify the TCK runner project included with Web Beans to use your JSR-299 implementation as described in section XX.X.</para>
- <section>
- <title>Running the Tests In Standalone Mode</title>
- <para>To execute the TCK test suite against the JSR-299 RI, first change to the jboss-tck-runner directory in the extracted Web Beans distribution:</para>
- <programlisting>cd <webbeans_install_dir>/jboss-tck-runner</programlisting>
- <para>Then execute the Maven 2 life cycle through the test phase:</para>
- <programlisting>mvn test</programlisting>
- <para>Without any command-line flags, the test suite is run in standalone mode, which means that any test class with the <literal>@org.jboss.testharness.impl.packaging.IntegrationTest</literal> annotation is skipped. This mode uses the <literal>StandaloneContainers</literal> SPI to invoke the test artifact within a mock Java EE life cycle and capture the results of the test. However, passing the suite in this mode is not sufficient to pass the TCK as a whole. The suite must be passed while executing using in-container mode.</para>
- </section>
- <section>
- <title>Running the Tests In In-Container Mode</title>
- <para>To execute the test suite using in-container mode, you first have to set the property <literal>jboss.home</literal> to the location of a JBoss AS 5.1 installation in the following Java properties file in the extracted Web Beans distribution:</para>
- <programlisting><webbeans_install_dir>/jboss-as/local.build.properties</programlisting>
- <para>Then add the <literal>incontainer</literal> property to the command that launches the Maven 2 life cycle:</para>
- <programlisting>mvn test -Dincontainer</programlisting>
- <para>The presence of the <literal>incontainer</literal> property activates a Maven 2 profile that assigns the <literal>org.jboss.testharness.standalone</literal> system property to <literal>false</literal> and the <literal>org.jboss.testharness.runIntegrationTests</literal> system property to <literal>true</literal>, hence activing the in-container test mode.</para>
- <para>When the Maven 2 life cycle is run with the <literal>incontainer</literal> property present, all the test artifacts in the test suite are executed. The in-container mode uses the <literal>Containers</literal> SPI to deploy the test artifact to the container and execute the test in a true Java EE life cycle.</para>
- <para>Since in-container tests are executed in a remote JVM, the results of the test must be communicated back to the runner over a container-supported protocol. The TCK provides servlet-based communication over HTTP.</para>
- </section>
- <section>
- <title>Running a Subset of Tests</title>
- <para/>
- </section>
- <section>
- <title>Dumping a Test Artifact</title>
- <para/>
- </section>
- <section>
- <title>Running a Test in Eclipse</title>
- <para/>
- </section>
+ <title>The Test Suite Runner</title>
+ <para>Each test class is treated as an individual artifact (hence the <literal>@Artifact</literal> annotation on the class). All test methods (i.e., methods annotated with <literal>@Test</literal>) in the test class are run in the same JSR-299 root context, meaning bean discovery occurs exactly once per artifact and the same BeanManager is used by each test method in the class.</para>
+ <para>The test suite is executed by the Maven 2 TestNG plugin during the test phase of the Maven 2 life cycle. The execution happens within a TCK runner project (as opposed to the TCK project itself). Web Beans includes a TCK runner project that executes the JSR-299 TCK on the JSR-299 RI (Web Beans) running inside JBoss AS 5.1. To execute the JSR-299 TCK on your own JSR-299 implementation, you must modify the TCK runner project included with Web Beans to use your JSR-299 implementation as described in section 4.2.</para>
</section>
+ <section>
+ <title>Running the Tests In Standalone Mode</title>
+ <para>To execute the TCK test suite against the JSR-299 RI, first switch to the jboss-tck-runner directory in the extracted Web Beans distribution:</para>
+ <programlisting>cd <webbeans_install_dir>/jboss-tck-runner</programlisting>
+ <para>Then execute the Maven 2 life cycle through the test phase:</para>
+ <programlisting>mvn test</programlisting>
+ <para>Without any command-line flags, the test suite is run in standalone mode, which means that any test class with the <literal>@org.jboss.testharness.impl.packaging.IntegrationTest</literal> annotation is skipped. This mode uses the <literal>StandaloneContainers</literal> SPI to invoke the test artifact within a mock Java EE life cycle and capture the results of the test. However, passing the suite in this mode is not sufficient to pass the TCK as a whole. The suite must be passed while executing in in-container mode.</para>
+ </section>
+ <section>
+ <title>Running the Tests In the Container</title>
+ <para>To execute the test suite using in-container mode with the JBoss TCK runner, you first have to set the property <literal>jboss.home</literal> to the location of a JBoss AS 5.1 installation. This property is set in the following Java properties file within the extracted Web Beans distribution:</para>
+ <programlisting><webbeans_install_dir>/jboss-as/local.build.properties</programlisting>
+ <para>Then, add the <literal>incontainer</literal> property to the command that launches the Maven 2 life cycle:</para>
+ <programlisting>mvn test -Dincontainer</programlisting>
+ <para>The presence of the <literal>incontainer</literal> property activates a Maven 2 profile that assigns the <literal>org.jboss.testharness.standalone</literal> system property to <literal>false</literal> and the <literal>org.jboss.testharness.runIntegrationTests</literal> system property to <literal>true</literal>, hence activing the in-container test mode.</para>
+ <para>When the Maven 2 life cycle is run with the <literal>incontainer</literal> property present, all the test artifacts in the test suite are executed. The in-container mode uses the <literal>Containers</literal> SPI to deploy the test artifact to the container and execute the test in a true Java EE life cycle. The JBoss TCK runner has a dependency on the library that provides an implementation of this interface for JBoss AS 5.1.</para>
+ <para>Since in-container tests are executed in a remote JVM, the results of the test must be communicated back to the runner over a container-supported protocol. The JBoss Test Harness provides servlet-based communication over HTTP as described in section 3.3.</para>
+ </section>
+ <section>
+ <title>Running a Subset of Tests</title>
+ <para>The TCK test suite is controlled by a TestNG descriptor. The TestNG descriptor tck-tests.xml, located in the src/main/resources directory of the jsr299-tck-impl project, defines the TCK test suite. The main configuration in this file is the packages filter, shown below, which instructs TestNG to look in the <literal>org.jboss.jsr299.tck.tests</literal> package to find the test classes.</para>
+ <programlisting><packages>
+ <package name="org.jboss.jsr299.tck.tests"/>
+</packages></programlisting>
+ <para>The descriptor also includes configuration of a method selector implementation, shown below, that allows integration tests to be skipped when the test suite is executed in standalone mode.</para>
+ <programlisting><method-selectors>
+ <method-selector>
+ <selector-class name="org.jboss.testharness.impl.
+testng.DisableIntegrationTestsMethodSelector" />
+ </method-selector>
+</method-selectors></programlisting>
+ <para>You may also notice other filters in this class, which are used to disable broken tests while the JSR-299 RI and the TCK are being developed. When both are final, you can expect these filters to be removed. However, you may want to use similar filters to disable tests while you are working on an implementation. Alternatively, you can explicity list the classes that you want to have executed if you are focusing on a specific area of the TCK. See the <ulink url="http://testng.org/doc/documentation-main.html">TestNG reference guide</ulink> for more information about how you can control which classes are selected to be run when the test suite is executed.</para>
+ </section>
+ <section>
+ <title>Dumping the Test Artifacts</title>
+ <para>As you have learned, when the test suite is executing using in-container mode, each test class is packaged as a deployable artifact and deployed to the container. The test is then executed within the context of the deployed application. This leaves room for errors in packaging. When investingating a test failure, it's helpful to be able to inspect the artifact after it is generated. The TCK can accomodate this type of inspection by "dumping" the generated artifact to disk.</para>
+ <para>If the <literal>dumpArtifacts</literal> is defined as a system property or defined in the classpath resource META-INF/jboss-test-harness.properties and has a value of <literal>true</literal>, the JBoss Test Harness will write the artifact to an output directory prior to deploying it to the server. This behavior is activated in the jboss-tck-runner project by appending the <literal>dumpArtifacts</literal> command line property to the end of the command that invokes the Maven test phase.</para>
+ <programlisting>mvn test -Dincontainer -DdumpArtifacts</programlisting>
+ <para>If you only want to write the artifacts to disk, and avoid executing the test suite, you can simply execute the main method of the class <literal>org.jboss.testharness.api.TCK</literal>. This execution is configured as a Maven profile that is activated when the <literal>dumpArtifacts</literal> command line property is defined:</para>
+ <programlisting>mvn test-compile -DdumpArtifacts</programlisting>
+ <para>The output directory where the artifacts are written is defined by the property <literal>org.jboss.testharness.outputDirectory</literal>. The jboss-tck-runner project is configured to dump the artifacts to the target/jsr299-artifacts directory.</para>
+ <para>Once the artifact is written to disk, you have to option of manually deploying it to the container. You can execute the tests in the artfact by requesting the context path of the application in the browser. If you want to execute an individual test method, specify the method name in the <literal>methodName</literal> request parameter (e.g., ?methodName=testMethodName).</para>
+ </section>
+ <section>
+ <title>Running a Test in Eclipse</title>
+ <para>The primary motivation for building the test harness on top of an existing testing framework is to allow the tests to be executed and debugged in an Integrated Development Environment (IDE) using availalbe plugins. It's also the easiest way to execute a test class in isolation.</para>
+ <para>The TCK can be executed in any IDE for which there is a TestNG plugin available. Running a test in Eclipse is almost as simple as running the test with the Eclipse TestNG plugin. You can also use the TestNG plugin to debug a test, which is described in the next chapter.</para>
+ <para>Before running a test from the TCK test suite in Eclipse, you must have the Eclipse <ulink url="http://testng.org">TestNG plugin</ulink> installed. Instructions for using the TestNG update site to add the TestNG plugin to Eclipse are provided on the TestNG <ulink url="http://testng.org/doc/download.html">download page</ulink>. You can find a tutorial that explains how to use the TestNG plugin on the TestNG <ulink url="http://testng.org/doc/eclipse.html">Eclipse page</ulink>.</para>
+ <para>You should also have the <ulink url="http://m2eclipse.codehaus.org">m2eclipse plugin</ulink> installed. This plugin absolutely essential for working with Maven 2 projects, which both the JSR-299 RI and the TCK are. Instructions for using the m2eclipse update site to add the m2eclipse plugin to Eclipse are provided on the m2eclipse home page. Sonatype, the company that maintains the m2eclipse plugin and is a strong supporter of Maven, publishes an entire <ulink url="http://www.sonatype.com/books/m2eclipse-book/reference">reference guide</ulink> dedicated to the plugin on their website.</para>
+ <para>Once you have the m2eclipse plugin installed, import the JSR-299 TCK projects. You should also import the JSR-299 RI projects if you want to debug into that code.</para>
+ <para>When setting up your Ecilpse workspace, I recommend creating three workings sets: one for the JSR-299 RI (Web Beans), one for the JSR-299 TCK and one for the JBoss TCK Runner. The dependencies between the projects will be established automatically by the m2eclipse plugin based on the dependency information in the pom.xml files. Your workspace should appear as follows:</para>
+ <programlisting>JSR-299 RI
+ jsr299-api
+ webbeans-api
+ webbeans-core
+ webbeans-core-test
+ webbeans-logging
+ webbeans-parent
+ webbeans-spi
+ webbeans-version-matrix
+JSR-299 TCK
+ jsr299-tck-api
+ jsr299-tck-impl
+ parent
+Web Beans JBoss TCK Runner
+ webbeans-jboss-tck-runner
+ webbeans-porting-package</programlisting>
+ <para>The tests in the TCK test suite are located in the jsr299-tck-impl project. You'll be working within this project in Eclipse when you are developing tests. However, you learned earlier, there are no references to a JSR-299 implementation in the TCK. So how can you execute an individual test in Eclipse? The secret is that you need to establish a link in Eclipse (not in Maven) between the jsr299-tck-impl project and your TCK runner project, which in this case is webbeans-jboss-tck-runner. Here are the steps to establish the link:</para>
+ <orderedlist>
+ <listitem>
+ <para>Right click on the jsr299-tck-impl project</para>
+ </listitem>
+ <listitem>
+ <para>Select Build Path > Configure Build Path...</para>
+ </listitem>
+ <listitem>
+ <para>Click on the Projects tab</para>
+ </listitem>
+ <listitem>
+ <para>Click the Add... button on the right</para>
+ </listitem>
+ <listitem>
+ <para>Check the TCK runner project (e.g., webbeans-jboss-tck-runner)</para>
+ </listitem>
+ <listitem>
+ <para>Click the OK button on the Required Project Selection dialog window</para>
+ </listitem>
+ <listitem>
+ <para>Click the OK button on the Java Build Path window</para>
+ </listitem>
+ </orderedlist>
+ <para>The TCK runner project should pull in the JSR-299 implementation, the TCK porting package and any additional properties that must be defined to execute the TCK test suite.</para>
+ <para>Your now ready to execute an individual test class (a class which extends AbstractJSR299Test and is annotated with @Artifact). Select a test class that is <emphasis role="italic">not</emphasis> annotated with <literal>@IntegrationTest</literal> and open it in the Eclipse editor. Right click in the editor view and select TestNG > Run as test. The TestNG view should pop out and you should see all the tests pass (hopefully).</para>
+ <note>
+ <para>If the TCK complains that there is a property missing, close all the projects, open them again, and rebuild. The m2eclipse plugin can be finicky getting everything built correctly the first time.</para>
+ </note>
+ <para>So far you have executed a test in standalone mode. That's not sufficient to pass the TCK. The test must be executed in in-container mode. Using in-container mode also the only way to execute a test annotated with <literal>@IntegrationTest</literal> as it requires container resources. So let's see what has to be done to execute an integration test. This will result in the artifact being deployed to the container, which is JBoss AS 5.1 if you are using the JBoss TCK runner.</para>
+ <para>As you have learned, the JBoss test harness determines how to behave based on the values of numerous system properties or properties defined in META-INF/jboss-test-harness.properties classpath resources. If the property named <literal>org.jboss.testharness.standalone</literal> is not defined, the harness assumes that the test is to be run in standalone mode. In order to run the tests in the container, you need to add a properties file to the classpath that sets the standalone property to false and provides values for other properties required to run an in-container test.</para>
+ <para>The JBoss TCK runner project conveniently provides the properties file src/test/debug-resources/META-INF/jboss-test-harness.properties that contains all of the necessary properties. You may have to tune the <literal>org.jboss.testharness.container.extraConfigurationDir</literal> and <literal>org.jboss.testharness.libraryDirectory</literal> properties to point to the relative location of the related projects. The properties should be defined as follows:</para>
+ <itemizedlist>
+ <listitem>
+ <para><literal>org.jboss.testharness.container.extraConfigurationDir</literal> - the relative path from the jboss-tck-impl project to a directory that contains a build.properties or local.build.properties file defining the location of a JBoss AS 5.1 installation in the <literal>jboss.home</literal> property</para>
+ </listitem>
+ <listitem>
+ <para><literal>org.jboss.testharness.libraryDirectory</literal> - the relative path from the jboss-tck-impl project to the target/dependency/lib directory in the TCK runner project.</para>
+ </listitem>
+ </itemizedlist>
+ <para>The other properties in that file are defined as follows:</para>
+ <programlisting>org.jboss.testharness.standalone=false
+org.oss.testharness.container.forceRestart=false
+org.oss.testharness.runIntegrationTests=true</programlisting>
+ <para>You're now ready to execute an integration test. Select an integration test (a class that extends <literal>AbstractJSR299Test</literal> and is annotated with both <literal>@Artifact</literal> and <literal>@IntegrationTest</literal>) and open it in your Eclipse editor. Follow these steps to execute the class with the TestNG plugin:</para>
+ <orderedlist>
+ <listitem>
+ <para>Right click in the editor view and select TestNG > Run as test</para>
+ </listitem>
+ <listitem>
+ <para>Observe the test fail because of missing dependencies</para>
+ </listitem>
+ <listitem>
+ <para>Select the Run > Run Configurations... menu from the main menubar</para>
+ </listitem>
+ <listitem>
+ <para>Select the name of the test class under the TestNG category</para>
+ </listitem>
+ <listitem>
+ <para>Select the Classpath tab</para>
+ </listitem>
+ <listitem>
+ <para>Select User Entries in the tree</para>
+ </listitem>
+ <listitem>
+ <para>Click the Advanced... button on the right</para>
+ </listitem>
+ <listitem>
+ <para>Select Add Folders and click the OK button</para>
+ </listitem>
+ <listitem>
+ <para>Select the webbeans-jboss-tck-runner/src/test/debug-resources folder</para>
+ </listitem>
+ <listitem>
+ <para>Click the OK button on the Folder Selection dialog window</para>
+ </listitem>
+ <listitem>
+ <para>Click on the webbeans-jboss-tck-runner entry</para>
+ </listitem>
+ <listitem>
+ <para>Move the webbeans-jboss-tck-runner to the first entry using the Up button</para>
+ </listitem>
+ <listitem>
+ <para>Click the Run button on the Run Configurations dialog window</para>
+ </listitem>
+ </orderedlist>
+ <para>When you run the test this time, it should pass. If you get a failure that the container (e.g., JBoss AS 5.1) must be run with assertions enabled, you need to stop the container and start it with the -ea flag (or just leave it stopped and the test will start it appropriately). </para>
+ <para>You can simply right click and select TestNG > Run as test for all subsequent runs for the reason cited earlier, the run configuration for a class is retained indefinitely.</para>
+ <para>Alternatively, you can configure TestNG to execute all tests in-container by default by adding the properties file in the debug-resources folder to the project's classpath as follows:</para>
+ <orderedlist>
+ <listitem>
+ <para>Right click on the jsr299-tck-impl project</para>
+ </listitem>
+ <listitem>
+ <para>Select Build Path > Configure Build Path...</para>
+ </listitem>
+ <listitem>
+ <para>Click on the Libraries tab</para>
+ </listitem>
+ <listitem>
+ <para>Click the Add Class Folder... button on the right</para>
+ </listitem>
+ <listitem>
+ <para>Check the webbeans-jboss-tck-runner/src/test/debug-resources folder</para>
+ </listitem>
+ <listitem>
+ <para>Click the OK button on the Class Folder Selection dialog window</para>
+ </listitem>
+ <listitem>
+ <para>Click the OK button on the Java Build Path window</para>
+ </listitem>
+ </orderedlist>
+ <para>Now you don't have to do any special configuration for each test class.</para>
+ <para>You can stop the individual tests from running in-container by reversing the steps above to remove the debug-resources folder from the Eclipse classpath. </para>
+ <para>You have now mastered running the JSR-299 TCK against the JSR-299 RI using both Maven 2 and within Eclipse. Now you're likely interested in how to debug a test so that you can efficiently investigate test failures.</para>
+ </section>
</chapter>
Added: tck/trunk/doc/reference/en-US/images/in-container-execution.png
===================================================================
(Binary files differ)
Property changes on: tck/trunk/doc/reference/en-US/images/in-container-execution.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: tck/trunk/doc/reference/en-US/installation.xml
===================================================================
--- tck/trunk/doc/reference/en-US/installation.xml 2009-07-14 18:32:29 UTC (rev 3051)
+++ tck/trunk/doc/reference/en-US/installation.xml 2009-07-15 04:20:28 UTC (rev 3052)
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
<chapter id="installation">
<title>Installation</title>
<para>This chapter explains how to obtain the TCK and supporting software and provides recommendations for how to install/extract it on your system.</para>
@@ -7,11 +7,11 @@
<title>Obtaining the Software</title>
<para>You can obtain the JSR-299 TCK project from the <ulink url="http://anonsvn.jboss.org/repos/webbeans/tck/trunk">JBoss SVN repository</ulink> or you can download a release from the <ulink url="http://seamframework.org/Download">download page</ulink> on Seam Framework website. The JSR-299 TCK is distributed as a ZIP file, which contains a multi-module Maven 2 project, the test suite, the test suite descriptor, the audit document and documentation. At the time of writing there is no official release of the JSR-299 TCK available, so you need to check out the TCK from the JBoss SVN repository.</para>
<para>The TCK project downloads additional required libraries from the JBoss Maven 2 repository automatically, including the JBoss Test Harness and the JSR-299 API. You may follow this approach when assembling a TCK runner for your JSR-299 implementation.</para>
- <para>The JSR-299: Contexts and Dependency Injection for Java EE 1.0 reference implementation (RI) is Web Beans. You can obtain the latest Web Beans release from the <ulink url="http://seamframework.org/Download">download page</ulink> on Seam Framework website. Web Beans includes a TCK runner that executes the TCK using the RI by deploying the test artifacts to JBoss AS 5.</para>
+ <para>The JSR-299: Contexts and Dependency Injection for Java EE 1.0 reference implementation (RI) is Web Beans. You can obtain the latest Web Beans release from the <ulink url="http://seamframework.org/Download">download page</ulink> on Seam Framework website. Web Beans includes a TCK runner that executes the TCK on the JSR-299 RI by deploying the test artifacts to JBoss AS 5.1.</para>
<note>
<para>The JSR-299 RI (Web Beans) is not required for running the JSR-299 TCK, but it can be useful as a reference for familiarizing yourself with the TCK before testing your own JSR-299 implementation.</para>
</note>
- <para>Executing the TCK requires a Java EE 5 or better runtime environment (i.e., application server), to which the test artifacts are deployed. The TCK does not depend on any particular implementation, only that it is compliant. However, if you decide to use JBoss AS 5 as the target container, you can use the JBoss AS 5 connector provided with the JBoss Test Harness, alleviating the requirement of implementing the <literal>org.jboss.jsr299.tck.spi.Containers</literal> interface from the TCK Porting Package. You can download JBoss AS 5 from the JBoss AS <ulink url="http://jboss.org/jbossas/downloads">project page</ulink>.</para>
+ <para>Executing the TCK requires a Java EE 5 or better runtime environment (i.e., application server), to which the test artifacts are deployed and invoked. The TCK does not depend on any particular Java EE implementation, only that it is compliant. However, if you decide to use JBoss AS 5.1 as the target container, you can use the JBoss AS 5.1 connector provided with the JBoss Test Harness, alleviating the requirement of implementing the <literal>org.jboss.jsr299.tck.spi.Containers</literal> SPI from the TCK porting package. You can download JBoss AS 5.1 from the JBoss AS <ulink url="http://jboss.org/jbossas/downloads">project page</ulink>.</para>
<para>Naturally, to execute Java programs, you must have a Java SE runtime environment. The TCK requires Java SE 1.5 or better, which you can obtain from the <ulink url="http://java.sun.com">Java Software</ulink> website.</para>
</section>
<section>
@@ -23,7 +23,7 @@
<para>Java SE 5.0 or better</para>
</listitem>
<listitem>
- <para>Java EE 5 or better (e.g., JBoss AS 5 or GlassFish V3)</para>
+ <para>Java EE 5 or better (e.g., JBoss AS 5.x or GlassFish V3)</para>
</listitem>
</itemizedlist>
<para>You can download Java SE from the <ulink url="http://java.sun.com/products">Java Software</ulink>
@@ -31,9 +31,48 @@
Refer to the instructions that accompany
the software for how to install it on your system.
You should be sure that the <literal>JAVA_HOME</literal> environment variable is assigned to the location of the Java SE software before you consider the installation complete.</para>
- <para>Which Java EE runtime environment to use is your choice. Keep in mind, though, that you must provide a custom connector if the application server you are using is not supported by the JBoss Test Harness. At the time of writing, JBoss AS 5 is the only supported application server. Hence, JBoss AS 5 is the recommend Java EE runtime environment.</para>
- <para>JBoss AS 5 can be downloaded from the JBoss AS project page. Refer to the instructions that accompany the software for how to install it on your system. Although not required, it's recommended that you set the <literal>JBOSS_HOME</literal> environment variable to the location of the JBoss AS software.</para>
- <para>The remaining components required to setup and execute the TCK are merely extracted. It's recommended that you first create a workspace directory named "jsr299" to host the JSR-299 implementation and the TCK. Within that directory you should extract the TCK software into a folder named "tck".</para>
- <para>...</para>
+ <para>Which Java EE runtime environment to use is your choice. Keep in mind, though, that you must provide a custom connector if the application server you are using is not supported by the JBoss Test Harness. At the time of writing, JBoss AS 5.1 is the only supported application server (table showing supported versions?) and is therefore the recommend Java EE runtime environment.</para>
+ <para>JBoss AS 5.1 can be downloaded from the JBoss AS project page. Refer to the instructions that accompany the software to learn how to install it on your system. Although not required, it's recommended that you set the <literal>JBOSS_HOME</literal> environment variable to the location of the JBoss AS software.</para>
+ <para>The rest of the TCK software can simply be extracted. It's recommended that you create a folder named jsr299 to hold all of the jsr299-related projects. Then, extract the TCK distribution into a subfolder named tck. If you have downloaded the Web Beans distribution, extract it into a sibling folder named webbeans. The resulting folder structure is shown here:</para>
+ <programlisting>jsr299/
+ webbeans/
+ tck/</programlisting>
+ <para>This arrangement becomes important later on when executing tests in Eclipse.</para>
+ <section>
+ <title>Web Beans deployer</title>
+ <para>When the TCK test suite is run (using in-container mode), it expects to test the JSR-299 implementation provided by the application server. Therefore, you need to install the JSR-299 implementation in the application server.</para>
+ <para>The JSR-299 RI (Web Beans) includes a JBoss AS integration project that installs a special deployer on JBoss AS 5.x that activates the JSR-299 RI per application when the application is deployed. The Web Beans deployer is installed in JBoss AS 5.x from the jboss-as directory in the Web Beans distribution.</para>
+ <para>To install the web beans deployer, first make sure the <literal>jboss.home</literal> property in the local.build.properties file in the jboss-as directory references a JBoss AS 5.1 installation:</para>
+ <programlisting>jboss.home=/path/to/jboss-as-5.1</programlisting>
+ <para>Then, run Ant from the jboss-as directory to install the deployer:</para>
+ <programlisting>ant update</programlisting>
+ <para>The libraries needed by the deployer are fetched from the Maven 2 repository on demand. The versions of the libraries fetched are defined in the build.properties files in that directory.</para>
+ </section>
+ <section>
+ <title>Maven 2 and Maven 2 artifacts</title>
+ <para>As mentioned earlier, because the JSR-299 RI and TCK are built with Maven 2, it's essential to have Maven 2 installed on the system. You can find documention on how to install Maven 2 in the <ulink url="http://www.sonatype.com/books/maven-book/reference/installation-sect-mave...">Maven: The Definitive Guide</ulink> book published by Sonatype. It merely entails extracting the distribution and putting the bin directory in the user's PATH environment variable.</para>
+ <programlisting>export PATH="<maven2_install_dir>/bin:$PATH"</programlisting>
+ <para>The TCK runner, introduced in section 4.2, is organized as a Maven 2 project (herein referred to as a Maven project). Therefore, it expects to retrieve all dependent artifacts (JAR files) from the local Maven repository. If the artifact is missing from the local repository, it will be fetched remotely from the JBoss Maven repository and cached in the local repository.</para>
+ <para>One option for executing the TCK the first time is to allow Maven fetch all required dependencies. If you want to use your own implementation of the TCK porting package, or if you are running the TCK against your own JSR-299 implementation, you need to install the cooresponding artifacts into your local Maven repository, at the very least. If you don't want to use Maven at all, you'll need to implement a project the executes the TCK runner from scratch. This guide assumes the use of the Maven project structure.</para>
+ <para>If your JSR-299 implementation uses a Maven project structure, you can have Maven install the artifact into your local Maven repository in the normal way:</para>
+ <programlisting>mvn install</programlisting>
+ <para>If you are not using a Maven project structure, you can install each artifact into your local Maven respository using the install goal:</para>
+ <programlisting>mvn install:install-file \
+-Dfile=jsr299-impl.jar \
+-DgroupId=com.company.jsr299 \
+-DartifactId=jsf299-impl \
+-Dversion=1.0 \
+-Dpackaging=jar</programlisting>
+ <para>You can use this command template for installing any JAR file you need into your local Maven respository.</para>
+ <note>
+ <para>The JSR-299 implementation doesn't have to be on the classpath of the TCK runner when executing the TCK in in-container mode. The JSR-299 implemention is expected to be provided by a compliant Java EE container. However, the implementation does have to be on the classpath when executing the test suite in standalone mode.</para>
+ </note>
+ </section>
+ <section>
+ <title>Eclipse plugins</title>
+ <para>Eclipse, or any other IDE, is not required to execute or pass the TCK. However, executing and debugging tests in the IDE is essential for a licensee attempting to get a JSR-299 implementation to pass the tests in the TCK test suite. This section introduces two essential Eclipse plugins and points you to resources explaining how to install them.</para>
+ <para>The TCK is built on the JBoss Test Harness, which is in turn executed by TestNG. Therefore, having the TestNG plugin installed in Eclipse is essential. Instructions for using the TestNG update site to add the TestNG plugin to Eclipse are provided on the TestNG <ulink url="http://testng.org/doc/download.html">download page</ulink>. You can find a tutorial that explains how to use the TestNG plugin on the TestNG <ulink url="http://testng.org/doc/eclipse.html">Eclipse page</ulink>.</para>
+ <para>Another essential plugin is m2eclipse. Both the TCK project and the TCK runner project (at least the one that ships with the JSR-299 RI) are built with Maven 2. Therefore, to work with these projects in Eclipse, you need to have support for Maven 2 project, which the m2eclipse plugin provided. Instructions for using the m2eclipse update site to add the m2eclipse plugin to Eclipse are provided on the m2eclipse home page. Sonatype, the company that maintains the m2eclipse plugin and is a strong supporter of Maven, publishes an entire <ulink url="http://www.sonatype.com/books/m2eclipse-book/reference">reference guide</ulink> dedicated to the plugin on their website.</para>
+ </section>
</section>
</chapter>
Modified: tck/trunk/doc/reference/en-US/introduction.xml
===================================================================
--- tck/trunk/doc/reference/en-US/introduction.xml 2009-07-14 18:32:29 UTC (rev 3051)
+++ tck/trunk/doc/reference/en-US/introduction.xml 2009-07-15 04:20:28 UTC (rev 3052)
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
<chapter id="introduction">
<title>Introduction</title>
<para>This chapter explains the purpose of a TCK and identifies the foundation elements of the JSR-299 TCK.</para>
@@ -7,7 +7,7 @@
<title>TCK Primer</title>
<para>A TCK, or Technology Compatibility Kit, is one of the three required pieces for any JSR (the other two being the specification document and the reference implementation). The TCK is a set of tools and tests to verify that a licensee's implementation of the Sun technology conforms to the specification. The tests are the primary component, but the tools serve an equally critical role of providing a framework and/or set of SPIs for executing the tests.</para>
<para>The tests in the TCK are derived from assertions in the written specification document. The assertions materialize as a suite of automated tests that collectively validate whether an implementation complies with the aforementioned assertions, and in turn the specification. For a particular implementation to be certified, all of the required tests must pass (the provided test suite must be run unmodified).</para>
- <para>A TCK is entirely implementation agnostic. Ideally, it should validate assertions by consulting the specficiation's public API. However, when the information returned by the public API is not low-level enough to validate the assertion, the implementation must be consulted directly. In this case, the TCK provides an independent API as part of a porting package which must also be implemented by the licensee. Section 1.3.4 introduces the porting package and Section X.XX covers the requirements for implementing it.</para>
+ <para>A TCK is entirely implementation agnostic. Ideally, it should validate assertions by consulting the specficiation's public API. However, when the information returned by the public API is not low-level enough to validate the assertion, the implementation must be consulted directly. In this case, the TCK provides an independent API as part of a porting package which must also be implemented by the licensee. Section 1.3.4 introduces the porting package and section 4.1 covers the requirements for implementing it.</para>
</section>
<section>
<title>Compatibility Testing</title>
@@ -57,7 +57,7 @@
<para>This section lists the applicable requirements and specifications for the JSR-299 TCK.</para>
<itemizedlist>
<listitem>
- <para><emphasis role="bold">Specification requirements</emphasis> - Software requirements for a JSR-299 implementation are itermized in Section 1.2 of Chapter 1, "Relationship to other specifications" in the JSR-299 specification, with details provided throughout the specification.</para>
+ <para><emphasis role="bold">Specification requirements</emphasis> - Software requirements for a JSR-299 implementation are itemized in section 1.2, "Relationship to other specifications" in the JSR-299 specification, with details provided throughout the specification.</para>
</listitem>
<listitem>
<para><emphasis role="bold">Contexts and Dependency Injection for Java EE 1.0 API</emphasis> - The Java API defined in the JSR-299 specification and provided by the reference implementation.</para>
@@ -77,6 +77,9 @@
See details at Java EE 5
(<ulink url="http://java.sun.com/javaee/5/docs/api/">http://java.sun.com/javaee/5/docs/api/</ulink>).</para>
</listitem>
+ <listitem>
+ <para><emphasis role="bold">Maven 2</emphasis> - Although licensees are free to execute the TCK however they decide, the recommended approach is to use Maven 2. Both the JSR-299 RI and the TCK are build using Maven 2. Furthermore, the TCK runner used to validate the RI, a resource which can be leveraged by licensee to test their own implementations, is also Maven 2 project. Therefore, it's highly recommended to have Maven 2 installed on the system.</para>
+ </listitem>
</itemizedlist>
</section>
<section>
@@ -97,7 +100,7 @@
automatic running of tests through the JBoss Test harness.</para>
</listitem>
<listitem>
- <para><emphasis role="bold">JBoss TCK Runner</emphasis> - An implementation of hte JBoss Test Harness deployment APIs for deploying artifacts to JBoss AS 5</para>
+ <para><emphasis role="bold">JBoss TCK Runner</emphasis> - An implementation of hte JBoss Test Harness deployment APIs for deploying artifacts to JBoss AS 5.1</para>
</listitem>
<listitem>
<para><emphasis role="bold">TCK documentation</emphasis> accompanied by release notes identifying updates between versions.</para>
@@ -113,7 +116,7 @@
<para> Java Platform, Enterprise Edition, Version 5 reference implementation (Java EE 5 RI)</para>
</listitem>
<listitem>
- <para>JBoss AS 5?</para>
+ <para>JBoss AS 5.1?</para>
</listitem>
</itemizedlist>
<para>The JSR-299 TCK tests run on the following platforms:</para>
@@ -176,8 +179,8 @@
</section>
<section>
<title>The Porting Package</title>
- <para>The JSR-299 TCK relies on an implemnetation of the Porting Package to function. The Porting Package can be divided into two parts. The first part is comprised of extensions to the JSR-299 SPIs to allow testing of a container. The second part must contain implementations of the JBoss Test Harness deployment APIs for deploying test artifacts to a given container.</para>
- <para>As mentioned earlier, there are times when the tests need to tap directly into the JSR-299 implementation to manipulate behavior or verify results. The Porting Package includes a set of SPIs that provide the TCK this level of access without tying the tests to a given implementation.</para>
+ <para>The JSR-299 TCK relies on an implemnetation of the porting package to function. The porting package can be divided into two parts. The first part is comprised of extensions to the JSR-299 SPIs to allow testing of a container. The second part must contain implementations of the JBoss Test Harness deployment APIs for deploying test artifacts to a given container.</para>
+ <para>As mentioned earlier, there are times when the tests need to tap directly into the JSR-299 implementation to manipulate behavior or verify results. The porting package includes a set of SPIs that provide the TCK this level of access without tying the tests to a given implementation.</para>
<para>The four SPI classes in the JSR-299 TCK are as follows:</para>
<itemizedlist>
<listitem>
@@ -193,8 +196,8 @@
<para><literal>org.jboss.jsr299.tck.spi.Managers</literal></para>
</listitem>
</itemizedlist>
- <para>To run the full TCK you must additionally implement <literal>org.jboss.testharness.spi.Containers</literal>, which handles deploying the test artifact to the container. If you wish to run the TCK in standalone mode, you must also implement <literal>org.jboss.testharness.spi.StandaloneContainers</literal>. Implementations of these APIs are already available for JBoss AS 5. Therefore, you only need to implement this part of the Porting Package if you wish to use a container other than JBoss AS 5, for instance GlassFish V3.</para>
- <para>The default configuration for the TCK is property-based. Therefore, you specify the implementation class for all of these SPIs in a properties file. There are additional properties for controlling whether the tests are run in standalone or in-container mode. Optionally, you can use system properties to configure the TCK. Details are provided in Section X.XX.</para>
+ <para>To run the full TCK you must additionally implement <literal>org.jboss.testharness.spi.Containers</literal>, which handles deploying the test artifact to the container. If you wish to run the TCK in standalone mode, you must also implement <literal>org.jboss.testharness.spi.StandaloneContainers</literal>. Implementations of these APIs are already available for JBoss AS 5.1. Therefore, you only need to implement this part of the porting package if you wish to use a container other than JBoss AS 5.1, for instance GlassFish V3.</para>
+ <para>The default configuration for the TCK is property-based. Therefore, you specify the implementation class for all of these SPIs in a properties file. There are additional properties for controlling whether the tests are run in standalone or in-container mode. Optionally, you can use system properties to configure the TCK. Details are provided in section 4.1.</para>
</section>
<section>
<title>TCK Audit Tool</title>
Modified: tck/trunk/doc/reference/en-US/part1-background.xml
===================================================================
--- tck/trunk/doc/reference/en-US/part1-background.xml 2009-07-14 18:32:29 UTC (rev 3051)
+++ tck/trunk/doc/reference/en-US/part1-background.xml 2009-07-15 04:20:28 UTC (rev 3052)
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
+<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
<part>
<title>Getting Acquainted with the TCK</title>
<partintro>
Modified: tck/trunk/doc/reference/en-US/part2-setup.xml
===================================================================
--- tck/trunk/doc/reference/en-US/part2-setup.xml 2009-07-14 18:32:29 UTC (rev 3051)
+++ tck/trunk/doc/reference/en-US/part2-setup.xml 2009-07-15 04:20:28 UTC (rev 3052)
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
+<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
<part>
<title>Installation and Setup</title>
<partintro>
Modified: tck/trunk/doc/reference/en-US/part3-execution.xml
===================================================================
--- tck/trunk/doc/reference/en-US/part3-execution.xml 2009-07-14 18:32:29 UTC (rev 3051)
+++ tck/trunk/doc/reference/en-US/part3-execution.xml 2009-07-15 04:20:28 UTC (rev 3052)
@@ -1,9 +1,11 @@
<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
+<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
<part>
<title>Executing and Debugging Tests</title>
<partintro>
- <para>In this part you learn how to execute the JSR-299 TCK. First, you are taken through the steps necessary to execute the test suite against the JSR-299 RI (Web Beans). Then you discover how to modify the TCK runner to execute the test suite against your own implementation. Finally, you learn how to debug individual tests in the test suite.</para>
+ <para>In this part you learn how to execute the JSR-299 TCK on a given JSR-299 implementation. First, you are walked through the steps necessary to execute the test suite on the JSR-299 RI (Web Beans). Then you discover how to modify the TCK runner to execute the test suite on your own implementation. Finally, you learn how to debug tests from the test suite in Eclipse.</para>
</partintro>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="executing.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="eclipse-running.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="eclipse-debugging.xml"/>
</part>
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3051 - examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess.
by webbeans-commits@lists.jboss.org
Author: rogerk
Date: 2009-07-14 14:32:29 -0400 (Tue, 14 Jul 2009)
New Revision: 3051
Removed:
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java.sav
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java.sav.1
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Generator.java.sav
Log:
remove sav files
Deleted: examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java.sav
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java.sav 2009-07-14 18:31:42 UTC (rev 3050)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java.sav 2009-07-14 18:32:29 UTC (rev 3051)
@@ -1,108 +0,0 @@
-package org.jboss.webbeans.examples.numberguess;
-
-
-import java.io.Serializable;
-
-import javax.annotation.Named;
-import javax.annotation.PostConstruct;
-import javax.context.SessionScoped;
-import javax.faces.application.FacesMessage;
-import javax.faces.component.UIComponent;
-import javax.faces.component.UIInput;
-import javax.faces.context.FacesContext;
-import javax.inject.AnnotationLiteral;
-import javax.inject.Current;
-import javax.inject.manager.Manager;
-
-@Named
-@SessionScoped
-public class Game implements Serializable
-{
- private int number;
-
- private int guess;
- private int smallest;
-
- @MaxNumber
- private int maxNumber;
-
- private int biggest;
- private int remainingGuesses;
-
- @Current Manager manager;
-
- public Game()
- {
- }
-
- public int getNumber()
- {
- return number;
- }
-
- public int getGuess()
- {
- return guess;
- }
-
- public void setGuess(int guess)
- {
- this.guess = guess;
- }
-
- public int getSmallest()
- {
- return smallest;
- }
-
- public int getBiggest()
- {
- return biggest;
- }
-
- public int getRemainingGuesses()
- {
- return remainingGuesses;
- }
-
- public String check() throws InterruptedException
- {
- if (guess>number)
- {
- biggest = guess - 1;
- }
- if (guess<number)
- {
- smallest = guess + 1;
- }
- if (guess == number)
- {
- FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Correct!"));
- }
- remainingGuesses--;
- return null;
- }
-
- @PostConstruct
- public void reset()
- {
- this.smallest = 0;
- this.guess = 0;
- this.remainingGuesses = 10;
- this.biggest = maxNumber;
- this.number = manager.getInstanceByType(Integer.class, new AnnotationLiteral<Random>(){});
- }
-
- public void validateNumberRange(FacesContext context, UIComponent toValidate, Object value)
- {
- int input = (Integer) value;
-
- if (input < smallest || input > biggest)
- {
- ((UIInput)toValidate).setValid(false);
-
- FacesMessage message = new FacesMessage("Invalid guess");
- context.addMessage(toValidate.getClientId(context), message);
- }
- }
-}
Deleted: examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java.sav.1
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java.sav.1 2009-07-14 18:31:42 UTC (rev 3050)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java.sav.1 2009-07-14 18:32:29 UTC (rev 3051)
@@ -1,108 +0,0 @@
-package org.jboss.webbeans.examples.numberguess;
-
-
-import java.io.Serializable;
-
-import javax.annotation.PostConstruct;
-import javax.enterprise.context.SessionScoped;
-import javax.enterprise.inject.AnnotationLiteral;
-import javax.enterprise.inject.Current;
-import javax.enterprise.inject.Named;
-import javax.enterprise.inject.spi.Bean;
-import javax.faces.application.FacesMessage;
-import javax.faces.component.UIComponent;
-import javax.faces.component.UIInput;
-import javax.faces.context.FacesContext;
-
-@Named("game")
-@SessionScoped
-public class Game implements Serializable
-{
- private int number;
-
- private int guess;
- private int smallest;
-
- @MaxNumber
- private int maxNumber;
-
- private int biggest;
- private int remainingGuesses;
-
- public Game()
- {
- }
-
- public int getNumber()
- {
- return number;
- }
-
- public int getGuess()
- {
- return guess;
- }
-
- public void setGuess(int guess)
- {
- this.guess = guess;
- }
-
- public int getSmallest()
- {
- return smallest;
- }
-
- public int getBiggest()
- {
- return biggest;
- }
-
- public int getRemainingGuesses()
- {
- return remainingGuesses;
- }
-
- public String check() throws InterruptedException
- {
- if (guess>number)
- {
- biggest = guess - 1;
- }
- if (guess<number)
- {
- smallest = guess + 1;
- }
- if (guess == number)
- {
- FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Correct!"));
- }
- remainingGuesses--;
- return null;
- }
-
- @PostConstruct
- public void reset()
- {
- this.smallest = 0;
- this.guess = 0;
- this.remainingGuesses = 10;
- this.biggest = maxNumber;
-// this.number = manager.getInstanceByType(Integer.class, new AnnotationLiteral<Random>(){});
- this.number=10;
- }
-
- public void validateNumberRange(FacesContext context, UIComponent toValidate, Object value)
- {
- int input = (Integer) value;
-
- if (input < smallest || input > biggest)
- {
- ((UIInput)toValidate).setValid(false);
-
- FacesMessage message = new FacesMessage("Invalid guess");
- context.addMessage(toValidate.getClientId(context), message);
- }
- }
-
-}
Deleted: examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Generator.java.sav
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Generator.java.sav 2009-07-14 18:31:42 UTC (rev 3050)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Generator.java.sav 2009-07-14 18:32:29 UTC (rev 3051)
@@ -1,33 +0,0 @@
-package org.jboss.webbeans.examples.numberguess;
-
-
-import java.io.Serializable;
-
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.inject.Produces;
-
-@ApplicationScoped
-public class Generator implements Serializable
-{
-
- private static final long serialVersionUID = -7213673465118041882L;
-
- private java.util.Random random = new java.util.Random( System.currentTimeMillis() );
-
- private int maxNumber = 100;
-
- java.util.Random getRandom()
- {
- return random;
- }
-
- @Produces @Random int next() {
- return getRandom().nextInt(maxNumber);
- }
-
- @Produces @MaxNumber int getMaxNumber()
- {
- return maxNumber;
- }
-
-}
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3050 - examples/branches/1.0.0.PREVIEW2-PATCH2.
by webbeans-commits@lists.jboss.org
Author: rogerk
Date: 2009-07-14 14:31:42 -0400 (Tue, 14 Jul 2009)
New Revision: 3050
Modified:
examples/branches/1.0.0.PREVIEW2-PATCH2/pom.xml
Log:
just jsf2 for now
Modified: examples/branches/1.0.0.PREVIEW2-PATCH2/pom.xml
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/pom.xml 2009-07-14 18:31:01 UTC (rev 3049)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/pom.xml 2009-07-14 18:31:42 UTC (rev 3050)
@@ -71,15 +71,7 @@
<modules>
- <module>numberguess</module>
<module>jsf2</module>
- <module>tomcat</module>
- <module>translator</module>
- <module>login</module>
- <module>conversations</module>
- <module>se/numberguess</module>
- <module>wicket/numberguess</module>
- <module>wicket/conversations</module>
</modules>
<build>
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3049 - in examples/branches: 1.0.0.PREVIEW2-PATCH2 and 20 other directories.
by webbeans-commits@lists.jboss.org
Author: rogerk
Date: 2009-07-14 14:31:01 -0400 (Tue, 14 Jul 2009)
New Revision: 3049
Added:
examples/branches/1.0.0.PREVIEW2-PATCH2/
examples/branches/1.0.0.PREVIEW2-PATCH2/build.properties
examples/branches/1.0.0.PREVIEW2-PATCH2/build.xml
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/WebContent/
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/WebContent/WEB-INF/
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/WebContent/WEB-INF/beans.xml
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/WebContent/WEB-INF/faces-config.xml
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/WebContent/WEB-INF/web.xml
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/WebContent/home.xhtml
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/WebContent/index.html
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/WebContent/style/
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/WebContent/template.xhtml
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/build.xml
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/manifest.mf
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/nbbuild.xml
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/nbproject/
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/nbproject/build-impl.xml
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/nbproject/genfiles.properties
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/nbproject/private/
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/nbproject/private/private.properties
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/nbproject/project.properties
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/nbproject/project.xml
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/pom.xml
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java.sav
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java.sav.1
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Generator.java
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Generator.java.sav
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/MaxNumber.java
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Random.java
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/resources/
examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/resources/META-INF/
examples/branches/1.0.0.PREVIEW2-PATCH2/lib/
examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven-ant-tasks.jar
examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/
examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/LICENSE.txt
examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/NOTICE.txt
examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/README.txt
examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/
examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/m2
examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/m2.bat
examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/m2.conf
examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/mvn
examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/mvn.bat
examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/mvnDebug
examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/mvnDebug.bat
examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/boot/
examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/boot/classworlds-1.1.jar
examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/conf/
examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/conf/settings.xml
examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/lib/
examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/lib/maven-2.0.9-uber.jar
examples/branches/1.0.0.PREVIEW2-PATCH2/pom.xml
Log:
examples (just jsf2 for now) for 1.0.0.PREVIEW2-PATCH2 branch
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/build.properties
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/build.properties (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/build.properties 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,2 @@
+jboss.home=/Applications/jboss-5.0.1.GA
+tomcat.home=/Applications/apache-tomcat-6.0.18
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/build.xml
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/build.xml (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/build.xml 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,111 @@
+<project basedir="." name="example.build.script" default="restart">
+
+ <dirname property="wbexamples.dir" file="${ant.file.example.build.script}" />
+
+ <property name="maven.dir" location="${wbexamples.dir}/lib/maven" />
+
+ <property file="${wbexamples.dir}/../jboss-as/local.build.properties"/>
+ <property file="${wbexamples.dir}/build.properties"/>
+ <property file="${wbexamples.dir}/../jboss-as/build.properties"/>
+
+ <property name="final.url" value="http://localhost:8080/${example.name}" />
+
+ <property name="type" value="war" />
+
+ <condition property="war">
+ <equals arg1="${type}" arg2="war"/>
+ </condition>
+ <condition property="ear">
+ <equals arg1="${type}" arg2="ear"/>
+ </condition>
+
+ <condition property="artifact.target.dir" value="${basedir}/target">
+ <equals arg1="${type}" arg2="war"/>
+ </condition>
+ <condition property="artifact.target.dir" value="${basedir}/${example.name}-ear/target">
+ <equals arg1="${type}" arg2="ear"/>
+ </condition>
+
+ <property name="artifact.dir" value="${artifact.target.dir}/${example.name}" />
+
+ <target name="package">
+ <maven target="package" basedir="${basedir}"/>
+ </target>
+
+ <target name="explode" depends="package">
+ <mkdir dir="${jboss.home}/server/default/deploy/${example.name}.${type}"/>
+ <copy todir="${jboss.home}/server/default/deploy/${example.name}.${type}">
+ <fileset dir="${artifact.dir}" />
+ </copy>
+ </target>
+
+ <target name="tomcat.explode" depends="package">
+ <mkdir dir="${tomcat.home}/webapps/${example.name}"/>
+ <copy todir="${tomcat.home}/webapps/${example.name}">
+ <fileset dir="${artifact.dir}" />
+ </copy>
+ </target>
+
+ <target name="deploy" depends="package">
+ <copy todir="${jboss.home}/server/default/deploy/" file="${artifact.target.dir}/${example.name}.${type}"/>
+ <echo message="The app can be accessed at ${final.url}" />
+ </target>
+
+ <target name="tomcat.deploy" depends="package">
+ <copy todir="${tomcat.home}/webapps/" file="${artifact.target.dir}/${example.name}.${type}"/>
+ <echo message="The app can be accessed at ${final.url}" />
+ </target>
+
+ <target name="clean">
+ <maven target="clean" basedir="${basedir}"/>
+ </target>
+
+ <target name="restart.war" depends="explode" if="war">
+ <touch file="${jboss.home}/server/default/deploy/${example.name}.war/WEB-INF/web.xml" />
+ </target>
+
+ <target name="tomcat.restart" depends="tomcat.explode" if="war">
+ <touch file="${tomcat.home}/webapps/${example.name}/WEB-INF/web.xml" />
+ </target>
+
+ <target name="restart.ear" depends="explode" if="ear">
+ <touch file="${jboss.home}/server/default/deploy/${example.name}.ear/META-INF/application.xml" />
+ </target>
+
+ <target name="restart" depends="restart.war, restart.ear">
+ <echo message="The app can be accessed at ${final.url}" />
+ </target>
+
+ <target name="undeploy">
+ <delete dir="${jboss.home}/server/default/deploy/${example.name}.${type}" failonerror="false" />
+ <delete file="${jboss.home}/server/default/deploy/${example.name}.${type}" failonerror="false" />
+ </target>
+
+ <target name="tomcat.undeploy">
+ <delete dir="${tomcat.home}/webapps/${example.name}" failonerror="false" />
+ <delete file="${tomcat.home}/webapps/${example.name}" failonerror="false" />
+ </target>
+
+ <macrodef name="maven">
+ <attribute name="target" />
+ <attribute name="basedir" />
+ <element name="args" implicit="true" optional="true" />
+ <sequential>
+ <java classname="org.codehaus.classworlds.Launcher" fork="true" dir="@{basedir}" failonerror="true">
+ <classpath>
+ <fileset dir="${maven.dir}/boot">
+ <include name="*.jar" />
+ </fileset>
+ <fileset dir="${maven.dir}/bin">
+ <include name="*.*" />
+ </fileset>
+ </classpath>
+ <sysproperty key="classworlds.conf" value="${maven.dir}/bin/m2.conf" />
+ <sysproperty key="maven.home" value="${maven.dir}" />
+ <args />
+ <arg line="@{target}" />
+ </java>
+ </sequential>
+ </macrodef>
+
+</project>
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/WebContent/WEB-INF/beans.xml
===================================================================
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/WebContent/WEB-INF/faces-config.xml
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/WebContent/WEB-INF/faces-config.xml (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/WebContent/WEB-INF/faces-config.xml 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<faces-config version="2.0"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2.0.xsd">
+
+</faces-config>
\ No newline at end of file
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/WebContent/WEB-INF/web.xml
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/WebContent/WEB-INF/web.xml (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/WebContent/WEB-INF/web.xml 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.5"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <display-name>Web Beans Numberguess example</display-name>
+
+ <!-- JSF -->
+
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>10</session-timeout>
+ </session-config>
+
+</web-app>
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/WebContent/home.xhtml
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/WebContent/home.xhtml (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/WebContent/home.xhtml 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+ <ui:composition template="template.xhtml">
+ <ui:define name="content">
+ <h1>Guess a number...</h1>
+ <h:form id="NumberGuessMain">
+ <div style="color: red">
+ <h:messages id="messages" globalOnly="false"/>
+ <h:outputText id="Higher" value="Higher!" rendered="#{game.number gt game.guess and game.guess ne 0}"/>
+ <h:outputText id="Lower" value="Lower!" rendered="#{game.number lt game.guess and game.guess ne 0}"/>
+ </div>
+
+ <div>
+ I'm thinking of a number between #{game.smallest} and #{game.biggest}. You have #{game.remainingGuesses} guesses.
+ </div>
+
+ <div>
+ Your guess:
+ <h:inputText id="inputGuess" value="#{game.guess}" required="true" size="3" disabled="#{game.number eq game.guess}"
+ validator="#{game.validateNumberRange}">
+ </h:inputText>
+ <h:commandButton id="GuessButton" value="Guess" action="#{game.check}" disabled="#{game.number eq game.guess}"/>
+ </div>
+ <div>
+ <h:commandButton id="RestartButton" value="Reset" action="#{game.reset}" immediate="true" />
+ </div>
+ </h:form>
+ </ui:define>
+ </ui:composition>
+</html>
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/WebContent/index.html
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/WebContent/index.html (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/WebContent/index.html 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,5 @@
+<html>
+<head>
+ <meta http-equiv="Refresh" content="0; URL=home.jsf">
+</head>
+</html>
\ No newline at end of file
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/WebContent/template.xhtml
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/WebContent/template.xhtml (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/WebContent/template.xhtml 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <title>Numberguess</title>
+ <link href="style/main.css" rel="stylesheet" type="text/css"/>
+ <ui:insert name="head"/>
+</head>
+
+<body>
+
+ <div id="container">
+ <div id="header">
+
+ </div>
+
+ <div id="sidebar">
+
+ </div>
+
+ <div id="content">
+ <ui:insert name="content"/>
+ </div>
+
+ <br style="clear:both"/>
+ </div>
+
+</body>
+</html>
+
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/build.xml
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/build.xml (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/build.xml 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,7 @@
+<project basedir="." name="Numberguess Example Build" default="restart">
+
+ <property name="example.name" value="webbeans-numberguess-jsf2" />
+
+ <import file="../build.xml" />
+
+</project>
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/manifest.mf
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/manifest.mf (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/manifest.mf 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+X-COMMENT: Main-Class will be added automatically by build
+
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/nbbuild.xml
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/nbbuild.xml (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/nbbuild.xml 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- You may freely edit this file. See commented blocks below for -->
+<!-- some examples of how to customize the build. -->
+<!-- (If you delete it and reopen the project it will be recreated.) -->
+<!-- By default, only the Clean and Build commands use this build script. -->
+<!-- Commands such as Run, Debug, and Test only use this build script if -->
+<!-- the Compile on Save feature is turned off for the project. -->
+<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
+<!-- in the project's Project Properties dialog box.-->
+<project name="JavaProject38" default="default" basedir=".">
+ <description>Builds, tests, and runs the project JavaProject38.</description>
+ <import file="nbproject/build-impl.xml"/>
+ <!--
+
+ There exist several targets which are by default empty and which can be
+ used for execution of your tasks. These targets are usually executed
+ before and after some main targets. They are:
+
+ -pre-init: called before initialization of project properties
+ -post-init: called after initialization of project properties
+ -pre-compile: called before javac compilation
+ -post-compile: called after javac compilation
+ -pre-compile-single: called before javac compilation of single file
+ -post-compile-single: called after javac compilation of single file
+ -pre-compile-test: called before javac compilation of JUnit tests
+ -post-compile-test: called after javac compilation of JUnit tests
+ -pre-compile-test-single: called before javac compilation of single JUnit test
+ -post-compile-test-single: called after javac compilation of single JUunit test
+ -pre-jar: called before JAR building
+ -post-jar: called after JAR building
+ -post-clean: called after cleaning build products
+
+ (Targets beginning with '-' are not intended to be called on their own.)
+
+ Example of inserting an obfuscator after compilation could look like this:
+
+ <target name="-post-compile">
+ <obfuscate>
+ <fileset dir="${build.classes.dir}"/>
+ </obfuscate>
+ </target>
+
+ For list of available properties check the imported
+ nbproject/build-impl.xml file.
+
+
+ Another way to customize the build is by overriding existing main targets.
+ The targets of interest are:
+
+ -init-macrodef-javac: defines macro for javac compilation
+ -init-macrodef-junit: defines macro for junit execution
+ -init-macrodef-debug: defines macro for class debugging
+ -init-macrodef-java: defines macro for class execution
+ -do-jar-with-manifest: JAR building (if you are using a manifest)
+ -do-jar-without-manifest: JAR building (if you are not using a manifest)
+ run: execution of project
+ -javadoc-build: Javadoc generation
+ test-report: JUnit report generation
+
+ An example of overriding the target for project execution could look like this:
+
+ <target name="run" depends="JavaProject38-impl.jar">
+ <exec dir="bin" executable="launcher.exe">
+ <arg file="${dist.jar}"/>
+ </exec>
+ </target>
+
+ Notice that the overridden target depends on the jar target and not only on
+ the compile target as the regular run target does. Again, for a list of available
+ properties which you can use, check the target you are overriding in the
+ nbproject/build-impl.xml file.
+
+ -->
+</project>
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/nbproject/build-impl.xml
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/nbproject/build-impl.xml (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/nbproject/build-impl.xml 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,631 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+*** GENERATED FROM project.xml - DO NOT EDIT ***
+*** EDIT ../build.xml INSTEAD ***
+
+For the purpose of easier reading the script
+is divided into following sections:
+
+ - initialization
+ - compilation
+ - jar
+ - execution
+ - debugging
+ - javadoc
+ - junit compilation
+ - junit execution
+ - junit debugging
+ - applet
+ - cleanup
+
+ -->
+<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="JavaProject38-impl">
+ <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
+ <!--
+ ======================
+ INITIALIZATION SECTION
+ ======================
+ -->
+ <target name="-pre-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="-pre-init" name="-init-private">
+ <property file="nbproject/private/config.properties"/>
+ <property file="nbproject/private/configs/${config}.properties"/>
+ <property file="nbproject/private/private.properties"/>
+ </target>
+ <target depends="-pre-init,-init-private" name="-init-user">
+ <property file="${user.properties.file}"/>
+ <!-- The two properties below are usually overridden -->
+ <!-- by the active platform. Just a fallback. -->
+ <property name="default.javac.source" value="1.4"/>
+ <property name="default.javac.target" value="1.4"/>
+ </target>
+ <target depends="-pre-init,-init-private,-init-user" name="-init-project">
+ <property file="nbproject/configs/${config}.properties"/>
+ <property file="nbproject/project.properties"/>
+ </target>
+ <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
+ <available file="${manifest.file}" property="manifest.available"/>
+ <condition property="manifest.available+main.class">
+ <and>
+ <isset property="manifest.available"/>
+ <isset property="main.class"/>
+ <not>
+ <equals arg1="${main.class}" arg2="" trim="true"/>
+ </not>
+ </and>
+ </condition>
+ <condition property="manifest.available+main.class+mkdist.available">
+ <and>
+ <istrue value="${manifest.available+main.class}"/>
+ <isset property="libs.CopyLibs.classpath"/>
+ </and>
+ </condition>
+ <condition property="have.tests">
+ <or/>
+ </condition>
+ <condition property="have.sources">
+ <or>
+ <available file="${src.dir}"/>
+ </or>
+ </condition>
+ <condition property="netbeans.home+have.tests">
+ <and>
+ <isset property="netbeans.home"/>
+ <isset property="have.tests"/>
+ </and>
+ </condition>
+ <condition property="no.javadoc.preview">
+ <and>
+ <isset property="javadoc.preview"/>
+ <isfalse value="${javadoc.preview}"/>
+ </and>
+ </condition>
+ <property name="run.jvmargs" value=""/>
+ <property name="javac.compilerargs" value=""/>
+ <property name="work.dir" value="${basedir}"/>
+ <condition property="no.deps">
+ <and>
+ <istrue value="${no.dependencies}"/>
+ </and>
+ </condition>
+ <property name="javac.debug" value="true"/>
+ <property name="javadoc.preview" value="true"/>
+ <property name="application.args" value=""/>
+ <property name="source.encoding" value="${file.encoding}"/>
+ <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
+ <and>
+ <isset property="javadoc.encoding"/>
+ <not>
+ <equals arg1="${javadoc.encoding}" arg2=""/>
+ </not>
+ </and>
+ </condition>
+ <property name="javadoc.encoding.used" value="${source.encoding}"/>
+ <property name="includes" value="**"/>
+ <property name="excludes" value=""/>
+ <property name="do.depend" value="false"/>
+ <condition property="do.depend.true">
+ <istrue value="${do.depend}"/>
+ </condition>
+ <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
+ <and>
+ <isset property="jaxws.endorsed.dir"/>
+ <available file="nbproject/jaxws-build.xml"/>
+ </and>
+ </condition>
+ </target>
+ <target name="-post-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
+ <fail unless="src.dir">Must set src.dir</fail>
+ <fail unless="build.dir">Must set build.dir</fail>
+ <fail unless="dist.dir">Must set dist.dir</fail>
+ <fail unless="build.classes.dir">Must set build.classes.dir</fail>
+ <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
+ <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
+ <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
+ <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
+ <fail unless="dist.jar">Must set dist.jar</fail>
+ </target>
+ <target name="-init-macrodef-property">
+ <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute name="name"/>
+ <attribute name="value"/>
+ <sequential>
+ <property name="@{name}" value="${@{value}}"/>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-javac">
+ <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute default="${src.dir}" name="srcdir"/>
+ <attribute default="${build.classes.dir}" name="destdir"/>
+ <attribute default="${javac.classpath}" name="classpath"/>
+ <attribute default="${includes}" name="includes"/>
+ <attribute default="${excludes}" name="excludes"/>
+ <attribute default="${javac.debug}" name="debug"/>
+ <attribute default="" name="sourcepath"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
+ <customize/>
+ </javac>
+ </sequential>
+ </macrodef>
+ <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute default="${src.dir}" name="srcdir"/>
+ <attribute default="${build.classes.dir}" name="destdir"/>
+ <attribute default="${javac.classpath}" name="classpath"/>
+ <sequential>
+ <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ </depend>
+ </sequential>
+ </macrodef>
+ <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute default="${build.classes.dir}" name="destdir"/>
+ <sequential>
+ <fail unless="javac.includes">Must set javac.includes</fail>
+ <pathconvert pathsep="," property="javac.includes.binary">
+ <path>
+ <filelist dir="@{destdir}" files="${javac.includes}"/>
+ </path>
+ <globmapper from="*.java" to="*.class"/>
+ </pathconvert>
+ <delete>
+ <files includes="${javac.includes.binary}"/>
+ </delete>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-junit">
+ <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute default="${includes}" name="includes"/>
+ <attribute default="${excludes}" name="excludes"/>
+ <attribute default="**" name="testincludes"/>
+ <sequential>
+ <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
+ <batchtest todir="${build.test.results.dir}"/>
+ <classpath>
+ <path path="${run.test.classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="test-sys-prop."/>
+ <mapper from="test-sys-prop.*" to="*" type="glob"/>
+ </syspropertyset>
+ <formatter type="brief" usefile="false"/>
+ <formatter type="xml"/>
+ <jvmarg line="${run.jvmargs}"/>
+ </junit>
+ </sequential>
+ </macrodef>
+ </target>
+ <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
+ <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute default="${main.class}" name="name"/>
+ <attribute default="${debug.classpath}" name="classpath"/>
+ <attribute default="" name="stopclassname"/>
+ <sequential>
+ <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ </nbjpdastart>
+ </sequential>
+ </macrodef>
+ <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute default="${build.classes.dir}" name="dir"/>
+ <sequential>
+ <nbjpdareload>
+ <fileset dir="@{dir}" includes="${fix.classes}">
+ <include name="${fix.includes}*.class"/>
+ </fileset>
+ </nbjpdareload>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-debug-args">
+ <property name="version-output" value="java version "${ant.java.version}"/>
+ <condition property="have-jdk-older-than-1.4">
+ <or>
+ <contains string="${version-output}" substring="java version "1.0"/>
+ <contains string="${version-output}" substring="java version "1.1"/>
+ <contains string="${version-output}" substring="java version "1.2"/>
+ <contains string="${version-output}" substring="java version "1.3"/>
+ </or>
+ </condition>
+ <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
+ <istrue value="${have-jdk-older-than-1.4}"/>
+ </condition>
+ <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
+ <os family="windows"/>
+ </condition>
+ <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
+ <isset property="debug.transport"/>
+ </condition>
+ </target>
+ <target depends="-init-debug-args" name="-init-macrodef-debug">
+ <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute default="${main.class}" name="classname"/>
+ <attribute default="${debug.classpath}" name="classpath"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <java classname="@{classname}" dir="${work.dir}" fork="true">
+ <jvmarg line="${debug-args-line}"/>
+ <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
+ <jvmarg line="${run.jvmargs}"/>
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="run-sys-prop."/>
+ <mapper from="run-sys-prop.*" to="*" type="glob"/>
+ </syspropertyset>
+ <customize/>
+ </java>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-java">
+ <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute default="${main.class}" name="classname"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <java classname="@{classname}" dir="${work.dir}" fork="true">
+ <jvmarg line="${run.jvmargs}"/>
+ <classpath>
+ <path path="${run.classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="run-sys-prop."/>
+ <mapper from="run-sys-prop.*" to="*" type="glob"/>
+ </syspropertyset>
+ <customize/>
+ </java>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-presetdef-jar">
+ <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <jar compress="${jar.compress}" jarfile="${dist.jar}">
+ <j2seproject1:fileset dir="${build.classes.dir}"/>
+ </jar>
+ </presetdef>
+ </target>
+ <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
+ <!--
+ ===================
+ COMPILATION SECTION
+ ===================
+ -->
+ <target depends="init" name="deps-jar" unless="no.deps"/>
+ <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
+ <target depends="init" name="-check-automatic-build">
+ <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
+ </target>
+ <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
+ <antcall target="clean"/>
+ </target>
+ <target depends="init,deps-jar" name="-pre-pre-compile">
+ <mkdir dir="${build.classes.dir}"/>
+ </target>
+ <target name="-pre-compile">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target if="do.depend.true" name="-compile-depend">
+ <j2seproject3:depend/>
+ </target>
+ <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
+ <j2seproject3:javac/>
+ <copy todir="${build.classes.dir}">
+ <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
+ </copy>
+ </target>
+ <target name="-post-compile">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
+ <target name="-pre-compile-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
+ <j2seproject3:force-recompile/>
+ <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
+ </target>
+ <target name="-post-compile-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
+ <!--
+ ====================
+ JAR BUILDING SECTION
+ ====================
+ -->
+ <target depends="init" name="-pre-pre-jar">
+ <dirname file="${dist.jar}" property="dist.jar.dir"/>
+ <mkdir dir="${dist.jar.dir}"/>
+ </target>
+ <target name="-pre-jar">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
+ <j2seproject1:jar/>
+ </target>
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
+ <j2seproject1:jar manifest="${manifest.file}"/>
+ </target>
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
+ <j2seproject1:jar manifest="${manifest.file}">
+ <j2seproject1:manifest>
+ <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
+ </j2seproject1:manifest>
+ </j2seproject1:jar>
+ <echo>To run this application from the command line without Ant, try:</echo>
+ <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
+ <property location="${dist.jar}" name="dist.jar.resolved"/>
+ <pathconvert property="run.classpath.with.dist.jar">
+ <path path="${run.classpath}"/>
+ <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
+ </pathconvert>
+ <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
+ </target>
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
+ <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
+ <pathconvert property="run.classpath.without.build.classes.dir">
+ <path path="${run.classpath}"/>
+ <map from="${build.classes.dir.resolved}" to=""/>
+ </pathconvert>
+ <pathconvert pathsep=" " property="jar.classpath">
+ <path path="${run.classpath.without.build.classes.dir}"/>
+ <chainedmapper>
+ <flattenmapper/>
+ <globmapper from="*" to="lib/*"/>
+ </chainedmapper>
+ </pathconvert>
+ <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
+ <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
+ <fileset dir="${build.classes.dir}"/>
+ <manifest>
+ <attribute name="Main-Class" value="${main.class}"/>
+ <attribute name="Class-Path" value="${jar.classpath}"/>
+ </manifest>
+ </copylibs>
+ <echo>To run this application from the command line without Ant, try:</echo>
+ <property location="${dist.jar}" name="dist.jar.resolved"/>
+ <echo>java -jar "${dist.jar.resolved}"</echo>
+ </target>
+ <target name="-post-jar">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
+ <!--
+ =================
+ EXECUTION SECTION
+ =================
+ -->
+ <target depends="init,compile" description="Run a main class." name="run">
+ <j2seproject1:java>
+ <customize>
+ <arg line="${application.args}"/>
+ </customize>
+ </j2seproject1:java>
+ </target>
+ <target name="-do-not-recompile">
+ <property name="javac.includes.binary" value=""/>
+ </target>
+ <target depends="init,-do-not-recompile,compile-single" name="run-single">
+ <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
+ <j2seproject1:java classname="${run.class}"/>
+ </target>
+ <!--
+ =================
+ DEBUGGING SECTION
+ =================
+ -->
+ <target depends="init" if="netbeans.home" name="-debug-start-debugger">
+ <j2seproject1:nbjpdastart name="${debug.class}"/>
+ </target>
+ <target depends="init,compile" name="-debug-start-debuggee">
+ <j2seproject3:debug>
+ <customize>
+ <arg line="${application.args}"/>
+ </customize>
+ </j2seproject3:debug>
+ </target>
+ <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
+ <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
+ <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
+ </target>
+ <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
+ <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
+ <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
+ <j2seproject3:debug classname="${debug.class}"/>
+ </target>
+ <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
+ <target depends="init" name="-pre-debug-fix">
+ <fail unless="fix.includes">Must set fix.includes</fail>
+ <property name="javac.includes" value="${fix.includes}.java"/>
+ </target>
+ <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
+ <j2seproject1:nbjpdareload/>
+ </target>
+ <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
+ <!--
+ ===============
+ JAVADOC SECTION
+ ===============
+ -->
+ <target depends="init" name="-javadoc-build">
+ <mkdir dir="${dist.javadoc.dir}"/>
+ <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
+ <classpath>
+ <path path="${javac.classpath}"/>
+ </classpath>
+ <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
+ <filename name="**/*.java"/>
+ </fileset>
+ </javadoc>
+ </target>
+ <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
+ <nbbrowse file="${dist.javadoc.dir}/index.html"/>
+ </target>
+ <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
+ <!--
+ =========================
+ JUNIT COMPILATION SECTION
+ =========================
+ -->
+ <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
+ <mkdir dir="${build.test.classes.dir}"/>
+ </target>
+ <target name="-pre-compile-test">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target if="do.depend.true" name="-compile-test-depend">
+ <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir=""/>
+ </target>
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
+ <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir=""/>
+ <copy todir="${build.test.classes.dir}"/>
+ </target>
+ <target name="-post-compile-test">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
+ <target name="-pre-compile-test-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
+ <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
+ <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="" srcdir=""/>
+ <copy todir="${build.test.classes.dir}"/>
+ </target>
+ <target name="-post-compile-test-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
+ <!--
+ =======================
+ JUNIT EXECUTION SECTION
+ =======================
+ -->
+ <target depends="init" if="have.tests" name="-pre-test-run">
+ <mkdir dir="${build.test.results.dir}"/>
+ </target>
+ <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
+ <j2seproject3:junit testincludes="**/*Test.java"/>
+ </target>
+ <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
+ <fail if="tests.failed">Some tests failed; see details above.</fail>
+ </target>
+ <target depends="init" if="have.tests" name="test-report"/>
+ <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
+ <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
+ <target depends="init" if="have.tests" name="-pre-test-run-single">
+ <mkdir dir="${build.test.results.dir}"/>
+ </target>
+ <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
+ <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
+ <j2seproject3:junit excludes="" includes="${test.includes}"/>
+ </target>
+ <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
+ <fail if="tests.failed">Some tests failed; see details above.</fail>
+ </target>
+ <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
+ <!--
+ =======================
+ JUNIT DEBUGGING SECTION
+ =======================
+ -->
+ <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
+ <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
+ <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
+ <delete file="${test.report.file}"/>
+ <mkdir dir="${build.test.results.dir}"/>
+ <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
+ <customize>
+ <syspropertyset>
+ <propertyref prefix="test-sys-prop."/>
+ <mapper from="test-sys-prop.*" to="*" type="glob"/>
+ </syspropertyset>
+ <arg value="${test.class}"/>
+ <arg value="showoutput=true"/>
+ <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
+ <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
+ </customize>
+ </j2seproject3:debug>
+ </target>
+ <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
+ <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
+ </target>
+ <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
+ <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
+ <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
+ </target>
+ <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
+ <!--
+ =========================
+ APPLET EXECUTION SECTION
+ =========================
+ -->
+ <target depends="init,compile-single" name="run-applet">
+ <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
+ <j2seproject1:java classname="sun.applet.AppletViewer">
+ <customize>
+ <arg value="${applet.url}"/>
+ </customize>
+ </j2seproject1:java>
+ </target>
+ <!--
+ =========================
+ APPLET DEBUGGING SECTION
+ =========================
+ -->
+ <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
+ <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
+ <j2seproject3:debug classname="sun.applet.AppletViewer">
+ <customize>
+ <arg value="${applet.url}"/>
+ </customize>
+ </j2seproject3:debug>
+ </target>
+ <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
+ <!--
+ ===============
+ CLEANUP SECTION
+ ===============
+ -->
+ <target depends="init" name="deps-clean" unless="no.deps"/>
+ <target depends="init" name="-do-clean">
+ <delete dir="${build.dir}"/>
+ <delete dir="${dist.dir}"/>
+ </target>
+ <target name="-post-clean">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
+</project>
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/nbproject/genfiles.properties
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/nbproject/genfiles.properties (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/nbproject/genfiles.properties 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,8 @@
+nbbuild.xml.data.CRC32=eb430c56
+nbbuild.xml.script.CRC32=b57bf418
+nbbuild.xml.stylesheet.CRC32=958a1d3e
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=eb430c56
+nbproject/build-impl.xml.script.CRC32=593c0042
+nbproject/build-impl.xml.stylesheet.CRC32=e55b27f5
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/nbproject/private/private.properties
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/nbproject/private/private.properties (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/nbproject/private/private.properties 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,3 @@
+compile.on.save=true
+jaxws.endorsed.dir=/Applications/NetBeans/NetBeans 6.5.app/Contents/Resources/NetBeans/java2/modules/ext/jaxws21/api:/Applications/NetBeans/NetBeans 6.5.app/Contents/Resources/NetBeans/ide10/modules/ext/jaxb/api
+user.properties.file=/Users/rogerk/.netbeans/6.5/build.properties
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/nbproject/project.properties
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/nbproject/project.properties (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/nbproject/project.properties 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,62 @@
+build.classes.dir=${build.dir}/classes
+build.classes.excludes=**/*.java,**/*.form
+# This directory is removed when the project is cleaned:
+build.dir=build
+build.generated.dir=${build.dir}/generated
+# Only compile against the classpath explicitly listed here:
+build.sysclasspath=ignore
+build.test.classes.dir=${build.dir}/test/classes
+build.test.results.dir=${build.dir}/test/results
+buildfile=nbbuild.xml
+# Uncomment to specify the preferred debugger connection transport:
+#debug.transport=dt_socket
+debug.classpath=\
+ ${run.classpath}
+debug.test.classpath=\
+ ${run.test.classpath}
+# This directory is removed when the project is cleaned:
+dist.dir=dist
+dist.jar=${dist.dir}/JavaProject38.jar
+dist.javadoc.dir=${dist.dir}/javadoc
+excludes=
+file.reference.main-java=src/main/java
+includes=**
+jar.compress=false
+javac.classpath=
+# Space-separated list of extra javac options
+javac.compilerargs=
+javac.deprecation=false
+javac.source=1.5
+javac.target=1.5
+javac.test.classpath=\
+ ${javac.classpath}:\
+ ${build.classes.dir}:\
+ ${libs.junit.classpath}:\
+ ${libs.junit_4.classpath}
+javadoc.additionalparam=
+javadoc.author=false
+javadoc.encoding=${source.encoding}
+javadoc.noindex=false
+javadoc.nonavbar=false
+javadoc.notree=false
+javadoc.private=false
+javadoc.splitindex=true
+javadoc.use=true
+javadoc.version=false
+javadoc.windowtitle=
+main.class=
+manifest.file=manifest.mf
+meta.inf.dir=${src.dir}/META-INF
+platform.active=default_platform
+run.classpath=\
+ ${javac.classpath}:\
+ ${build.classes.dir}
+# Space-separated list of JVM arguments used when running the project
+# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
+# or test-sys-prop.name=value to set system properties for unit tests):
+run.jvmargs=
+run.test.classpath=\
+ ${javac.test.classpath}:\
+ ${build.test.classes.dir}
+source.encoding=UTF-8
+src.dir=${file.reference.main-java}
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/nbproject/project.xml
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/nbproject/project.xml (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/nbproject/project.xml 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+ <type>org.netbeans.modules.java.j2seproject</type>
+ <configuration>
+ <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
+ <name>JavaProject38</name>
+ <minimum-ant-version>1.6.5</minimum-ant-version>
+ <source-roots>
+ <root id="src.dir"/>
+ </source-roots>
+ <test-roots/>
+ </data>
+ </configuration>
+</project>
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/pom.xml
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/pom.xml (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/pom.xml 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,77 @@
+<?xml version="1.0"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.jboss.webbeans.examples</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0.0.PREVIEW2-PATCH2</version>
+ </parent>
+
+ <groupId>org.jboss.webbeans.examples</groupId>
+ <artifactId>webbeans-numberguess-jsf2</artifactId>
+ <packaging>war</packaging>
+ <name>Web Beans Examples: Numberguess for JSF2</name>
+
+ <pluginRepositories>
+ <pluginRepository>
+ <id>codehaus snapshot repository</id>
+ <url>http://snapshots.repository.codehaus.org/</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </pluginRepository>
+ </pluginRepositories>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <scope>test</scope>
+ <classifier>jdk15</classifier>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.webbeans</groupId>
+ <artifactId>jsr299-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.webbeans</groupId>
+ <artifactId>webbeans-core</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+<!-- <dependency>-->
+<!-- <groupId>javax.el</groupId>-->
+<!-- <artifactId>el-ri</artifactId>-->
+<!-- <exclusions>-->
+<!-- <exclusion>-->
+<!-- <groupId>javax.el</groupId>-->
+<!-- <artifactId>el-api</artifactId>-->
+<!-- </exclusion>-->
+<!-- </exclusions>-->
+<!-- <scope>runtime</scope>-->
+<!-- </dependency>-->
+
+ <dependency>
+ <groupId>javax.annotation</groupId>
+ <artifactId>jsr250-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>webbeans-numberguess-jsf2</finalName>
+ </build>
+
+</project>
+
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,113 @@
+package org.jboss.webbeans.examples.numberguess;
+
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.enterprise.context.SessionScoped;
+import javax.enterprise.inject.Instance;
+import javax.enterprise.inject.Named;
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIInput;
+import javax.faces.context.FacesContext;
+
+@Named
+@SessionScoped
+public class Game implements Serializable
+{
+ private int number;
+
+ private int guess;
+ private int smallest;
+
+ @MaxNumber
+ private int maxNumber;
+
+ private int biggest;
+ private int remainingGuesses;
+
+ @Random Instance<Integer> randomNumber;
+
+ public Game()
+ {
+ }
+
+ public int getNumber()
+ {
+ return number;
+ }
+
+ public int getGuess()
+ {
+ return guess;
+ }
+
+ public void setGuess(int guess)
+ {
+ this.guess = guess;
+ }
+
+ public int getSmallest()
+ {
+ return smallest;
+ }
+
+ public int getBiggest()
+ {
+ return biggest;
+ }
+
+ public int getRemainingGuesses()
+ {
+ return remainingGuesses;
+ }
+
+ public String check() throws InterruptedException
+ {
+ if (guess>number)
+ {
+ biggest = guess - 1;
+ }
+ if (guess<number)
+ {
+ smallest = guess + 1;
+ }
+ if (guess == number)
+ {
+ FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Correct!"));
+ }
+ remainingGuesses--;
+ return null;
+ }
+
+ @PostConstruct
+ public void reset()
+ {
+ this.smallest = 0;
+ this.guess = 0;
+ this.remainingGuesses = 10;
+ this.biggest = maxNumber;
+ this.number = randomNumber.get();
+ }
+
+ public void validateNumberRange(FacesContext context, UIComponent toValidate, Object value)
+ {
+ if (remainingGuesses <= 0)
+ {
+ FacesMessage message = new FacesMessage("No guesses left!");
+ context.addMessage(toValidate.getClientId(context), message);
+ ((UIInput)toValidate).setValid(false);
+ return;
+ }
+ int input = (Integer) value;
+
+ if (input < smallest || input > biggest)
+ {
+ ((UIInput)toValidate).setValid(false);
+
+ FacesMessage message = new FacesMessage("Invalid guess");
+ context.addMessage(toValidate.getClientId(context), message);
+ }
+ }
+}
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java.sav
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java.sav (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java.sav 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,108 @@
+package org.jboss.webbeans.examples.numberguess;
+
+
+import java.io.Serializable;
+
+import javax.annotation.Named;
+import javax.annotation.PostConstruct;
+import javax.context.SessionScoped;
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIInput;
+import javax.faces.context.FacesContext;
+import javax.inject.AnnotationLiteral;
+import javax.inject.Current;
+import javax.inject.manager.Manager;
+
+@Named
+@SessionScoped
+public class Game implements Serializable
+{
+ private int number;
+
+ private int guess;
+ private int smallest;
+
+ @MaxNumber
+ private int maxNumber;
+
+ private int biggest;
+ private int remainingGuesses;
+
+ @Current Manager manager;
+
+ public Game()
+ {
+ }
+
+ public int getNumber()
+ {
+ return number;
+ }
+
+ public int getGuess()
+ {
+ return guess;
+ }
+
+ public void setGuess(int guess)
+ {
+ this.guess = guess;
+ }
+
+ public int getSmallest()
+ {
+ return smallest;
+ }
+
+ public int getBiggest()
+ {
+ return biggest;
+ }
+
+ public int getRemainingGuesses()
+ {
+ return remainingGuesses;
+ }
+
+ public String check() throws InterruptedException
+ {
+ if (guess>number)
+ {
+ biggest = guess - 1;
+ }
+ if (guess<number)
+ {
+ smallest = guess + 1;
+ }
+ if (guess == number)
+ {
+ FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Correct!"));
+ }
+ remainingGuesses--;
+ return null;
+ }
+
+ @PostConstruct
+ public void reset()
+ {
+ this.smallest = 0;
+ this.guess = 0;
+ this.remainingGuesses = 10;
+ this.biggest = maxNumber;
+ this.number = manager.getInstanceByType(Integer.class, new AnnotationLiteral<Random>(){});
+ }
+
+ public void validateNumberRange(FacesContext context, UIComponent toValidate, Object value)
+ {
+ int input = (Integer) value;
+
+ if (input < smallest || input > biggest)
+ {
+ ((UIInput)toValidate).setValid(false);
+
+ FacesMessage message = new FacesMessage("Invalid guess");
+ context.addMessage(toValidate.getClientId(context), message);
+ }
+ }
+}
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java.sav.1
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java.sav.1 (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java.sav.1 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,108 @@
+package org.jboss.webbeans.examples.numberguess;
+
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.enterprise.context.SessionScoped;
+import javax.enterprise.inject.AnnotationLiteral;
+import javax.enterprise.inject.Current;
+import javax.enterprise.inject.Named;
+import javax.enterprise.inject.spi.Bean;
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIInput;
+import javax.faces.context.FacesContext;
+
+@Named("game")
+@SessionScoped
+public class Game implements Serializable
+{
+ private int number;
+
+ private int guess;
+ private int smallest;
+
+ @MaxNumber
+ private int maxNumber;
+
+ private int biggest;
+ private int remainingGuesses;
+
+ public Game()
+ {
+ }
+
+ public int getNumber()
+ {
+ return number;
+ }
+
+ public int getGuess()
+ {
+ return guess;
+ }
+
+ public void setGuess(int guess)
+ {
+ this.guess = guess;
+ }
+
+ public int getSmallest()
+ {
+ return smallest;
+ }
+
+ public int getBiggest()
+ {
+ return biggest;
+ }
+
+ public int getRemainingGuesses()
+ {
+ return remainingGuesses;
+ }
+
+ public String check() throws InterruptedException
+ {
+ if (guess>number)
+ {
+ biggest = guess - 1;
+ }
+ if (guess<number)
+ {
+ smallest = guess + 1;
+ }
+ if (guess == number)
+ {
+ FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Correct!"));
+ }
+ remainingGuesses--;
+ return null;
+ }
+
+ @PostConstruct
+ public void reset()
+ {
+ this.smallest = 0;
+ this.guess = 0;
+ this.remainingGuesses = 10;
+ this.biggest = maxNumber;
+// this.number = manager.getInstanceByType(Integer.class, new AnnotationLiteral<Random>(){});
+ this.number=10;
+ }
+
+ public void validateNumberRange(FacesContext context, UIComponent toValidate, Object value)
+ {
+ int input = (Integer) value;
+
+ if (input < smallest || input > biggest)
+ {
+ ((UIInput)toValidate).setValid(false);
+
+ FacesMessage message = new FacesMessage("Invalid guess");
+ context.addMessage(toValidate.getClientId(context), message);
+ }
+ }
+
+}
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Generator.java
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Generator.java (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Generator.java 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,33 @@
+package org.jboss.webbeans.examples.numberguess;
+
+
+import java.io.Serializable;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Produces;
+
+@ApplicationScoped
+public class Generator implements Serializable
+{
+
+ private static final long serialVersionUID = -7213673465118041882L;
+
+ private java.util.Random random = new java.util.Random( System.currentTimeMillis() );
+
+ private int maxNumber = 100;
+
+ java.util.Random getRandom()
+ {
+ return random;
+ }
+
+ @Produces @Random Integer next() {
+ return new Integer(getRandom().nextInt(maxNumber));
+ }
+
+ @Produces @MaxNumber int getMaxNumber()
+ {
+ return maxNumber;
+ }
+
+}
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Generator.java.sav
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Generator.java.sav (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Generator.java.sav 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,33 @@
+package org.jboss.webbeans.examples.numberguess;
+
+
+import java.io.Serializable;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Produces;
+
+@ApplicationScoped
+public class Generator implements Serializable
+{
+
+ private static final long serialVersionUID = -7213673465118041882L;
+
+ private java.util.Random random = new java.util.Random( System.currentTimeMillis() );
+
+ private int maxNumber = 100;
+
+ java.util.Random getRandom()
+ {
+ return random;
+ }
+
+ @Produces @Random int next() {
+ return getRandom().nextInt(maxNumber);
+ }
+
+ @Produces @MaxNumber int getMaxNumber()
+ {
+ return maxNumber;
+ }
+
+}
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/MaxNumber.java
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/MaxNumber.java (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/MaxNumber.java 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,23 @@
+package org.jboss.webbeans.examples.numberguess;
+
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+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;
+
+import javax.enterprise.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+public @interface MaxNumber
+{
+
+}
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Random.java
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Random.java (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Random.java 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,23 @@
+package org.jboss.webbeans.examples.numberguess;
+
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+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;
+
+import javax.enterprise.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+public @interface Random
+{
+
+}
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/LICENSE.txt
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/LICENSE.txt (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/LICENSE.txt 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/NOTICE.txt
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/NOTICE.txt (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/NOTICE.txt 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,11 @@
+ =========================================================================
+ == NOTICE file corresponding to the section 4 d of ==
+ == the Apache License, Version 2.0, ==
+ == in this case for the Apache Maven distribution. ==
+ =========================================================================
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+This product includes software (Plexus and Classworlds) developed by
+The Codehaus Foundation (http://www.codehaus.org/).
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/README.txt
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/README.txt (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/README.txt 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,78 @@
+
+ Apache Maven
+
+ What is it?
+ -----------
+
+ Maven is a software project management and comprehension tool. Based on
+ the concept of a Project Object Model (POM), Maven can manage a project's
+ build, reporting and documentation from a central piece of information.
+
+ Documentation
+ -------------
+
+ The documentation available as of the date of this release is included in
+ HTML format in the docs/ directory.
+ The most up-to-date documentation can be found at http://maven.apache.org/.
+
+ Release Notes
+ -------------
+
+ The full list of changes can be found at http://maven.apache.org/release-notes.html.
+
+ System Requirements
+ -------------------
+
+ JDK:
+ 1.4 or above (this is to execute Maven - it still allows you to build against 1.3
+ and prior JDK's).
+ Memory:
+ No minimum requirement.
+ Disk:
+ No minimum requirement. Approximately 100MB will be used for your local repository,
+ however this will vary depending on usage and can be removed and redownloaded at
+ any time.
+ Operating System:
+ No minimum requirement. On Windows, Windows NT and above or Cygwin is required for
+ the startup scripts. Tested on Windows XP, Fedora Core and Mac OS X.
+
+ Installing Maven
+ ----------------
+
+ 1) Unpack the archive where you would like to store the binaries, eg:
+
+ Unix-based Operating Systems (Linux, Solaris and Mac OS X)
+ tar zxvf apache-maven-2.0.x.tar.gz
+ Windows 2000/XP
+ unzip apache-maven-2.0.x.zip
+
+ 2) A directory called "apache-maven-2.0.x" will be created.
+
+ 3) Add the bin directory to your PATH, eg:
+
+ Unix-based Operating Systems (Linux, Solaris and Mac OS X)
+ export PATH=/usr/local/apache-maven-2.0.x/bin:$PATH
+ Windows 2000/XP
+ set PATH="c:\program files\apache-maven-2.0.x\bin";%PATH%
+
+ 4) Make sure JAVA_HOME is set to the location of your JDK
+
+ 5) Run "mvn --version" to verify that it is correctly installed.
+
+ For complete documentation, see http://maven.apache.org/download.html#Installation
+
+ Licensing
+ ---------
+
+ Please see the file called LICENSE.TXT
+
+ Maven URLS
+ ----------
+
+ Home Page: http://maven.apache.org/
+ Downloads: http://maven.apache.org/downloads.html
+ Mailing Lists: http://maven.apache.org/mail-lists.html
+ Source Code: http://svn.apache.org/repos/asf/maven/
+ Issue Tracking: http://jira.codehaus.org/browse/MNG
+ Wiki: http://docs.codehaus.org/display/MAVENUSER/
+ Available Plugins: http://maven.apache.org/plugins/index.html
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/m2
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/m2 (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/m2 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,26 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+echo ""
+echo THE m2 COMMMAND IS DEPRECATED - PLEASE RUN mvn INSTEAD
+echo ""
+
+. `dirname "$0"`/mvn
+exec "`dirname "$0"`/mvn" $QUOTED_ARGS
Property changes on: examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/m2
___________________________________________________________________
Name: svn:executable
+ *
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/m2.bat
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/m2.bat (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/m2.bat 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,26 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@ECHO OFF
+echo.
+echo THE m2 COMMMAND IS DEPRECATED - PLEASE RUN mvn INSTEAD
+echo.
+
+"%~dp0\mvn" %*
+
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/m2.conf
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/m2.conf (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/m2.conf 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,6 @@
+main is org.apache.maven.cli.MavenCli from plexus.core
+
+set maven.home default ${user.home}/m2
+
+[plexus.core]
+load ${maven.home}/lib/*.jar
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/mvn
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/mvn (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/mvn 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,163 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven2 Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+# JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+# M2_HOME - location of maven2's installed home dir
+# MAVEN_OPTS - parameters passed to the Java VM when running Maven
+# e.g. to debug Maven itself, use
+# set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+# ----------------------------------------------------------------------------
+
+QUOTED_ARGS=""
+while [ "$1" != "" ] ; do
+
+ QUOTED_ARGS="$QUOTED_ARGS \"$1\""
+ shift
+
+done
+
+if [ -f /etc/mavenrc ] ; then
+ . /etc/mavenrc
+fi
+
+if [ -f "$HOME/.mavenrc" ] ; then
+ . "$HOME/.mavenrc"
+fi
+
+# OS specific support. $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ MINGW*) mingw=true;;
+ Darwin*) darwin=true
+ if [ -z "$JAVA_VERSION" ] ; then
+ JAVA_VERSION="CurrentJDK"
+ else
+ echo "Using Java version: $JAVA_VERSION"
+ fi
+ if [ -z "$JAVA_HOME" ] ; then
+ JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
+ fi
+ ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+ if [ -r /etc/gentoo-release ] ; then
+ JAVA_HOME=`java-config --jre-home`
+ fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+ ## resolve links - $0 may be a link to maven's home
+ PRG="$0"
+
+ # need this for relative symlinks
+ while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG="`dirname "$PRG"`/$link"
+ fi
+ done
+
+ saveddir=`pwd`
+
+ M2_HOME=`dirname "$PRG"`/..
+
+ # make it fully qualified
+ M2_HOME=`cd "$M2_HOME" && pwd`
+
+ cd "$saveddir"
+ # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --unix "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Migwn, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME="`(cd "$M2_HOME"; pwd)`"
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+ # TODO classpath?
+fi
+
+if [ -z "$JAVACMD" ] ; then
+ if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ else
+ JAVACMD="`which java`"
+ fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+ echo "Error: JAVA_HOME is not defined correctly."
+ echo " We cannot execute $JAVACMD"
+ exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+ echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.classworlds.Launcher
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --path --windows "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+ [ -n "$HOME" ] &&
+ HOME=`cygpath --path --windows "$HOME"`
+fi
+
+exec "$JAVACMD" \
+ $MAVEN_OPTS \
+ -classpath "${M2_HOME}"/boot/classworlds-*.jar \
+ "-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \
+ "-Dmaven.home=${M2_HOME}" \
+ ${CLASSWORLDS_LAUNCHER} $QUOTED_ARGS
+
Property changes on: examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/mvn
___________________________________________________________________
Name: svn:executable
+ *
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/mvn.bat
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/mvn.bat (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/mvn.bat 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,188 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven2 Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set HOME=%HOMEDRIVE%%HOMEPATH%)
+
+@REM Execute a user defined script before this one
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+
+set ERROR_CODE=0
+
+@REM set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" @setlocal
+if "%OS%"=="WINNT" @setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo ERROR: JAVA_HOME not found in your environment.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto chkMHome
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory.
+echo JAVA_HOME = %JAVA_HOME%
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation
+echo.
+goto error
+
+:chkMHome
+if not "%M2_HOME%"=="" goto valMHome
+
+if "%OS%"=="Windows_NT" SET M2_HOME=%~dp0..
+if "%OS%"=="WINNT" SET M2_HOME=%~dp0..
+if not "%M2_HOME%"=="" goto valMHome
+
+echo.
+echo ERROR: M2_HOME not found in your environment.
+echo Please set the M2_HOME variable in your environment to match the
+echo location of the Maven installation
+echo.
+goto error
+
+:valMHome
+
+:stripMHome
+if not _%M2_HOME:~-1%==_\ goto checkMBat
+set M2_HOME=%M2_HOME:~0,-1%
+goto stripMHome
+
+:checkMBat
+if exist "%M2_HOME%\bin\mvn.bat" goto init
+
+echo.
+echo ERROR: M2_HOME is set to an invalid directory.
+echo M2_HOME = %M2_HOME%
+echo Please set the M2_HOME variable in your environment to match the
+echo location of the Maven installation
+echo.
+goto error
+@REM ==== END VALIDATION ====
+
+:init
+@REM Decide how to startup depending on the version of windows
+
+@REM -- Windows NT with Novell Login
+if "%OS%"=="WINNT" goto WinNTNovell
+
+@REM -- Win98ME
+if NOT "%OS%"=="Windows_NT" goto Win9xArg
+
+:WinNTNovell
+
+@REM -- 4NT shell
+if "%@eval[2+2]" == "4" goto 4NTArgs
+
+@REM -- Regular WinNT shell
+set MAVEN_CMD_LINE_ARGS=%*
+goto endInit
+
+@REM The 4NT Shell from jp software
+:4NTArgs
+set MAVEN_CMD_LINE_ARGS=%$
+goto endInit
+
+:Win9xArg
+@REM Slurp the command line arguments. This loop allows for an unlimited number
+@REM of agruments (up to the command line limit, anyway).
+set MAVEN_CMD_LINE_ARGS=
+:Win9xApp
+if %1a==a goto endInit
+set MAVEN_CMD_LINE_ARGS=%MAVEN_CMD_LINE_ARGS% %1
+shift
+goto Win9xApp
+
+@REM Reaching here means variables are defined and arguments have been captured
+:endInit
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+
+@REM -- 4NT shell
+if "%@eval[2+2]" == "4" goto 4NTCWJars
+
+@REM -- Regular WinNT shell
+for %%i in ("%M2_HOME%"\boot\classworlds-*) do set CLASSWORLDS_JAR="%%i"
+goto runm2
+
+@REM The 4NT Shell from jp software
+:4NTCWJars
+for %%i in ("%M2_HOME%\boot\classworlds-*") do set CLASSWORLDS_JAR="%%i"
+goto runm2
+
+@REM Start MAVEN2
+:runm2
+%MAVEN_JAVA_EXE% %MAVEN_OPTS% -classpath %CLASSWORLDS_JAR% "-Dclassworlds.conf=%M2_HOME%\bin\m2.conf" "-Dmaven.home=%M2_HOME%" org.codehaus.classworlds.Launcher %MAVEN_CMD_LINE_ARGS%
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+if "%OS%"=="Windows_NT" @endlocal
+if "%OS%"=="WINNT" @endlocal
+set ERROR_CODE=1
+
+:end
+@REM set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" goto endNT
+if "%OS%"=="WINNT" goto endNT
+
+@REM For old DOS remove the set variables from ENV - we assume they were not set
+@REM before we started - at least we don't leave any baggage around
+set MAVEN_JAVA_EXE=
+set MAVEN_CMD_LINE_ARGS=
+goto postExec
+
+:endNT
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+:postExec
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+@REM pause the batch file if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
+
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+
+exit /B %ERROR_CODE%
+
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/mvnDebug
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/mvnDebug (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/mvnDebug 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,168 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven2 Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+# JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+# M2_HOME - location of maven2's installed home dir
+# MAVEN_OPTS - parameters passed to the Java VM when running Maven
+# e.g. to debug Maven itself, use
+# set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+# ----------------------------------------------------------------------------
+
+INT_MAVEN_OPTS="$MAVEN_OPTS -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"
+
+echo Preparing to Execute Maven in Debug Mode
+
+QUOTED_ARGS=""
+while [ "$1" != "" ] ; do
+
+ QUOTED_ARGS="$QUOTED_ARGS \"$1\""
+ shift
+
+done
+
+if [ -f /etc/mavenrc ] ; then
+ . /etc/mavenrc
+fi
+
+if [ -f "$HOME/.mavenrc" ] ; then
+ . "$HOME/.mavenrc"
+fi
+
+# OS specific support. $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ MINGW*) mingw=true;;
+ Darwin*) darwin=true
+ if [ -z "$JAVA_VERSION" ] ; then
+ JAVA_VERSION="CurrentJDK"
+ else
+ echo "Using Java version: $JAVA_VERSION"
+ fi
+ if [ -z "$JAVA_HOME" ] ; then
+ JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
+ fi
+ ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+ if [ -r /etc/gentoo-release ] ; then
+ JAVA_HOME=`java-config --jre-home`
+ fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+ ## resolve links - $0 may be a link to maven's home
+ PRG="$0"
+
+ # need this for relative symlinks
+ while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG="`dirname "$PRG"`/$link"
+ fi
+ done
+
+ saveddir=`pwd`
+
+ M2_HOME=`dirname "$PRG"`/..
+
+ # make it fully qualified
+ M2_HOME=`cd "$M2_HOME" && pwd`
+
+ cd "$saveddir"
+ # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --unix "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Migwn, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME="`(cd "$M2_HOME"; pwd)`"
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+ # TODO classpath?
+fi
+
+if [ -z "$JAVACMD" ] ; then
+ if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ else
+ JAVACMD=java
+ fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+ echo "Error: JAVA_HOME is not defined correctly."
+ echo " We cannot execute $JAVACMD"
+ exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+ echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.classworlds.Launcher
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --path --windows "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+ [ -n "$HOME" ] &&
+ HOME=`cygpath --path --windows "$HOME"`
+fi
+
+exec "$JAVACMD" \
+ $INT_MAVEN_OPTS \
+ -classpath "${M2_HOME}"/boot/classworlds-*.jar \
+ "-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \
+ "-Dmaven.home=${M2_HOME}" \
+ ${CLASSWORLDS_LAUNCHER} $QUOTED_ARGS
+
+
Property changes on: examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/mvnDebug
___________________________________________________________________
Name: svn:executable
+ *
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/mvnDebug.bat
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/mvnDebug.bat (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/bin/mvnDebug.bat 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,192 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven2 Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM ----------------------------------------------------------------------------
+
+set INT_MAVEN_OPTS=%MAVEN_OPTS% -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@echo Preparing to Execute Maven in Debug Mode
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set HOME=%HOMEDRIVE%%HOMEPATH%)
+
+@REM Execute a user defined script before this one
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+
+set ERROR_CODE=0
+
+@REM set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" @setlocal
+if "%OS%"=="WINNT" @setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo ERROR: JAVA_HOME not found in your environment.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto chkMHome
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory.
+echo JAVA_HOME = %JAVA_HOME%
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation
+echo.
+goto error
+
+:chkMHome
+if not "%M2_HOME%"=="" goto valMHome
+
+if "%OS%"=="Windows_NT" SET M2_HOME=%~dp0..
+if "%OS%"=="WINNT" SET M2_HOME=%~dp0..
+if not "%M2_HOME%"=="" goto valMHome
+
+echo.
+echo ERROR: M2_HOME not found in your environment.
+echo Please set the M2_HOME variable in your environment to match the
+echo location of the Maven installation
+echo.
+goto error
+
+:valMHome
+
+:stripMHome
+if not _%M2_HOME:~-1%==_\ goto checkMBat
+set M2_HOME=%M2_HOME:~0,-1%
+goto stripMHome
+
+:checkMBat
+if exist "%M2_HOME%\bin\mvn.bat" goto init
+
+echo.
+echo ERROR: M2_HOME is set to an invalid directory.
+echo M2_HOME = %M2_HOME%
+echo Please set the M2_HOME variable in your environment to match the
+echo location of the Maven installation
+echo.
+goto error
+@REM ==== END VALIDATION ====
+
+:init
+@REM Decide how to startup depending on the version of windows
+
+@REM -- Windows NT with Novell Login
+if "%OS%"=="WINNT" goto WinNTNovell
+
+@REM -- Win98ME
+if NOT "%OS%"=="Windows_NT" goto Win9xArg
+
+:WinNTNovell
+
+@REM -- 4NT shell
+if "%@eval[2+2]" == "4" goto 4NTArgs
+
+@REM -- Regular WinNT shell
+set MAVEN_CMD_LINE_ARGS=%*
+goto endInit
+
+@REM The 4NT Shell from jp software
+:4NTArgs
+set MAVEN_CMD_LINE_ARGS=%$
+goto endInit
+
+:Win9xArg
+@REM Slurp the command line arguments. This loop allows for an unlimited number
+@REM of agruments (up to the command line limit, anyway).
+set MAVEN_CMD_LINE_ARGS=
+:Win9xApp
+if %1a==a goto endInit
+set MAVEN_CMD_LINE_ARGS=%MAVEN_CMD_LINE_ARGS% %1
+shift
+goto Win9xApp
+
+@REM Reaching here means variables are defined and arguments have been captured
+:endInit
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+
+@REM -- 4NT shell
+if "%@eval[2+2]" == "4" goto 4NTCWJars
+
+@REM -- Regular WinNT shell
+for %%i in ("%M2_HOME%"\boot\classworlds-*) do set CLASSWORLDS_JAR="%%i"
+goto runm2
+
+@REM The 4NT Shell from jp software
+:4NTCWJars
+for %%i in ("%M2_HOME%\boot\classworlds-*") do set CLASSWORLDS_JAR="%%i"
+goto runm2
+
+@REM Start MAVEN2
+:runm2
+
+%MAVEN_JAVA_EXE% %INT_MAVEN_OPTS% -classpath %CLASSWORLDS_JAR% "-Dclassworlds.conf=%M2_HOME%\bin\m2.conf" "-Dmaven.home=%M2_HOME%" org.codehaus.classworlds.Launcher %MAVEN_CMD_LINE_ARGS%
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+if "%OS%"=="Windows_NT" @endlocal
+if "%OS%"=="WINNT" @endlocal
+set ERROR_CODE=1
+
+:end
+@REM set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" goto endNT
+if "%OS%"=="WINNT" goto endNT
+
+@REM For old DOS remove the set variables from ENV - we assume they were not set
+@REM before we started - at least we don't leave any baggage around
+set MAVEN_JAVA_EXE=
+set MAVEN_CMD_LINE_ARGS=
+goto postExec
+
+:endNT
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+:postExec
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+@REM pause the batch file if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
+
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+
+exit /B %ERROR_CODE%
+
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/boot/classworlds-1.1.jar
===================================================================
(Binary files differ)
Property changes on: examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/boot/classworlds-1.1.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/conf/settings.xml
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/conf/settings.xml (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/conf/settings.xml 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,241 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<!--
+ | This is the configuration file for Maven. It can be specified at two levels:
+ |
+ | 1. User Level. This settings.xml file provides configuration for a single user,
+ | and is normally provided in $HOME/.m2/settings.xml.
+ |
+ | NOTE: This location can be overridden with the system property:
+ |
+ | -Dorg.apache.maven.user-settings=/path/to/user/settings.xml
+ |
+ | 2. Global Level. This settings.xml file provides configuration for all maven
+ | users on a machine (assuming they're all using the same maven
+ | installation). It's normally provided in
+ | ${maven.home}/conf/settings.xml.
+ |
+ | NOTE: This location can be overridden with the system property:
+ |
+ | -Dorg.apache.maven.global-settings=/path/to/global/settings.xml
+ |
+ | The sections in this sample file are intended to give you a running start at
+ | getting the most out of your Maven installation. Where appropriate, the default
+ | values (values used when the setting is not specified) are provided.
+ |
+ |-->
+<settings>
+ <!-- localRepository
+ | The path to the local repository maven will use to store artifacts.
+ |
+ | Default: ~/.m2/repository
+ <localRepository>/path/to/local/repo</localRepository>
+ -->
+
+ <!-- interactiveMode
+ | This will determine whether maven prompts you when it needs input. If set to false,
+ | maven will use a sensible default value, perhaps based on some other setting, for
+ | the parameter in question.
+ |
+ | Default: true
+ <interactiveMode>true</interactiveMode>
+ -->
+
+ <!-- offline
+ | Determines whether maven should attempt to connect to the network when executing a build.
+ | This will have an effect on artifact downloads, artifact deployment, and others.
+ |
+ | Default: false
+ <offline>false</offline>
+ -->
+
+ <!-- proxies
+ | This is a list of proxies which can be used on this machine to connect to the network.
+ | Unless otherwise specified (by system property or command-line switch), the first proxy
+ | specification in this list marked as active will be used.
+ |-->
+ <proxies>
+ <!-- proxy
+ | Specification for one proxy, to be used in connecting to the network.
+ |
+ <proxy>
+ <id>optional</id>
+ <active>true</active>
+ <protocol>http</protocol>
+ <username>proxyuser</username>
+ <password>proxypass</password>
+ <host>proxy.host.net</host>
+ <port>80</port>
+ <nonProxyHosts>local.net,some.host.com</nonProxyHosts>
+ </proxy>
+ -->
+ </proxies>
+
+ <!-- servers
+ | This is a list of authentication profiles, keyed by the server-id used within the system.
+ | Authentication profiles can be used whenever maven must make a connection to a remote server.
+ |-->
+ <servers>
+ <!-- server
+ | Specifies the authentication information to use when connecting to a particular server, identified by
+ | a unique name within the system (referred to by the 'id' attribute below).
+ |
+ | NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are
+ | used together.
+ |
+ <server>
+ <id>deploymentRepo</id>
+ <username>repouser</username>
+ <password>repopwd</password>
+ </server>
+ -->
+
+ <!-- Another sample, using keys to authenticate.
+ <server>
+ <id>siteServer</id>
+ <privateKey>/path/to/private/key</privateKey>
+ <passphrase>optional; leave empty if not used.</passphrase>
+ </server>
+ -->
+ </servers>
+
+ <!-- mirrors
+ | This is a list of mirrors to be used in downloading artifacts from remote repositories.
+ |
+ | It works like this: a POM may declare a repository to use in resolving certain artifacts.
+ | However, this repository may have problems with heavy traffic at times, so people have mirrored
+ | it to several places.
+ |
+ | That repository definition will have a unique id, so we can create a mirror reference for that
+ | repository, to be used as an alternate download site. The mirror site will be the preferred
+ | server for that repository.
+ |-->
+ <mirrors>
+ <!-- mirror
+ | Specifies a repository mirror site to use instead of a given repository. The repository that
+ | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
+ | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
+ |
+ <mirror>
+ <id>mirrorId</id>
+ <mirrorOf>repositoryId</mirrorOf>
+ <name>Human Readable Name for this Mirror.</name>
+ <url>http://my.repository.com/repo/path</url>
+ </mirror>
+ -->
+ </mirrors>
+
+ <!-- profiles
+ | This is a list of profiles which can be activated in a variety of ways, and which can modify
+ | the build process. Profiles provided in the settings.xml are intended to provide local machine-
+ | specific paths and repository locations which allow the build to work in the local environment.
+ |
+ | For example, if you have an integration testing plugin - like cactus - that needs to know where
+ | your Tomcat instance is installed, you can provide a variable here such that the variable is
+ | dereferenced during the build process to configure the cactus plugin.
+ |
+ | As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles
+ | section of this document (settings.xml) - will be discussed later. Another way essentially
+ | relies on the detection of a system property, either matching a particular value for the property,
+ | or merely testing its existence. Profiles can also be activated by JDK version prefix, where a
+ | value of '1.4' might activate a profile when the build is executed on a JDK version of '1.4.2_07'.
+ | Finally, the list of active profiles can be specified directly from the command line.
+ |
+ | NOTE: For profiles defined in the settings.xml, you are restricted to specifying only artifact
+ | repositories, plugin repositories, and free-form properties to be used as configuration
+ | variables for plugins in the POM.
+ |
+ |-->
+ <profiles>
+ <!-- profile
+ | Specifies a set of introductions to the build process, to be activated using one or more of the
+ | mechanisms described above. For inheritance purposes, and to activate profiles via <activatedProfiles/>
+ | or the command line, profiles have to have an ID that is unique.
+ |
+ | An encouraged best practice for profile identification is to use a consistent naming convention
+ | for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc.
+ | This will make it more intuitive to understand what the set of introduced profiles is attempting
+ | to accomplish, particularly when you only have a list of profile id's for debug.
+ |
+ | This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.
+ <profile>
+ <id>jdk-1.4</id>
+
+ <activation>
+ <jdk>1.4</jdk>
+ </activation>
+
+ <repositories>
+ <repository>
+ <id>jdk14</id>
+ <name>Repository for JDK 1.4 builds</name>
+ <url>http://www.myhost.com/maven/jdk14</url>
+ <layout>default</layout>
+ <snapshotPolicy>always</snapshotPolicy>
+ </repository>
+ </repositories>
+ </profile>
+ -->
+
+ <!--
+ | Here is another profile, activated by the system property 'target-env' with a value of 'dev',
+ | which provides a specific path to the Tomcat instance. To use this, your plugin configuration
+ | might hypothetically look like:
+ |
+ | ...
+ | <plugin>
+ | <groupId>org.myco.myplugins</groupId>
+ | <artifactId>myplugin</artifactId>
+ |
+ | <configuration>
+ | <tomcatLocation>${tomcatPath}</tomcatLocation>
+ | </configuration>
+ | </plugin>
+ | ...
+ |
+ | NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to
+ | anything, you could just leave off the <value/> inside the activation-property.
+ |
+ <profile>
+ <id>env-dev</id>
+
+ <activation>
+ <property>
+ <name>target-env</name>
+ <value>dev</value>
+ </property>
+ </activation>
+
+ <properties>
+ <tomcatPath>/path/to/tomcat/instance</tomcatPath>
+ </properties>
+ </profile>
+ -->
+ </profiles>
+
+ <!-- activeProfiles
+ | List of profiles that are active for all builds.
+ |
+ <activeProfiles>
+ <activeProfile>alwaysActiveProfile</activeProfile>
+ <activeProfile>anotherAlwaysActiveProfile</activeProfile>
+ </activeProfiles>
+ -->
+</settings>
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/lib/maven-2.0.9-uber.jar
===================================================================
(Binary files differ)
Property changes on: examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven/lib/maven-2.0.9-uber.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven-ant-tasks.jar
===================================================================
(Binary files differ)
Property changes on: examples/branches/1.0.0.PREVIEW2-PATCH2/lib/maven-ant-tasks.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: examples/branches/1.0.0.PREVIEW2-PATCH2/pom.xml
===================================================================
--- examples/branches/1.0.0.PREVIEW2-PATCH2/pom.xml (rev 0)
+++ examples/branches/1.0.0.PREVIEW2-PATCH2/pom.xml 2009-07-14 18:31:01 UTC (rev 3049)
@@ -0,0 +1,234 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.webbeans</groupId>
+ <artifactId>webbeans-version-matrix</artifactId>
+ <version>1.0.0.PREVIEW2-PATCH2</version>
+ </parent>
+ <groupId>org.jboss.webbeans.examples</groupId>
+ <artifactId>parent</artifactId>
+ <packaging>pom</packaging>
+ <version>1.0.0.PREVIEW2-PATCH2</version>
+ <name>Web Beans Examples</name>
+
+ <description>
+ Examples for the reference implementation of JSR 299: Web Beans
+ </description>
+
+ <url>http://www.seamframework.org/WebBeans</url>
+
+ <repositories>
+ <repository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <url>http://repository.jboss.org/maven2</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshots Repository</name>
+ <url>http://snapshots.jboss.org/maven2</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ </repository>
+ </repositories>
+
+ <developers>
+ <developer>
+ <name>Pete Muir</name>
+ <roles>
+ <role>Project Lead</role>
+ </roles>
+ <email>pete.muir(a)jboss.org</email>
+ <organization>JBoss, a division of Red Hat</organization>
+ <url>http://in.relation.to/Bloggers/Pete</url>
+ </developer>
+
+ <developer>
+ <name>Shane Bryzak</name>
+ <organization>JBoss, a division of Red Hat</organization>
+ </developer>
+
+ <developer>
+ <name>David Allen</name>
+ </developer>
+
+ <developer>
+ <name>Nicklas Karlsson</name>
+ </developer>
+ </developers>
+
+
+ <modules>
+ <module>numberguess</module>
+ <module>jsf2</module>
+ <module>tomcat</module>
+ <module>translator</module>
+ <module>login</module>
+ <module>conversations</module>
+ <module>se/numberguess</module>
+ <module>wicket/numberguess</module>
+ <module>wicket/conversations</module>
+ </modules>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.0-beta-8</version>
+ <configuration>
+ <tagBase>https://svn.jboss.org/repos/webbeans/examples/tags</tagBase>
+ <autoVersionSubmodules>true</autoVersionSubmodules>
+ </configuration>
+ </plugin>
+ </plugins>
+ <defaultGoal>package</defaultGoal>
+
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addDefaultImplementationEntries>
+ true
+ </addDefaultImplementationEntries>
+ <addDefaultSpecificationEntries>
+ true
+ </addDefaultSpecificationEntries>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>emma-maven-plugin</artifactId>
+ <configuration>
+ <forkMode>once</forkMode>
+ <metadataFile>../target/coverage.em</metadataFile>
+ <outputDirectory>${project.build.directory}/generated-classes</outputDirectory>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <warSourceDirectory>${basedir}/WebContent</warSourceDirectory>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-ejb-plugin</artifactId>
+ <configuration>
+ <ejbVersion>3.0</ejbVersion>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <ciManagement>
+ <system>Hudson</system>
+ <url />
+ </ciManagement>
+
+ <issueManagement>
+ <system>JIRA</system>
+ <url>http://jira.jboss.org/browse/WBRI</url>
+ </issueManagement>
+
+ <inceptionYear>2008</inceptionYear>
+
+ <licenses>
+ <license>
+ <name>Apache License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0</url>
+ </license>
+ <license>
+ <name>Lesser Gnu Public License, Version 2.1</name>
+ <url>http://www.gnu.org/licenses/lgpl-2.1.html</url>
+ </license>
+ </licenses>
+
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/webbeans/examples/1.0.0.PREVIEW2-P...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/webbeans/examples/tags/1.0.0.PREVIEW2...</developerConnection>
+ <url>http://fisheye.jboss.org/browse/WebBeans/ri/examples/1.0.0.PREVIEW2-PATCH2</url>
+ </scm>
+
+ <distributionManagement>
+ <repository>
+ <!-- Copy the dist to the local checkout of the JBoss maven2 repo ${maven.repository.root} -->
+ <!-- It is anticipated that ${maven.repository.root} be set in user's settings.xml -->
+ <!-- todo : replace this with direct svn access once the svnkit providers are available -->
+ <id>repository.jboss.org</id>
+ <url>file://${maven.repository.root}</url>
+ </repository>
+ <snapshotRepository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshot Repository</name>
+ <url>dav:https://snapshots.jboss.org/maven2</url>
+ </snapshotRepository>
+ </distributionManagement>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>cobertura-maven-plugin</artifactId>
+ <configuration>
+ <formats>
+ <format>html</format>
+ <format>xml</format>
+ </formats>
+ <instrumentation>
+ <ignores>
+ <ignore>javax.webbeans.*</ignore>
+ </ignores>
+ </instrumentation>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+
+</project>
+
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3048 - ri/branches/1.0.0.PREVIEW2-PATCH2/osgi-bundle.
by webbeans-commits@lists.jboss.org
Author: rogerk
Date: 2009-07-14 12:52:07 -0400 (Tue, 14 Jul 2009)
New Revision: 3048
Modified:
ri/branches/1.0.0.PREVIEW2-PATCH2/osgi-bundle/pom.xml
Log:
export javax/enterprise.*
Modified: ri/branches/1.0.0.PREVIEW2-PATCH2/osgi-bundle/pom.xml
===================================================================
--- ri/branches/1.0.0.PREVIEW2-PATCH2/osgi-bundle/pom.xml 2009-07-14 16:51:17 UTC (rev 3047)
+++ ri/branches/1.0.0.PREVIEW2-PATCH2/osgi-bundle/pom.xml 2009-07-14 16:52:07 UTC (rev 3048)
@@ -59,7 +59,7 @@
<_include>-osgi.bundle</_include>
<Embed-Dependency>*; scope=compile; inline=true</Embed-Dependency>
- <_exportcontents>javax.event; javax.context; javax.webbeans; javax.decorator; javax.inject; javax.enterprise.inject.spi; version=${osgi.version},
+ <_exportcontents>javax.event; javax.context; javax.webbeans; javax.decorator; javax.inject; javax.enterprise.*; version=${osgi.version},
org.jboss.webbeans.*.api.*; org.jboss.webbeans.*.spi.*; org.jboss.webbeans.conversation; org.jboss.webbeans.bootstrap; org.jboss.webbeans.introspector; org.jboss.webbeans.servlet; version=${osgi.version},
org.jboss.webbeans.bean.proxy; org.jboss.webbeans.ejb; org.jboss.webbeans.el; include:="WebBeansELResolver"; version=${osgi.version},
org.jboss.webbeans.jsf; include:="WebBeansPhaseListener"; version=${osgi.version},
@@ -126,10 +126,10 @@
<artifactId>javassist</artifactId>
</dependency>
<dependency>
+ <groupId>com.google.collections</groupId>
+ <artifactId>google-collections</artifactId>
+ </dependency>
- <groupId>dom4j</groupId>
- <artifactId>dom4j</artifactId>
- </dependency>
</dependencies>
</project>
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3047 - ri/branches/1.0.0.PREVIEW2-PATCH2/version-matrix.
by webbeans-commits@lists.jboss.org
Author: rogerk
Date: 2009-07-14 12:51:17 -0400 (Tue, 14 Jul 2009)
New Revision: 3047
Modified:
ri/branches/1.0.0.PREVIEW2-PATCH2/version-matrix/pom.xml
Log:
remove dom4j dependency
Modified: ri/branches/1.0.0.PREVIEW2-PATCH2/version-matrix/pom.xml
===================================================================
--- ri/branches/1.0.0.PREVIEW2-PATCH2/version-matrix/pom.xml 2009-07-14 15:41:57 UTC (rev 3046)
+++ ri/branches/1.0.0.PREVIEW2-PATCH2/version-matrix/pom.xml 2009-07-14 16:51:17 UTC (rev 3047)
@@ -131,12 +131,6 @@
</dependency>
<dependency>
- <groupId>dom4j</groupId>
- <artifactId>dom4j</artifactId>
- <version>1.6.1</version>
- </dependency>
-
- <dependency>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
<version>1.1</version>
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3046 - tck/trunk/impl/src/main/resources.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-07-14 11:41:57 -0400 (Tue, 14 Jul 2009)
New Revision: 3046
Modified:
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
updated section 11 assertions to latest version of spec
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-14 02:20:21 UTC (rev 3045)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-14 15:41:57 UTC (rev 3046)
@@ -3740,43 +3740,38 @@
<text>A portable extension may integrate with the container by providing a context implementation for a custom scope.</text>
</assertion>
- <assertion id="d" testable="false">
- <text>Bean definitions provided by a portable extension may be associated with a certain activity.</text>
+ <assertion id="f" testable="false">
+ <text>Augmenting or overriding the annotation-based metadata with metadata from some other source.</text>
</assertion>
-
- <assertion id="e" testable="false">
- <text>Integration with portable extensions is enabled via the important SPI interfaces Bean and BeanManager.</text>
- </assertion>
</section>
<section id="11.1" title="The Bean interface">
- <assertion id="a">
- <text>Implementations of |Bean| must also implement the inherited operations defined by the |Contextual| interface defined in Section 6.1, "The Contextual interface".</text>
+ <assertion id="ba">
+ <text>|getTypes()|, |getBindings()|, |getScopeType()|, |getName()| and |getStereotypes()| must return the bean types, bindings, scope type, EL name and stereotypes of the bean, as defined in Chapter 2, Concepts.</text>
</assertion>
-
- <assertion id="b">
- <text>The methods |getTypes()|, |getBindings()|, |getScopeType()|, |getDeploymentType()|, |getName()|, |getStereotypes()| and |getInterceptorBindings()| must return the bean types, bindings, scope type, deployment type, EL name, stereotypes and interceptor bindings of the bean, as defined in Chapter 2, Bean definition.</text>
+
+ <assertion id="bb">
+ <text>|getBeanClass()| returns the bean class of the managed bean or session bean or of the bean that declares the producer method or field.</text>
</assertion>
-
- <assertion id="c">
- <text>The method |getInjectionPoints()| returns a set of |InjectionPoint| objects, defined in Section 5.4.9, "Injection point
-metadata", representing injection points of the bean, that will be validated by the container at initialization time.</text>
+
+ <assertion id="bc">
+ <text>|isPolicy()| must return |true| if the bean is a policy, and |false| otherwise.</text>
</assertion>
- <assertion id="d">
- <text>The method |isPassivationCapable()| must return |true| if the bean is passivation capable, as defined in Section 6.6.1, "Passivation capable beans", and |false| otherwise.</text>
+ <assertion id="bd">
+ <text>|isNullable()| must return |true| if the method |create()| sometimes returns a |null| value, and |false| otherwise, as defined in Section 5.3.4, "Primitive types and null values".</text>
</assertion>
- <assertion id="e">
- <text>The method |isNullable()| must return |true| if the method |create()| sometimes returns a |null| value, and |false| otherwise, as defined in Section 5.1.3, "Primitive types and null values".</text>
+ <assertion id="c">
+ <text>|getInjectionPoints()| returns a set of |InjectionPoint| objects, defined in Section 5.6.9, "Injection point metadata", representing injection points of the bean, that will be validated by the container at initialization time.</text>
</assertion>
-
+
<assertion id="f">
- <text>An instance of |Bean| exists for every enabled bean in a deployment.</text>
+ <text>An instance of |Bean| exists for every enabled bean.</text>
</assertion>
<assertion id="g" testable="false">
- <text>An application or portable extension may add support for new kinds of beans beyond those defined by the this specification (managed beans, session beans, producer methods and fields, resources and message destinations) by implementing |Bean| and registering beans with the container, using the mechanism defined in Section 11.2.6, "Bean registration".</text>
+ <text>An application or portable extension may add support for new kinds of beans beyond those defined by the this specification (managed beans, session beans, producer methods and fields, resources and message destinations) by implementing |Bean| and registering beans with the container, using the mechanism defined in Section 11.5.2, "AfterBeanDiscovery event".</text>
</assertion>
</section>
@@ -3786,12 +3781,16 @@
</assertion>
<assertion id="b">
- <text>The method |getDecoratedTypes()| returns the decorated types of the decorator.</text>
+ <text>|getDecoratedTypes()| returns the decorated types of the decorator.</text>
</assertion>
<assertion id="c">
- <text>The methods |getDelegateType()| and |getDelegateBindings()| return the delegate type and bindings of the decorator.</text>
+ <text>|getDelegateType()| and |getDelegateBindings()| return the delegate type and bindings of the decorator.</text>
</assertion>
+
+ <assertion id="d">
+ <text>An instance of |Decorator| exists for every enabled decorator.</text>
+ </assertion>
</section>
<section id="11.1.2" title="The Interceptor interface">
@@ -3800,404 +3799,376 @@
</assertion>
<assertion id="b">
- <text>The method |getInterceptorBindingTypes()| returns the interceptor bindings of the interceptor.</text>
+ <text>|getInterceptorBindingTypes()| returns the interceptor bindings of the interceptor.</text>
</assertion>
<assertion id="c">
- <text>The method |intercepts()| returns |true| if the interceptor intercepts callbacks or business methods of the given type, and |false| otherwise.</text>
+ <text>|intercepts()| returns |true| if the interceptor intercepts callbacks or business methods of the given type, and |false| otherwise.</text>
</assertion>
<assertion id="d">
- <text>The method |intercept()| invokes the specified kind of lifecycle callback or business method upon the given instance.</text>
+ <text>|intercept()| invokes the specified kind of lifecycle callback or business method upon the given instance.</text>
</assertion>
<assertion id="e">
<text>An |InterceptionType| identifies the kind of lifecycle callback or business method.</text>
</assertion>
+
+ <assertion id="f">
+ <text>An instance of |Interceptor| exists for every enabled interceptor.</text>
+ </assertion>
</section>
-
- <section id="11.2" title="The BeanManager object">
+
+ <section id="11.1.3" title="The ObserverMethod interface">
<assertion id="a">
- <text>The container provides a built-in bean with bean type |BeanManager|, scope |@Dependent|, deployment type |@Standard| and binding |@Current|.</text>
+ <text>The interface |javax.enterprise.inject.spi.ObserverMethod| defines everything the container needs to know about an observer method.</text>
</assertion>
-
+
<assertion id="b">
- <text>The built-in implementation must be a passivation capable dependency, as defined in Section 6.6.2, "Passivation capable dependencies".</text>
+ <text>|getBean()| returns the bean with the observer method.</text>
</assertion>
-
+
<assertion id="c">
- <text>Any bean may obtain an instance of |BeanManager| by injecting it.</text>
+ <text>|getObservedType()| and |getObservedBindings()| return the observed event type and bindings.</text>
</assertion>
-
+
<assertion id="d">
- <text>A framework may obtain the |BeanManager| object from JNDI. The container must register an instance of |BeanManager| with name |java:app/BeanManager| in JNDI at initialization time.</text>
+ <text>|getNotify()| returns |IF_EXISTS| for a conditional observer and |ALWAYS| otherwise.</text>
</assertion>
-
+
<assertion id="e">
- <text>Any operation of |BeanManager| may be called at any time during the execution of the application.</text>
+ <text>|getTransactionPhase()| returns the appropriate transaction phase for a transactional observer method or |IN_PROGRESS| otherwise.</text>
</assertion>
- </section>
-
- <section id="11.2.1" title="Obtaining a contextual reference for a bean">
- <assertion id="a">
- <text>The method |BeanManager.getReference()| returns a contextual reference for a given bean and bean type, as defined in Section 6.5.3, "Contextual reference for a bean".</text>
+
+ <assertion id="f">
+ <text>|notify()| calls the observer method, as defined in Section 5.6.8 "Invocation of observer methods".</text>
</assertion>
-
- <assertion id="b">
- <text>The first parameter is the |Bean| object representing the bean. The second parameter represents the bean type that must be implemented by any client proxy that is returned.</text>
+
+ <assertion id="g">
+ <text>An instance of |Bean| exists for every observer method of every enabled bean.</text>
</assertion>
</section>
-
- <section id="11.2.2" title="Obtaining an injectable reference">
+
+ <section id="11.2" title="The Producer and InjectionTarget interfaces">
<assertion id="a">
- <text>The method |BeanManager.getInjectableReference()| returns an injectable reference for a given injection point, as defined in Section 5.4.1, "Injectable references".</text>
+ <text>The interface |javax.enterprise.inject.spi.Producer| provides a generic operation for producing an instance of a type.</text>
</assertion>
-
+
<assertion id="b">
- <text>If the |InjectionPoint| represents a decorator delegate injection point, |getInjectableReference()| returns a delegate, as
-defined in Section 8.1.2, "Decorator delegate injection points".</text>
+ <text>For a |Producer| that represents a class, |produce()| calls the constructor annotated |@Initializer| if it exists, or the constructor with no parameters otherwise, as defined in Section 5.6.3, "Injection using the bean constructor".</text>
</assertion>
-
+
<assertion id="c">
- <text>Implementations of |Bean| usually maintain a reference to an instance of |BeanManager|. When the |Bean| implementation performs dependency injection, it must obtain the contextual instances to inject by calling |BeanManager.getInjectableReference()|, passing an instance of |InjectionPoint| that represents the injection point and the instance of |CreationalContext| that was passed to |Bean.create()|.</text>
+ <text>For a |Producer| that represents a class, |dispose()| does nothing.</text>
</assertion>
- </section>
-
- <section id="11.2.3" title="Obtaining a Bean by type">
- <assertion id="a">
- <text>The |getBeans()| method of the |BeanManager| interface returns the result of the typesafe resolution algorithm defined in Section 5.1, "Typesafe resolution algorithm".</text>
- </assertion>
-
- <assertion id="b">
- <text>The first parameter is a required bean type. The remaining parameters are required bindings.</text>
- </assertion>
-
- <assertion id="c">
- <text>If no bindings are passed to |getBeans()|, the default binding |@Current| is assumed.</text>
- </assertion>
-
+
<assertion id="d">
- <text>If a parameterized type with a type parameter or wildcard is passed to |getBeans()|, an |IllegalArgumentException| is thrown.</text>
+ <text>For a |Producer| that represents a class, |getInjectionPoints()| returns a set of |InjectionPoint| objects representing all injected fields, bean constructor parameters and initializer method parameters.</text>
</assertion>
-
+
<assertion id="e">
- <text>If two instances of the same binding type are passed to |getBeans()|, a |DuplicateBindingTypeException| is thrown.</text>
+ <text>For a Producer that represents a producer method or field, |produce()| calls the producer method on, or accesses the producer field of, a contextual instance of the most specialized bean that specializes the bean that declares the producer method, as defined in Section 5.6.6, "Invocation of producer or disposer methods".</text>
</assertion>
-
+
<assertion id="f">
- <text>If an instance of an annotation that is not a binding type is passed to |getBeans()|, an |IllegalArgumentException| is thrown.</text>
+ <text>For a Producer that represents a producer method or field, |dispose()| calls the disposer method, if any, on a contextual instance of the most specialized bean that specializes the bean that declares the disposer method, as defined in Section 5.6.6, "Invocation of producer or disposer methods", or performs any additional required cleanup, if any, to destroy state associated with a resource.</text>
</assertion>
- </section>
-
- <section id="11.2.4" title="Obtaining a Bean by name">
- <assertion id="a">
- <text>The |getBeans()| method of the |BeanManager| interface returns the result of the name resolution algorithm defined in Section 5.2, "EL name resolution algorithm".</text>
+
+ <assertion id="g">
+ <text>For a Producer that represents a producer method or field, |getInjectionPoints()| returns the set of |InjectionPoint| objects representing all parameters of the producer method.</text>
</assertion>
-
- <assertion id="b">
- <text>The parameter is a bean EL name.</text>
+
+ <assertion id="h">
+ <text>The subinterface |javax.enterprise.inject.spi.InjectionTarget| provides operations for performing dependency injection and lifecycle callbacks on an instance of a type.</text>
</assertion>
- </section>
-
- <section id="11.2.5" title="Obtaining the most specialized bean">
- <assertion id="a">
- <text>The method |BeanManager.getMostSpecializedBean()| returns the |Bean| object representing the most specialized enabled bean registered with the container that specializes the given bean, as defined in Section 4.3.2, "Most specialized enabled bean for a bean".</text>
+
+ <assertion id="i">
+ <text>|inject()| performs dependency injection upon the given object. First, the container performs Java EE component environment injection according to the semantics required by the Java EE platform specification. Next, it sets the value of all injected fields, and then calls all initializer methods, as defined in Section 5.6.4, "Injection of fields and initializer methods".</text>
</assertion>
- </section>
-
- <section id="11.2.6" title="Bean registration">
- <assertion id="a">
- <text>The |BeanManager.addBean()| method registers a new bean with the container, thereby making it available for injection into other beans.</text>
+
+ <assertion id="j">
+ <text>|postConstruct()| calls the |@PostConstruct| callback, if it exists, according to the semantics required by the Java EE platform specification.</text>
</assertion>
-
- <assertion id="b">
- <text>The |Bean| parameter may represent an interceptor or decorator.</text>
+
+ <assertion id="k">
+ <text>|preDestroy()| calls the |@PreDestroy| callback, if it exists, according to the semantics required by the Java EE platform specification.</text>
</assertion>
</section>
- <section id="11.2.7" title="Observer registration">
+ <section id="11.3" title="The BeanManager object">
<assertion id="a">
- <text>An observer instance may be registered with the container by calling |BeanManager.addObserver()|.</text>
+ <text>The container provides a built-in bean with bean type |BeanManager|, scope |@Dependent| and binding |@Current|.</text>
</assertion>
<assertion id="b">
- <text>The first parameter is the observer object. The second parameter is the observed event type. The remaining parameters are optional observed event bindings. The observer is notified when an event object that is assignable to the observed event type is raised with the observed event bindings.</text>
+ <text>The built-in implementation must be a passivation capable dependency, as defined in Section 6.6.2, "Passivation capable dependencies".</text>
</assertion>
<assertion id="c">
- <text>An observer instance may be deregistered by calling |BeanManager.removeObserver()|.</text>
+ <text>Any bean may obtain an instance of |BeanManager| by injecting it.</text>
</assertion>
- <assertion id="d">
- <text>If two instances of the same binding type are passed to |addObserver()| or |removeObserver()|, a |DuplicateBindingTypeException| is thrown.</text>
- </assertion>
+ <assertion id="da">
+ <text>Java EE components may obtain an instance of |BeanManager| from JNDI by looking up the name |java:comp/BeanManager|.</text>
+ </assertion>
<assertion id="e">
- <text>If an instance of an annotation that is not a binding type is passed to |addObserver()| or |removeObserver()|, an |IllegalArgumentException| is thrown.</text>
+ <text>Any operation of |BeanManager| may be called at any time during the execution of the application.</text>
</assertion>
</section>
- <section id="11.2.8" title="Firing an event">
+ <section id="11.3.1" title="Obtaining a contextual reference for a bean">
<assertion id="a">
- <text>The method |BeanManager.fireEvent()| fires an event and notifies observers, according to Section 10.6, "Observer notification".</text>
+ <text>The method |BeanManager.getReference()| returns a contextual reference for a given bean and bean type, as defined in Section 6.5.3, "Contextual reference for a bean".</text>
</assertion>
<assertion id="b">
- <text>The first argument is the event object. The remaining parameters are event bindings.</text>
+ <text>The first parameter is the |Bean| object representing the bean. The second parameter represents the bean type that must be implemented by any client proxy that is returned.</text>
</assertion>
-
- <assertion id="c">
- <text>If the runtime type of the event object passed to |fireEvent()| contains a type variable, an |IllegalArgumentException| is thrown.</text>
- </assertion>
-
- <assertion id="d">
- <text>If two instances of the same binding type are passed to |fireEvent()|, a |DuplicateBindingTypeException| is thrown.</text>
- </assertion>
-
- <assertion id="e">
- <text>If an instance of an annotation that is not a binding type is passed to |fireEvent()|, an |IllegalArgumentException| is thrown.</text>
- </assertion>
</section>
- <section id="11.2.9" title="Observer resolution">
+ <section id="11.3.2" title="Obtaining an injectable reference">
<assertion id="a">
- <text>The method |BeanManager.resolveObservers()| resolves observers for an event according to the observer resolution algorithm defined in Section 10.2, "Observer resolution algorithm".</text>
+ <text>The method |BeanManager.getInjectableReference()| returns an injectable reference for a given injection point, as defined in Section 5.6.1, "Injectable references".</text>
</assertion>
-
+
<assertion id="b">
- <text>The first parameter of |resolveObservers()| is the event object. The remaining parameters are event bindings.</text>
+ <text>If the |InjectionPoint| represents a decorator delegate injection point, |getInjectableReference()| returns a delegate, as defined in Section 8.1.2, "Decorator delegate injection points".</text>
</assertion>
-
- <assertion id="c">
- <text>If the runtime type of the event object passed to |resolveObservers()| contains a type variable, an |IllegalArgumentException| is thrown.</text>
+
+ <assertion id="bb">
+ <text>If typesafe resolution results in an unsatisfied dependency, the container must throw an |UnsatisfiedResolutionException|.</text>
</assertion>
-
- <assertion id="d">
- <text>If two instances of the same binding type are passed to |resolveObservers()|, a |DuplicateBindingTypeException| is thrown.</text>
+
+ <assertion id="bc">
+ <text>If typesafe resolution results in an unresolvable ambiguous dependency, the container must throw an |AmbiguousResolutionException|.</text>
</assertion>
- <assertion id="e">
- <text>If an instance of an annotation that is not a binding type is passed to |resolveObservers()|, an |IllegalArgumentException| is thrown.</text>
+ <assertion id="c">
+ <text>Implementations of |Bean| usually maintain a reference to an instance of |BeanManager|. When the |Bean| implementation performs dependency injection, it must obtain the contextual instances to inject by calling |BeanManager.getInjectableReference()|, passing an instance of |InjectionPoint| that represents the injection point and the instance of |CreationalContext| that was passed to |Bean.create()|.</text>
</assertion>
</section>
-
- <section id="11.2.10" title="Decorator resolution">
+
+ <section id="11.3.3" title="Obtaining a CreationalContext">
<assertion id="a">
- <text>The method |BeanManager.resolveDecorators()| returns the ordered list of enabled decorators for a set of bean types and a set of bindings, as defined in Section 8.3, "Decorator resolution".</text>
+ <text>An instance of |CreationalContext| may be obtained by calling |BeanManager.createCreationalContext()|.</text>
</assertion>
-
- <assertion id="b">
- <text>The first argument is the set of bean types of the decorated bean. The annotations are bindings declared by the decorated bean.</text>
- </assertion>
-
- <assertion id="c">
- <text>If two instances of the same binding type are passed to |resolveDecorators()|, a |DuplicateBindingTypeException| is thrown.</text>
- </assertion>
-
- <assertion id="d">
- <text>If an instance of an annotation that is not a binding type is passed to |resolveDecorators()|, an |IllegalArgumentException| is thrown.</text>
- </assertion>
-
- <assertion id="e">
- <text>If the set of bean types is empty, an |IllegalArgumentException| is thrown.</text>
- </assertion>
</section>
- <section id="11.2.11" title="Interceptor resolution">
- <assertion id="a">
- <text>The method |BeanManager.resolveInterceptors()| returns the ordered list of enabled interceptors for a set of interceptor bindings, as defined in Section 9.5, "Interceptor resolution".</text>
+ <section id="11.3.4" title="Obtaining a Bean by type">
+ <assertion id="aa">
+ <text>The method |BeanManager.getBeans()| returns the set of beans which match the given required type and bindings and are accessible to the class into which the |BeanManager| was injected, or to the Java EE component from whose JNDI environment namespace the |BeanManager| was obtained, according to the rules of typesafe resolution defined in Section 5.3, "Typesafe resolution".</text>
</assertion>
<assertion id="b">
- <text>If two instances of the same interceptor binding type are passed to |resolveInterceptors()|, a |DuplicateBindingTypeException| is thrown.</text>
+ <text>The first parameter is a required bean type. The remaining parameters are required bindings.</text>
</assertion>
<assertion id="c">
- <text>If no interceptor binding type instance is passed to |resolveInterceptors()|, an |IllegalArgumentException| is thrown.</text>
+ <text>If no bindings are passed to |getBeans()|, the default binding |@Current| is assumed.</text>
</assertion>
- <assertion id="d">
- <text>If an instance of an annotation that is not an interceptor binding type is passed to |resolveInterceptors()|, an |IllegalArgumentException| is thrown.</text>
+ <assertion id="da">
+ <text>If the given type represents a type variable, an |IllegalArgumentException| is thrown.</text>
</assertion>
- </section>
- <section id="11.2.12" title="Dependency validation">
- <assertion id="a">
- <text>The |BeanManager.validate()| operation validates a dependency.</text>
+ <assertion id="e">
+ <text>If two instances of the same binding type are given, an |IllegalArgumentException| is thrown.</text>
</assertion>
- <assertion id="b">
- <text>The method |validate()| validates the dependency and throws an |InjectionException| if there is a deployment problem (for example, an unsatisfied or ambiguous dependency) associated with the injection point.</text>
+ <assertion id="f">
+ <text>If an instance of an annotation that is not a binding type is given, an |IllegalArgumentException| is thrown.</text>
</assertion>
</section>
- <section id="11.2.13" title="Enabled deployment types">
- <assertion id="a">
- <text>The method |BeanManager.getEnabledDeploymentTypes()| exposes the list of enabled deployment types, in order of lower to higher precedence, as defined by Section 2.5.5, "Enabled deployment types".</text>
+ <section id="11.3.5" title="Obtaining a Bean by name">
+ <assertion id="aa">
+ <text>The method |BeanManager.getBeans()| which accepts a string returns the set of beans which match the given EL name and are accessible to the class into which the |BeanManager| was injected, or to the Java EE component from whose JNDI environment namespace the |BeanManager| was obtained, according to the rules of EL name resolution defined in Section 5.4, "EL name resolution".</text>
</assertion>
<assertion id="b">
- <text>Portable extensions may use this method to inspect meta-annotations that appear on the deployment types and thereby discover information about the deployment.</text>
+ <text>The parameter is an EL name.</text>
</assertion>
</section>
- <section id="11.2.14" title="Registering a Context">
+ <section id="11.3.6" title="Obtaining the most specialized bean">
<assertion id="a">
- <text>A custom implementation of |Context| may be associated with a scope type by calling |BeanManager.addContext()|.</text>
+ <text>The method |BeanManager.getMostSpecializedBean()| returns the |Bean| object representing the most specialized enabled bean that specializes the given bean, as defined in Section 4.3.2, "Most specialized enabled bean for a bean".</text>
</assertion>
</section>
-
- <section id="11.2.15" title="Obtaining the active Context for a scope">
+
+ <section id="11.3.7" title="Obtaining a passivation capable bean by identifier">
<assertion id="a">
- <text>The method |BeanManager.getContext()| retrieves an active context object associated with the a given scope, as defined in Section 6.5.1, "The active context object for a scope".</text>
+ <text>The method |BeanManager.getPassivationCapableBean()| returns the |PassivationCapableBean| with the given identifier.</text>
</assertion>
</section>
-
- <section id="11.3" title="Alternative metadata sources">
+
+ <section id="11.3.8" title="Resolving an ambiguous dependency">
<assertion id="a">
- <text>The interfaces |AnnotatedType|, |AnnotatedField|, |AnnotatedMethod|, |AnnotatedConstructor| and |AnnotatedParameter| in the package |javax.enterprise.inject.spi| allow a portable extension to specify metadata that overrides the annotations that exist on a bean class. The portable extension is responsible for implementing the interfaces, thereby exposing the metadata to the container.</text>
+ <text>The method |BeanManager.resolve()| applies the ambiguous dependency resolution rules defined in Section 5.3.1, "Unsatisfied and ambiguous dependencies" to a set of |Beans|.</text>
</assertion>
-
+
<assertion id="b">
- <text>The interface |Annotated| exposes the overriding annotations and type declarations.</text>
+ <text>If the ambiguous dependency resolution rules fail, the container must throw an |AmbiguousResolutionException|.</text>
</assertion>
</section>
-
- <section id="11.3.18" title="Obtaining the active Context for a scope">
+
+ <section id="11.3.9" title="Validating a dependency">
<assertion id="a">
- <text>The method |BeanManager.getContext()| retrieves an active context object associated with the a given scope, as defined in Section 6.5.1, "The active context object for a scope".</text>
+ <text>The |BeanManager.validate()| operation validates a dependency.</text>
</assertion>
+
+ <assertion id="b">
+ <text>The method |validate()| validates the dependency and throws an |InjectionException| if there is a deployment problem (for example, an unsatisfied or unresolvable ambiguous dependency) associated with the injection point.</text>
+ </assertion>
</section>
-
- <section id="11.4" title="Helper objects for Bean implementations">
+
+ <section id="11.3.10" title="Firing an event">
<assertion id="a">
- <text>The BeanManager provides access to helper objects which parse and validate the standard metadata defined by this specification and perform injection upon an object according to the standard injection lifecycle defined in Section 5.4.3, "Injection using the bean constructor".</text>
+ <text>The method |BeanManager.fireEvent()| fires an event and notifies observers, according to Section 10.5, "Observer notification".</text>
</assertion>
-
+
<assertion id="b">
- <text>The method |createInjectionTarget()| returns a container provided instance of |InjectionTarget| for the given type or throws an |IllegalArgumentException| if there is a definition error associated with any injection point of the type.</text>
+ <text>The first argument is the event object. The remaining parameters are event bindings.</text>
</assertion>
-
+
<assertion id="c">
- <text>The method |createManagedBean()| returns an instance of |ManagedBean| representing the given managed bean type, or throws an |IllegalArgumentException| if there is any kind of definition error associated with the type.</text>
+ <text>If the runtime type of the event object contains a type variable, an |IllegalArgumentException| is thrown.</text>
</assertion>
-
+
<assertion id="d">
- <text>When an |AnnotatedType| is passed to |createInjectionTarget()| or |createManagedBean()| the container ignores the annotations and types declared by the elements of the actual Java class and uses the metadata provided via the |Annotated| interface instead.</text>
+ <text>If two instances of the same binding type are given, an |IllegalArgumentException| is thrown.</text>
</assertion>
+
+ <assertion id="e">
+ <text>If an instance of an annotation that is not a binding type is given, an |IllegalArgumentException| is thrown.</text>
+ </assertion>
</section>
-
- <section id="11.4.1" title="The InjectionTarget interface">
+
+ <section id="11.3.11" title="Observer method resolution">
<assertion id="a">
- <text>The interface |javax.enterprise.inject.spi.InjectionTarget| provides operations for instantiating and performing dependency injection on instances of a type.</text>
+ <text>The method |BeanManager.resolveObserverMethods()| resolves observer methods for an event according to the rules of observer resolution defined in Section 10.2, "Observer resolution".</text>
</assertion>
<assertion id="b">
- <text>For any container provided implementation of |InjectionTarget| that represents a class, |produce()| calls the constructor annotated |@Initializer| if it exists, or the constructor with no parameters otherwise, as defined in Section 5.4.3, "Injection using the bean constructor".</text>
+ <text>The first parameter of |resolveObserverMethods()| is the event object. The remaining parameters are event bindings.</text>
</assertion>
-
+
<assertion id="c">
- <text>For any container provided implementation of |InjectionTarget| that represents a class, |inject()| performs dependency injection upon the given object. First, the container performs Java EE component environment
-injection according to the semantics required by the Java EE platform specification. Next, it sets the value all injected fields, and then calls all the initializer methods, as defined in Section 5.4.4, "Injection of fields and initializer methods". Finally, it calls the |@PostConstruct| callback, if it exists, according to the semantics required by the Java EE platform specification.</text>
+ <text>If the runtime type of the event object contains a type variable, an |IllegalArgumentException| is thrown.</text>
</assertion>
-
+
<assertion id="d">
- <text>For any container provided implementation of |InjectionTarget| that represents a class, |dispose()| calls the |@PreDestroy| callback, if it exists, according to the semantics required by the Java EE platform
-specification.</text>
+ <text>If two instances of the same binding type are given, an |IllegalArgumentException| is thrown.</text>
</assertion>
-
+
<assertion id="e">
- <text>For any container provided implementation of |InjectionTarget| that represents a class, |destroy()| destroys dependent objects of the given instance, as defined in Section 5.4.5, "Destruction of dependent objects".</text>
+ <text>If an instance of an annotation that is not a binding type is given, an |IllegalArgumentException| is thrown.</text>
</assertion>
-
- <assertion id="f">
- <text>For any container provided implementation of |InjectionTarget| that represents a class, |getInjectionPoints()| returns the set of |InjectionPoint| objects representing all injected fields, bean constructor parameters and initializer method parameters.</text>
+ </section>
+
+ <section id="11.3.12" title="Decorator resolution">
+ <assertion id="a">
+ <text>The method |BeanManager.resolveDecorators()| returns the ordered list of decorators for a set of bean types and a set of bindings, as defined in Section 8.3, "Decorator resolution".</text>
</assertion>
-
- <assertion id="g">
- <text>For any container provided implementation of |InjectionTarget| that represents a producer method or field, produce() calls the producer method on, or accesses the producer field of, either the given instance or a contextual instance of the most specialized bean that specializes the bean that declares the producer method, as defined in Section 5.4.6, "Invocation of producer or disposal methods".</text>
+
+ <assertion id="b">
+ <text>The first argument is the set of bean types of the decorated bean. The annotations are bindings declared by the decorated bean.</text>
</assertion>
-
- <assertion id="h">
- <text>For any container provided implementation of |InjectionTarget| that represents a producer method or field, |inject()| does nothing.</text>
+
+ <assertion id="c">
+ <text>If two instances of the same binding type are given, an |IllegalArgumentException| is thrown.</text>
</assertion>
-
- <assertion id="i">
- <text>For any container provided implementation of |InjectionTarget| that represents a producer method or field, |dispose()| calls the disposal method, if it exists, on either the given instance or a contextual instance of the most specialized bean that specializes the bean that declares the producer method, as defined in Section 5.4.6, "Invocation of
-producer or disposal methods".</text>
+
+ <assertion id="d">
+ <text>If an instance of an annotation that is not a binding type is given, an |IllegalArgumentException| is thrown.</text>
</assertion>
-
- <assertion id="j">
- <text>For any container provided implementation of |InjectionTarget| that represents a producer method or field, |destroy()| destroys dependent objects of the given object, as defined in Section 5.4.5, "Destruction of dependent objects".</text>
+
+ <assertion id="e">
+ <text>If the set of bean types is empty, an |IllegalArgumentException| is thrown.</text>
</assertion>
-
- <assertion id="k">
- <text>For any container provided implementation of |InjectionTarget| that represents a producer method or field, |getInjectionPoints()| returns the set of |InjectionPoint| objects representing all producer and disposal method parameters.</text>
- </assertion>
</section>
-
- <section id="11.4.2" title="ManagedBean and ProducerBean">
+
+ <section id="11.3.13" title="Interceptor resolution">
<assertion id="a">
- <text>The interface |javax.enterprise.inject.spi.ManagedBean| exposes container provided implementations of |Bean| and |InjectionTarget| for a managed bean class.</text>
+ <text>The method |BeanManager.resolveInterceptors()| returns the ordered list of interceptors for a set of interceptor bindings, as defined in Section 9.5, "Interceptor resolution".</text>
</assertion>
-
+
<assertion id="b">
- <text>The method |getAnnotatedType()| returns the |AnnotatedType| representing the managed bean class.</text>
+ <text>If two instances of the same interceptor binding type are given, an |IllegalArgumentException| is thrown.</text>
</assertion>
-
+
<assertion id="c">
- <text>The method |getInjectionTarget()| returns a container provided implementation of |InjectionTarget| for the managed bean class.</text>
+ <text>If no interceptor binding type instance is given, an |IllegalArgumentException| is thrown.</text>
</assertion>
-
+
<assertion id="d">
- <text>The method |getProducerBeans()| returns a set of |ProducerBean| objects representing the producer methods and fields of the managed bean.</text>
+ <text>If an instance of an annotation that is not an interceptor binding type is given, an |IllegalArgumentException| is thrown.</text>
</assertion>
-
- <assertion id="e">
- <text>The method |getObserverMethods()| returns a set of |ObserverMethod| objects representing the observer methods of the bean.</text>
+ </section>
+
+ <section id="11.3.14" title="Determining if an annotation is a binding type, scope type, stereotype or interceptor binding type">
+ <assertion id="a">
+ <text>A portable extension may test an annotation to determine if it is a binding type, scope type, stereotype or interceptor binding type, obtain the set of meta-annotations declared by a stereotype or interceptor binding type, or obtain a |ScopeType| representing a scope type.</text>
</assertion>
-
- <assertion id="f">
- <text>The |ProducerBean| interface exposes container provided implementations of |Bean| and |InjectionTarget| for a producer method or field.</text>
+ </section>
+
+ <section id="11.3.15" title="Obtaining the active Context for a scope">
+ <assertion id="a">
+ <text>The method |BeanManager.getContext()| retrieves an active context object associated with the a given scope, as defined in Section 6.5.1, "The active context object for a scope".</text>
</assertion>
-
- <assertion id="g">
- <text>The methods |getAnnotatedProducer()| and |getAnnotatedDisposer()| return the |AnnotatedMembers| representing the producer method or field and disposal method respectively.</text>
+ </section>
+
+ <section id="11.3.16" title="Obtaining the ELResolver">
+ <assertion id="a">
+ <text>The method |BeanManager.getELResolver()| returns the |javax.el.ELResolver| specified in Section 5.8, "Integration with Unified EL".</text>
</assertion>
-
- <assertion id="h">
- <text>The method |getDeclaringBean()| returns a container provided implementation of |Bean| for the bean class that declares the producer method or field.</text>
+ </section>
+
+ <section id="11.3.17" title="Obtaining an AnnotatedType for a class">
+ <assertion id="a">
+ <text>The method |BeanManager.createAnnotatedType()| returns an |AnnotatedType| for the given Java class.</text>
</assertion>
-
- <assertion id="i">
- <text>The method |getInjectionTarget()| returns a container provided implementation of |InjectionTarget| for the producer method or field.</text>
+ </section>
+
+ <section id="11.3.18" title="Obtaining an InjectionTarget">
+ <assertion id="a">
+ <text>The method |BeanManager.createInjectionTarget()| returns a container provided implementation of |InjectionTarget| for a given |AnnotatedType| or throws an |IllegalArgumentException| if there is a definition error associated with any injection point of the type.</text>
</assertion>
</section>
- <section id="11.4.3" title="The ObserverMethod interface">
+ <section id="11.4" title="Alternative metadata sources">
<assertion id="a">
- <text>The interface |javax.enterprise.inject.spi.ObserverMethod| exposes a container provided implementation of |Observer| for an observer method, as defined in Section 10.6.1, "Observer method notification" along with the observed event type and bindings and an operation for calling the method.</text>
+ <text>The interfaces |AnnotatedType|, |AnnotatedField|, |AnnotatedMethod|, |AnnotatedConstructor| and |AnnotatedParameter| in the package |javax.enterprise.inject.spi| allow a portable extension to specify metadata that overrides the annotations that exist on a bean class. The portable extension is responsible for implementing the interfaces, thereby exposing the metadata to the container.</text>
</assertion>
<assertion id="b">
- <text>The methods |getAnnotatedMethod()| returns the |AnnotatedMethod| representing the observer method.</text>
+ <text>The interface |javax.enterprise.inject.spi.Annotated| exposes the overriding annotations and type declarations.</text>
</assertion>
-
+
<assertion id="c">
- <text>The method |getDeclaringBean()| returns a container provided implementation of |Bean| for the bean class that declares the observer method.</text>
+ <text>|getBaseType()| returns the type of the program element.</text>
</assertion>
-
+
<assertion id="d">
- <text>The method |notify()| calls the observer method, upon the given bean instance as defined in Section 5.4.8, "Invocation of observer methods".</text>
+ <text>|getTypeClosure()| returns all types to which the base type should be considered assignable.</text>
</assertion>
-
+
<assertion id="e">
- <text>The methods |getObservedEventType()| and |getObservedEventBindings()| return the observed event type and bindings of the observer method.</text>
+ <text>|getAnnotation()| returns the program element annotation of the given annotation type, or a null value.</text>
</assertion>
-
+
<assertion id="f">
- <text>The method |getInjectionPoints()| returns the set of |InjectionPoint| objects representing all injected method parameters.</text>
+ <text>|getAnnotations()| returns all annotations of the program element.</text>
</assertion>
+
+ <assertion id="g">
+ <text>|isAnnotationPresent()| returns true if the program element has an annotation of the given annotation type, or false otherwise.</text>
+ </assertion>
+
+ <assertion id="h">
+ <text>The container must use the operations of |Annotated| and its subinterfaces to discover program element types and annotations, instead of directly calling the Java Reflection API. In particular, the container must call |Annotated.getBaseType()| to determine the type of an injection point, event parameter or disposed parameter, call |Annotated.getTypeClosure()| to determine the bean types of any kind of bean, call |Annotated.getAnnotations()| to determine the scope, bindings, stereotypes and interceptor bindings of a bean, call |Annotated.isAnnotationPresent()| and |Annotated.getAnnotation()| to read any bean annotations defined by this specification, and call |AnnotatedType.getConstructors()|, |AnnotatedType.getMethods()| and |AnnotatedType.getFields()| to determine the members of a bean class.</text>
+ </assertion>
</section>
<section id="11.5" title="Container lifecycle events">
@@ -4212,30 +4183,43 @@
<assertion id="c">
<text>The container instantiates a single instance of each service provider at the beginning of the application initialization process and maintains a reference to it until the application shuts down.</text>
</assertion>
+
+ <assertion id="d">
+ <text>Service providers may have observer methods, which may observe container initialization events and obtain an injected |BeanManager| reference.</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>For each service provider, the container must provide a bean of scope |@ApplicationScoped| and binding |@Current|, supporting injection of a reference to the service provider instance. The bean types of this bean include the class of the service
+provider and all superclases and interfaces.</text>
+ </assertion>
</section>
<section id="11.5.1" title="BeforeBeanDiscovery event">
<assertion id="a">
<text>The container must fire an event before it begins the bean discovery process. The event object must be of type |javax.enterprise.inject.spi.BeforeBeanDiscovery|.</text>
</assertion>
-
- <assertion id="ba">
- <text>The operations of the |BeforeBeanDiscovery| instance allow a portable extension to declare that any annotation as a _binding type_, scope type, stereotype or interceptor binding type.</text>
+
+ <assertion id="ab">
+ <text>|addBindingType()| declares an annotation type as a binding type.</text>
</assertion>
-
- <assertion id="bb">
- <text>The operations of the |BeforeBeanDiscovery| instance allow a portable extension to declare that any annotation as a binding type, _scope type_, stereotype or interceptor binding type.</text>
+
+ <assertion id="ac">
+ <text>|addScopeType()| declares an annotation type as a scope type.</text>
</assertion>
-
- <assertion id="bc">
- <text>The operations of the |BeforeBeanDiscovery| instance allow a portable extension to declare that any annotation as a binding type, scope type, _stereotype_ or interceptor binding type.</text>
+
+ <assertion id="ad">
+ <text>|addStereotype()| declares an annotation type as a stereotype, and specifies its meta-annotations.</text>
</assertion>
-
- <assertion id="bd">
- <text>The operations of the |BeforeBeanDiscovery| instance allow a portable extension to declare that any annotation as a binding type, scope type, stereotype or _interceptor binding type_.</text>
+
+ <assertion id="ae">
+ <text>|addInterceptorBindingType()| declares an annotation type as an interceptor binding type, and specifies its meta-annotations.</text>
</assertion>
+
+ <assertion id="af">
+ <text>|addAnnotatedType()| adds a given |AnnotatedType| to the set of types which will be scanned during bean discovery.</text>
+ </assertion>
- <assertion id="c">
+ <assertion id="ag">
<text>If any observer method of the |BeforeBeanDiscovery| event throws an exception, the exception is treated as a definition error by the container.</text>
</assertion>
</section>
@@ -4244,12 +4228,25 @@
<assertion id="a">
<text>The container must fire a second event when it has fully completed the bean discovery process, validated that there are no definition errors relating to the discovered beans, and registered |Bean| and |Observer| objects for the discovered beans, but before detecting deployment problems. The event object must be of type |javax.enterprise.inject.spi.AfterBeanDiscovery|.</text>
</assertion>
-
- <assertion id="c">
- <text>The method |addDefinitionError()| registers a definition error with the container, causing the container to abort deployment after all observers have been notified.</text>
+
+ <assertion id="ca">
+ <text>|addDefinitionError()| registers a definition error with the container, causing the container to abort deployment after all observers have been notified.</text>
</assertion>
<assertion id="d">
+ <text>|addBean()| fires an event of type |ProcessBean| containing the given |Bean| and then registers the |Bean| with the container, thereby making it available for injection into other beans. The given |Bean| may implement |Interceptor| or |Decorator|.</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>|addObserverMethod()| fires an event of type |ProcessObserverMethod| containing the given |ObserverMethod| and then registers the |ObserverMethod| with the container, thereby making it available for event notifications.</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>|addContext()| registers a custom |Context| object with the container.
+A portable extension may take advantage of this event to register beans, interceptors, decorators, observer methods and custom context objects with the container.</text>
+ </assertion>
+
+ <assertion id="g">
<text>If any observer method of the |AfterBeanDiscovery| event throws an exception, the exception is treated as a definition error by the container.</text>
</assertion>
</section>
@@ -4260,7 +4257,7 @@
</assertion>
<assertion id="b">
- <text>The method |addDeploymentProblem()| registers a deployment problem with the container, causing the container to abort deployment after all observers have been notified.</text>
+ <text>|addDeploymentProblem()| registers a deployment problem with the container, causing the container to abort deployment after all observers have been notified.</text>
</assertion>
<assertion id="c">
@@ -4277,8 +4274,8 @@
<text>The container must fire a final event after it has finished processing requests and destroyed all contexts. The event object must be of type |javax.enterprise.inject.spi.BeforeShutdown|.</text>
</assertion>
- <assertion id="b">
- <text>If any observer method of the |BeforeShutdown| event throws an exception, the exception is treated as a deployment problem by the container.</text>
+ <assertion id="ba">
+ <text>If any observer method of the |BeforeShutdown| event throws an exception, the exception is ignored by the container.</text>
</assertion>
</section>
@@ -4287,17 +4284,25 @@
<text>The container must fire an event for each Java class it discovers, before it reads the declared annotations. The event object must be of type |javax.enterprise.inject.spi.ProcessAnnotatedType<X>|, where |X| is the class.</text>
</assertion>
- <assertion id="b">
- <text>The |getAnnotatedType()|/|setAnnotatedType()| property accessor pair provides access to the |AnnotatedType| object that will be used by the container to read the declared annotations.</text>
+ <assertion id="ba">
+ <text>|getAnnotatedType()| returns the |AnnotatedType| object that will be used by the container to read the declared annotations.</text>
</assertion>
-
- <assertion id="c">
- <text>Any observer of this event is permitted to wrap and/or replace the |annotatedType| property of |ProcessAnnotatedType|.</text>
+
+ <assertion id="bb">
+ <text>|setAnnotatedType()| replaces the |AnnotatedType|.</text>
</assertion>
+
+ <assertion id="bc">
+ <text>|veto()| forces the container to ignore the type.</text>
+ </assertion>
- <assertion id="d">
- <text>The container must use the final value of this property, after all observers have been called, to read the annotations of this class.</text>
+ <assertion id="ca">
+ <text>Any observer of this event is permitted to wrap and/or replace the |AnnotatedType|. The container must use the final value of this property, after all observers have been called, to discover the types and read the annotations of the program elements.</text>
</assertion>
+
+ <assertion id="e">
+ <text>If any observer method of a |ProcessAnnotatedType| event throws an exception, the exception is treated as a definition error by the container.</text>
+ </assertion>
</section>
<section id="11.5.6" title="ProcessInjectionTarget event">
@@ -4305,174 +4310,139 @@
<text>The container must fire an event for each managed bean, session bean, Java EE component class supporting injection, producer method or producer field it discovers. The event object must be of type |javax.enterprise.inject.spi.ProcessInjectionTarget<X>|, where |X| is the managed bean class, session bean class or Java EE component class supporting injection.</text>
</assertion>
- <assertion id="b">
- <text>The |getInjectionTarget()|/|setInjectionTarget()| property accessor pair provides access to the |InjectionTarget| object that will be used by the container to perform injection.</text>
+ <assertion id="ab">
+ <text>|getAnnotatedType()| returns the |AnnotatedType| representing the managed bean class, session bean or other Java EE component class supporting injection.</text>
</assertion>
-
- <assertion id="c">
- <text>The method |getAnnotatedType()| returns the |AnnotatedType| representing the managed bean, session bean or other Java EE component class supporting injection.</text>
+
+ <assertion id="ba">
+ <text>|getInjectionTarget()| returns the |InjectionTarget| object that will be used by the container to perform injection.</text>
</assertion>
+
+ <assertion id="bb">
+ <text>|setInjectionTarget()| replaces the |InjectionTarget|.</text>
+ </assertion>
- <assertion id="d">
- <text>The method |addDefinitionError()| registers a definition error with the container, causing the container to abort deployment after bean discovery is complete.</text>
+ <assertion id="da">
+ <text>|addDefinitionError()| registers a definition error with the container, causing the container to abort deployment after bean discovery is complete.</text>
</assertion>
<assertion id="e">
- <text>Any observer of this event is permitted to wrap and/or replace the |injectionTarget| property of |ProcessInjectionTarget|. The container must use the final value of this property, after all observers have been called, whenever it performs injection upon the managed bean, session bean or other Java EE component class supporting injection.</text>
+ <text>Any observer of this event is permitted to wrap and/or replace the |InjectionTarget|. The container must use the final value of this property, after all observers have been called, whenever it performs injection upon the managed bean, session bean or other Java EE component class supporting injection.</text>
</assertion>
+
+ <assertion id="f">
+ <text>If any observer method of a |ProcessInjectionTarget| event throws an exception, the exception is treated as a definition error by the container.</text>
+ </assertion>
</section>
-
- <section id="11.5.7" title="ProcessBean event">
+
+ <section id="11.5.7" title="ProcessProducer event">
<assertion id="a">
- <text>The container must fire an event for each bean it discovers, before registering the |Bean| object. The event object must be of type |javax.enterprise.inject.spi.ProcessBean|.</text>
+ <text>The container must fire an event for each producer method or field, including resources.</text>
</assertion>
-
+
<assertion id="b">
- <text>For a managed bean with bean class |X|, the container must raise an event of type |ProcessBean<X>|.</text>
+ <text>The event object must be of type |javax.enterprise.inject.spi.ProcessProducer<X, T>|, where X is bean class and T is the return type of the producer method or the type of the producer field.</text>
</assertion>
<assertion id="c">
- <text>For a session bean with bean class local view |X|, the container must raise an event of type |ProcessBean<X>|.</text>
+ <text>|getAnnotatedMember()| returns the |AnnotatedField| representing the producer field or the |AnnotatedMethod| representing the producer method.</text>
</assertion>
-
+
<assertion id="d">
- <text>For a session bean with no bean class local view |X|, the container must raise an event of type |ProcessBean<Object>|.</text>
+ <text>|getProducer()| returns the |Producer| object that will be used by the container to call the producer method or read the producer field.</text>
</assertion>
-
+
<assertion id="e">
- <text>For a producer method or field with method return type or field type |X|, the container must raise an event of type |ProcessBean<
-X>|.</text>
+ <text>|setProducer()| replaces the |Producer|.</text>
</assertion>
-
+
<assertion id="f">
- <text>The |getBean()|/|setBean()| property accessor pair provides access to the |Bean| object that is about to be registered.</text>
+ <text>|addDefinitionError()| registers a definition error with the container, causing the container to abort deployment after bean discovery is complete.</text>
</assertion>
-
+
<assertion id="g">
- <text>The method |getAnnotated()| returns the |AnnotatedType|, |AnnotatedField| or |AnnotatedMethod|.</text>
+ <text>Any observer of this event is permitted to wrap and/or replace the |Producer|. The container must use the final value of this property, after all observers have been called, whenever it calls the producer or disposer.</text>
</assertion>
-
+
<assertion id="h">
- <text>The method |addDefinitionError()| registers a definition error with the container, causing the container to abort deployment after bean discovery is complete.</text>
+ <text>If any observer method of a |ProcessInjectionTarget| event throws an exception, the exception is treated as a definition error by the container.</text>
</assertion>
-
- <assertion id="i">
- <text>Any observer of this event is permitted to wrap and/or replace the bean property of |ProcessBean|. When all observers have been called, the container registers the final value of this property. The container must not register any |Bean| object if any observer called |addDefinitionError()|.</text>
- </assertion>
</section>
- <section id="11.5.8" title="ProcessObserver event">
- <assertion id="a">
- <text>The container must fire an event for each observer method it discovers, before registering the |Observer| object. The event object must be of type |javax.enterprise.inject.spi.ProcessObserver<T>| where |T| is the observed event type.</text>
+ <section id="11.5.8" title="ProcessBean event">
+ <assertion id="aa">
+ <text>The container must fire an event for each bean it discovers, before registering the |Bean| object. The event object in the package |javax.enterprise.inject.spi| depends upon what kind of bean was discovered.</text>
</assertion>
- <assertion id="b">
- <text>The |getObserver()|/|setObserver()| property accessor pair provides access to the |Observer| object that is about to be registered.</text>
+ <assertion id="ba">
+ <text>For a managed bean with bean class |X|, the container must raise an event of type |ProcessManagedBean<X>|.</text>
</assertion>
<assertion id="c">
- <text>The method |getAnnotatedMethod()| returns the |AnnotatedMethod|.</text>
+ <text>For a session bean with bean class |X|, the container must raise an event of type |ProcessSessionBean<X>|.</text>
</assertion>
- <assertion id="d">
- <text>The method |addDefinitionError()| registers a definition error with the container, causing the container to abort deployment after bean discovery is complete.</text>
+ <assertion id="ea">
+ <text>For a producer method if a bean class |X| with method return type |T|, the container must raise an event of type |ProcessProducerMethod<X, T>|.</text>
</assertion>
-
- <assertion id="e">
- <text>Any observer of this event is permitted to wrap and/or replace the observer property of |ProcessObserver|. When all observers have been called, the container registers the final value of this property. The container must not register any |ObserverMethod| object if any observer called |addDefinitionError()|.</text>
+
+ <assertion id="eb">
+ <text>For a producer field of a bean class |X| with field type |T|, the container must raise an event of type |ProcessProducerField<X>|.</text>
</assertion>
- </section>
-
- <section id="11.6" title="Activities">
- <assertion id="a">
- <text>Activities are represented by instances of |BeanManager|. The method |createActivity()| creates a new child activity of an activity.</text>
+
+ <assertion id="ec">
+ <text>Resources are considered to be producer fields.</text>
</assertion>
-
- <assertion id="b">
- <text>A child activity inherits all beans, interceptors, decorators, observers, and contexts defined by its direct and indirect parent activities.</text>
+
+ <assertion id="ed">
+ <text>The interface |javax.enterprise.inject.spi.ProcessBean| is a supertype of all these event types.</text>
</assertion>
- <assertion id="c">
- <text>Every bean belonging to a parent activity also belongs to the child activity, is eligible for injection into other beans belonging to the child activity and may be obtained by dynamic lookup via the child activity.</text>
+ <assertion id="ef">
+ <text>|getAnnotated()| returns the |AnnotatedType| representing the bean class, the |AnnotatedMethod| representing the producer method, or the |AnnotatedField| representing the producer field.</text>
</assertion>
- <assertion id="d">
- <text>Every interceptor and decorator belonging to a parent activity also belongs to the child activity and may be applied to any bean belonging to the child activity.</text>
+ <assertion id="fa">
+ <text>|getBean()| returns the |Bean| object that is about to be registered. The |Bean| may implement |Interceptor| or |Decorator|.</text>
</assertion>
- <assertion id="c">
- <text>Every observer belonging to a parent activity also belongs to the child activity and receives events fired via the child activity.</text>
- </assertion>
-
- <assertion id="d">
- <text>Every context object belonging to the parent activity also belongs to the child activity.</text>
- </assertion>
-
- <assertion id="e">
- <text>Beans and observers may be registered with an activity by calling |addBean()| or |addObserver()| on the |BeanManager| object that represents the activity.</text>
- </assertion>
-
- <assertion id="f">
- <text>Beans and observers registered with an activity are visible only to that activity and its children�they are never visible to direct or indirect parent activities, or to other children of the parent activity.</text>
- </assertion>
-
- <assertion id="g">
- <text>A bean registered with the child activity is not available for injection into any bean registered with a parent activity.</text>
- </assertion>
-
<assertion id="h">
- <text>A bean registered with a child activity is not available for injection into a non-contextual instance.</text>
+ <text>|addDefinitionError()| registers a definition error with the container, causing the container to abort deployment after bean discovery is complete.</text>
</assertion>
-
- <assertion id="i">
- <text>A bean registered with a child activity may not be obtained by dynamic lookup via the parent activity.</text>
+
+ <assertion id="hb">
+ <text>|getEjbName()| returns the EJB name of the session bean.</text>
</assertion>
-
- <assertion id="j">
- <text>An observer registered with the child activity does not receive events fired via a parent activity.</text>
+
+ <assertion id="hc">
+ <text>|getSessionBeanType()| returns a |javax.enterprise.inject.spi.SessionBeanType| representing the kind of session bean.</text>
</assertion>
-
- <assertion id="k">
- <text>If a bean registered with a child activity has the bean type and all bindings of some injection point of some bean registered with a direct or indirect parent activity, the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+
+ <assertion id="hd">
+ <text>If any observer method of a |ProcessBean| event throws an exception, the exception is treated as a definition error by the container.</text>
</assertion>
-
- <assertion id="l">
- <text>Interceptors and decorators may not be registered with a child activity. The |addInterceptor()| and |addDecorator()| methods throw |UnsupportedOperationException| when called on a |BeanManager| object that represents a child activity.</text>
- </assertion>
</section>
- <section id="11.6.1" title="Current activity">
- <assertion id="a">
- <text>An activity may be associated with the current context for a normal scope by calling |setCurrent()|, passing the normal scope type.</text>
+ <section id="11.5.9" title="ProcessObserverMethod event">
+ <assertion id="aa">
+ <text>The container must fire an event for each observer method. The event object must be of type |javax.enterprise.inject.spi.ProcessObserverMethod<X, T>| where |X| is bean class and |T| is the observed event type of the observer method.</text>
</assertion>
- <assertion id="b">
- <text>If the given scope is inactive when |setCurrent()| is called, a |ContextNotActiveException| is thrown.</text>
+ <assertion id="ab">
+ <text>|getAnnotatedMethod()| returns the |AnnotatedMethod| representing the observer method.</text>
</assertion>
-
- <assertion id="c">
- <text>If the given scope type is not a normal scope, an |IllegalArgumentException| is thrown.</text>
+
+ <assertion id="ba">
+ <text>|getObserverMethod()| returns the |ObserverMethod| object that will be used by the container to call the observer method.</text>
</assertion>
- <assertion id="d">
- <text>All EL evaluations (as defined Section 5.6, "Integration with Unified EL"), all calls to any injected |BeanManager| object or |BeanManager| object obtained via JNDI lookup (as defined by Section 11.2, "The BeanManager object"), all calls to any injected |Event| object (as defined in Section 10.4.1, "The Event interface") and all calls to any injected Instance object (as defined by Section 5.5.1, "The Instance interface") are processed by the current activity.</text>
+ <assertion id="da">
+ <text>|addDefinitionError()| registers a definition error with the container, causing the container to abort deployment after bean discovery is complete.</text>
</assertion>
-
- <assertion id="e">
- <text>If the root activity has no active normal scope such that the current context for that scope has an associated activity, the root activity is the current activity.</text>
+
+ <assertion id="db">
+ <text>If any observer method of a |ProcessObserverMethod| event throws an exception, the exception is treated as a definition error by the container.</text>
</assertion>
-
- <assertion id="f">
- <text>If the root activity has exactly one active normal scope such that the current context for that scope has an associated activity, that activity is the current activity.</text>
- </assertion>
-
- <assertion id="g">
- <text>Otherwise, there is no well-defined current activity, and the behavior is undefined. Portable frameworks and applications should not depend upon the behavior of the container when two different current contexts have an associated activity.</text>
- </assertion>
-
- <assertion id="h">
- <text>A bean registered with an activity is only available to Unified EL expressions that are evaluated when that activity or one of its children is the current activity.</text>
- </assertion>
</section>
<section id="12" title="Packaging and Deployment">
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3045 - tck/trunk/impl/src/main/resources.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-07-13 22:20:21 -0400 (Mon, 13 Jul 2009)
New Revision: 3045
Modified:
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
updated sections 5, 6, 7, 8, 9 and 10 to latest version of spec
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-13 03:41:42 UTC (rev 3044)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-14 02:20:21 UTC (rev 3045)
@@ -1,501 +1,501 @@
-<specification
+<specification
xmlns="http://jboss.com/products/webbeans/tck/audit"
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..."
- name="JSR-299: Java Contexts and Dependency Injection"
+ name="JSR-299: Java Contexts and Dependency Injection"
version="20090625">
<section id="2" title="Concepts">
-
+
<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="e">
<text>A bean comprises of an optional bean EL 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="l">
<text>All beans have the bean type java.lang.Object</text>
</assertion>
-
+
</section>
-
+
<section id="2.2.1" title="Legal bean types">
<assertion id="a">
<text>A bean type may be an interface.</text>
</assertion>
-
+
<assertion id="b">
<text>A bean type may be a concrete class.</text>
</assertion>
-
+
<assertion id="c">
<text>A bean type may be an abstract class.</text>
</assertion>
-
+
<assertion id="d">
<text>A bean type may be declared final.</text>
</assertion>
-
+
<assertion id="e">
<text>A bean type may have final methods.</text>
</assertion>
-
+
<assertion id="f">
<text>A bean type may be a parameterized type with actual type parameters.</text>
</assertion>
-
+
<assertion id="g">
<text>A bean type may be a parameterized type with type variables.</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 type. Primitive types are considered to be identical to their corresponding wrapper types in java.lang.</text>
</assertion>
-
+
<assertion id="k">
<text>A bean type may be a raw type.</text>
</assertion>
-
+
<assertion id="la">
<text>A type variable is not a legal bean type</text>
</assertion>
-
+
<assertion id="lb">
<text>A parameterized type that contains a wildcard type parameter is not a legal bean type.</text>
- </assertion>
+ </assertion>
</section>
-
- <section id="2.2.2" title="Typecasting between bean types">
+
+ <section id="2.2.2" title="Typecasting between bean types">
<assertion id="a">
<text>A client of a bean may typecast its contextual reference to a bean to any bean type of the bean which is a Java interface. However, the client may not in general typecast its contextual reference to an arbitrary concrete bean type of the bean.</text>
</assertion>
</section>
-
+
<section id="2.3" title="Bindings">
-
+
</section>
-
+
<section id="2.3.1" title="Built-in binding types">
<assertion id="a0">
<text>Every bean has the built-in binding |@Any|, even if it does not explicitly declare this binding, except for beans with the built-in binding |@New| defined in Section 3.11, "Beans with the @New binding".</text>
</assertion>
-
+
<assertion id="aa">
<text>If a bean does not explicitly declare a binding, the bean has exactly one additional binding, of type |@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="aa" testable="false">
<text>A binding type is a Java annotation defined as |@Target({METHOD, FIELD, PARAMETER, TYPE})|~ and |@Retention(RUNTIME)|~.</text>
</assertion>
-
+
<assertion id="ab" testable="false">
<text>A binding type is a Java annotation defined as ~|@Target({METHOD, FIELD, PARAMETER, TYPE})| and ~|@Retention(RUNTIME)|.</text>
<note>Non-runtime retention annotations are discarded by the compiler</note>
</assertion>
-
+
<assertion id="ba">
<text>A binding type may be declared by specifying the |(a)javax.enterprise.inject.BindingType| meta-annotation.</text>
</assertion>
-
+
<assertion id="d" testable="false">
<text>A binding type may define annotation members.</text>
<note>This is true by default in the JLS</note>
</assertion>
</section>
-
- <section id="2.3.3" title="Declaring the bindings of a bean">
+
+ <section id="2.3.3" title="Declaring the bindings of a bean">
<assertion id="a">
<text>A bean's bindings are declared by annotating the bean class with the binding types.</text>
</assertion>
-
+
<assertion id="b">
<text>A bean's bindings are declared by annotating the producer method with the binding types.</text>
</assertion>
-
+
<assertion id="c">
<text>A bean's bindings are declared by annotating the producer field with the binding types.</text>
</assertion>
-
+
<assertion id="d">
<text>Any bean may declare multiple binding types.</text>
</assertion>
</section>
-
- <section id="2.3.4" title="Specifying bindings of an injected field">
+
+ <section id="2.3.4" 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 rules of typesafe resolution defined in Section 5.3, "Typesafe resolution".</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>
</section>
-
+
<section id="2.3.5" title="Specifying bindings of a method or constructor parameter">
<assertion id="a">
<text>Binding types may be applied to parameters of producer methods (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>Binding types may be applied to parameters of initializer methods (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="c">
<text>Binding types may be applied to parameters of disposal methods (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="ca">
- <text>Binding types may be applied to parameters of observer methods (see Chapter 3, Bean implementation) to determine the bean instance that is passed when the method is called by the container.</text>
+ <text>Binding types may be applied to parameters of observer methods (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="d">
<text>Binding types may be applied to parameters of 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>
</section>
-
- <section id="2.4" title="Scopes">
+
+ <section id="2.4" title="Scopes">
<assertion id="a">
<text>All beans have a scope.</text>
</assertion>
-
+
<assertion id="b" testable="false">
<text>A scope type is represented by an annotation type.</text>
<note>This is a statement of intent</note>
</assertion>
-
+
<assertion id="c">
<text>The set of scope types is extensible.</text>
- </assertion>
+ </assertion>
</section>
-
+
<section id="2.4.1" title="Built-in scope types">
<assertion id="a" testable="false">
<text>The |@RequestScoped|, |@ApplicationScoped| and |@SessionScoped| annotations defined in Section 6.7, "Context management for built-in scopes" represent the standard scopes defined by the Java Servlets specification</text>
<note>This is a statement of intent</note>
</assertion>
-
+
<assertion id="b" testable="false">
<text>The |@ConversationScoped| annotation represents the conversation scope defined in Section 6.7.4, "Conversation context lifecycle".</text>
<note>This is a statement of intent</note>
</assertion>
-
+
<assertion id="c" testable="false">
<text>The |@Dependent| pseudo-scope is for dependent objects, as defined in Section 6.4, "Dependent pseudo-scope"</text>
<note>This is a statement of intent</note>
</assertion>
</section>
-
+
<section id="2.4.2" title="Defining new scope types">
<assertion id="aa">
<text>A scope type is a Java annotation defined as |@Target({TYPE, METHOD, FIELD})|~ and |@Retention(RUNTIME)|~.</text>
</assertion>
-
+
<assertion id="ab" testable="false">
<text>A scope type is a Java annotation defined as ~|@Target({TYPE, METHOD, FIELD})| and ~|@Retention(RUNTIME)|.</text>
<note>Non-runtime retention annotations are discarded by the compiler</note>
</assertion>
-
+
<assertion id="ba">
<text>All scope types must specify the |(a)javax.enterprise.context.ScopeType| meta-annotation.</text>
</assertion>
-
+
</section>
-
+
<section id="2.4.3" title="Declaring the bean scope">
<assertion id="a">
<text>The bean's scope is defined by annotating the bean class or producer method or field with a scope type.</text>
</assertion>
-
+
<assertion id="ba">
<text>A bean class or producer method or field may specify at most one scope type annotation. If a bean class or producer method or field specifies multiple scope type annotations, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="c">
<text>A scope type may be specified using a stereotype annotation, as defined in Section 2.7.2, "Declaring the stereotypes for a bean"</text>
</assertion>
</section>
-
+
<section id="2.4.4" title="Default scope">
<assertion id="aa">
<text>When no scope is explicitly declared by annotating the bean class or producer method or field the scope of a bean is defaulted.</text>
</assertion>
-
+
<assertion id="b">
<text>If the bean does not declare any stereotype with a declared default scope, the default scope for the bean is |@Dependent|.</text>
</assertion>
-
+
<assertion id="c">
<text>If all stereotypes declared by the bean that have some declared default scope have the same default scope, then that scope is the default scope for the bean.</text>
</assertion>
-
+
<assertion id="da">
<text>If there are two different stereotypes declared by the bean that declare different default scopes, then there is no default scope and the bean must explicitly declare a scope. If it does not explicitly declare a scope, the container automatically
detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="e">
<text>If a bean explicitly declares a scope, any default scopes declared by stereotypes are ignored.</text>
</assertion>
</section>
-
+
<section id="2.5" title="Bean EL names">
-
+
<assertion id="a">
<text>A valid bean EL name is a period-separated list of valid EL identifiers</text>
</assertion>
</section>
-
+
<section id="2.5.1" title="Declaring the bean EL name">
-
+
<assertion id="a">
<text>To specify the EL name of a bean, the |(a)javax.enterprise.inject.Named| annotation is applied to the bean class.</text>
</assertion>
-
+
<assertion id="b">
<text>To specify the EL name of a bean, the |(a)javax.enterprise.inject.Named| annotation is applied to the producer method.</text>
</assertion>
-
+
<assertion id="c">
<text>To specify the EL name of a bean, the |(a)javax.enterprise.inject.Named| annotation is applied to the producer field.</text>
</assertion>
-
+
<assertion id="d">
<text>If the |@Named| annotation does not specify the value member, the default EL name is assumed.</text>
</assertion>
</section>
-
+
<section id="2.5.2" title="Default bean EL names">
-
+
<assertion id="a">
<text>A default EL name must be assigned by the container when a bean class declares a |@Named| annotation and no EL name is explicitly specified by the value member.</text>
</assertion>
-
+
<assertion id="b">
<text>A default EL name must be assigned by the container when a producer method of a bean declares a |@Named| annotation and EL no name is explicitly specified by the value member.</text>
</assertion>
-
+
<assertion id="c">
<text>A default EL name must be assigned by the container when a producer field of a bean declares a |@Named| annotation and no EL name is explicitly specified by the value member.</text>
</assertion>
-
+
<assertion id="e">
<text>A default EL 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 an EL name.</text>
</assertion>
</section>
-
+
<section id="2.5.3" title="Beans with no EL name">
-
+
<assertion id="a">
<text>If |@Named| is not declared by the bean, nor by its stereotypes, a bean has no EL name.</text>
</assertion>
</section>
-
+
<section id="2.6" title="Policies">
<assertion id="a">
<text>A policy is a bean that must be explicitly declared in the in the beans.xml file if it should be available for lookup, injection or EL resolution.</text>
- </assertion>
+ </assertion>
</section>
-
+
<section id="2.6.1" title="Declaring a policy">
<assertion id="a">
<text>A policy may be declared by annotating the bean class with the |@Policy| annotation.</text>
</assertion>
-
+
<assertion id="b">
<text>A policy may be declared by annotating a bean with a stereotype that declares a |@Policy| annotation.</text>
</assertion>
-
+
<assertion id="c">
<text>A policy may be declared by annotating a producer method with a stereotype that declares a |@Policy| annotation.</text>
</assertion>
-
+
<assertion id="d">
<text>A policy may be declared by annotating a producer field with a stereotype that declares a |@Policy| annotation.</text>
</assertion>
-
+
<assertion id="e">
<text>If a bean is a policy, all producer methods and fields of the bean are also policies.</text>
</assertion>
</section>
-
+
<section id="2.7" title="Stereotypes">
-
+
<assertion id="a">
<text>A stereotype may specify that all beans with the stereotype have defaulted bean EL names.</text>
</assertion>
-
+
<assertion id="aa">
<text>A stereotype may specify that all beans with the stereotype are policies.</text>
</assertion>
-
+
<assertion id="b" testable="false">
<text>A bean may declare zero stereotypes.</text>
<note>Not testable through API</note>
</assertion>
-
+
<assertion id="c">
<text>A bean may declare one stereotype.</text>
</assertion>
-
+
<assertion id="d">
<text>A bean may declare multiple stereotypes.</text>
</assertion>
-
+
</section>
-
+
<section id="2.7.1" title="Defining new stereotypes">
<assertion id="aa" testable="false">
<text>A beans stereotype is a Java annotation defined as |@Target({TYPE, METHOD, FIELD})|~, |@Target(TYPE)|, |@Target(METHOD)|, |@Target(FIELD)| or |@Target({METHOD, FIELD})| and |@Retention(RUNTIME)|~.</text>
</assertion>
-
+
<assertion id="ab" testable="false">
<text>A beans stereotype is a Java annotation defined as ~|@Target({TYPE, METHOD, FIELD})|,~ |@Target(TYPE)|~, |@Target(METHOD)|, |@Target(FIELD)| or |@Target({METHOD, FIELD})| and |@Retention(RUNTIME)|~.</text>
</assertion>
-
+
<assertion id="ac" testable="false">
<text>A beans stereotype is a Java annotation defined as ~|@Target({TYPE, METHOD, FIELD})|, |@Target(TYPE)|, |@Target(METHOD)|, ~|@Target(FIELD)| ~or |@Target({METHOD, FIELD})| and |@Retention(RUNTIME)|~.</text>
</assertion>
-
+
<assertion id="ad" testable="false">
<text>A beans stereotype is a Java annotation defined as ~|@Target({TYPE, METHOD, FIELD})|, |@Target(TYPE)|, |@Target(METHOD)|, |@Target(FIELD)| or~ |@Target({METHOD, FIELD})|~ and |@Retention(RUNTIME)|~.</text>
</assertion>
-
+
<assertion id="ae" testable="false">
<text>A beans stereotype is a Java annotation defined as ~|@Target({TYPE, METHOD, FIELD})|, |@Target(TYPE)|, |@Target(METHOD)|, |@Target(FIELD)| or |@Target({METHOD, FIELD})| and~ |@Retention(RUNTIME)|.</text>
<note>Non-runtime retention annotations are discarded by the compiler</note>
</assertion>
-
+
<assertion id="b">
<text>A stereotype may be declared by specifying the |(a)javax.enterprise.inject.stereotype.Stereotype| meta-annotation.</text>
</assertion>
-
+
<assertion id="da">
<text>A stereotype may not declare any binding annotation. If a stereotype declares a binding annotation, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
</section>
-
+
<section id="2.7.1.1" title="Declaring the default scope for a stereotype">
<assertion id="aa">
<text>A stereotype may declare at most one scope. If a stereotype declares more than one scope, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the
container".</text>
- </assertion>
+ </assertion>
</section>
-
+
<section id="2.7.1.2" title="Specifying interceptor bindings for a stereotype">
<assertion id="a">
<text>A stereotype may declare zero interceptor bindings.</text>
</assertion>
-
+
<assertion id="b">
<text>A stereotype may declare one interceptor bindings.</text>
</assertion>
-
+
<assertion id="c">
<text>A stereotype may declare multiple interceptor bindings.</text>
</assertion>
</section>
-
+
<section id="2.7.1.3" title="Declaring a @Named stereotype">
<assertion id="aaa">
<text>A stereotype may declare an empty |@Named| annotation, which specifies that every bean with the stereotype has a defaulted name when a name is not explicitly specified by the bean.</text>
</assertion>
-
+
<assertion id="aab">
<text>If a stereotype declares a non-empty |@Named| annotation, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
</section>
-
+
<section id="2.7.1.4" title="Declaring a @Policy stereotype">
<assertion id="a">
<text>A stereotype may declare a @Policy annotation, which specifies that every bean with the stereotype is a policy.</text>
</assertion>
</section>
-
+
<section id="2.7.1.5" title="Stereotypes with additional stereotypes">
<assertion id="a">
<text>A stereotype may declare other stereotypes.</text>
</assertion>
-
+
<assertion id="b">
<text>Stereotype declarations are transitive - a stereotype declared by a second stereotype is inherited by all beans and other stereotypes that declare the second stereotype.</text>
</assertion>
-
+
<assertion id="c" >
<text>Stereotypes declared |@Target(TYPE)| may not be applied to stereotypes declared |@Target({TYPE, METHOD, FIELD})|.</text>
</assertion>
-
+
<assertion id="d">
<text>Stereotypes declared |@Target(TYPE)| may not be applied to stereotypes declared |@Target(METHOD)|.</text>
</assertion>
-
+
<assertion id="e">
<text>Stereotypes declared |@Target(TYPE)| may not be applied to stereotypes declared |@Target(FIELD)|.</text>
</assertion>
-
+
<assertion id="f">
<text>Stereotypes declared |@Target(TYPE)| may not be applied to stereotypes declared |@Target({METHOD, FIELD})|.</text>
</assertion>
-
+
</section>
-
+
<section id="2.7.2" title="Declaring the stereotypes for a bean">
<assertion id="a">
<text>Stereotype annotations may be applied to a bean class.</text>
</assertion>
-
+
<assertion id="b">
<text>Stereotype annotations may be applied to a producer method.</text>
</assertion>
-
+
<assertion id="c">
<text>Stereotype annotations may be applied to a producer field.</text>
</assertion>
-
+
<assertion id="db">
<text>The default scope declared by the stereotype may be overridden by the bean.</text>
</assertion>
-
+
<assertion id="e">
<text>Multiple stereotypes may be applied to the same bean.</text>
</assertion>
</section>
-
+
<section id="2.7.3" title="Built-in stereotypes">
<assertion id="aa" testable="false">
<text>The built-in stereotype |(a)javax.enterprise.inject.stereotype.Model| is intended for use with beans that define the model layer of an MVC web application architecture such as JSF.</text>
@@ -504,50 +504,50 @@
</section>
<section id="3" title="Programming model">
-
+
</section>
-
- <section id="3.1" title="Managed beans">
+
+ <section id="3.1" title="Managed beans">
<assertion id="f0">
- <text>If the bean class of a managed bean is annotated with both the |@Interceptor| and |@Decorator| stereotypes, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ <text>If the bean class of a managed bean is annotated with both the |@Interceptor| and |@Decorator| stereotypes, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="fa">
<text>If a managed bean has a public field, it must have scope |@Dependent|.</text>
<note>Check that a dependent scoped bean with a public field does work</note>
</assertion>
-
+
<assertion id="fba">
<text>If a managed bean with a public field declares any scope other than |@Dependent|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="g">
<text>If the managed bean class is a generic type, it must have scope |@Dependent|. If a managed bean with a parameterized bean class declares any scope other than |@Dependent|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
- </assertion>
+ </assertion>
</section>
-
+
<section id="3.1.1" title="Which Java classes are managed beans?">
<assertion id="b">
<text>A top-level Java class is not a managed bean if it is a non-static inner class.</text>
</assertion>
-
+
<assertion id="ba">
- <text>A top-level Java class that is a static inner class can be a managed bean.</text>
+ <text>A top-level Java class that is a static inner class can be a managed bean.</text>
<note>Implied as the inverse of assertion 3.1.1.b</note>
</assertion>
-
+
<assertion id="ca">
<text>A top-level Java class is not a managed bean if it is an abstract class, unless it is annotated |@Decorator|.</text>
</assertion>
-
+
<assertion id="cb">
<text>A top-level Java class is not a managed bean if it is an interface, unless it is annotated |@Decorator|.</text>
</assertion>
-
+
<assertion id="f">
<text>A top-level Java class is not a managed bean if it is annotated with any of the EJB component-defining annotations</text>
</assertion>
-
+
<assertion id="n">
<text>A top-level Java class is not a managed bean if it is declared as an EJB bean class in |ejb-jar.xml|</text>
</assertion>
@@ -555,143 +555,143 @@
<assertion id="p">
<text>A top-level Java class is only a managed bean if it has an appropriate constructor - a constructor with no parameters.</text>
</assertion>
-
+
<assertion id="q">
<text>A top-level Java class is only a managed bean if it has an appropriate constructor - a constructor annotated |@Initializer|.</text>
- </assertion>
+ </assertion>
</section>
-
+
<section id="3.1.2" title="Bean types of a managed bean">
<assertion id="a">
<text>The set of bean types for a managed bean contains the bean class, every superclass and all interfaces it implements directly or indirectly.</text>
- </assertion>
+ </assertion>
</section>
-
+
<section id="3.1.3" title="Declaring a managed bean">
<assertion id="a">
<text>A managed bean with a constructor that takes no parameters does not require any special annotations</text>
</assertion>
-
+
<assertion id="ba">
<text>A bean class may also specify a scope~, name, deployment type, stereotypes and/or bindings~</text>
</assertion>
-
+
<assertion id="bb">
<text>A bean class may also specify a ~scope,~ name~, deployment type, stereotypes and/or bindings~</text>
</assertion>
-
+
<assertion id="bc">
<text>A bean class may also specify a ~scope, name, ~deployment type~, stereotypes and/or bindings~</text>
</assertion>
-
+
<assertion id="bd">
<text>A bean class may also specify ~a scope, name, deployment type, ~stereotypes~ and/or bindings~</text>
</assertion>
-
+
<assertion id="be">
<text>A bean class may also specify ~a scope, name, deployment type, stereotypes and/or~ bindings</text>
</assertion>
-
+
<assertion id="c">
<text>A managed bean may extend another managed bean</text>
</assertion>
</section>
-
- <section id="3.1.4" title="Bean constructors">
+
+ <section id="3.1.4" title="Bean constructors">
<assertion id="a">
<text>When the container instantiates a managed bean, it calls the bean constructor. The bean constructor is a constructor of the bean class</text>
- </assertion>
+ </assertion>
</section>
-
+
<section id="3.1.4.1" title="Declaring a bean constructor">
<assertion id="a">
<text>The bean constructor may be identified by annotating the constructor |@Initializer|</text>
</assertion>
-
+
<assertion id="ba">
<text>If a managed bean does not explicitly declare a constructor using |@Initializer|, the constructor that accepts no parameters is the bean constructor</text>
<note>Can't check implicit constructor</note>
</assertion>
-
+
<assertion id="ca">
<text>If a managed bean has more than one constructor annotated |@Initializer|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="da">
<text>If a bean constructor has a parameter annotated |@Disposes|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="ea">
<text>If a bean constructor has a parameter annotated |@Observes|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
- </assertion>
+ </assertion>
</section>
-
- <section id="3.1.4.2" title="Bean constructor parameters">
+
+ <section id="3.1.4.2" title="Bean constructor parameters">
<assertion id="b">
<text>A bean constructor may have any number of parameters.</text>
</assertion>
-
+
<assertion id="c">
<text>All parameters of a bean constructor are injection points.</text>
</assertion>
</section>
-
+
<section id="3.1.5" title="Specializing a managed bean">
<assertion id="aa">
<text>If a bean class of a managed bean X is annotated @Specializes, then the bean class of X must directly extend the bean class of another managed bean Y. Then X directly specializes Y, as defined in Section 4.3, "Specialization".</text>
</assertion>
-
+
<assertion id="da">
<text>If the bean class of X does not directly extend the bean class of another managed bean, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
</section>
-
+
<section id="3.1.6" title="Default name for a managed bean">
<assertion id="a">
<text>The default name for a managed bean is the unqualified class name of the bean class, after converting the first character to lower case</text>
</assertion>
</section>
-
+
<section id="3.2" title="Session beans">
<assertion id="aa" testable="false">
<text>A session bean is a bean that is implemented by a session bean with an EJB 3.x client view. The basic lifecycle and semantics of an EJB session bean are defined by the EJB specification.</text>
<note>This is a reference to the EJB specification</note>
</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="da">
<text>If a session bean specifies an illegal scope, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="e">
<text>A stateful session bean may have any scope.</text>
</assertion>
-
+
<assertion id="f">
<text>When a contextual instance of a session bean is obtained via the dependency injection service, the behavior of |SessionContext.getInvokedBusinessInterface()| is specific to the container implementation. Portable applications should not rely upon the value returned by this method.</text>
</assertion>
-
+
<assertion id="g">
<text>If the bean class of a session bean is annotated |@Interceptor|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="h">
<text>If the bean class of a session bean is annotated |@Decorator|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="i">
<text>If the session bean class is a generic type, it must have scope |@Dependent|. If a session bean with a parameterized bean class declares any scope other than |@Dependent|, the container automatically detects the problem and treats it as a
definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
- </assertion>
+ </assertion>
</section>
-
+
<section id="3.2.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>
@@ -700,479 +700,479 @@
<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="da">
<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.</text>
</assertion>
-
+
<assertion id="dba">
<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 the container ignores the instance instead of destroying it when |Contextual.destroy()| is called, as defined in Section 6.5, "Lifecycle of stateful session beans"</text>
- </assertion>
+ </assertion>
</section>
-
- <section id="3.2.2" title="Bean types of a session bean">
- <assertion id="aa">
+
+ <section id="3.2.2" title="Bean types of a session bean">
+ <assertion id="aa">
<text>The set of bean types for a session bean contains all local interfaces of the bean and their superinterfaces.</text>
</assertion>
-
+
<assertion id="ba">
<text>If the session bean has a bean class local view, 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.2.3" title="Declaring a session bean">
<assertion id="a">
<text>A session bean does not require any special annotations</text>
</assertion>
-
+
<assertion id="ba">
<text>A bean class may also specify a scope~, name, deployment type, stereotypes and/or bindings~</text>
</assertion>
-
+
<assertion id="bb">
<text>A bean class may also specify a ~scope, ~name~, deployment type, stereotypes and/or bindings~</text>
</assertion>
-
+
<assertion id="bc">
<text>A bean class may also specify a ~scope, name, ~deployment type~, stereotypes and/or bindings~</text>
</assertion>
-
+
<assertion id="bd">
<text>A bean class may also specify a ~scope, name, deployment type, ~stereotypes ~and/or bindings~</text>
</assertion>
-
+
<assertion id="be">
<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.2.4" title="Specializing a session bean">
+
+ <section id="3.2.4" title="Specializing a session bean">
<assertion id="aa">
<text>If a bean class of a session bean X is annotated |@Specializes|, then the bean class of X must directly extend the bean class of another session bean Y. Then X directly specializes Y, as defined in Section 4.3 "Specialization".</text>
</assertion>
-
+
<assertion id="da">
<text>If the bean class of X does not directly extend the bean class of another session bean, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
- </assertion>
+ </assertion>
</section>
-
+
<section id="3.2.5" title="Default name for a session bean">
<assertion id="a">
<text>The default name for a managed bean is the unqualified class name of the session bean class, after converting the first character to lower case.</text>
</assertion>
</section>
-
+
<section id="3.3" title="Producer methods">
<assertion id="aa">
<text>A producer method must be a non-abstract method of a managed bean class or session bean class.</text>
</assertion>
-
+
<assertion id="b">
<text>A producer method may be static.</text>
</assertion>
-
+
<assertion id="c">
<text>A producer method may be non-static.</text>
</assertion>
-
+
<assertion id="d">
<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="e">
<text>If a producer method sometimes returns a null value, then the producer method must have scope |@Dependent|.</text>
</assertion>
-
+
<assertion id="f">
<text>If a producer method returns a null value at runtime, and the producer method declares scope other than |@Dependent|, an |IllegalProductException| is thrown by the container. This restriction allows the container to use a client proxy, as defined in Section 5.5, "Client proxies".</text>
</assertion>
-
+
<assertion id="ga">
<text>If the producer method return type is a parameterized type, it must specify an actual type parameter or type variable for each type parameter.</text>
</assertion>
-
+
<assertion id="ha">
<text>If a producer method return type contains a wildcard type parameter the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="ia">
<text>If the producer method return type is a parameterized type with a type variable, it must have scope |@Dependent|. If a producer method with a parameterized return type with a type variable declares any scope other than |@Dependent|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="ib">
<text>If a producer method return type is a type variable the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="j" testable="false">
<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="k">
<text>A bean may declare multiple producer methods.</text>
</assertion>
</section>
-
- <section id="3.3.1" title="Bean types of a producer method">
+
+ <section id="3.3.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.3.2" title="Declaring a producer method">
-
+
<assertion id="a">
<text>A producer method may be declared by annotating a method with the |(a)javax.enterprise.inject.Produces| annotation</text>
</assertion>
-
+
<assertion id="ba">
<text>A producer method may specify a scope</text>
</assertion>
-
+
<assertion id="bb">
<text>A producer method may specify a name</text>
</assertion>
-
+
<assertion id="bd">
<text>A producer method may specify stereotypes</text>
</assertion>
-
+
<assertion id="be">
<text>A producer method may specify a binding type</text>
</assertion>
-
+
<assertion id="ca">
<text>If a producer method is annotated |@Initializer|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="da">
<text>If a producer method has a parameter annotated |@Disposes|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="ea">
<text>If a producer method has a parameter annotated |@Observes|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="fa">
<text>If a non-static method of a session bean class is annotated |@Produces|, and the method is not a business method of the session bean, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="g">
<text>Interceptors and decorators may not declare producer methods. If an interceptor or decorator has a method annotated |@Produces|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
</section>
-
- <section id="3.3.3" title="Producer method parameters">
+
+ <section id="3.3.3" title="Producer method parameters">
<assertion id="b">
<text>A producer method may have any number of parameters.</text>
</assertion>
-
+
<assertion id="c">
<text>All producer method parameters are injection points.</text>
</assertion>
</section>
-
+
<section id="3.3.4" title="Specializing a producer method">
<assertion id="aa">
<text>If a producer method X is annotated |@Specializes|, then it must be non-static and directly override another producer method Y. Then X directly specializes Y, as defined in Section 4.3 "Specialization".</text>
</assertion>
-
+
<assertion id="ba">
<text>If a producer method is static, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4 "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="ca">
<text>If a producer method does not directly override another producer method, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4 "Problems detected automatically by the container".</text>
</assertion>
</section>
-
- <section id="3.3.5" title="Disposer methods">
+
+ <section id="3.3.5" title="Disposer methods">
<assertion id="a">
<text>A disposer method must be a method of a managed bean class or session bean class.</text>
</assertion>
-
+
<assertion id="b">
<text>A disposer method may be static.</text>
</assertion>
-
+
<assertion id="c">
<text>A disposer method may be non-static.</text>
</assertion>
-
+
<assertion id="d">
<text>If the bean is a session bean, the disposer method must be a business method of the EJB or a static method of the bean class.</text>
</assertion>
-
+
<assertion id="e">
<text>A bean may declare multiple disposer methods.</text>
</assertion>
</section>
-
- <section id="3.3.6" title="Disposed parameter of a disposer method">
+
+ <section id="3.3.6" title="Disposed parameter of a disposer method">
<assertion id="a">
<text>Each disposer method must have exactly one disposed parameter, of the same type as the corresponding producer method return type.</text>
</assertion>
-
+
<assertion id="ba">
<text>When searching for disposer 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 declared by the same bean class, according to the rules of typesafe resolution defined in Section 5.3 "Typesafe resolution", the container must call this method when destroying an instance returned by that producer method.</text>
</assertion>
-
+
<assertion id="da">
<text>A disposer method may resolve to multiple producer methods declared by the bean class, in which case the container must call it when destroying any instance returned by any of these producer methods.</text>
</assertion>
</section>
-
- <section id="3.3.7" title="Declaring a disposer method">
+
+ <section id="3.3.7" title="Declaring a disposer method">
<assertion id="a">
<text>A disposer method may be declared by annotating a parameter |(a)javax.enterprise.inject.Disposes|. That parameter is the disposed parameter</text>
</assertion>
-
+
<assertion id="b0">
<text>Bindings may be declared by annotating the disposed parameter.</text>
</assertion>
-
+
<assertion id="ba">
<text>If a method has more than one parameter annotated |@Disposes|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4 "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="ca">
<text>If a disposal method is annotated |@Produces|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4 "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="da">
<text>If a disposal method is annotated |@Initializer|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4 "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="ea">
<text>If a disposal method has a parameter annotated |@Observes|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4 "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="fa">
<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 session bean, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4 "Problems detected automatically by the container".</text>
</assertion>
</section>
-
- <section id="3.3.8" title="Disposer method parameters">
+
+ <section id="3.3.8" title="Disposer method parameters">
<assertion id="a">
<text>In addition to the disposed parameter, a disposer method may declare additional parameters, which may also specify bindings. These additional parameters are injection points.</text>
</assertion>
</section>
-
- <section id="3.3.9" title="Disposer method resolution">
+
+ <section id="3.3.9" title="Disposer method resolution">
<assertion id="aa">
<text>When searching for disposer methods for a producer method, the container searches for disposer methods which are declared by the same bean class as the producer method, and for which the disposed parameter resolves to the producer method, according to the typesafe resolution algorithm defined in Section 5.3, "Typesafe resolution".</text>
</assertion>
-
+
<assertion id="ba">
<text>If there are multiple disposer methods for a single producer method, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="ca">
<text>If the disposed parameter of a disposer method does not resolve to any producer method declared by the bean class, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
</section>
-
- <section id="3.3.10" title="Default name for a producer method">
+
+ <section id="3.3.10" 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.4" title="Producer fields">
+
+ <section id="3.4" title="Producer fields">
<assertion id="a">
<text>A producer field must be a field of a managed bean class or session bean class</text>
</assertion>
-
+
<assertion id="b">
<text>A producer field may be static.</text>
</assertion>
-
+
<assertion id="c">
<text>A producer field may be non-static.</text>
</assertion>
-
+
<assertion id="d">
<text>If a producer field sometimes contains a null value when accessed, then the producer field must have scope |@Dependent|</text>
</assertion>
-
+
<assertion id="e">
<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.5, "Client proxies"</text>
</assertion>
-
+
<assertion id="fa">
<text>If the producer field type is a parameterized type, it must specify an actual type parameter or type variable for each type parameter</text>
</assertion>
-
+
<assertion id="ga">
<text>If a producer field type contains a wildcard type parameter the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="gb">
<text>If the producer field type is a parameterized type with a type variable, it must have scope |@Dependent|. If a producer field with a parameterized type with a type variable declares any scope other than |@Dependent|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="ha">
<text>If a producer field type is a type variable the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="i" testable="false">
<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>
<note>This is a statement of intent</note>
</assertion>
-
+
<assertion id="j">
<text>A bean may declare multiple producer fields</text>
</assertion>
</section>
-
- <section id="3.4.1" title="Bean types of a producer field">
+
+ <section id="3.4.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.4.2" title="Declaring a producer field">
+
+ <section id="3.4.2" title="Declaring a producer field">
<assertion id="a">
<text>A producer field may be declared by annotating a field with the |(a)javax.enterprise.inject.Produces| annotation</text>
</assertion>
-
+
<assertion id="b">
<text>A producer field may specify a scope.</text>
</assertion>
-
+
<assertion id="c">
<text>A producer field may specify a name.</text>
</assertion>
-
+
<assertion id="e">
<text>A producer field may specify stereotypes.</text>
</assertion>
-
+
<assertion id="f">
<text>A producer field may specify bindings.</text>
</assertion>
</section>
-
+
<section id="3.4.3" 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.5" title="Resources">
+
+ <section id="3.5" title="Resources">
<assertion id="ka">
<text>The container is not required to support resources with scope other than |@Dependent|.</text>
</assertion>
-
+
<assertion id="l">
<text>A resource may not declare a bean EL name</text>
</assertion>
</section>
-
- <section id="3.5.1" title="Declaring a resource">
+
+ <section id="3.5.1" title="Declaring a resource">
<assertion id="aa">
- <text>A resource may be declared by specifying a Java EE component environment injection annotation as part of a producer field declaration.</text>
+ <text>A resource may be declared by specifying a Java EE component environment injection annotation as part of a producer field declaration.</text>
</assertion>
-
+
<assertion id="bb">
- <text>For a Java EE resource, |@Resource| must be specified.</text>
+ <text>For a Java EE resource, |@Resource| must be specified.</text>
</assertion>
-
+
<assertion id="cc">
<text>For a persistence context, |@PersistenceContext| must be specified.</text>
</assertion>
-
+
<assertion id="dd">
<text>For a persistence unit, |@PersistenceUnit| must be specified.</text>
</assertion>
-
+
<assertion id="ee">
<text>For a remote EJB, |@EJB| must be specified.</text>
</assertion>
-
+
<assertion id="ff">
<text>For a web service, |@WebServiceRef| must be specified.</text>
</assertion>
-
+
<assertion id="gg">
<text>The injection annotation specifies the metadata needed to obtain the resources, entity manager, entity manager factory, remote
EJB instance or web service reference from the component environment.</text>
</assertion>
-
+
<assertion id="hh">
<text>The bean type, bindings and deployment type of the resource are determined by the producer field declaration.</text>
</assertion>
-
+
</section>
-
+
<section id="3.5.2" title="Bean types of a resource">
<assertion id="a">
<text>The bean types of a resource are the declared type of the field declaration, together with |java.lang.Object|.</text>
</assertion>
</section>
-
+
<section id="3.6" title="Additional built-in beans">
<assertion id="a">
<text>A Java EE or embeddable EJB container must provide a bean with binding |@Current| and bean type |javax.transaction.UserTransaction|, allowing injection of a reference to the JTA |UserTransaction|.</text>
</assertion>
-
+
<assertion id="b">
<text>A Java EE or embeddable EJB container must provide a bean with binding |@Current| and bean type |javax.security.Principal|, allowing injection of a |Principal| representing the current caller identity.</text>
</assertion>
-
+
<assertion id="c">
<text>A Java EE or embeddable EJB container must provide a bean with binding |@Current| and bean type |javax.validation.ValidationFactory|, allowing injection of the default Bean Validation |ValidationFactory|.</text>
</assertion>
-
+
<assertion id="d">
<text>A Java EE or embeddable EJB container must provide a bean with binding |@Current| and bean type |javax.validation.Validator|, allowing injection of a |Validator| for the default Bean Validation |ValidationFactory|.</text>
</assertion>
-
+
<assertion id="e">
<text>If a Java EE component class has an injection point of type |UserTransaction| and binding |@Current|, and may not validly make use of the JTA |UserTransaction| according to the Java EE platform specification, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
- </section>
-
- <section id="3.7" title="Injected fields">
+ </section>
+
+ <section id="3.7" title="Injected fields">
<assertion id="aa">
<text>An injected field is a non-static~, non-final~ field of a bean class.</text>
</assertion>
-
+
<assertion id="ab">
<text>An injected field is a ~non-static, ~non-final field of a bean class.</text>
</assertion>
-
+
<assertion id="ba">
<text>An injected field is a non-static, ~non-final~ field of any Java EE component class supporting injection.</text>
</assertion>
@@ -1180,1440 +1180,1410 @@
<assertion id="bb">
<text>An injected field is a ~non-static~, non-final field of any Java EE component class supporting injection.</text>
</assertion>
-
+
<assertion id="ea">
<text>Injected fields are initialized by the container before initializer methods are called, and before the |@PostConstruct| callback occurs.</text>
</assertion>
-
+
<assertion id="h">
<text>If a field is a producer field, it is not an injected field</text>
- </assertion>
+ </assertion>
</section>
-
- <section id="3.7.1" title="Declaring an injected field">
+
+ <section id="3.7.1" title="Declaring an injected field">
<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" title="Initializer methods">
<assertion id="aa">
<text>An initializer method is a non-static method of a bean class.</text>
</assertion>
-
+
<assertion id="ca">
- <text>An initializer method is a non-static method of any Java EE component class supporting injection.</text>
+ <text>An initializer method is a non-static method of any Java EE component class supporting injection.</text>
</assertion>
-
+
<assertion id="e">
<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="g">
<text>A bean class may declare multiple (or zero) initializer methods</text>
</assertion>
-
+
<assertion id="ea">
<text>Initializer methods are called by the container after injected fields are initialized, and before the |@PostConstruct| callback occurs.</text>
</assertion>
-
+
<assertion id="f">
<text>Method interceptors are never called when the container calls an initializer method</text>
</assertion>
-
+
<assertion id="h" testable="false">
<text>The application may call initializer methods directly, but then no parameters will be passed to the method by the container</text>
<note>This is a statement of intent</note>
</assertion>
</section>
-
+
<section id="3.8.1" title="Declaring an initializer method">
<assertion id="a">
<text>An initializer method may be declared by annotating the method |(a)javax.enterprise.inject.Initializer|</text>
</assertion>
-
+
<assertion id="ab">
<text>If a generic method of a bean is annotated |@Initializer|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="ba">
<text>If an initializer method is annotated |@Produces|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="ca">
<text>If an initializer method has a parameter annotated |@Disposes|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="da">
<text>If an initializer method has a parameter annotated |@Observes|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
</section>
-
+
<section id="3.8.2" title="Initializer method parameters">
<assertion id="aa">
<text>An initializer method may have any number of parameters.</text>
</assertion>
-
+
<assertion id="b">
<text>All initializer method parameters are injection points.</text>
</assertion>
</section>
-
+
<section id="3.9" title="The default binding at injection points">
<assertion id="a">
<text>If an injection point declares no binding, the default binding |@Current| is assumed.</text>
</assertion>
</section>
-
+
<section id="3.10" title="Beans with the @New binding">
<assertion id="d">
<text>For each managed bean, a second bean exists which has the same bean class.</text>
</assertion>
-
+
<assertion id="e">
<text>For each managed bean, a second bean exists which has the same bean types.</text>
</assertion>
-
+
<assertion id="f">
<text>For each managed bean, a second bean exists which has the same bean constructor.</text>
</assertion>
-
+
<assertion id="g">
<text>For each managed bean, a second bean exists which has the same initializer methods.</text>
</assertion>
-
+
<assertion id="h">
<text>For each managed bean, a second bean exists which has the same injected fields.</text>
</assertion>
-
+
<assertion id="i">
<text>For each managed bean, a second bean exists which has the same interceptor bindings.</text>
</assertion>
-
+
<assertion id="j">
<text>For each session bean, a second bean exists which has the same bean class.</text>
</assertion>
-
+
<assertion id="k">
<text>For each session bean, a second bean exists which has the same bean types.</text>
</assertion>
-
+
<assertion id="l">
<text>For each session bean, a second bean exists which has the same bean constructor.</text>
</assertion>
-
+
<assertion id="m">
<text>For each session bean, a second bean exists which has the same initializer methods.</text>
</assertion>
-
+
<assertion id="n">
<text>For each session bean, a second bean exists which has the same injected fields.</text>
</assertion>
-
+
<assertion id="o">
<text>For each session bean, a second bean exists which has the same interceptor bindings.</text>
</assertion>
-
+
<assertion id="p">
<text>This second bean has scope |@Dependent|.</text>
</assertion>
-
+
<assertion id="r">
<text>This second bean has exactly one binding: |(a)javax.enterprise.inject.New(X.class)| where |x| is the bean class.</text>
</assertion>
-
+
<assertion id="s">
<text>This second bean has no bean EL name.</text>
</assertion>
-
+
<assertion id="t">
<text>This second bean has no stereotypes.</text>
</assertion>
-
+
<assertion id="u">
<text>This second bean has no observer methods.</text>
</assertion>
-
+
<assertion id="v">
<text>This second bean has no producer methods.</text>
</assertion>
-
+
<assertion id="w">
<text>This second bean has no producer fields.</text>
</assertion>
-
+
<assertion id="x">
<text>This second bean has no disposer methods.</text>
</assertion>
-
+
<assertion id="xb">
<text>This second bean is not a policy.</text>
</assertion>
-
+
<assertion id="z">
<text>When the binding |@New| is specified at an injection point and no value member is explicitly specified, the container defaults the value to the declared type of the injection point.</text>
</assertion>
</section>
-
+
<section id="4" title="Inheritance and specialization">
</section>
-
- <section id="4.1" title="Inheritance of type-level metadata">
+
+ <section id="4.1" title="Inheritance of type-level metadata">
<assertion id="aa">
<text>For class X which is extended _directly_ by the bean class of a _managed_ bean Y, if X is annotated with a _binding type_ Z then Y inherits the annotation if and only if Z declares the |@Inherited| meta-annotation and Y does not declare an annotation of type Z.</text>
- </assertion>
-
+ </assertion>
+
<assertion id="ab">
<text>For class X which is extended _directly_ by the bean class of a _managed_ bean Y, if X is annotated with a _stereotype_ Z then Y inherits the annotation if and only if Z declares the |@Inherited| meta-annotation and Y does not declare an annotation of type Z.</text>
- </assertion>
-
+ </assertion>
+
<assertion id="ad">
<text>For class X which is extended _directly_ by the bean class of a _managed_ bean Y, if X is annotated with a _binding type_ Z then Y inherits the annotation if and only if Z declares the |@Inherited| meta-annotation and Y does not declare an annotation of type Z.</text>
- </assertion>
-
+ </assertion>
+
<assertion id="ae">
<text>For class X which is extended _directly_ by the bean class of a _managed_ bean Y, if X is annotated with a _stereotype_ Z then Y inherits the annotation if and only if Z declares the |@Inherited| meta-annotation and Y does not declare an annotation of type Z.</text>
- </assertion>
-
+ </assertion>
+
<assertion id="ag">
<text>For class X which is extended _indirectly_ by the bean class of a _managed_ bean Y, if X is annotated with a _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>
+
<assertion id="ah">
<text>For class X which is extended _indirectly_ by the bean class of a _managed_ bean Y, if X is annotated with a _stereotype_ 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>
+
<assertion id="aj">
<text>For class X which is extended _indirectly_ by the bean class of a _managed_ bean Y, if X is annotated with a _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>
+
<assertion id="ak">
<text>For class X which is extended _indirectly_ by the bean class of a _managed_ bean Y, if X is annotated with a _stereotype_ 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>
<assertion id="ba">
<text>For class X which is extended _directly_ by the bean class of a _managed_ bean Y, if X is annotated with a _scope type_ Z then Y inherits the annotation if and only if Z declares the |@Inherited| meta-annotation and Y does not declare a scope type.</text>
</assertion>
-
+
<assertion id="bb">
<text>For class X which is extended _directly_ by the bean class of a _managed_ bean Y, if X is annotated with a _scope type_ Z then Y inherits the annotation if and only if Z declares the |@Inherited| meta-annotation and Y does not declare a scope type.</text>
</assertion>
-
+
<assertion id="bc">
<text>For class X which is extended _indirectly_ by the bean class of a _managed_ bean Y, if X is annotated with a _scope 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 scope type.</text>
</assertion>
-
+
<assertion id="bd">
<text>For class X which is extended _indirectly_ by the bean class of a _managed_ bean Y, if X is annotated with a _scope 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 scope type.</text>
</assertion>
-
+
<assertion id="hhh">
<text>A scope type explicitly declared by X and inherited by Y from X takes precedence over default scopes of stereotypes declared or inherited by Y.</text>
</assertion>
-
+
<assertion id="i" testable="false">
<text>For annotations defined by the bean specification, all built-in _scope types_ are declared |@Inherited|</text>
<note>sigtest</note>
</assertion>
-
+
<assertion id="j" testable="false">
<text>For annotations defined by the bean specification, all built-in _stereotypes_ are declared |@Inherited|</text>
<note>sigtest</note>
</assertion>
-
+
<assertion id="k" testable="false">
<text>For annotations defined by the bean specification, _no built-in binding type is declared |@Inherited|_</text>
<note>sigtest</note>
</assertion>
-
+
<assertion id="m" testable="false">
<text>The |@Named| annotation is not declared |@Inherited| and bean EL names are not inherited unless specialization is used</text>
<note>sigtest</note>
</assertion>
-
+
</section>
-
+
<section id="4.2" title="Inheritance of member-level metadata">
-
+
<assertion id="aa">
<text>For class X which is extended _directly_ by the bean class of a _managed_ bean Y, if X declares an injected field x then Y inherits x.</text>
</assertion>
-
+
<assertion id="ab">
<text>For class X which is extended _directly_ by the bean class of a _managed_ bean Y, if X declares an injected field x then Y inherits x.</text>
</assertion>
-
+
<assertion id="ac">
<text>For class X which is extended _indirectly_ by the bean class of a _managed_ bean Y, if X declares an injected field x then Y inherits x.</text>
</assertion>
-
+
<assertion id="ad">
<text>For class X which is extended _indirectly_ by the bean class of a _session_ bean Y, if X declares an injected field x then Y inherits x.</text>
</assertion>
-
+
<assertion id="baa">
<text>For class X which is extended _directly_ by the bean class of a _managed_ bean Y, if X declares a _|@PostConstruct|_ method x() then Y inherits x() if and only if Y does not override the method x()</text>
</assertion>
-
+
<assertion id="bab">
<text>For class X which is extended _directly_ by the bean class of a _managed_ bean Y, if X declares a _|@PostConstruct|_ method x() then Y inherits x() if and only if Y does not override the method x()</text>
</assertion>
-
+
<assertion id="bac">
<text>For class X which is extended _indirectly_ by the bean class of a _managed_ bean Y, if X declares a _|@PostConstruct|_ 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="bad">
<text>For class X which is extended _indirectly_ by the bean class of a _session_ bean Y, if X declares a _|@PostConstruct|_ 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="bba">
<text>For class X which is extended _directly_ by the bean class of a _managed_ bean Y, if X declares a _|@PreDestroy|_ method x() then Y inherits x() if and only if Y does not override the method x()</text>
</assertion>
-
+
<assertion id="bbb">
<text>For class X which is extended _directly_ by the bean class of a _session_ bean Y, if X declares a _|@PreDestroy|_ method x() then Y inherits x() if and only if Y does not override the method x()</text>
</assertion>
-
+
<assertion id="bbc">
<text>For class X which is extended _indirectly_ by the bean class of a _managed_ bean Y, if X declares a _|@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="bbd">
<text>For class X which is extended _indirectly_ by the bean class of a _session_ bean Y, if X declares a _|@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="da">
<text>For class X which is extended _directly_ by the bean class of a _managed_ bean Y, if X declares a _non-static producer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize X</text>
</assertion>
-
+
<assertion id="db">
<text>For class X which is extended _directly_ by the bean class of a _managed_ bean Y, if X declares a _non-static disposer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize X</text>
</assertion>
-
+
<assertion id="dc">
<text>For class X which is extended _directly_ by the bean class of a _managed_ bean Y, if X declares a _non-static observer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize X</text>
</assertion>
-
+
<assertion id="dd">
<text>For class X which is extended _directly_ by the bean class of a _session_ bean Y, if X declares a _non-static producer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize X</text>
</assertion>
-
+
<assertion id="de">
<text>For class X which is extended _directly_ by the bean class of a _session_ bean Y, if X declares a _non-static disposer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize X</text>
</assertion>
-
+
<assertion id="df">
<text>For class X which is extended _directly_ by the bean class of a _session_ bean Y, if X declares a _non-static observer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize X</text>
</assertion>
-
+
<assertion id="dg">
<text>For class X which is extended _indirectly_ by the bean class of a _managed_ bean Y, if X declares a _non-static producer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize X</text>
</assertion>
-
+
<assertion id="dh">
<text>For class X which is extended _indirectly_ by the bean class of a _managed_ bean Y, if X declares a _non-static disposer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize X</text>
</assertion>
-
+
<assertion id="di">
<text>For class X which is extended _indirectly_ by the bean class of a _managed_ bean Y, if X declares a _non-static observer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize X</text>
</assertion>
-
+
<assertion id="dj">
<text>For class X which is extended _indirectly_ by the bean class of a _session_ bean Y, if X declares a _non-static producer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize X</text>
</assertion>
-
+
<assertion id="dk">
<text>For class X which is extended _indirectly_ by the bean class of a _session_ bean Y, if X declares a _non-static disposer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize X</text>
</assertion>
-
+
<assertion id="dl">
<text>For class X which is extended _indirectly_ by the bean class of a _session_ bean Y, if X declares a _non-static observer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize X</text>
- </assertion>
-
+ </assertion>
+
<assertion id="ea">
<text>For class X which is extended _directly_ by the bean class of a _managed_ 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 X.</text>
</assertion>
-
+
<assertion id="eb">
<text>For class X which is extended _directly_ by the bean class of a _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 X.</text>
</assertion>
-
+
<assertion id="ec">
<text>For class X which is extended _indirectly_ by the bean class of a _managed_ 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 X.</text>
</assertion>
-
+
<assertion id="ed">
<text>For class X which is extended _indirectly_ by the bean class of a _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 X.</text>
</assertion>
-
+
<assertion id="f">
<text>If X is a generic type, and an injection point declared by X is inherited by Y, and the declared type of the injection point contains type variables declared by X, the type of the injection point inherited in Y is the declared type, after substitution of actual type arguments declared by Y or any intermediate class that is a subclass of X and a superclass of Y.</text>
</assertion>
-
+
<assertion id="g">
<text>If X is a generic type, and a producer method declared by X is inherited by Y, and the declared type of the producer method contains type variables declared by X, the type of the producer method inherited in Y is the declared type, after substitution of actual type arguments declared by Y or any intermediate class that is a subclass of X and a superclass of Y.</text>
</assertion>
-
+
<assertion id="h">
<text>If X is a generic type, and a producer field declared by X is inherited by Y, and the declared type of the producer field contains type variables declared by X, the type of the producer field inherited in Y is the declared type, after substitution of actual type arguments declared by Y or any intermediate class that is a subclass of X and a superclass of Y.</text>
</assertion>
-
+
<assertion id="i">
<text>If X is a generic type, and a disposer method declared by X is inherited by Y, and the declared type of the disposed parameter contains type variables declared by X, the type of the disposed parameter inherited in Y is the declared type, after substitution of actual type arguments declared by Y or any intermediate class that is a subclass of X and a superclass of Y.</text>
</assertion>
-
+
<assertion id="j">
<text>If X is a generic type, and an observer method declared by X is inherited by Y, and the declared type of the event parameter contains type variables declared by X, the type of the event parameter inherited in Y is the declared type, after substitution of actual type arguments declared by Y or any intermediate class that is a subclass of X and a superclass of Y.</text>
</assertion>
</section>
-
+
<section id="4.3" title="Specialization">
<assertion id="a" testable="false">
<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.</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="ca">
<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 or observer 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="Direct and indirect specialization">
<assertion id="i">
- <text>A bean X is said to specialize another bean Y if X directly specializes Y.</text>
+ <text>A bean X is said to specialize another bean Y if X directly specializes Y.</text>
</assertion>
-
+
<assertion id="i">
- <text>A bean X is said to specialize another bean Y if a bean Z exists, such that X directly specializes Z and Z specializes Y.</text>
+ <text>A bean X is said to specialize another bean Y if a bean Z exists, such that X directly specializes Z and Z specializes Y.</text>
</assertion>
-
+
<assertion id="j">
<text>A bean X that specializes bean Y will include all bindings of Y, together with all bindings declared explicitly by X.</text>
</assertion>
-
+
<assertion id="k">
<text>A bean X that specializes bean Y will have the same name as Y if Y has a name.</text>
</assertion>
-
+
<assertion id="l">
<text>If X declares a name explicitly, using @Named, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="m">
<text>X must have all the bean types of Y. If X does not support some bean type of Y, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
</section>
-
+
<section id="4.3.2" title="Most specialized enabled bean for a bean">
<assertion id="a">
<text>Non-static producer methods, producer fields, disposal methods and observer methods of a bean are invoked upon an instance of the most specialized enabled bean that specializes the bean, as defined by Section 5.6.6, "Invocation of producer or disposal methods", Section 5.6.7, "Access to producer field values" and Section 5.6.8, "Invocation of observer methods".</text>
</assertion>
-
+
</section>
-
- <section id="4.3.3" title="Inconsistent specialization">
+
+ <section id="4.3.3" title="Inconsistent specialization">
<assertion id="c">
<text>If, for an enabled bean X that directly specializes a second bean Y, there is another enabled bean that directly specializes Y, we say that inconsistent specialization exists. The container automatically detects inconsistent specialization and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="d">
<text>If, for an enabled bean X that directly specializes a second bean Y, there is an injection point that matches Y and not X, according to the typesafe resolution algorithm defined in Section 5.3 "Typesafe resolution", we say that inconsistent specialization exists. The container automatically detects inconsistent specialization and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
</section>
-
- <section id="5" title="Lookup, dependency injection and EL resolution">
-
+
+ <section id="5" title="Dependency injection, lookup, and EL">
+
<assertion id="b">
- <text>The container is required to support circularities in the bean dependency graph</text>
+ <text>The container is required to support circularities in the bean dependency graph.</text>
<note>The RI has unit tests for this atm</note>
</assertion>
</section>
-
- <section id="5.1" title="Typesafe resolution algorithm">
-
- <assertion id="faa">
- <text>When the container is resolving a bean by type, it identifies the set of matching enabled beans which have a bean type that matches the required type.</text>
+
+ <section id="5.1" title="Inter-module accessibility in Java EE">
+
+ </section>
+
+ <section id="5.2" title="Policy enablement">
+ <assertion id="a">
+ <text>A policy is never available for injection, lookup or EL resolution in a Java EE module or library that is not a bean deployment archive (a module or library with no beans.xml file).</text>
</assertion>
-
- <assertion id="fb">
- <text>Primitive types are considered to be identical to their corresponding wrapper types in |java.lang|.</text>
+
+ <assertion id="b">
+ <text>Nor is a policy available for injection, lookup or EL resolution in every bean deployment archive. A policy must be explicitly enabled in every bean deployment archive in which the policy should be available for injection, lookup and EL resolution.</text>
</assertion>
-
- <assertion id="fc">
- <text>Array types are considered identical only if their element types are identical.</text>
+
+ <assertion id="c">
+ <text>By default, a bean deployment archive has no enabled policies. A policy must be explicitly declared using the <policies> element of the |beans.xml| file of the bean deployment archive.</text>
</assertion>
-
- <assertion id="fd">
- <text>Parameterized types are considered identical only if both the type and all type parameters are identical.</text>
+
+ <assertion id="d" testable="false">
+ <text>The <policies> element contains a list of bean classes and stereotypes. </text>
</assertion>
-
- <assertion id="gaa">
- <text>_If no bindings were explicitly specified, the container assumes the binding |@Current|_. </text>
+
+ <assertion id="e">
+ <text>A policy is enabled for the bean deployment archive if the policy is a managed bean or session bean and the bean class of the bean is listed.</text>
</assertion>
-
- <assertion id="gba">
- <text>The container narrows the set of matching beans to just those where for each required binding, the bean declares a matching binding with _(a) the same type_ and (b) the same annotation member value for each member which is not annotated |(a)javax.enterprise.inject.NonBinding|.</text>
+
+ <assertion id="f">
+ <text>A policy is enabled for the bean deployment archive if the policy is a producer method, field or resource, and the bean class that declares the method or field is listed.</text>
</assertion>
-
- <assertion id="gca">
- <text>The container narrows the set of matching beans to just those where for each required binding, the bean declares a matching binding with (a) the same type and _(b) the same annotation member value for each member_ which is not annotated |javax.enterprise.inject.@NonBinding|.</text>
+
+ <assertion id="g">
+ <text>A policy is enabled for the bean deployment archive if any |@Policy| stereotype of the policy is listed.</text>
</assertion>
-
- <assertion id="ha">
- <text>When the container is resolving a bean by type, it examines the deployment types of the matching beans, as defined in Section 2.5.6, "Deployment type precedence", and returns the set of beans with the highest precedence deployment type that occurs in the set.</text>
+
+ <assertion id="h">
+ <text>Each child <class> element must specify the name of a policy bean class. If there is no class with the specified name, or if the class with the specified name is not a policy bean class, the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
- <assertion id="hb">
- <text>When the container is resolving a bean by type, it examines the deployment types of the matching beans, as defined in Section 2.5.6, "Deployment type precedence", and returns the set of beans with the highest precedence deployment type that occurs in the set. _If there are no matching beans, an empty set is returned_</text>
- </assertion>
+
+ <assertion id="i">
+ <text>Each child <stereotype> element must specify the name of a |@Policy| stereotype annotation. If there is no annotation with the specified name, or the annotation is not a |@Policy| stereotype, the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ </assertion>
+
+ <assertion id="j">
+ <text>If the same type is listed twice under the <policies> element, the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ </assertion>
+
+ <assertion id="k">
+ <text>For a custom implementation of the |Bean| interface defined in Section 11.1, "The Bean interface", the container calls |isPolicy()| to determine whether the bean is a policy, and |getBeanClass()| and |getStereotypes()| to determine whether a policy is enabled in a certain bean deployment archive.</text>
+ </assertion>
+
+ <assertion id="l" testable="false">
+ <text>A bean is said to be enabled if it is not a policy, or if it is enabled in at least one bean deployment archive.</text>
+ </assertion>
</section>
-
- <section id="5.1.1" title="Assignability of raw and parameterized types">
-
+
+ <section id="5.3" title="Typesafe resolution">
+ <assertion id="i">
+ <text>When resolving beans that are eligible for injection to an injection point, the container identifies the set of matching beans which are not interceptors or decorators and which have a bean type that matches the required type. For this purpose, primitive types are considered to match their corresponding wrapper types in |java.lang| ~and array types are considered to match only if their element types are identical. Parameterized and raw types are considered to match if they are identical or if the bean type is assignable to the required type, as defined in Section 5.3.3, "Assignability of raw and parameterized types".~</text>
+ </assertion>
+
+ <assertion id="j">
+ <text>When resolving beans that are eligible for injection to an injection point, the container identifies the set of matching beans which are not interceptors or decorators and which have a bean type that matches the required type. For this purpose, ~primitive types are considered to match their corresponding wrapper types in |java.lang| and~ array types are considered to match only if their element types are identical. ~Parameterized and raw types are considered to match if they are identical or if the bean type is assignable to the required type, as defined in Section 5.3.3, "Assignability of raw and parameterized types".~</text>
+ </assertion>
+
+ <assertion id="k">
+ <text>When resolving beans that are eligible for injection to an injection point, the container identifies the set of matching beans which are not interceptors or decorators and which have a bean type that matches the required type. For this purpose, ~primitive types are considered to match their corresponding wrapper types in |java.lang| and array types are considered to match only if their element types are identical.~ Parameterized and raw types are considered to match if they are identical or if the bean type is assignable to the required type, as defined in Section 5.3.3, "Assignability of raw and parameterized types".</text>
+ </assertion>
+
+ <assertion id="l">
+ <text>When resolving beans that are eligible for injection to an injection point, the container identifies the set of matching beans which are not interceptors or decorators and which have the required bindings. If no required bindings were explicitly specified, the container assumes the required binding |@Current|. The container narrows the set of matching beans to just those where for each required binding, the bean declares a matching binding with (a) the same type and (b) the same annotation member value for each member which is not annotated |(a)javax.enterprise.inject.NonBinding| (see Section 5.3.5, "Binding annotations with members").</text>
+ </assertion>
+
+ <assertion id="m">
+ <text>When resolving beans that are eligible for injection to an injection point, the container identifies the set of matching beans which are not interceptors or decorators. In a Java EE or servlet container, the bean class is required to be accessible to the class that declares the injection point, according to the class loading requirements of the Java EE platform and Java Servlet specifications.</text>
+ </assertion>
+
+ <assertion id="n">
+ <text>When resolving beans that are eligible for injection to an injection point, the container identifies the set of matching beans which are not interceptors or decorators and which are not a policy, or is an enabled policy of the bean deployment archive of the class that declares the injection point. For a custom implementation of the |Bean| interface defined in Section 11.1, "The Bean interface", the container calls |getTypes()| and |getBindings()| to determine the bean types and bindings.</text>
+ </assertion>
+ </section>
+
+ <section id="5.3.1" title="Unsatisfied and ambiguous dependencies">
+ <assertion id="aa">
+ <text>The container must validate all injection points of all enabled beans when the application is initialized to ensure that there are no unsatisfied or ambiguous dependencies. If an unsatisfied or ambiguous dependency exists, the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ <note>These need expanding out - one for each assertion that results in an exception in 5.7.1</note>
+ </assertion>
+
+ <assertion id="b">
+ <text>For a custom implementation of the Bean interface defined in Section 11.1, "The Bean interface", the container calls |getInjectionPoints()| to determine the injection points of the bean.</text>
+ </assertion>
+ </section>
+
+ <section id="5.3.3" title="Assignability of raw and parameterized types">
<assertion id="a">
<text>A parameterized bean type is considered assignable to a raw required type if the raw types are identical and all type parameters of the bean type are either unbounded type variables or |java.lang.Object|.</text>
- </assertion>
-
+ </assertion>
+
<assertion id="b">
- <text>A parameterized bean type is considered assignable to a parameterized required type if they have identical raw type and for each parameter the required type parameter and the bean type parameter are actual types with identical raw type, and, if the type is parameterized, the bean type is assignable to the required type according to these rules.</text>
+ <text>A parameterized bean type is considered assignable to a parameterized required type if they have identical raw type and for each parameter the required type parameter and the bean type parameter are actual types with identical raw type, and, if the type is parameterized, the bean type parameter is assignable to the required type according to these rules.</text>
</assertion>
-
+
<assertion id="c">
- <text>A parameterized bean type is considered assignable to a parameterized required type if they have identical raw type and for each parameter the required type parameter is a wildcard, the bean type parameter is an actual type and the actual type is a subtype of the upper bound, if any, of the wildcard and a supertype of the upper bound, if any, or the wildcard.
- </text>
+ <text>A parameterized bean type is considered assignable to a parameterized required type if they have identical raw type and for each parameter the required type parameter is a wildcard, the bean type parameter is an actual type and the actual type is assignable to the upper bound, if any, of the wildcard and assignable from the lower bound, if any, of the wildcard.</text>
</assertion>
-
+
<assertion id="d">
- <text>A parameterized bean type is considered assignable to a parameterized required type if they have identical raw type and for each parameter the required type parameter is a wildcard with no lower bound, the bean type parameter is a type variable and the upper bound of the type variable is aa subtype of the upper bound, if any, of the wildcard.</text>
+ <text>A parameterized bean type is considered assignable to a parameterized required type if they have identical raw type and for each parameter the required type parameter is a wildcard, the bean type parameter is a type variable and the upper bound of the type variable is assignable to the upper bound, if any, of the wildcard and assignable from the lower bound, if any, of the wildcard.</text>
</assertion>
-
+
<assertion id="e">
- <text>A parameterized bean type is considered assignable to a parameterized required type if they have identical raw type and for each parameter the required type parameter is an actual type, the bean type parameter is a type variable and the actual type is a subtype of the upper bound, if any, of the type variable.</text>
+ <text>A parameterized bean type is considered assignable to a parameterized required type if they have identical raw type and for each parameter the required type parameter is an actual type, the bean type parameter is a type variable and the actual type is assignable to the upper bound, if any, of the type variable.</text>
</assertion>
-
+
<assertion id="f">
- <text>A parameterized bean type is considered assignable to a parameterized required type if they have identical raw type and for each parameter the required type parameter and the bean type parameter are both type variables and the upper bound of the required type parameter is a subtype of the upper bound, if any, of the bean type parameter</text>
+ <text>A parameterized bean type is considered assignable to a parameterized required type if they have identical raw type and for each parameter the required type parameter and the bean type parameter are both type variables and the upper bound of the required type parameter is assignable to the upper bound, if any, of the bean type parameter.</text>
</assertion>
-
- <assertion id="g">
- <text>If the injection point is declared by a parameterized superclass, and the type declaration of the injection point contains type parameters declared by the superclass, the required type is the declared type, after substitution of actual type arguments declared by subclasses.</text>
- </assertion>
-
</section>
-
- <section id="5.1.2" title="Unsatisfied and ambiguous dependencies">
+
+ <section id="5.3.4" title="Primitive types and null values">
+
<assertion id="aa">
- <text>The container must validate all injection points of all enabled beans when the application is initialized to ensure that there are no unsatisfied or ambiguous dependencies. If an unsatisfied or ambiguous dependency exists, the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
- <note>These need expanding out - one for each assertion that results in an exception in 5.7.1</note>
- </assertion>
-
- <assertion id="b">
- <text>For a custom implementation of the Bean interface defined in Section 11.1, "The Bean interface", the container calls |getInjectionPoints()| to determine the injection points of the bean.</text>
- </assertion>
-
- </section>
-
- <section id="5.1.3" title="Primitive types and null values">
-
- <assertion id="aa">
<text>If necessary, the container performs boxing ~or unboxing~ when it injects a value to a field or parameter of primitive or wrapper type.</text>
</assertion>
<assertion id="ab">
<text>If necessary, the container performs ~boxing or~ unboxing when it injects a value to a field or parameter of primitive or wrapper type.</text>
- </assertion>
-
+ </assertion>
+
<assertion id="aa">
<text>If an injection point of primitive type resolves to a bean that may have null values, such as a producer method with a nonprimitive return type or a producer field with a non-primitive type, the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4 "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="ba">
<text>For a custom implementation of the Bean interface defined in Section 11.1, "The Bean interface", the container calls |isNullable()| to determine whether the bean may have null values.</text>
</assertion>
</section>
-
- <section id="5.1.4" title="Binding annotations with members">
+
+ <section id="5.3.5" title="Binding annotations with members">
<assertion id="a" testable="false">
<text>Binding types with members are supported</text>
<note>A statement of intent</note>
</assertion>
-
+
<assertion id="b">
<text>An annotation member may be excluded from consideration using the |@NonBinding| annotation</text>
</assertion>
-
+
<assertion id="ca">
<text>Array-valued ~or annotation-valued~ members of a binding type must be annotated |@NonBinding|. If an array-valued ~or annotation-valued~ member of a binding type is not annotated |@NonBinding|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="cb">
<text>~Array-valued or ~annotation-valued members of a binding type must be annotated |@NonBinding|. If an ~array-valued or ~annotation-valued member of a binding type is not annotated |@NonBinding|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
- </section>
-
- <section id="5.1.5" title="Multiple bindings">
+ </section>
+
+ <section id="5.3.6" title="Multiple bindings">
<assertion id="a">
<text>A bean class may declare multiple bindings</text>
</assertion>
-
+
<assertion id="b">
<text>A producer method may declare multiple bindings</text>
</assertion>
-
+
<assertion id="c">
<text>A producer field may declare multiple bindings</text>
- </assertion>
-
+ </assertion>
+
<assertion id="d">
<text>A bean must declare all of the bindings that are specified at the injection point to be considered a candidate for injection</text>
</assertion>
- </section>
-
- <section id="5.2" title="EL Name resolution algorithm">
-
- <assertion id="b">
- <text>When resolving a bean by name, the container must identify the set of matching enabled beans which have the given EL name</text>
+ </section>
+
+ <section id="5.4" title="EL Name resolution">
+
+ <assertion id="ba">
+ <text>When resolving a bean by name, the container identifies the set of matching beans which have the given EL name, and are accessible to classes in the war containing the JSP or JSF page with the EL expression, according to the class loading requirements of the Java EE platform and Java Servlet specifications, and which are not a policy or an enabled policy of the war containing the JSP or JSF page with the EL expression.</text>
</assertion>
-
+
+ <assertion id="e">
+ <text>For a custom implementation of the Bean interface defined in Section 11.1, "The Bean interface", the container calls |getName()| to determine the bean EL name.</text>
+ </assertion>
+ </section>
+
+ <section id="5.4.1" title="Ambiguous EL names">
<assertion id="c">
- <text>After the container identifies the set of matching beans, it examines the deployment types of the matching beans, as defined in Section 2.5.6, "Deployment type precedence", and returns the set of beans with the highest precedence deployment type that occurs in the set.</text>
+ <text>An ambiguous EL name exists in an EL expression when there are multiple beans which match the given EL name. When an ambiguous EL name exists, the container attempts to resolve the ambiguity - if any matching beans are policies, the container eliminates all matching beans that are not policies. The container eliminates all matching beans that are specialized by some other matching bean. If there is exactly one bean remaining, the container will select this bean, and the ambiguous name is called resolvable.</text>
</assertion>
-
+
<assertion id="d">
- <text>If there are no matching beans, an empty set is returned.</text>
+ <text>All unresolvable ambiguous EL names are detected by the container when the application is initialized. Suppose two beans are both accessible to classes in a certain war, according to the class loading requirements of the Java EE platform and Java Servlet specifications. If each bean is either not a policy, or is an enabled policy of the war, and either the two beans have the same EL name and the name is not resolvable, or the EL name of one bean is of the form x.y, where y is a valid bean EL name, and x is the EL name of the other bean, the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
- </section>
-
- <section id="5.2.1" title="Ambiguous EL names">
- <assertion id="a">
- <text>If, in a particular deployment two enabled beans have the same EL name and the same deployment type, the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
- </assertion>
-
- <assertion id="b">
- <text>If, in a particular deployment, the EL name of an enabled bean is of the form |x.y|, where |y| is a valid bean EL name, and |x| is the EL name of some other enabled bean, the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
- </assertion>
</section>
-
- <section id="5.3" title="Client proxies">
+
+ <section id="5.5" title="Client proxies">
<assertion id="a">
<text>Client proxies are never required for a bean whose scope is a pseudo-scope such as |@Dependent|</text>
</assertion>
-
+
<assertion id="b">
<text>Client proxies are used for normal scoped beans</text>
</assertion>
-
+
<assertion id="d">
<text>The container must guarantee that when any valid injected reference to a bean of normal scope is invoked, the invocation is always processed by the current instance of the injected bean.</text>
</assertion>
</section>
-
- <section id="5.3.1" title="Unproxyable bean types">
+
+ <section id="5.5.1" title="Unproxyable bean types">
<assertion id="aa">
- <text>Classes without a non-private constructor with no parameters cannot be proxied by the container. If an injection point whose declared type cannot be proxied by the container resolves to a bean with a normal scope, the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ <text>Classes which don't have a non-private constructor with no parameters cannot be proxied by the container. If an injection point whose declared type cannot be proxied by the container resolves to a bean with a normal scope, the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="baa">
<text>Classes which are declared final ~or have final methods~ cannot be proxied by the container. If an injection point whose declared type cannot be proxied by the container resolves to a bean with a normal scope, the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="bba">
<text>Classes which ~are declared final or ~have final methods cannot be proxied by the container. If an injection point whose declared type cannot be proxied by the container resolves to a bean with a normal scope, the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="ca">
<text>Primitive types cannot be proxied by the container. If an injection point whose declared type cannot be proxied by the container resolves to a bean with a normal scope, the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="da">
<text>Array types cannot be proxied by the container. If an injection point whose declared type cannot be proxied by the container resolves to a bean with a normal scope, the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
- </section>
-
- <section id="5.3.2" title="Client proxy invocation">
+ </section>
+
+ <section id="5.5.2" title="Client proxy invocation">
<assertion id="aa">
<text>Every time a method of the bean is invoked upon a client proxy, the client proxy must obtain a contextual instance of the bean, as defined in Section 6.5.2, "Contextual instance of a bean", and invoke the method upon this instance.</text>
</assertion>
-
+
+ <assertion id="ab">
+ <text>If the scope is not active, as specified in Section 6.5.1, "The active context object for a scope", the client proxy rethrows |ContextNotActiveException| or |IllegalStateException|.</text>
+ </assertion>
+
<assertion id="b">
<text>The behavior of all methods declared by |java.lang.Object|, except for |toString()|, is undefined for a client proxy</text>
</assertion>
- </section>
-
- <section id="5.4" title="Dependency injection">
+ </section>
+
+ <section id="5.6" title="Dependency injection">
<assertion id="a">
<text>The container is required to perform dependency injection whenever it creates a contextual instance of a session bean.</text>
</assertion>
-
+
<assertion id="b">
<text>The container is required to perform dependency injection whenever it creates a contextual instance of a managed bean.</text>
</assertion>
-
+
<assertion id="c">
<text>The container is required to perform dependency injection whenever it instantiates non-contextual instances of session beans (for example, session beans obtained by the application from JNDI or injected using |@EJB|).</text>
</assertion>
-
+
<assertion id="d">
<text>The container is required to perform dependency injection whenever it instantiates non-contextual instances of managed beans.</text>
</assertion>
-
+
<assertion id="e">
<text>The container is required to perform dependency injection whenever it instantiates instances of any other Java EE component class supporting injection.</text>
</assertion>
-
+
<assertion id="f">
- <text>In a Java EE 5 environment, the container is not required to support injection for non-contextual objects.</text>
+ <text>In a Java EE 5 environment, the container is not required to support injection for non-contextual objects.</text>
</assertion>
-
+
<assertion id="g">
<text>The container interacts with instances of beans and other Java EE component classes supporting injection by calling methods and getting and setting the field values.</text>
</assertion>
</section>
-
- <section id="5.4.1" title="Injectable references">
- <assertion id="a">
- <text>To obtain an injectable reference for an injection point, the container must identify a bean according to the rules defined in Section 5.1, "Typesafe resolution algorithm".</text>
+
+ <section id="5.6.1" title="Injectable references">
+ <assertion id="aa">
+ <text>To obtain an injectable reference for an injection point, the container must identify a bean according to the rules defined in Section 5.3, "Typesafe resolution" and resolving ambiguities according to Section 5.3.1, "Unsatisfied and ambiguous dependencies", then obtain a contextual reference for this bean and the type of the injection point according to Section 6.5.3, "Contextual reference for a bean".</text>
</assertion>
-
- <assertion id="b">
- <text>If typesafe resolution resulted in an empty set, throw an |UnsatisfiedResolutionException|.</text>
+
+ <assertion id="g">
+ <text>For certain combinations of scopes, the container is permitted to optimize the above procedure by directly injecting a contextual instance of the bean, as defined in Section 6.5.2, "Contextual instance of a bean". If an incompletely initialized instance of the bean is registered with the current |CreationalContext|, as defined in Section
+6.1, "The Contextual interface", the container is permitted to directly inject this instance. However, in performing these optimizations, the container must respect the rules of injected reference validity.</text>
</assertion>
-
- <assertion id="c">
- <text>If typesafe resolution resulted in more than one bean, throw an |AmbiguousResolutionException|.</text>
- </assertion>
-
+ </section>
+
+ <section id="5.6.2" title="Injected reference validity">
<assertion id="d">
- <text>Otherwise, obtain a contextual reference for this bean for the type of the injection point according to Section 6.5.3, "Contextual reference for a bean".</text>
+ <text>A reference to a bean injected into a field, bean constructor or initializer method is valid until the object into which it was injected is destroyed.</text>
</assertion>
-
+
<assertion id="e">
- <text>The container is permitted to directly inject a contextual instance of the bean, as defined in Section 6.5.2, "Contextual instance of a bean".</text>
+ <text>A reference to a bean injected into a producer method is valid until the producer method bean instance that is being produced is destroyed.</text>
</assertion>
-
+
<assertion id="f">
- <text>If an incompletely initialized instance of the bean is registered with the current |CreationalContext|, as defined in Section
-6.1, "The Contextual interface", the container is permitted to directly inject this instance.</text>
+ <text>A reference to a bean injected into a disposer method or observer method is valid until the invocation of the method completes.</text>
</assertion>
-
- </section>
-
- <section id="5.4.2" title="Injected reference validity">
- <assertion id="c">
- <text>Injected references to a bean are valid until the object into which they were injected is destroyed. The application should not invoke a method of an invalid reference. If the application invokes a method of an injected reference after the object into which it was injected has been destroyed, the behavior is undefined.</text>
+
+ <assertion id="g">
+ <text>The application should not invoke a method of an invalid reference. If the application invokes a method of an invalid injected reference, the behavior is undefined.</text>
</assertion>
</section>
-
- <section id="5.4.3" title="Injection using the bean constructor">
+
+ <section id="5.6.3" title="Injection using the bean constructor">
<assertion id="a">
- <text>When the container instantiates a managed bean with a constructor annotated |@Initializer|, the container calls this constructor, passing an injectable reference to each parameter. If there is no constructor annotated |@Initializer|, the container calls the constructor with no parameters.</text>
- </assertion>
+ <text>When the container instantiates a managed bean with a constructor annotated |@Initializer|, the container calls this constructor, passing an injectable reference to each parameter. If there is no constructor annotated |@Initializer|, the container calls the constructor with no parameters.</text>
+ </assertion>
</section>
-
- <section id="5.4.4" title="Injection of fields and initializer methods">
+
+ <section id="5.6.4" title="Injection of fields and initializer methods">
<assertion id="a">
- <text>When the container creates a new instance of a managed bean, session bean, or of any other Java EE component class supporting injection, the container must initialize the values of all injected fields after injection of Java EE component environment resources has been performed and before the |@PostConstruct| callback occurs and before the servlet |init()| method is called. The container sets the value of each injected field to an injectable reference.</text>
+ <text>When the container creates a new instance of a managed bean, session bean, or of any other Java EE component class supporting injection, the container must initialize the values of all injected fields after injection of Java EE component environment resources has been performed and before the |@PostConstruct| callback occurs and before the servlet |init()| method is called. The container sets the value of each injected field to an injectable reference.</text>
</assertion>
-
+
<assertion id="b">
- <text>After the container initializes the values of the injected fields, it must call all initializer methods, passing an injectable reference to each parameter.</text>
+ <text>After the container initializes the values of the injected fields, it must call all initializer methods, passing an injectable reference to each parameter.</text>
</assertion>
-
- <assertion id="c">
- <text>After the container calls initializer methods, it must build the interceptor and decorator stacks for the instance (if the component has interceptors or decorators).</text>
- </assertion>
</section>
-
- <section id="5.4.5" title="Destruction of dependent objects">
+
+ <section id="5.6.5" title="Destruction of dependent objects">
<assertion>
<text>When the container destroys an instance of a bean or of any Java EE component class supporting injection, the container destroys all dependent objects, as defined in Section 6.4.3, "Dependent object destruction", after the |@PreDestroy| callback completes and after the servlet |destroy()| method is called.</text>
- </assertion>
+ </assertion>
</section>
-
- <section id="5.4.6" title="Invocation of producer or disposal methods">
+
+ <section id="5.6.6" title="Invocation of producer or disposal methods">
<assertion id="a">
<text>When the container calls a producer method, if the method is static, the container must invoke the method.</text>
</assertion>
-
+
<assertion id="b">
<text>When the container calls a disposal method, if the method is static, the container must invoke the method.</text>
</assertion>
-
+
<assertion id="c">
<text>When the container calls a producer method, if the method is non-static the container must determine the most specialized enabled bean that specializes the bean which declares the method, as defined in Section 4.3.2 "Most specializaed enabled bean for a bean", then obtain a contextual instance of the most specialized bean, as defined by Section 6.5.2 "Contextual instance of a bean", then invoke the method upon this instance.</text>
</assertion>
-
+
<assertion id="d">
<text>When the container calls a disposal method, if the method is non-static the container must determine the most specialized enabled bean that specializes the bean which declares the method, as defined in Section 4.3.2 "Most specializaed enabled bean for a bean", then obtain a contextual instance of the most specialized bean, as defined by Section 6.5.2 "Contextual instance of a bean", then invoke the method upon this instance.</text>
</assertion>
-
+
<assertion id="e">
- <text>The container passes an injectable reference to each injected method parameter. The container is also responsible for destroying dependent objects created during this invocation, as defined in Section 6.4.3 "Dependent object destruction".</text>
- </assertion>
+ <text>The container passes an injectable reference to each injected method parameter. The container is also responsible for destroying dependent objects created during this invocation, as defined in Section 6.4.3 "Dependent object destruction".</text>
+ </assertion>
</section>
-
- <section id="5.4.7" title="Access to producer field values">
+
+ <section id="5.6.7" title="Access to producer field values">
<assertion id="a">
<text>When the container accesses the value of a producer field, if the producer field is static, the container must access the field value.</text>
</assertion>
-
+
<assertion id="b">
<text>When the container accesses the value of a producer field, if the producer field is non-static, the container must determine the most specialized enabled bean that specializes the bean which declares the producer field, as defined in Section 4.3.2 "Most specialized enabled bean for a bean", then obtain a contextual instance of the most specialized bean, as defined by Section 6.5.2 "Contextual instance of a bean", then access the field value of this instance.</text>
</assertion>
</section>
-
- <section id="5.4.8" title="Invocation of observer methods">
+
+ <section id="5.6.8" title="Invocation of observer methods">
<assertion id="a">
- <text>When the container calls an observer method (defined in Section 10.5 "Observer methods"), if the observer method is static, the container must invoke the method.</text>
+ <text>When the container calls an observer method (defined in Section 10.4 "Observer methods"), if the observer method is static, the container must invoke the method.</text>
</assertion>
-
- <assertion id="b">
- <text>When the container calls an observer method (defined in Section 10.5 "Observer methods"), if the observer method is non-static, the container must determine the most specialized enabled bean that specializes the bean which declares the observer method, as defined in Section 4.3.2 "Most specialized enabled bean for a bean", then obtain a contextual instance of the bean according to Section 6.5.2 "Contextual instance of a bean". If this observer method is a conditional observer method, obtain the contextual instance that already exists, without creating a new contextual instance. Finally, the container must invoke the observer method on the resulting instance, if any.</text>
+
+ <assertion id="ba">
+ <text>When the container calls an observer method (defined in Section 10.5 "Observer methods"), if the observer method is non-static, the container must determine the most specialized enabled bean that specializes the bean which declares the observer method, as defined in Section 4.3.2 "Most specialized enabled bean for a bean", then obtain a contextual instance of the bean according to Section 6.5.2 "Contextual instance of a bean". If this observer method is a conditional observer method, obtain the contextual instance that already exists, without creating a new contextual instance. Finally, the container must invoke the observer method on the resulting instance, if any, as a business method invocation, as defined in Section 7.2 "Container invocations and interception".</text>
</assertion>
-
+
<assertion id="c">
<text>The container must pass the event object to the event parameter and an injectable instance to each injected method parameter.</text>
</assertion>
-
+
<assertion id="d">
- <text>The container is also responsible for destroying dependent objects created during this invocation, as defined in Section 6.4.3, "Dependent object destruction".</text>
- </assertion>
+ <text>The container is also responsible for destroying dependent objects created during this invocation, as defined in Section 6.4.2, "Dependent object destruction".</text>
+ </assertion>
</section>
-
- <section id="5.4.9" title="Injection point metadata">
+
+ <section id="5.6.9" title="Injection point metadata">
<assertion id="aa">
<text>The |javax.enterprise.inject.spi.InjectionPoint.getBean()| method returns the Bean object representing the bean that defines the injection point. If the injection point does not belong to a bean, |getBean()| returns a null value.</text>
</assertion>
-
+
<assertion id="ba">
<text>The |javax.enterprise.inject.spi.InjectionPoint.getType()| method returns the declared type of the injection point.</text>
</assertion>
-
+
<assertion id="bc">
<text>The |javax.enterprise.inject.spi.InjectionPoint.getBindings()| method returns the declared bindings of the injection point.</text>
</assertion>
-
+
<assertion id="ca">
<text>The |javax.enterprise.inject.spi.InjectionPoint.getMember()| method returns the |Field| object in the case of field injection.</text>
</assertion>
-
+
<assertion id="cb">
<text>The |javax.enterprise.inject.spi.InjectionPoint.getMember()| method returns the |Method| object in the case of method parameter injection.</text>
</assertion>
-
+
<assertion id="cc">
<text>The |javax.enterprise.inject.spi.InjectionPoint.getMember()| method returns the |Constructor| object in the case of constructor parameter injection</text>
</assertion>
-
+
<assertion id="daa">
<text>The |getAnnotated()| method returns an instance of |javax.enterprise.inject.spi.AnnotatedField| or |javax.enterprise.inject.spi.AnnotatedParameter|, depending upon whether the injection point is an injected field or a constructor/method parameter.</text>
</assertion>
-
+
<assertion id="dba">
<text>The |isDelegate()| method returns true if the injection point is a decorator delegate injection point, and false otherwise.</text>
</assertion>
-
+
<assertion id="dca">
<text>The |isTransient()| method returns true if the injection point is a transient field, and false otherwise.</text>
</assertion>
<assertion id="e">
- <text>The container must provide a bean with deployment type |@Standard|, scope |@Dependent|, bean type |InjectionPoint| and binding |@Current|, allowing dependent objects, as defined in Section 6.4.2, "Dependent objects", to obtain information about the injection point to which they belong. The built-in implementation must be a passivation capable dependency, as defined in Section 6.6.2, "Passivation capable dependencies".</text>
- </assertion>
-
+ <text>The container must provide a bean with deployment type |@Standard|, scope |@Dependent|, bean type |InjectionPoint| and binding |@Current|, allowing dependent objects, as defined in Section 6.4.2, "Dependent objects", to obtain information about the injection point to which they belong. The built-in implementation must be a passivation capable dependency, as defined in Section 6.6.2, "Passivation capable dependencies".</text>
+ </assertion>
+
<assertion id="f">
- <text>If a bean that declares any scope other than |@Dependent| has an injection point of type |InjectionPoint| and binding |@Current|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ <text>If a bean that declares any scope other than |@Dependent| has an injection point of type |InjectionPoint| and binding |@Current|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="g">
<text>If an object that is not a bean has an injection point of type |InjectionPoint| and binding |@Current|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
- </assertion>
+ </assertion>
</section>
-
- <section id="5.5" title="Programmatic lookup">
+
+ <section id="5.7" title="Programmatic lookup">
<assertion id="aa">
<text>An instance of the |javax.enterprise.inject.Instance| interface may be injected.</text>
</assertion>
-
+
<assertion id="ba">
<text>The method |javax.enterprise.inject.Instance.get()| returns a contextual reference.</text>
</assertion>
-
+
<assertion id="ca">
<text>Any combination of bindings may be specified at the injection point.</text>
</assertion>
-
+
<assertion id="da">
<text>The |@Any| binding may be used to allow the application to specify bindings dynamically.</text>
</assertion>
</section>
-
- <section id="5.5.1" title="The Instance interface">
- <assertion id="a">
- <text>The |Instance| interface provides a method for obtaining instances of beans of a specific type, and inherits the ability to iterate
-beans of a specific type from |java.lang.Iterable|.</text>
+
+ <section id="5.7.1" title="The Instance interface">
+ <assertion id="aa">
+ <text>The |Instance| interface provides a method for obtaining instances of beans with a specified combination of required type and bindings, and inherites the ability to iterate beans with that combination of required type and bindings from |java.lang.Iterable|.</text>
</assertion>
-
- <assertion id="b">
- <text>The |select()| method of the provided implementation of |Instance| returns a child Instance for a subtype of the bean type and additional bindings. If no subtype is given, the bean type is the same as the parent.</text>
+
+ <assertion id="ab">
+ <text>For an injected |Instance|, the required type is the type parameter specified at the injection point, and the required bindings are the bindings specified at the injection point.</text>
</assertion>
-
- <assertion id="c">
- <text>If a parameterized type with a type parameter or wildcard is passed to |select()|, an |IllegalArgumentException| is thrown.</text>
+
+ <assertion id="ba">
+ <text>The |select()| method returns a child |Instance| for a given required type and additional required bindings. If no required type is given, the required type is the same as the parent.</text>
</assertion>
-
- <assertion id="d">
- <text>If two instances of the same binding type are passed to |select()|, a |DuplicateBindingTypeException| is thrown.</text>
+
+ <assertion id="da">
+ <text>If two instances of the same binding type are passed to |select()|, an |IllegalArgumentException| is thrown.</text>
</assertion>
-
+
<assertion id="e">
<text>If an instance of an annotation that is not a binding type is passed to |select()|, an |IllegalArgumentException| is thrown.</text>
</assertion>
-
- <assertion id="f">
- <text>The |get()| method of the provided implementation of |Instance| must identify the bean by calling |BeanManager.getBeans()|, passing the type and bindings specified at the injection point. A child |Instance| passes the bean subtype and the additional bindings, along with the bindings of its parent.</text>
+
+ <assertion id="fa">
+ <text>The |get()| method must identify a bean that matches the required type and required bindings and is accessible to the class into which the parent |Instance| was injected, according to the rules of typesafe resolution, as defined in Section 5.3, "Typesafe resolution" and resolving ambiguities according to Section 5.3.1, "Unsatisfied and ambiguous dependencies".</text>
</assertion>
-
- <assertion id="g">
- <text>If |getBeans()| did not return a bean, throw an |UnsatisfiedResolutionException|.</text>
+
+ <assertion id="fb">
+ <text>If typesafe resolution results in an unsatisfied dependency, throw an |UnsatisfiedResolutionException|. If typesafe resolution results in an unresolvable ambiguous dependency, throw an |AmbiguousResolutionException|.</text>
</assertion>
-
- <assertion id="h">
- <text>If |getBeans()| returned more than one bean, throw an |AmbiguousResolutionException|.</text>
+
+ <assertion id="fc">
+ <text>Otherwise, obtain a contextual reference for the bean and the required type, as defined in Section 6.5.3, "Contextual reference for a bean".</text>
</assertion>
-
- <assertion id="i">
- <text>Otherwise, obtain a contextual reference for the bean by calling |BeanManager.getReference()|, passing the |Bean| object representing the bean and the bean type or subtype, and return it.</text>
+
+ <assertion id="ja">
+ <text>The |iterator()| method must identify the set of beans that match the required type and required bindings and are accessible to the class into which the parent |Instance| was injected, according to the rules of typesafe resolution, as defined in Section 5.3, "Typesafe resolution".</text>
</assertion>
-
- <assertion id="j">
- <text>The |iterator()| method of the provided implementation of |Instance| must identify the set of beans by calling |BeanManager.getBeans()|, passing the type and bindings specified at the injection point. A child Instance passes the subtype, the bindings specified at the injection point and the additional bindings.</text>
+
+ <assertion id="ka">
+ <text>The |iterator()| method must return an |Iterator|, that iterates over the set of contextual references for the resulting beans and required type, as defined in Section 6.5.3, "Contextual reference for a bean".</text>
</assertion>
-
- <assertion id="k">
- <text>The |iterator()| method of the provided implementation of |Instance| must return an |Iterator|, that iterates over the set of contextual references for the resulting beans by calling |BeanManager.getReference()|, passing the |Bean| object representing the current bean and the bean type or subtype.</text>
- </assertion>
- </section>
-
- <section id="5.5.2" title="The built-in Instance">
+
+ <assertion id="l">
+ <text>The method |isUnsatisfied()| returns true if there is no bean that matches the required type and bindings, or false otherwise.</text>
+ </assertion>
+
+ <assertion id="m">
+ <text>The method |isAmbiguous()| returns true if there is more than one bean that matches the required type and bindings, or false otherwise.</text>
+ </assertion>
+ </section>
+
+ <section id="5.7.2" title="The built-in Instance">
<assertion id="a">
<text>The container must provide a built-in bean with |Instance<X>| for every legal bean type X in its set of bean types</text>
</assertion>
-
+
<assertion id="b">
<text>The container must provide a built-in bean with every binding type in its set of binding types.</text>
</assertion>
-
- <assertion id="c">
- <text>The container must provide a built-in bean with deployment type @Standard.</text>
- </assertion>
-
+
<assertion id="d">
<text>The container must provide a built-in bean with scope @Dependent.</text>
</assertion>
-
+
<assertion id="e">
<text>The container must provide a built-in bean with no bean EL name.</text>
</assertion>
-
+
<assertion id="f">
<text>The container must provide a built-in bean with an implementation provided automatically by the container. </text>
</assertion>
-
+
<assertion id="g">
<text>The built-in implementation must be a passivation capable dependency, as defined in Section 6.6.2, "Passivation capable dependencies".</text>
</assertion>
</section>
-
- <section id="5.5.3" title="Using AnnotationLiteral">
- <assertion id="a">
- <text>When the application calls select(), it may pass instances of binding annotation types.</text>
- </assertion>
+
+ <section id="5.7.3" title="Using AnnotationLiteral and TypeLiteral">
+
</section>
-
- <section id="5.6" title="Integration with Unified EL">
+
+ <section id="5.8" title="Integration with Unified EL">
<assertion id="aaa">
- <text>The container must provide a Unified EL ELResolver to the servlet engine ~and JSF implementation~ that resolves bean EL names using the name resolution algorithm defined in Section 5.2 "EL name resolution algorithm".</text>
+ <text>The container must provide a Unified EL ELResolver to the servlet engine ~and JSF implementation~ that resolves bean EL names using the rules of name resolution algorithm defined in Section 5.4 "EL name resolution" and resolving ambiguities according to Section 5.4.1, "Ambiguous EL names".</text>
<note>This is testable implicitly by trying to resolve using EL from a servlet</note>
</assertion>
-
+
<assertion id="aba">
- <text>The container must provide a Unified EL |ELResolver| to the ~servlet engine~ and JSF implementation that resolves bean EL names using the name resolution algorithm defined in Section 5.2 "EL name resolution algorithm".</text>
+ <text>The container must provide a Unified EL |ELResolver| to the ~servlet engine~ and JSF implementation that resolves bean EL names using the rules of name resolution algorithm defined in Section 5.4 "EL name resolution" and resolving ambiguities according to Section 5.4.1, "Ambiguous EL names".</text>
<note>This is testable implicitly by trying to resolve using EL from a JSF view</note>
</assertion>
-
- <assertion id="ba">
- <text>If a name used in an EL expression resolves to more than one bean, the |ELResolver| must throw an |AmbiguousResolutionException|.</text>
- </assertion>
-
+
<assertion id="bb">
<text>If a name used in an EL expression does not resolve to any bean, the |ELResolver| must return a null value.</text>
</assertion>
-
+
<assertion id="bc">
<text>Otherwise, if a name used in an EL expression resolves to exactly one bean, the |ELResolver| must return a contextual instance of the bean, as defined in Section 6.5.2, "Contextual instance of a bean".</text>
</assertion>
-
+
<assertion id="c">
<text>For each distinct name that appears in the EL expression, the resolver must be called at most once. Even if a name appears more than once in the same expression, the container may not call the resolver multiple times with that name. This restriction ensures that there is a unique instance of each bean with scope |@Dependent| in any EL evaluation.</text>
</assertion>
</section>
-
- <section id="6" title="Scopes and contexts">
-
+
+ <section id="6" title="Scopes and contexts">
+
</section>
-
+
<section id="6.1" title="The Contextual interface">
- <assertion id="a">
- <text>The container and portable extensions may define implementations of the Contextual interface that do not extend |Bean|, but it is not recommended that applications directly implement |Contextual|.</text>
+ <assertion id="a0">
+ <text>If an exception occurs while creating an instance, the exception is rethrown by the |create()| method. If the exception is a checked exception, it must be wrapped and rethrown as an (unchecked) |CreationException|.</text>
</assertion>
- </section>
-
- <section id="6.1.1" title="Instance creation">
- <assertion id="a">
- <text>The |Contextual.create()| method is responsible for creating new contextual instances of the type.</text>
+
+ <assertion id="a1">
+ <text>If an exception occurs while destroying an instance, the exception must be caught by the |destroy()| method.</text>
</assertion>
-
- <assertion id="b">
- <text>If any exception occurs while creating an instance, the exception is rethrown by the |create()| method. If the exception is a checked exception, it is wrapped and rethrown as an (unchecked) |CreationException|.</text>
+
+ <assertion id="a2">
+ <text>If the application invokes a contextual instance after it has been destroyed, the behavior is undefined.</text>
</assertion>
-
- <assertion id="c">
- <text>The interface |javax.enterprise.context.spi.CreationalContext| provides an operation that allows the |create()| method to register an incompletely initialized contextual instance with the container. A contextual instance is considered incompletely initialized until the create() method returns the instance.</text>
+
+ <assertion id="a">
+ <text>The container and portable extensions may define implementations of the |Contextual| interface that do not extend |Bean|, but it is not recommended that applications directly implement |Contextual|.</text>
</assertion>
-
+ </section>
+
+ <section id="6.1.1" title="The CreationalContext interface">
+ <assertion id="ca">
+ <text>The interface |javax.enterprise.context.spi.CreationalContext| provides operations that are used by the |Contextual| implementation during instance creation and destruction.</text>
+ </assertion>
+
<assertion id="d">
- <text>The method |push()| registers the incompletely initialized instance.</text>
+ <text>|push()| registers an incompletely initialized contextual instance with the container. A contextual instance is considered incompletely initialized until it is returned by the |create()| method.</text>
</assertion>
-
+
<assertion id="e">
- <text>If |create()| calls |CreationalContext.push()|, it must also return the instance passed to |push()|.</text>
+ <text>|release()| destroys all dependent objects, as defined in Section 6.4.1, "Dependent objects", of the instance which is being destroyed, by passing each dependent object to the |destroy()| method of its |Contextual| object.</text>
</assertion>
- </section>
-
- <section id="6.1.2" title="Instance destruction">
- <assertion id="a">
- <text>The |Contextual.destroy()| method is responsible for destroying instances of the type. In particular, it is responsible for destroying all dependent objects of an instance, as defined in Section 6.4.3, "Dependent object destruction". If any exception occurs while destroying an instance, the exception is caught by the |destroy()| method.</text>
+
+ <assertion id="f" testable="false">
+ <text>The implementation of |Contextual| is not required to call |push()|. However, for certain bean scopes, invocation of |push()| between instantiation and injection helps the container minimize the use of client proxy objects (which would otherwise be required to allow circular dependencies).</text>
</assertion>
+
+ <assertion id="g">
+ <text>If |Contextual.create()| calls |push()|, it must also return the instance passed to |push()|.</text>
+ </assertion>
+
+ <assertion id="h">
+ <text>|Contextual.create()| should use the given |CreationalContext| when obtaining contextual references to inject, as defined in Section 6.5.3, "Contextual reference for a bean", in order to ensure that any dependent objects are associated with the contextual instance that is being created.</text>
+ </assertion>
+
+ <assertion id="i">
+ <text>|Contextual.destroy()| should call |release()| to allow the container to destroy dependent objects of the contextual instance.</text>
+ </assertion>
</section>
-
- <section id="6.2" title="The Context interface">
+
+ <section id="6.2" title="The Context interface">
<assertion id="aa">
<text>The |javax.enterprise.context.spi.Context| interface provides an operation for obtaining contextual instances with a particular scope of any contextual type.</text>
</assertion>
+ <assertion id="ab">
+ <text>The method |getScopeType()| returns the scope type of the context object.</text>
+ </assertion>
+
<assertion id="ha">
<text>When a context object is active the |isActive()| method returns |true|. Otherwise, we say that the context object is inactive and the |isActive()| method returns false.</text>
</assertion>
-
+
<assertion id="j">
<text>The |Context.get()| method may either return an existing instance of the given contextual type, ~or if no |CreationalContext| is given, return a null value, or if a |CreationalContext| is given, create a new instance of the given contextual type by calling |Contextual.create() and return the new instance~.</text>
- </assertion>
-
+ </assertion>
+
<assertion id="k">
<text>The |Context.get()| method may either ~return an existing instance of the given contextual type~, or if no |CreationalContext| is given, return a null value, ~or if a |CreationalContext| is given, create a new instance of the given contextual type by calling |Contextual.create() and return the new instance~.</text>
</assertion>
-
+
<assertion id="l">
<text>The |Context.get()| method may either ~return an existing instance of the given contextual type, or if no |CreationalContext| is given, return a null value~, or if a |CreationalContext| is given, create a new instance of the given contextual type by calling |Contextual.create() and return the new instance.</text>
</assertion>
-
+
<assertion id="m">
<text>If the context object is inactive, the |get()| method must throw a |ContextNotActiveException|.</text>
</assertion>
-
+
<assertion id="na">
<text>The |get()| method may not return a null value _unless no |CreationalContext| is given_, or |Contextual.create()| returns a null value.</text>
</assertion>
-
+
<assertion id="nb">
<text>The |get()| method may not return a null value unless no |CreationalContext| is given, or _|Contextual.create()| returns a null value_.</text>
</assertion>
-
+
<assertion id="o">
<text>The |get()| method may not create a new instance of the given contextual type unless a |CreationalContext| is given.</text>
</assertion>
-
+
<assertion id="p">
<text>The context object is responsible for destroying any contextual instance it creates by passing the instance to the |destroy()|
method of the Contextual object representing the contextual type.</text>
</assertion>
-
+
<assertion id="q">
<text> A destroyed instance must not subsequently be returned by the |get()| method.</text>
</assertion>
- </section>
-
+
+ <assertion id="r">
+ <text>The context object must pass the same instance of |CreationalContext| to |Contextual.destroy()| that it passed to |Contextual.create()| when it created the instance.</text>
+ </assertion>
+ </section>
+
<section id="6.3" title="Normal scopes and pseudo-scopes">
<assertion id="a" testable="false">
<text>There may be no more than one mapped instance of a context object per contextual type per thread</text>
<note>Not testable through API</note>
</assertion>
-
+
<assertion id="b" testable="false">
<text>A context may be associated with one or more threads</text>
<note>A statement of intent</note>
</assertion>
-
+
<assertion id="c">
<text>The |get()| operation of the |Context| object for an active normal scope returns the current instance of the given contextual type</text>
</assertion>
-
+
<assertion id="d">
<text>When a context is destroyed, all mapped instances belonging to that context are destroyed by passing them to the |Contextual.destroy()| method.</text>
</assertion>
-
+
<assertion id="e">
<text>Contexts with normal scopes must obey the following rule: Suppose beans A, B and Z all have normal scopes. Suppose A has an injection point x, and B has an injection point y. Suppose further that both x and y resolve to bean Z according to the typesafe resolution algorithm. If a is the current instance of A, and b is the current instance of B, then both a.x and b.y refer to the same instance of Z. This instance is the current instance of Z.</text>
</assertion>
-
+
<assertion id="f" testable="false">
<text>All pseudo-scopes must be explicitly declared |@ScopeType(normal=false)|, to indicate to the container that no client proxy is required</text>
<note>A statement of intent</note>
</assertion>
-
+
<assertion id="g" testable="false">
<text>All scopes defined by this specification, except for the |@Dependent| pseudo-scope, are normal scopes</text>
<note>A statement of intent</note>
</assertion>
</section>
- <section id="6.4" title="Dependent pseudo-scope">
+ <section id="6.4" title="Dependent pseudo-scope">
<assertion id="a">
<text>When a bean is declared to have |@Dependent| scope, no injected instance of the bean is ever shared between multiple injection points</text>
</assertion>
-
+
<assertion id="b">
<text>When a bean is declared to have |@Dependent| scope, any injected instance of the bean is bound to the lifecycle of the bean, servlet or EJB into which it is injected</text>
</assertion>
-
+
<assertion id="c">
<text>When a bean is declared to have |@Dependent| scope, any instance of the bean that is used to evaluate a Unified EL expression exists to service that evaluation only</text>
</assertion>
-
+
<assertion id="da">
- <text>When a bean is declared to have |@Dependent| scope, any instance of the bean that receives a producer method~, producer field, disposal method or observer method~ invocation exists to service that invocation only</text>
+ <text>When a bean is declared to have |@Dependent| scope, any instance of the bean that receives a producer method~, producer field, disposer method or observer method~ invocation exists to service that invocation only</text>
</assertion>
-
+
<assertion id="db">
- <text>When a bean is declared to have |@Dependent| scope, any instance of the bean that receives a ~producer method,~ producer field~, disposal method or observer method~ invocation exists to service that invocation only</text>
+ <text>When a bean is declared to have |@Dependent| scope, any instance of the bean that receives a ~producer method,~ producer field~, disposer method or observer method~ invocation exists to service that invocation only</text>
</assertion>
-
+
<assertion id="dc">
- <text>When a bean is declared to have |@Dependent| scope, any instance of the bean that receives a ~producer method, producer field,~ disposal method ~or observer method~ invocation exists to service that invocation only</text>
+ <text>When a bean is declared to have |@Dependent| scope, any instance of the bean that receives a ~producer method, producer field,~ disposer method ~or observer method~ invocation exists to service that invocation only</text>
</assertion>
-
+
<assertion id="dd">
- <text>When a bean is declared to have |@Dependent| scope, any instance of the bean that receives a ~producer method, producer field, disposal method or~ observer method invocation exists to service that invocation only</text>
+ <text>When a bean is declared to have |@Dependent| scope, any instance of the bean that receives a ~producer method, producer field, disposer method or~ observer method invocation exists to service that invocation only</text>
</assertion>
-
+
<assertion id="e">
<text>Every invocation of the |get()| operation of the |Context| object for the |@Dependent| scope with a |CreationalContext| returns a new instance of the given bean</text>
</assertion>
-
+
<assertion id="f">
<text>Every invocation of the |get()| operation of the |Context| object for the |@Dependent| scope with no |CreationalContext| returns a null value</text>
</assertion>
+
+ <assertion id="g">
+ <text>The |@Dependent| scope is always active.</text>
+ </assertion>
</section>
-
- <section id="6.4.1" title="Dependent scope lifecycle">
-
- <assertion id="ga">
- <text>The |@Dependent| scope is inactive ~except when an instance of a bean with scope |@Dependent| is created by the container to receive a producer method, producer field, disposal method or observer method ~invocation</text>
- <note>Assertions g through k are all related and should be treated as "or" conditions</note>
+
+ <section id="6.4.1" title="Dependent objects">
+ <assertion id="a">
+ <text>Instances of interceptors or decorators with scope |@Dependent| are dependent objects of the bean instance they decorate.</text>
</assertion>
-
- <assertion id="gb">
- <text>The |@Dependent| scope is inactive except when an instance of a bean with scope |@Dependent| is created by the container to receive a producer method~, producer field, disposal method or observer method ~invocation</text>
- <note>Assertions g through k are all related and should be treated as "or" conditions</note>
+
+ <assertion id="g">
+ <text>An instance of a bean with scope |@Dependent| injected into a field, bean constructor or initializer method is a dependent object of the bean or Java EE component class instance into which it was injected.</text>
</assertion>
- <assertion id="gc">
- <text>The |@Dependent| scope is inactive except when an instance of a bean with scope |@Dependent| is created by the container to receive a ~producer method,~ producer field~, disposal method or observer method ~invocation</text>
- <note>Assertions g through k are all related and should be treated as "or" conditions</note>
- </assertion>
-
- <assertion id="gd">
- <text>The |@Dependent| scope is inactive except when an instance of a bean with scope |@Dependent| is created by the container to receive a ~producer method, producer field,~ disposal method ~or observer method ~invocation</text>
- <note>Assertions g through k are all related and should be treated as "or" conditions</note>
- </assertion>
-
- <assertion id="ge">
- <text>The |@Dependent| scope is inactive except when an instance of a bean with scope |@Dependent| is created by the container to receive a ~producer method, producer field, disposal method or~ observer method ~invocation</text>
- <note>Assertions g through k are all related and should be treated as "or" conditions</note>
- </assertion>
-
<assertion id="h">
- <text>The |@Dependent| scope is inactive except while a Unified EL expression is evaluated</text>
+ <text>An instance of a bean with scope |@Dependent| injected into a producer method is a dependent object of the producer method bean instance that is being produced.</text>
</assertion>
<assertion id="i">
- <text>The |@Dependent| scope is inactive except while an observer method is invoked</text>
+ <text>An instance of a bean with scope |@Dependent| obtained by direct invocation of an |Instance| is a dependent object of the instance of |Instance|.</text>
</assertion>
-
- <assertion id="ja">
- <text>The |@Dependent| scope is inactive except when the container is creating ~or destroying~ a contextual instance of a bean~, injecting its dependencies, invoking its observer methods, or invoke its |@PostConstruct| or |@PreDestroy| callback.~</text>
- </assertion>
-
- <assertion id="jb">
- <text>The |@Dependent| scope is inactive except when the container is ~creating or~ destroying a contextual instance of a bean, ~injecting its dependencies, invoking its observer methods, or invoke its |@PostConstruct| or |@PreDestroy| callback.~</text>
- </assertion>
-
- <assertion id="jc">
- <text>The |@Dependent| scope is inactive except when the container is ~creating or destroying a contextual instance of a bean,~ injecting its dependencies, ~invoking its observer methods, or invoke its |@PostConstruct| or |@PreDestroy| callback.~</text>
- </assertion>
-
- <assertion id="jd">
- <text>The |@Dependent| scope is inactive except when the container is ~creating or destroying a contextual instance of a bean, injecting its dependencies,~ invoking its observer methods, ~or invoke its |@PostConstruct| or |@PreDestroy| callback.~</text>
- </assertion>
-
- <assertion id="je">
- <text>The |@Dependent| scope is inactive except when the container is ~creating or destroying a contextual instance of a bean, injecting its dependencies, invoking its observer methods, or~ invoke its |@PostConstruct|~ or |@PreDestroy|~ callback.</text>
- </assertion>
-
- <assertion id="jf">
- <text>The |@Dependent| scope is inactive except when the container is ~creating or destroying a contextual instance of a bean, injecting its dependencies, invoking its observer methods, or~ invoke ~its |@PostConstruct| or~ |@PreDestroy| callback.</text>
- </assertion>
-
- <assertion id="ka">
- <text>The |@Dependent| scope is inactive except when the container is injecting dependencies ~or invoking the |@PostConstruct| or |@PreDestroy| callback~ of a Java EE component class supporting injection.</text>
- </assertion>
-
- <assertion id="kb">
- <text>The |@Dependent| scope is inactive except when the container is ~injecting dependencies or~ invoking the |@PostConstruct| ~or |@PreDestroy|~ callback of a Java EE component class supporting injection.</text>
- </assertion>
-
- <assertion id="kc">
- <text>The |@Dependent| scope is inactive except when the container is ~injecting dependencies or~ invoking the ~|@PostConstruct| or~ |@PreDestroy| callback of a Java EE component class supporting injection.</text>
- </assertion>
-
- <assertion id="la">
- <text>The |@Dependent| scope is inactive except when |Instance.get()|, |Instance.iterator()| or |BeanManager.getReference()| is invoked upon an instance of |Instance| or |BeanManager| injected by the container into a bean or other Java EE component class supporting injection.</text>
- </assertion>
-
- <assertion id="n">
- <text>The |@Dependent| scope is not active when |Instance.get()|, |Instance.iterator()| or |BeanManager.getReference()| is invoked upon an instance of |Instance| or |BeanManager| that was not injected by the container.</text>
- </assertion>
</section>
-
- <section id="6.4.2" title="Dependent objects">
- <assertion id="a">
- <text>Instances of interceptors or decorators with scope |@Dependent| are dependent objects of the bean instance they intercept or decorate.</text>
- </assertion>
-
- <assertion id="b">
- <text>An instance of a bean with scope |@Dependent| injected into a field, bean constructor, initializer method or observer method is a dependent object of the bean or Java EE component class instance into which it was injected.</text>
- </assertion>
-
- <assertion id="c">
- <text>An instance of a bean with scope |@Dependent| injected into a producer method or disposal method is a dependent object of the producer method bean instance that is being produced or disposed.</text>
- </assertion>
-
- <assertion id="d">
- <text>An instance of a bean with scope |@Dependent| obtained by direct invocation of |BeanManager| or |Instance| during invocation of a bean constructor, initializer method, observer method, |@PostConstruct| or |@PreDestroy| callback is a dependent object of the bean or Java EE component class instance upon which the method is being invoked.</text>
- </assertion>
-
- <assertion id="e">
- <text>An instance of a bean with scope |@Dependent| obtained by direct invocation of |BeanManager| or |Instance| during invocation of a producer method or disposal method is a dependent object of the producer method bean instance that is being produced or disposed.</text>
- </assertion>
-
- <assertion id="f">
- <text>Otherwise, an instance of a bean with scope |@Dependent| obtained by direct invocation of an instance of |Instance| or |BeanManager| that was injected by the container into a bean or Java EE component class instance is a dependent object of the bean or Java EE component class instance. </text>
- </assertion>
- </section>
- <section id="6.4.3" title="Dependent object destruction">
- <assertion id="a">
- <text>The container must destroy all dependent objects of a contextual bean instance when the instance is destroyed</text>
+ <section id="6.4.2" title="Dependent object destruction">
+ <assertion id="aaa">
+ <text>The container must ensure that all dependent objects of a non-contextual instance of a bean or other Java EE component class are destroyed when the instance is destroyed by the container.</text>
</assertion>
- <assertion id="baa">
- <text>The container must destroy all dependent objects of a non-contextual instance of a bean or instance of other Java EE component class when the instance is destroyed.</text>
+ <assertion id="bbb">
+ <text>The container must ensure that all |@Dependent| scoped contextual instances injected into method parameters of an observer method of any container lifecycle event, as defined in Section 11.5, "Container lifecycle events", is destroyed after all observers of the |BeforeShutdown| event complete.</text>
</assertion>
- <assertion id="c">
- <text>The container must destroy all |@Dependent| scoped contextual instances created during an EL expression evaluation when the evaluation completes</text>
+ <assertion id="ccc">
+ <text>The container must ensure that all |@Dependent| scoped contextual instances injected into method parameters of a disposer method or observer method of any other event are destroyed when the invocation completes.</text>
</assertion>
- <assertion id="da">
- <text>The container must destroy any |@Dependent| scoped contextual instance created to receive a producer method~, producer field, disposal method or observer method~ invocation when the invocation completes</text>
+ <assertion id="ddd">
+ <text>The container must ensure that any |@Dependent| scoped contextual instance created to receive a producer method, producer field, disposer method or observer method invocation is destroyed when the invocation completes.</text>
</assertion>
- <assertion id="db">
- <text>The container must destroy any |@Dependent| scoped contextual instance created to receive a ~producer method,~ producer field~, disposal method or observer method~ invocation when the invocation completes</text>
+ <assertion id="eee">
+ <text>The container must ensure that all |@Dependent| scoped contextual instances created during an EL expression evaluation are destroyed when the evaluation completes.</text>
</assertion>
-
- <assertion id="dc">
- <text>The container must destroy any |@Dependent| scoped contextual instance created to receive a ~producer method, producer field,~ disposal method ~or observer method~ invocation when the invocation completes</text>
- </assertion>
-
- <assertion id="dd">
- <text>The container must destroy any |@Dependent| scoped contextual instance created to receive a ~producer method, producer field, disposal method or~ observer method invocation when the invocation completes</text>
- </assertion>
-
+
<assertion id="e" testable="false">
- <text>The container is permitted to destroy any |@Dependent| scoped contextual instance at any time if the instance is no Scopes and contexts longer referenced by the application (excluding weak, soft and phantom references)</text>
+ <text>The container is permitted to destroy any |@Dependent| scoped contextual instance at any time if the instance is no longer referenced by the application (excluding weak, soft and phantom references)</text>
<note>In other words this is unspecified</note>
</assertion>
</section>
<section id="6.5" title="Contextual instances and contextual references">
-
+
</section>
-
+
<section id="6.5.1" title="The active context object for a scope">
<assertion id="a">
<text>From time to time, the container must obtain an active context object for a certain scope type. The container must search for an active instance of |Context| associated with the scope type. If no active context object exists for the scope type, the container throws a |ContextNotActiveException|.</text>
</assertion>
-
+
<assertion id="b">
<text>If more than one active context object exists for the given scope type, the container must throw an |IllegalStateException|.</text>
</assertion>
</section>
-
+
<section id="6.5.2" title="Contextual instance of a bean">
<assertion id="a">
- <text>From time to time, the container must obtain a contextual instance of a bean. The container must obtain the active context object for the bean scope, then obtain an instance of the bean by calling |Context.get()|, passing the |Bean| instance representing the bean and an instance of |CreationalContext|.</text>
+ <text>From time to time, the container must obtain a contextual instance of a bean. The container must obtain the active context object for the bean scope, then obtain an instance of the bean by calling |Context.get()|, passing the |Bean| instance representing the bean and an instance of |CreationalContext|.</text>
</assertion>
-
+
<assertion id="b">
- <text>From time to time, the container attempts to obtain a contextual instance of a bean that already exists, without creating a
-new contextual instance. The container must obtain the active context object for the bean scope, then obtain an instance of the bean by calling |Context.get()|, passing the |Bean| instance representing the bean without
-passing any instance of |CreationalContext|.</text>
+ <text>From time to time, the container attempts to obtain a contextual instance of a bean that already exists, without creating a new contextual instance. The container must determine if the scope of the bean is active and if it is, obtain the active context object for the bean scope, then attempt to obtain an instance of the bean by calling |Context.get()|, passing the |Bean| instance representing the bean without passing any instance of |CreationalContext|.</text>
</assertion>
+
+ <assertion id="c">
+ <text>IF the scope is not active, or if |Context.get()| returns a null value, there is no contextual instance that already exists.</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>For a custom implementation of the |Bean| interface defined in Section 11.1, "The Bean interface", the container calls |getScopeType()| to determine the bean scope.</text>
+ </assertion>
</section>
-
+
<section id="6.5.3" title="Contextual reference for a bean">
- <assertion id="a">
- <text>If the bean has a normal scope and the given bean type cannot be proxied by the container, as defined in Section 5.3.1, "Unproxyable bean types", the container throws an |UnproxyableResolutionException|.</text>
+ <assertion id="a0">
+ <text>Contextual references must be obtained with a given |CreationalContext|, allowing any instance of scope |@Dependent| that is created to be later destroyed.</text>
</assertion>
+ <assertion id="a">
+ <text>If the bean has a normal scope and the given bean type cannot be proxied by the container, as defined in Section 5.5.1, "Unproxyable bean types", the container throws an |UnproxyableResolutionException|.</text>
+ </assertion>
+
<assertion id="b">
- <text>If the bean has a normal scope, then the contextual reference for the bean is a client proxy, as defined in Section 5.3, "Client proxies", created by the container, that implements the given bean type and all bean types of the bean which are Java interfaces.</text>
+ <text>If the bean has a normal scope, then the contextual reference for the bean is a client proxy, as defined in Section 5.5, "Client proxies", created by the container, that implements the given bean type and all bean types of the bean which are Java interfaces.</text>
</assertion>
-
+
<assertion id="c">
- <text>If the bean has a pseudo-scope, the container must obtain a contextual instance of the bean.</text>
+ <text>If the bean has a pseudo-scope, the container must obtain a contextual instance of the bean. If the bean has scope |@Dependent|, the container must associate it with the |CreationalContext|.</text>
</assertion>
-
+
<assertion id="d">
<text>The container must ensure that every injection point of type |InjectionPoint| and binding |@Current| of any dependent object instantiated during this process receives an instance of |InjectionPoint| representing the injection point into which the dependent object will be injected, or a null value if it is not being injected into any injection point.</text>
- </assertion>
+ </assertion>
</section>
-
+
<section id="6.5.4" title="Contextual 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="6.6" title="Passivation and passivating scopes">
-
+
</section>
-
+
<section id="6.6.1" title="Passivation capable beans">
<assertion id="a">
<text>As defined by the EJB specification, all stateful session beans are passivation capable. Stateless and singleton session beans are not passivation capable.</text>
</assertion>
-
+
<assertion id="b">
- <text>A managed bean is passivation capable if and only if the bean class is serializable.</text>
+ <text>A managed bean is passivation capable if and only if the bean class is serializable and all interceptors and decorators of the bean are serializable.</text>
</assertion>
-
+
<assertion id="c">
<text>A producer method is passivation capable if and only if it never returns a value which is not passivation capable at runtime. A producer method with a return type that implements or extends serializable is passivation capable. A producer method with a return type that is declared final and does not implement |Serializable| is not passivation capable.</text>
</assertion>
-
+
<assertion id="d">
- <text>A producer field is passivation capable if and only if it never refers to a value which is not passivation capable at runtime. A producer field with a type that implements or extends serializable is passivation capable. A producer field with a type that is declared |final| and does not implement serializable is not passivation capable.</text>
+ <text>A producer field is passivation capable if and only if it never refers to a value which is not passivation capable at runtime. A producer field with a type that implements or extends |Serializable| is passivation capable. A producer field with a type that is declared |final| and does not implement |Serializable| is not passivation capable.</text>
</assertion>
+
+ <assertion id="ea">
+ <text>A custom implementation of Bean is passivation capable if it implements the interface |PassivationCapable|.</text>
+ </assertion>
- <assertion id="e">
- <text>A custom implementation of Bean is passivation capable if |isPassivationCapable()| returns true.</text>
+ <assertion id="f">
+ <text>An implementation of |Contextual| that is not a bean is passivation capable if it implements both |PassivationCapable| and |Serializable|.</text>
</assertion>
+
+ <assertion id="g">
+ <text>The |getId()| method must return a value that uniquely identifies the instance of |Bean| or |Contextual|. It is recommended that the string contain the package name of the class that implements |Bean| or |Contextual|.</text>
+ </assertion>
</section>
<section id="6.6.2" title="Passivation capable dependencies">
<assertion id="a">
<text>The container must guarantee that all session beans are passivation capable dependencies.</text>
- </assertion>
-
+ </assertion>
+
<assertion id="b">
<text>The container must guarantee that all beans with normal scope are passivation capable dependencies.</text>
- </assertion>
-
+ </assertion>
+
<assertion id="c">
<text>The container must guarantee that all passivation capable beans with scope |@Dependent| are passivation capable dependencies.</text>
- </assertion>
-
- <assertion id="d">
- <text>The container must guarantee that all resources and message destinations are passivation capable dependencies.</text>
- </assertion>
-
+ </assertion>
+
+ <assertion id="da">
+ <text>The container must guarantee that all resources are passivation capable dependencies.</text>
+ </assertion>
+
<assertion id="e">
<text>The container must guarantee that the built-in beans of type |Instance|, |Event|, |InjectionPoint| and |BeanManager| are passivation capable dependencies.</text>
- </assertion>
-
- <assertion id="f">
- <text>A custom implementation of |Bean| is a passivation capable dependency if |isPassivationCapable()| returns |true| or |getScopeType()| returns a normal scope type.</text>
- </assertion>
+ </assertion>
+
+ <assertion id="fa">
+ <text>A custom implementation of |Bean| is a passivation capable dependency if it implements |PassivationCapable| or if |getScopeType()| returns a normal scope type.</text>
+ </assertion>
</section>
-
+
<section id="6.6.3" title="Passivating scopes">
+ <assertion id="a">
+ <text>A passivating scope requires that beans with the scope are passivation capable, and implementations of |Contextual| passed to any context object for the scope are passivation capable.</text>
+ </assertion>
-
+ <assertion id="b">
+ <text>Passivating scopes must be explicitly declared |@ScopeType(passivating=true)|.</text>
+ </assertion>
</section>
<section id="6.6.4" title="Validation of passivation capable beans and dependencies">
- <assertion id="aa">
- <text>If a managed bean which declares a passivating scope is not passivation capable~, or has a non-transient injected field, bean constructor parameter or initializer method parameter that does not resolve to a passivation capable dependency, ~then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ <assertion id="aaa">
+ <text>If a managed bean which declares a passivating scope is not passivation capable, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
- <assertion id="ab">
- <text>If a managed bean which ~declares a passivating scope is not passivation capable, or~ has a non-transient injected field~, bean constructor parameter or initializer method parameter~ that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ <assertion id="aab">
+ <text>If a managed bean which declares a passivating scope has a non-transient injected field, bean constructor parameter or initializer method parameter that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
- <assertion id="ac">
- <text>If a managed bean which ~declares a passivating scope is not passivation capable, or~ has a non-transient ~injected field~, bean constructor parameter or ~initializer method parameter~ that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ <assertion id="aac">
+ <text>If a managed bean which declares a passivating scope has an interceptor or decorator with a non-transient injected field, bean constructor parameter or initializer method parameter that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
- <assertion id="ad">
- <text>If a managed bean which ~declares a passivating scope is not passivation capable, or~ has a non-transient ~injected field, bean constructor parameter or~ initializer method parameter that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
- </assertion>
-
+
<assertion id="ba">
<text>If a stateful session bean has a non-transient injected field~, bean constructor parameter or initializer method parameter~ that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="bb">
<text>If a stateful session bean has a non-transient ~injected field,~ bean constructor parameter ~or initializer method parameter~ that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="bc">
<text>If a stateful session bean has a non-transient~ injected field, bean constructor parameter or~ initializer method parameter that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
+ <assertion id="bd">
+ <text>If a stateful session bean has an interceptor or decorator with a non-transient injected field, bean constructor parameter or initializer method parameter that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ </assertion>
+
<assertion id="c">
<text>If a producer method declares a passivating scope and the container is able to determine that it is not passivation capable by inspecting its return type, or has a parameter that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="d">
<text>If a producer field declares a passivating scope and the container is able to determine that it is not passivation capable by inspecting its type, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4,
"Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="e">
<text>If a producer method or field which declares a passivating scope returns an unserializable object at runtime, the container must
throw an |IllegalProductException|.</text>
@@ -2622,15 +2592,15 @@
<assertion id="f">
<text>If a producer method or field of scope |@Dependent| returns an unserializable object for injection into an injection point that requires a passivation capable dependency, the container must throw an |IllegalProductException|</text>
</assertion>
-
+
<assertion id="g">
<text>For a custom implementation of |Bean|, the container calls |getInjectionPoints()| to determine the injection points, and
|InjectionPoint.isTransient()| to determine whether the injected point is a transient field.</text>
</assertion>
-
+
<assertion id="h">
<text>If a bean which declares a passivating scope type, or any stateful session bean, has a decorator which is not a passivation capable dependency, the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
- </assertion>
+ </assertion>
</section>
<section id="6.7" title="Context management for built-in scopes">
@@ -2638,159 +2608,168 @@
<text>The built-in context object is active during servlet, web service and EJB invocations, or in the case of the conversation context object, for JSF requests.</text>
</assertion>
</section>
-
+
<section id="6.7.1" title="Request context lifecycle">
<assertion id="aa">
- <text>The request scope is active during the |service()| method of any servlet in the web application~ and during the |doFilter()| method of any servlet filter.~</text>
+ <text>The request scope is active during the |service()| method of any servlet in the web application~, during the |doFilter()| method of any servlet filter and when the container calls any |ServletRequestListener| or |AsyncListener|.~</text>
</assertion>
-
+
<assertion id="ab">
- <text>The request scope is active ~during the |service()| method of any servlet in the web application and~ during the |doFilter()| method of any servlet filter.</text>
+ <text>The request scope is active ~during the |service()| method of any servlet in the web application~, during the |doFilter()| method of any servlet filter and when the container calls any |ServletRequestListener| or |AsyncListener|.</text>
</assertion>
-
- <assertion id="ba">
- <text>The request context is destroyed at the end of the servlet request, after the |service()| method ~and all |doFilter()| methods~ return.</text>
- </assertion>
-
- <assertion id="bb">
- <text>The request context is destroyed at the end of the servlet request, after ~the |service()| method and~ all |doFilter()| methods return.</text>
- </assertion>
-
+
<assertion id="c">
<text>The request scope is active during any Java EE web service invocation.</text>
</assertion>
- <assertion id="d">
- <text>The request context is destroyed after the web service invocation completes.</text>
- </assertion>
-
<assertion id="e">
<text>The request scope is active during any asynchronous observer method notification.</text>
</assertion>
- <assertion id="f">
- <text>The request context is destroyed after the notification completes</text>
- </assertion>
-
<assertion id="ga">
<text>The request scope is active during any remote method invocation of any EJB,~ during any asynchronous method invocation of any EJB, during any call to an EJB timeout method and during message delivery to any EJB message-driven bean.~</text>
- </assertion>
-
+ </assertion>
+
<assertion id="gb">
<text>The request scope is active ~during any remote method invocation of any EJB~, during any asynchronous method invocation of any EJB, ~during any call to an EJB timeout method and during message delivery to any EJB message-driven bean.~</text>
</assertion>
-
+
<assertion id="gc">
<text>The request scope is active ~during any remote method invocation of any EJB, during any asynchronous method invocation of any EJB,~ during any call to an EJB timeout method ~and during message delivery to any EJB message-driven bean~.</text>
</assertion>
-
+
<assertion id="gd">
<text>The request scope is active ~during any remote method invocation of any EJB, during any asynchronous method invocation of any EJB, during any call to an EJB timeout method and~ during message delivery to any EJB message-driven bean.</text>
</assertion>
- <assertion id="ha">
- <text>The request context is destroyed after the remote method invocation,~ asynchronous method invocation, timeout or message delivery completes~.</text>
+ <assertion id="ge">
+ <text>The request scope is active during any message delivery to a |MessageListener| for a JMS topic or queue obtained from the Java EE component environment.</text>
+ </assertion>
+
+ <assertion id="baa">
+ <text>The request context is destroyed at the end of the servlet request, after the |service()| method ~and all |doFilter()| methods~, and all |requestDestroyed()| and |onComplete()| notifications return.</text>
</assertion>
+
+ <assertion id="bba">
+ <text>The request context is destroyed at the end of the servlet request, after ~the |service()| method and~ all |doFilter()| methods, and all |requestDestroyed()| and |onComplete()| notifications return.</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>The request context is destroyed after the web service invocation completes.</text>
+ </assertion>
+
+ <assertion id="fa">
+ <text>The request context is destroyed after the asynchronous observer notification completes</text>
+ </assertion>
+ <assertion id="ha">
+ <text>The request context is destroyed after the EJB remote method invocation,~ asynchronous method invocation, timeout or message delivery completes~.</text>
+ </assertion>
+
<assertion id="hb">
- <text>The request context is destroyed after the ~remote method invocation,~ asynchronous method invocation~, timeout or message delivery completes~.</text>
+ <text>The request context is destroyed after the ~EJB remote method invocation,~ asynchronous method invocation~, timeout or message delivery completes~.</text>
</assertion>
-
+
<assertion id="hc">
- <text>The request context is destroyed after the ~remote method invocation, asynchronous method invocation,~ timeout~ or message delivery completes~.</text>
+ <text>The request context is destroyed after the ~EJB remote method invocation, asynchronous method invocation,~ timeout~ or message delivery completes~.</text>
</assertion>
-
+
<assertion id="hd">
- <text>The request context is destroyed after the ~remote method invocation, asynchronous method invocation, timeout or~ message delivery completes.</text>
+ <text>The request context is destroyed after the ~EJB remote method invocation, asynchronous method invocation, timeout or~ message delivery completes.</text>
</assertion>
-
-
+
+ <assertion id="i">
+ <text>The request context is destroyed after the message delivery to the |MessageListener| completes.</text>
+ </assertion>
</section>
-
+
<section id="6.7.2" title="Session context lifecycle">
<assertion id="aa">
- <text>The session scope is active during the |service()| method of any servlet in the web application ~and during the |doFilter()| method of any servlet filter~.</text>
+ <text>The session scope is active during the |service()| method of any servlet in the web application ~, during the |doFilter()| method of any servlet filter~ and when the container calls any |HttpSessionListener|, |AsyncListener| or |ServletRequestListener|.</text>
</assertion>
-
+
<assertion id="ab">
- <text>The session scope is active ~during the |service()| method of any servlet in the web application and~ during the |doFilter()| method of any servlet filter.</text>
+ <text>The session scope is active ~during the |service()| method of any servlet in the web application~, during the |doFilter()| method of any servlet filter and when the container calls any |HttpSessionListener|, |AsyncListener| or |ServletRequestListener|.</text>
</assertion>
-
+
<assertion id="b">
<text>The session context is shared between all servlet requests that occur in the same HTTP servlet session.</text>
</assertion>
-
- <assertion id="c">
- <text>The session context is destroyed when the |HTTPSession| is invalidated ~or times out~.</text>
+
+ <assertion id="ca">
+ <text>The session context is destroyed when the |HTTPSession| times out, after all |HttpSessionListener|s have been called, and at the very end of any request in which |invalidate()| was called, after all filters and |ServletRequestListeners| have been called.</text>
</assertion>
-
- <assertion id="d">
- <text>The session context is destroyed when the |HTTPSession| ~is invalidated or~ times out.</text>
- </assertion>
-
</section>
-
+
<section id="6.7.3" title="Application context lifecycle">
<assertion id="aa">
- <text>The application scope is active during the |service()| method of any servlet in the web application ~and during the |doFilter()| method of any servlet filter.~</text>
+ <text>The application scope is active during the |service()| method of any servlet in the web application ~, during the |doFilter()| method of any servlet filter and when the container calls any |ServletContextListener|, |HttpSessionListener|, |AsyncListener| or |ServletRequestListener|.~</text>
</assertion>
-
+
<assertion id="ab">
- <text>The application scope is active during ~the |service()| method of any servlet in the web application and during~ the |doFilter()| method of any servlet filter.</text>
+ <text>The application scope is active during ~the |service()| method of any servlet in the web application, during~ the |doFilter()| method of any servlet filter and when the container calls any |ServletContextListener|, |HttpSessionListener|, |AsyncListener| or |ServletRequestListener|.~</text>
</assertion>
-
+
<assertion id="b">
<text>The application scope is active during any Java EE web service invocation.</text>
</assertion>
-
+
<assertion id="c">
<text>The application scope is active during any asynchronous observer method notification.</text>
</assertion>
-
+
<assertion id="da">
<text>The application scope is also active during any remote method invocation of any EJB~, during any asynchronous method invocation of any EJB, during any call to an EJB timeout method and during message delivery to any EJB message-driven bean.</text>
</assertion>
-
+
<assertion id="db">
<text>The application scope is also active ~during any remote method invocation of any EJB~, during any asynchronous method invocation of any EJB~, during any call to an EJB timeout method and during message delivery to any EJB message-driven bean.~</text>
</assertion>
-
+
<assertion id="dc">
<text>The application scope is also active ~during any remote method invocation of any EJB, during any asynchronous method invocation of any EJB,~ during any call to an EJB timeout method~ and during message delivery to any EJB message-driven bean.~</text>
</assertion>
-
+
<assertion id="dd">
<text>The application scope is also active ~during any remote method invocation of any EJB, during any asynchronous method invocation of any EJB, during any call to an EJB timeout method and~ during message delivery to any EJB message-driven bean.</text>
</assertion>
+ <assertion id="de">
+ <text>The application scope is active during any message delivery to a |MessageListener| for a JMS topic or queue obtained from the Java EE component environment.</text>
+ </assertion>
+
+ <assertion id="df">
+ <text>The application scope is active when the disposer method or |@PreDestroy| callback of any bean with any normal scope other than |@ApplicationScoped| is called.</text>
+ </assertion>
+
<assertion id="ea">
<text>The application context is shared between all servlet requests~, asynchronous observer method notifications, web service invocations, EJB remote method invocations, EJB asynchronous method invocations, EJB timeouts and message deliveries to message driven beans ~that execute within the same application.</text>
</assertion>
-
+
<assertion id="eb">
<text>The application context is shared between all ~servlet requests,~ asynchronous observer method notifications~, web service invocations, EJB remote method invocations, EJB asynchronous method invocations, EJB timeouts and message deliveries to message driven beans ~that execute within the same application.</text>
</assertion>
-
+
<assertion id="ec">
<text>The application context is shared between all ~servlet requests, asynchronous observer method notifications,~ web service invocations~, EJB remote method invocations, EJB asynchronous method invocations, EJB timeouts and message deliveries to message driven beans ~that execute within the same application~.</text>
</assertion>
-
+
<assertion id="ed">
<text>The application context is shared between all ~servlet requests, asynchronous observer method notifications, web service invocations,~ EJB remote method invocations~, EJB asynchronous method invocations, EJB timeouts and message deliveries to message driven beans ~that execute within the same application~.</text>
</assertion>
-
+
<assertion id="ee">
<text>The application context is shared between all ~servlet requests, asynchronous observer method notifications, web service invocations, EJB remote method invocations,~ EJB asynchronous method invocations~, EJB timeouts and message deliveries to message driven beans ~that execute within the same application.</text>
</assertion>
-
+
<assertion id="ef">
<text>The application context is shared between all ~servlet requests, asynchronous observer method notifications, web service invocations, EJB remote method invocations, EJB asynchronous method invocations,~ EJB timeouts ~and message deliveries to message driven beans ~that execute within the same application.</text>
</assertion>
-
+
<assertion id="eg">
<text>The application context is shared between all ~servlet requests, asynchronous observer method notifications, web service invocations, EJB remote method invocations, EJB asynchronous method invocations, EJB timeouts and~ message deliveries to message driven beans ~that execute within the same application.</text>
</assertion>
-
+
<assertion id="f">
<text>The application context is destroyed when the application
is undeployed.</text>
@@ -2799,189 +2778,203 @@
<section id="6.7.4" title="Conversation context lifecycle">
<assertion id="a">
- <text>For a JSF faces request, the conversation context is active from the beginning of the apply request values phase, until the response is complete</text>
+ <text>The conversation scope is active during all standard lifecycle phases of any JSF faces or non-faces request.</text>
</assertion>
-
- <assertion id="b">
- <text>For a JSF non-faces request, the context is active during the render response phase</text>
- </assertion>
-
+
<assertion id="c">
- <text>Any JSF request has exactly one associated conversation</text>
+ <text>Any JSF request has exactly one associated conversation.</text>
</assertion>
-
- <assertion id="d">
- <text>The conversation associated with a JSF request is determined at the end of the restore view phase and does not change during the request</text>
+
+ <assertion id="da">
+ <text>The conversation associated with a JSF request is determined at the beginning of the restore view phase and does not change during the request.</text>
</assertion>
-
+
<assertion id="e">
- <text>By default, a conversation is transient</text>
+ <text>By default, a conversation is transient.</text>
</assertion>
-
+
<assertion id="f">
<text>A transient conversation may be marked long-running by calling |Conversation.begin()|</text>
</assertion>
-
+
<assertion id="g">
<text>A long-running conversation may be marked transient by calling |Conversation.end()|</text>
</assertion>
-
+
<assertion id="ha">
<text>All long-running conversations have a string-valued unique identifier, _which may be set by the application_ when the conversation is marked long-running~, or generated by the container~</text>
</assertion>
-
+
<assertion id="hb">
<text>All long-running conversations have a string-valued unique identifier, ~which may be set by the application when the conversation is marked long-running,~ or generated by the container</text>
</assertion>
+
+ <assertion id="j">
+ <text>If the conversation associated with the current JSF request is in the transient state at the end of a JSF request, it is destroyed, and the conversation context is also destroyed.</text>
+ </assertion>
+
+ <assertion id="k">
+ <text>If the conversation associated with the current JSF request is in the long-running state at the end of a JSF request, it is not destroyed.</text>
+ </assertion>
+
+ <assertion id="l">
+ <text>The long-running conversation context associated with a request that renders a JSF view is automatically propagated to any faces request (JSF form submission) that originates from that rendered page.</text>
+ </assertion>
+
+ <assertion id="m">
+ <text>The long-running conversation context associated with a request that results in a JSF redirect (via a navigation rule) is automatically propagated to the resulting non-faces request, and to any other subsequent request to the same URL. This is accomplished via use of a GET request parameter named cid containing the unique identifier of the conversation.</text>
+ </assertion>
+
+ <assertion id="n">
+ <text>The long-running conversation associated with a request may be propagated to any non-faces request via use of a GET request parameter named |cid| containing the unique identifier of the conversation. In this case, the application must manage this request parameter.</text>
+ </assertion>
+
+ <assertion id="o">
+ <text>When no conversation is propagated to a JSF request, the request is associated with a new transient conversation.</text>
+ </assertion>
+
+ <assertion id="p">
+ <text>All long-running conversations are scoped to a particular HTTP servlet session and may not cross session boundaries.</text>
+ </assertion>
+
+ <assertion id="qa">
+ <text>When the HTTP servlet session is invalidated, all long-running conversation contexts created during the current session are destroyed, after the servlet |service()| method completes.</text>
+ </assertion>
+
+ <assertion id="r" testable="false">
+ <text>The container is permitted to arbitrarily destroy any long-running conversation that is associated with no current JSF request, in order to conserve resources</text>
+ <note>In other words, this is unspecified</note>
+ </assertion>
+
+ <assertion id="ta" testable="false">
+ <text>The conversation timeout, which may be specified by calling |Conversation.setTimeout()| is a hint to the container that a conversation should not be destroyed if it has been active within the last given interval in milliseconds.</text>
+ <note>Not required</note>
+ </assertion>
+ <assertion id="tb">
+ <text>If the propagated conversation cannot be restored, the container must associate the request with a new transient conversation and throw an exception of type |javax.context.NonexistentConversationException| from the restore view phase of the JSF lifecycle. The application may handle this exception using the JSF |ExceptionHandler|.</text>
+ </assertion>
+
+ <assertion id="ua">
+ <text>The container ensures that a long-running conversation may be associated with at most one request at a time, by blocking or rejecting concurrent requests. If the container rejects a request, it must associate the request with a new transient conversation and throw an exception of type |javax.context.BusyConversationException| from the restore view phase of the JSF lifecycle. The application may handle this exception using the JSF |ExceptionHandler|.</text>
+ </assertion>
+ </section>
+
+ <section id="6.7.5" title="The Conversation interface">
<assertion id="iaa">
- <text>The container provides a built-in bean with bean type |Conversation|~, scope |@RequestScoped|, deployment type |@Standard| and binding |@Current|, named |javax.enterprise.context.conversation|~</text>
+ <text>The container provides a built-in bean with bean type |Conversation|~, scope |@RequestScoped|, and binding |@Current|, named |javax.enterprise.context.conversation|~</text>
</assertion>
-
+
<assertion id="ib">
- <text>The container provides a built-in bean with ~bean type |Conversation|~, scope |@RequestScoped|~, deployment type |@Standard| and binding |@Current|, named |javax.enterprise.context.conversation|~</text>
+ <text>The container provides a built-in bean with ~bean type |Conversation|~, scope |@RequestScoped|~, and binding |@Current|, named |javax.enterprise.context.conversation|~</text>
</assertion>
-
- <assertion id="ic">
- <text>The container provides a built-in bean with~ bean type |Conversation|, scope |@RequestScoped|,~ deployment type |@Standard|~ and binding |@Current|, named |javax.enterprise.context.conversation|~</text>
- </assertion>
-
+
<assertion id="id">
- <text>The container provides a built-in bean with bean type ~|Conversation|, scope |@RequestScoped|, deployment type |@Standard| and~ binding |@Current|~, named |javax.enterprise.context.conversation|~</text>
+ <text>The container provides a built-in bean with bean type ~|Conversation|, scope |@RequestScoped|, and~ binding |@Current|~, named |javax.enterprise.context.conversation|~</text>
</assertion>
-
+
<assertion id="ie">
- <text>The container provides a built-in bean with bean type ~|Conversation|, scope |@RequestScoped|, deployment type |@Standard| and binding |@Current|,~ named |javax.enterprise.context.conversation|</text>
- </assertion>
+ <text>The container provides a built-in bean with bean type ~|Conversation|, scope |@RequestScoped|, and binding |@Current|,~ named |javax.enterprise.context.conversation|</text>
+ </assertion>
<assertion id="j">
- <text>If the conversation associated with the current JSF request is in the transient state at the end of a JSF request, it is destroyed, and the conversation context is also destroyed</text>
+ <text>|begin()| marks the current transient conversation long-running. A conversation identifier may, optionally, be specified. If no conversation identifier is specified, an identifier is generated by the container.</text>
</assertion>
<assertion id="k">
- <text>If the conversation associated with the current JSF request is in the long-running state at the end of a JSF request, it is not destroyed</text>
+ <text>|end()| marks the current long-running conversation transient.</text>
</assertion>
<assertion id="l">
- <text>The long-running conversation context associated with a request that renders a JSF view is automatically propagated to any faces request (JSF form submission) that originates from that rendered page</text>
+ <text>|getId()| returns the identifier of the current long-running conversation, or a null value of the current conversation is transient.</text>
</assertion>
<assertion id="m">
- <text>The long-running conversation context associated with a request that results in a JSF redirect (via a navigation rule) is automatically propagated to the resulting non-faces request, and to any other subsequent request to the same URL. This is accomplished via use of a GET request parameter named cid containing the unique identifier of the conversation</text>
+ <text>|getTimeout()| returns the timeout, in milliseconds, of the current conversation.</text>
</assertion>
<assertion id="n">
- <text>The long-running conversation associated with a request may be propagated to any non-faces request via use of a GET request parameter named cid containing the unique identifier of the conversation. In this case, the application must manage this request parameter</text>
+ <text>|setTimeout()| sets the timeout of the current conversation.</text>
</assertion>
<assertion id="o">
- <text>When no conversation is propagated to a JSF request, the request is associated with a new transient conversation</text>
+ <text>|isTransient()| returns |true| if the conversation is marked transient, or |false| if it is marked long-running.</text>
</assertion>
<assertion id="p">
- <text>All long-running conversations are scoped to a particular HTTP servlet session and may not cross session boundaries</text>
+ <text>If any method of |Conversation| is called when the conversation scope is not active, a |ContextNotActiveException| is thrown.</text>
</assertion>
<assertion id="q">
- <text>When the HTTP servlet session is invalidated, all long-running conversation contexts created during the current session are destroyed</text>
+ <text>If |end()| is called, and the current conversation is marked transient, an |IllegalStateException| is thrown.</text>
</assertion>
- <assertion id="r" testable="false">
- <text>The container is permitted to arbitrarily destroy any long-running conversation that is associated with no current JSF request, in order to conserve resources</text>
- <note>In other words, this is unspecified</note>
+ <assertion id="r">
+ <text>If |begin()| is called, and the current conversation is already marked long-running, an |IllegalStateException| is thrown.</text>
</assertion>
<assertion id="s">
- <text>If the propagated conversation cannot be restored, the request is associated with a new transient conversation</text>
+ <text>If |begin()| is called with an explicit conversation identifier, and a long-running conversation with that identifier already exists, an |IllegalArgumentException| is thrown.</text>
</assertion>
+ </section>
+
+ <section id="7" title="Lifecycle of contextual instances">
- <assertion id="t" testable="false">
- <text>The method |Conversation.setTimeout()| is a hint to the container that a conversation should not be destroyed if it has been active within the last given interval in milliseconds</text>
- <note>Not required</note>
- </assertion>
+ </section>
+
+ <section id="7.1" title="Restriction upon bean instantiation">
- <assertion id="u" testable="false">
- <text>The container ensures that a long-running conversation may be associated with at most one request at a time, by blocking or rejecting concurrent requests</text>
- <note>Cannot test as their as what happens is not well defined</note>
- </assertion>
</section>
-
- <section id="7" title="Bean lifecycle">
- <assertion id="a">
- <text>To create a contextual instance of a session bean, the container creates an EJB local object reference</text>
+
+ <section id="7.2" title="Container invocations and interception">
+ <assertion id="e">
+ <text>When the container invokes a method of a bean, if, and only if, the invocation is a business method invocation it passes through the method interceptor and decorator stacks, ~and in the case of a session bean, it is subject to EJB services such a declarative transaction management, concurrency, security and asynchronicity, as defined by the EJB specification.~</text>
</assertion>
- <assertion id="b">
- <text>To create a contextual instance of a producer method bean, the container calls the producer method</text>
+ <assertion id="f">
+ <text>When the container invokes a method of a bean, if, and only if, the invocation is a business method invocation it passes through the method interceptor and decorator stacks, and in the case of a session bean, _it is subject to EJB services such a declarative transaction management, concurrency, security and asynchronicity, as defined by the EJB specification._</text>
</assertion>
- <assertion id="c">
- <text>To create a contextual instance of a producer field bean, the container retrieves the current value of the field</text>
+ <assertion id="g">
+ <text>If the invocation is not a business method invocation, it is treated as a normal Java method call and is not intercepted by the container.</text>
</assertion>
- <assertion id="d">
- <text>To create a contextual instance of a managed bean, the container calls the bean constructor</text>
+ <assertion id="h">
+ <text>Invocations of initializer methods by the container are not business method invocations.</text>
</assertion>
- <assertion id="e">
- <text>To destroy a contextual instance of a stateful session bean, the container removes the EJB instance</text>
+ <assertion id="i">
+ <text>Invocations of producer, disposer and observer methods by the container are business method invocations are are intercepted by method interceptors and decorators.</text>
</assertion>
- <assertion id="f">
- <text>To destroy a contextual instance of a producer method bean, the container calls the disposal method, if any</text>
- </assertion>
- </section>
-
- <section id="7.1" title="Container invocations and interception">
- <assertion id="a">
- <text>Invocations of initializer methods by the container are not business method invocations and are never intercepted.</text>
- </assertion>
-
- <assertion id="b">
- <text>Invocations of producer, disposal and observer methods by the container are business method invocations and are intercepted by method interceptors and decorators.</text>
- </assertion>
-
- <assertion id="c">
+ <assertion id="j">
<text>Invocation of lifecycle callbacks by the container are not business method invocations, but are intercepted by interceptors for lifecycle callbacks.</text>
</assertion>
- <assertion id="d">
+ <assertion id="k">
<text>Invocations of interceptors and decorator methods during method or lifecycle callback interception are not business method invocations, and therefore no recursive interception occurs.</text>
</assertion>
</section>
- <section id="7.2" title="Lifecycle of managed beans">
- <assertion id="a">
- <text>When the create() method of the Bean object that represents a managed bean is called, the container first calls the bean constructor to obtain an instance of the bean, as defined in Section 5.4.3, "Injection
-using the bean constructor". The container is permitted to return an instance of a container-generated subclass of the bean class, allowing interceptor and decorator bindings.</text>
- </assertion>
+ <section id="7.3" title="Lifecycle of contextual instances">
- <assertion id="b">
- <text>Next, the container performs Java EE component environment injection, as required by the managed bean specification.</text>
+ </section>
+
+ <section id="7.3.1" title="Lifecycle of managed beans">
+ <assertion id="aa">
+ <text>When the |create()| method of the |Bean| object that represents a managed bean is called, the container obtains an instance of the bean, as defined by the Managed Beans specification, calling the bean constructor as defined by Section 5.6.3, "Injection using the bean constructor", and performing dependency injection as defined in Section 5.6.4, "Injection of fields and initializer methods".</text>
</assertion>
- <assertion id="c">
- <text>Next, the container performs dependency injection, as defined in Section 5.4.4, "Injection of fields and initializer methods".</text>
+ <assertion id="ba">
+ <text>When the |destroy()| method is called, the container destroys the instance, as defined by the Managed Beans specification, and any dependent objects, as defined in Section 5.6.5, "Destruction of dependent objects".</text>
</assertion>
-
- <assertion id="d">
- <text>Finally, the container calls the |@PostConstruct| method, if any.</text>
- </assertion>
-
- <assertion id="e">
- <text>When the |destroy()| method is called, the container calls the |@PreDestroy| method, if any.</text>
- </assertion>
-
- <assertion id="f">
- <text>Finally, the container destroys dependent objects, as defined in Section 5.4.5, "Destruction of dependent objects.</text>
- </assertion>
</section>
-
- <section id="7.3" title="Lifecycle of stateful session beans">
+
+ <section id="7.3.2" title="Lifecycle of stateful session beans">
<assertion id="aa">
<text>When the |create()| method of a |Bean| object that represents a stateful session bean that is called, the container creates and returns a container-specific internal local reference to a new session bean instance. The reference must be passivation capable. This reference is not directly exposed to the application.</text>
</assertion>
-
+
<assertion id="bb">
<text>Before injecting or returning a contextual instance to the application, the container transforms its internal reference into an object that implements the bean types expected by the application and delegates method invocations to the underlying stateful session bean instance. This object must be passivation capable.</text>
</assertion>
@@ -2990,655 +2983,562 @@
<text>When the |destroy()| method is called, and if the underlying EJB was not already removed by direct invocation of a remove method by the application, the container removes the stateful session bean. The |@PreDestroy| callback must be invoked by the container.</text>
</assertion>
</section>
-
- <section id="7.4" title="Lifecycle of stateless session and singleton beans">
+
+ <section id="7.3.3" title="Lifecycle of stateless session and singleton beans">
<assertion id="a">
<text>When the |create()| method of a Bean object that represents a stateless session or singleton session bean is called, the container
creates and returns a container-specific internal local reference to the session bean. This reference is not directly exposed to the application.</text>
</assertion>
-
+
<assertion id="b">
<text>Before injecting or returning a contextual instance to the application, the container transforms its internal reference into an object that implements the bean types expected by the application and delegates method invocations to the underlying session bean. This object must be passivation capable.</text>
</assertion>
-
+
<assertion id="c">
<text>When the |destroy()| method is called, the container simply discards this internal reference.</text>
</assertion>
</section>
-
- <section id="7.5" title="Lifecycle of producer methods">
- <assertion id="a">
- <text>Any Java object may be returned by a producer method. It is not required that the returned object be an instance of another bean</text>
- </assertion>
-
- <assertion id="b" testable="false">
- <text>If an object returned by a producer method is not an instance of another bean, the container will not provide injection of other beans</text>
- <note>In other words the behaviour is unspecified</note>
- </assertion>
-
- <assertion id="c" testable="false">
- <text>If an object returned by a producer method is not an instance of another bean, the container will not provide lifecycle callbacks</text>
- <note>In other words the behaviour is unspecified</note>
- </assertion>
-
- <assertion id="d" testable="false">
- <text>If an object returned by a producer method is not an instance of another bean, the container will not provide method and lifecycle interception</text>
- <note>In other words the behaviour is unspecified</note>
- </assertion>
-
+
+ <section id="7.3.4" title="Lifecycle of producer methods">
<assertion id="ea">
- <text>When the create() method of a Bean object that represents a producer method is called, the container must invoke the producer method as defined by Section 5.4.6, "Invocation of producer or disposal methods". The return value of the producer method, after method interception completes, is the new contextual instance to be returned by |Bean.create()|.</text>
+ <text>When the create() method of a |Bean| object that represents a producer method is called, the container must invoke the producer method as defined by Section 5.6.6, "Invocation of producer or disposer methods". The return value of the producer method, after method interception completes, is the new contextual instance to be returned by |Bean.create()|.</text>
</assertion>
-
+
<assertion id="k">
- <text>If the producer method returns a null value and the producer method bean has the scope |@Dependent|, the |create()| method returns a null value</text>
+ <text>If the producer method returns a null value and the producer method bean has the scope |@Dependent|, the |create()| method returns a null value.</text>
</assertion>
-
+
<assertion id="l">
- <text>If the producer method returns a null value, and the scope of the producer method is not |@Dependent|, the |create()| method throws an |IllegalProductException|</text>
+ <text>If the producer method returns a null value, and the scope of the producer method is not |@Dependent|, the |create()| method throws an |IllegalProductException|.</text>
</assertion>
-
+
<assertion id="ma">
- <text>When the destroy() method is called, and if there is a disposal method for this producer method, the container must invoke
-the disposal method as defined by Section 5.4.6, "Invocation of producer or disposal methods", passing the instance given to |destroy()| to the disposed parameter.</text>
+ <text>When the |destroy()| method is called, and if there is a disposal method for this producer method, the container must invoke the disposer method as defined by Section 5.6.6, "Invocation of producer or disposal methods", passing the instance given to |destroy()| to the disposed parameter.</text>
</assertion>
-
+
<assertion id="r">
- <text>Finally, the container destroys dependent objects</text>
- </assertion>
+ <text>Finally, the container destroys dependent objects, as defined in Section 5.6.5, "Destruction of dependent objects".</text>
+ </assertion>
</section>
- <section id="7.6" title="Lifecycle of producer fields">
- <assertion id="a">
- <text>Any Java object may be the value of a producer field</text>
- </assertion>
-
- <assertion id="b">
- <text>It is not required that the returned object of a producer field be an instance of another bean</text>
- </assertion>
-
- <assertion id="c" testable="false">
- <text>If the object returned by a producer field is not an instance of another bean, the container will not provide injection of other beans</text>
- <note>In other words the behaviour is unspecified</note>
- </assertion>
-
- <assertion id="d" testable="false">
- <text>If the object returned by a producer field is not an instance of another bean, the container will not provide lifecycle callbacks</text>
- <note>In other words the behaviour is unspecified</note>
- </assertion>
-
- <assertion id="e" testable="false">
- <text>If the object returned by a producer field is not an instance of another bean, the container will not provide method interception</text>
- <note>In other words the behaviour is unspecified</note>
- </assertion>
-
- <assertion id="f" testable="false">
- <text>If the object returned by a producer field is not an instance of another bean, the container will not provide lifecycle interception</text>
- <note>In other words the behaviour is unspecified</note>
- </assertion>
-
+ <section id="7.3.5" title="Lifecycle of producer fields">
<assertion id="ga">
- <text>When the |create()| method of a |Bean| object that represents a producer field is called, the container must access the producer field as defined by Section 5.4.7, "Access to producer field values" to obtain the current value of the field. The value of the producer field is the new contextual instance to be returned by |Bean.create()|.</text>
+ <text>When the |create()| method of a |Bean| object that represents a producer field is called, the container must access the producer field as defined by Section 5.6.7, "Access to producer field values" to obtain the current value of the field. The value of the producer field is the new contextual instance to be returned by |Bean.create()|.</text>
</assertion>
-
+
<assertion id="m">
- <text>If the producer field contains a null value and the producer field bean has the scope |@Dependent|, the create() method returns a null value</text>
+ <text>If the producer field contains a null value and the producer field bean has the scope |@Dependent|, the |create()| method returns a null value.</text>
</assertion>
-
+
<assertion id="n">
- <text>If the producer field contains a null value, and the scope of the producer method is not |@Dependent|, the |create()| method throws an |IllegalProductException|</text>
- </assertion>
+ <text>If the producer field contains a null value, and the scope of the producer method is not |@Dependent|, the |create()| method throws an |IllegalProductException|.</text>
+ </assertion>
</section>
-
- <section id="7.7" title="Lifecycle of resources">
+
+ <section id="7.3.6" title="Lifecycle of resources">
<assertion id="l">
<text>When the |create()| method of a |Bean| object that represents a resource is called, the container creates and returns a container-
specific internal reference to the Java EE component environment resource, entity manager, entity manager factory, remote EJB instance or web service reference. This reference is not directly exposed to the application.</text>
</assertion>
-
+
<assertion id="m">
<text>Before injecting or returning a contextual instance to the application, the container transforms its internal reference into an object that implements the bean types expected by the application and delegates method invocations to the underlying resource, entity manager, entity manager factory, remote EJB instance or web service reference. This object must be passivation capable.</text>
</assertion>
-
- <assertion id="n">
- <text>When the |destroy()| method is called, the container discards this internal reference.</text>
+
+ <assertion id="na">
+ <text>When the |destroy()| method is called, the container discards this internal reference. For certain kinds of resource, for example persistence contexts, the container eventually performs additional cleanup to destroy state associated with the client or transaction, as required by the Java EE platform specification.</text>
</assertion>
- </section>
-
- <section id="7.8" title="Lifecycle of message destinations">
- <assertion id="a" testable="false">
- <text>An instance of a message destination is a proxy object, provided by the container, that implements all the bean types defined in Section 3.7, "JMS resources", delegating the actual implementation of these methods directly to the underlying JMS objects. This proxy must be passivation capable.</text>
- </assertion>
- <assertion id="b">
- <text>A message destination resource proxy object is a dependent object of the object it is injected into.</text>
- </assertion>
-
- <assertion id="da">
- <text>When the |create()| method of a |Bean| object that represents a message destination is called, the container creates and returns a proxy object.</text>
- </assertion>
-
- <assertion id="e">
- <text>The methods of this proxy object delegate to JMS objects obtained as needed using the metadata provided by the message destination declaration.</text>
- </assertion>
-
- <assertion id="f">
- <text>The Destination is obtained using the JNDI name or mapped name specified by |@Resource|.</text>
- </assertion>
-
- <assertion id="g">
- <text>The appropriate |ConnectionFactory| for the topic or queue is obtained automatically</text>
- </assertion>
-
- <assertion id="h">
- <text>The |Connection| is obtained by calling |QueueConnectionFactory.createQueueConnection()| or |TopicConnectionFactory.createTopicConnection()|</text>
- </assertion>
-
- <assertion id="i" testable="false">
- <text>The container is permitted to share a connection between multiple proxy objects</text>
- </assertion>
-
- <assertion id="j">
- <text>The |Session| object is obtained by calling |QueueConnection.createQueueSession()| or |TopicConnection.createTopicSession()|</text>
- </assertion>
-
- <assertion id="k">
- <text>The |MessageProducer| object is obtained by calling |QueueSession.createSender()| or |TopicSession.createPublisher()|</text>
- </assertion>
-
- <assertion id="l">
- <text>The |MessageConsumer| object is obtained by calling |QueueSession.createReceiver()| or |TopicSession.createSubscriber()|</text>
- </assertion>
-
- <assertion id="m">
- <text>When the |destroy()| method is called, the container must ensure that all JMS objects created by the proxy object are destroyed by calling |close()| if necessary</text>
- </assertion>
-
- <assertion id="n">
- <text>The |Connection| is destroyed by calling |Connection.close()| if necessary</text>
- </assertion>
-
<assertion id="o">
- <text>If the connection is being shared between multiple proxy objects, the container is not required to close the connection when the proxy is destroyed</text>
+ <text>The container must perform ordinary Java EE component environment injection upon any non-static field that functions as a resource declaration, as defined by the Java EE platform and Common Annotations for the Java platform specifications.</text>
</assertion>
- <assertion id="p">
- <text>The |Session| object is destroyed by calling |Session.close()|</text>
+ <assertion id="p" testable="false">
+ <text>The container is not required to perform Java EE component environment injection upon a static field. Portable applications should not rely upon the value of a static field that functions as a resource declaration.</text>
</assertion>
-
- <assertion id="q">
- <text>The |MessageProducer| object is destroyed by calling |MessageProducer.close()|</text>
- </assertion>
-
- <assertion id="r">
- <text>The |MessageConsumer| object is destroyed by calling |MessageConsumer.close()|</text>
- </assertion>
-
- <assertion id="s">
- <text>The |close()| method of a message destination proxy object always throws an |UnsupportedOperationException|.</text>
- </assertion>
-
</section>
-
+
<section id="8" title="Decorators">
<assertion id="a">
<text>Decorators may be bound to any managed bean that is not itself an interceptor or decorator or to any EJB session or message-driven bean.</text>
- </assertion>
+ </assertion>
</section>
-
+
<section id="8.1" title="Decorator beans">
<assertion id="a">
<text>A decorator is a managed bean.</text>
</assertion>
-
+
<assertion id="b">
<text>The set of decorated types of a decorator includes all interfaces implemented directly or indirectly by the bean class, except for |java.io.Serializable|.</text>
</assertion>
-
+
<assertion id="c">
<text>The decorator bean class and its superclasses are not decorated types of the decorator.</text>
</assertion>
-
+
<assertion id="d">
<text>The decorator class may be abstract.</text>
</assertion>
+
+ <assertion id="e">
+ <text>Decorators of a session bean must comply with the bean provider programming restrictions defined by the EJB specification.</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>Decorators of a stateful session bean must comply with the rules for instance passivation and conversational state defined by the EJB specification.</text>
+ </assertion>
</section>
-
+
<section id="8.1.1" title="Declaring a decorator">
<assertion id="a">
<text>A decorator is declared by annotating the bean class with the |(a)javax.decorator.Decorator| stereotype.</text>
</assertion>
</section>
-
+
<section id="8.1.2" title="Decorator delegate injection points">
<assertion id="a">
- <text>All decorators have a delegate injection point. A delegate injection point is an injection point of the bean class. The type and bindings of the injection point are called the delegate type and delegate bindings. The delegate injection point must be be declared by annotating the field with the @javax.decorator.Decorates annotation.</text>
+ <text>All decorators have a delegate injection point. A delegate injection point is an injection point of the bean class. The type and bindings of the injection point are called the delegate type and delegate bindings. The delegate injection point must be be declared by annotating the injection point with the annotation |(a)javax.decorator.Decorates|.</text>
</assertion>
-
+
<assertion id="b">
<text>The decorator applies to any bean that is eligible for injection to the delegate injection point, according to the rules defined
in Section 5.1, "Typesafe resolution algorithm".</text>
</assertion>
-
+
<assertion id="ca">
<text>A decorator must have exactly one delegate injection point. If a decorator has more than one delegate injection point~, or does not have a delegate injection point,~ the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="cb">
<text>A decorator must have exactly one delegate injection point. If a decorator ~has more than one delegate injection point, or~ does not have a delegate injection point, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
+ <assertion id="cc">
+ <text>The delegate injection point must be an injected field, ~initializer method parameter or bean constructor method parameter~. If an injection point that is not an injected field, ~initializer method parameter or bean constructor method parameter ~is annotated |@Decorates|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ </assertion>
+
+ <assertion id="cd">
+ <text>The delegate injection point must be an ~injected field~, initializer method parameter or ~bean constructor method parameter~. If an injection point that is not an ~injected field~, initializer method parameter or ~bean constructor method parameter ~is annotated |@Decorates|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ </assertion>
+
+ <assertion id="ce">
+ <text>The delegate injection point must be an ~injected field, initializer method parameter~ or bean constructor method parameter. If an injection point that is not an ~injected field, initializer method parameter~ or bean constructor method parameter is annotated |@Decorates|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ </assertion>
+
+ <assertion id="cf">
+ <text>If a bean class that is not a decorator has an injection point annotated |@Decorates|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ </assertion>
+
<assertion id="d">
<text>If a decorator applies to a managed bean, and the bean class is declared final, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="e">
<text>If a decorator applies to a managed bean with a non-static, non-private, final method, and the decorator also implements that method, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="f">
- <text>When the container must inject a delegate object to the delegate injection point, the delegate object implements the delegate
-type and delegates method invocations along the decorator stack.</text>
+ <text>The container must inject a delegate object to the delegate injection point. The delegate object implements the delegate type and delegates method invocations along the decorator stack.</text>
</assertion>
</section>
-
+
<section id="8.1.3" title="Decorated types of a decorator">
<assertion id="a">
<text>The delegate type of a decorator must implement or extend every decorated type. If the delegate type does not implement or extend a decorated type of the decorator, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
+ <assertion id="ab">
+ <text>If a decorated type is a parameterized type and the delegate type does not have exactly the same type parameters as the decorated type, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ </assertion>
+
<assertion id="b">
<text>A decorator is not required to implement the delegate type.</text>
</assertion>
-
+
<assertion id="c">
<text>A decorator may be an abstract Java class, and is not required to implement every method of every decorated type.</text>
</assertion>
-
+
<assertion id="d">
<text>The decorator intercepts every method declared by a decorated type of the decorator, and that is implemented by the bean class of the decorator.</text>
</assertion>
</section>
-
+
<section id="8.2" title="Decorator enablement and ordering">
<assertion id="a">
- <text>By default, decorators are not enabled. A decorator must be explicitly enabled by listing its bean class under the
-|<Decorators>| element in |beans.xml|.</text>
+ <text>By default, decorators are not enabled. A decorator must be explicitly enabled by listing its bean class under the |<Decorators>| element in |beans.xml| file of the bean deployment archive.</text>
</assertion>
-
+
<assertion id="b">
<text>The order of the decorator declarations determines the decorator ordering. Decorators which occur earlier in the list are called first.</text>
</assertion>
- <assertion id="c">
- <text>If a class listed under the |<Decorators>| element is not the bean class of at least one decorator, the container automatically
-detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".
- </text>
+ <assertion id="bb">
+ <text>Each child |<class>| element must specify the name of a decorator bean class. If there is no class with the specified name, or if the class with the specified name is not a decorator bean class, the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
- <assertion id="d">
- <text>If the bean class of a decorator with a disabled deployment type is listed under the |<Decorators>| element, the container
-automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ <assertion id="bc">
+ <text>If the same class is listed twice under the |<decorators>| element, the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
- <assertion id="e">
- <text>If the |<Decorators>| element is specified in more than one |beans.xml| document, the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
- </assertion>
-
+
<assertion id="f">
<text>Decorators are called after interceptors.</text>
</assertion>
</section>
-
+
<section id="8.3" title="Decorator resolution">
- <assertion id="a">
- <text>The following algorithm must be used by the container when resolving decorators for a certain bean - First, the container identifies the set of matching enabled decorators such that the bean is eligible for injection to the delegate injection point according to the rules defined in Section 5.1, "Typesafe resolution algorithm". Next, the container orders the matching decorators according to the decorator ordering specified in Section 8.2, "Decorator enablement and ordering".</text>
+ <assertion id="aa">
+ <text>The following procedure must be used by the container when resolving decorators for a certain bean - First, the container identifies the set of matching decorators for which the bean is eligible for injection to the delegate injection point according to the rules defined in Section 5.3, "Typesafe resolution", and for which the decorator is enabled in the bean deployment archive of the bean. Next, the container orders the matching decorators according to the decorator ordering specified in Section 8.2, "Decorator enablement and ordering".</text>
</assertion>
+
+ <assertion id="b">
+ <text>For a custom implementation of the Decorator interface defined in Section 11.1.1, "The Decorator interface", the container calls |getDelegateType()|, |getDelegateBindings()| and |getDecoratedTypes()| to determine the delegate type and bindings and decorated types of the decorator.</text>
+ </assertion>
</section>
-
+
<section id="8.4" title="Decorator stack creation">
<assertion id="a">
<text>When a bean with decorators is created, the container must
identify the decorators for the bean according to Section 8.3, "Decorator resolution", and for each decorator, obtain a contextual reference, as defined in Section 6.5.3, "Contextual reference for a bean", and build an ordered list of the decorator instances.</text>
</assertion>
</section>
-
+
<section id="8.5" title="Decorator invocation">
<assertion id="a">
<text>Whenever a business method is invoked on an instance of a bean with decorators, the container intercepts the business method invocation and, after processing the interceptor stack, invokes decorators of the bean. The container searches for the first decorator in the decorator stack for the instance that implements the method that is being
invoked as a business method.</text>
</assertion>
-
+
<assertion id="b">
<text>If no such decorator exists, the container invokes the business method of the intercepted instance.</text>
</assertion>
-
+
<assertion id="c">
<text>Otherwise, the container calls the method of the decorator.</text>
</assertion>
-
+
<assertion id="d">
<text>When any decorator is invoked by the container, it may in turn invoke a method of the delegate. The container intercepts the delegate invocation and searches for the first decorator in the decorator stack for the instance such that the decorator implements the method that is being invoked upon the delegate, and the decorator has not previously been invoked during this business method invocation.</text>
</assertion>
-
+
<assertion id="e">
<text>If no such decorator exists, the container invokes the business method of the intercepted instance.</text>
</assertion>
-
+
<assertion id="f">
<text>Otherwise, the container calls the method of the decorator.</text>
</assertion>
</section>
-
+
<section id="9" title="Interceptor bindings">
-
+
</section>
-
+
<section id="9.1" title="Interceptor binding types">
<assertion id="a">
<text>An interceptor binding type is a Java annotation defined as |@Target({TYPE, METHOD})| or |@Target(TYPE)| and |@Retention(RUNTIME)|.</text>
</assertion>
-
+
<assertion id="b">
<text>An interceptor binding type may be declared by specifying the |(a)javax.interceptor.InterceptorBindingType| metaannotation.</text>
</assertion>
-
+
<assertion id="c">
<text>Multiple interceptors may be bound to the same interceptor binding type or types.</text>
</assertion>
</section>
-
+
<section id="9.1.1" title="Interceptor binding types with additional interceptor bindings">
<assertion id="a">
<text>An interceptor binding type may declare other interceptor bindings.</text>
</assertion>
-
+
<assertion id="b">
<text>Interceptor bindings are transitive�an interceptor binding declared by an interceptor binding type is inherited by all beans and other interceptor binding types that declare that interceptor binding type.</text>
</assertion>
-
+
<assertion id="c">
<text>Interceptor binding types declared |@Target(TYPE)| may not be applied to interceptor binding types declared |@Target({TYPE, METHOD})|.</text>
- </assertion>
+ </assertion>
</section>
-
+
<section id="9.1.2" title="Interceptor bindings for stereotypes">
<assertion id="a">
<text>Interceptor bindings may be applied to a stereotype by annotating the stereotype annotation</text>
</assertion>
-
+
<assertion id="b">
<text>An interceptor binding declared by a stereotype are inherited by any bean that declares that stereotype.</text>
</assertion>
-
+
<assertion id="c">
<text>If a stereotype declares interceptor bindings, it must be defined as |@Target(TYPE)|.</text>
</assertion>
</section>
-
+
<section id="9.2" title="Declaring the interceptor bindings of an interceptor">
<assertion id="a">
- <text>The interceptor bindings of an interceptor are specified by annotating the interceptor bean class with the binding types and the |(a)javax.interceptor.Interceptor| annotation.</text>
+ <text>The interceptor bindings of an interceptor are specified by annotating the interceptor class with the binding types and the |(a)javax.interceptor.Interceptor| annotation.</text>
</assertion>
-
+
<assertion id="b">
<text>If an interceptor does not declare an |@Interceptor| annotation, it must be bound to beans using |@Interceptors| or |ejb-jar.xml|.</text>
</assertion>
-
+
<assertion id="c">
<text>All interceptors declared using |@Interceptor| must specify at least one interceptor binding. If an interceptor declared using |@Interceptor| does not declare any interceptor binding, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="d">
<text>An interceptor for lifecycle callbacks may only declare interceptor binding types that are defined as |@Target(TYPE)|. If an
interceptor for lifecycle callbacks declares an interceptor binding type that is defined |@Target({TYPE, METHOD})|, the containerautomatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
- </assertion>
+ </assertion>
</section>
-
+
<section id="9.3" title="Binding an interceptor to a bean">
<assertion id="a">
<text>An interceptor binding may be declared by annotating the bean class, or a method of the bean class, with the interceptor binding type.</text>
</assertion>
-
- <assertion id="b">
- <text>Interceptors may be enabled or disabled at deployment time.</text>
- </assertion>
-
- <assertion id="c">
- <text>Disabled interceptors are never called at runtime.</text>
- </assertion>
</section>
-
+
<section id="9.4" title="Interceptor enablement and ordering">
<assertion id="a">
- <text>By default, interceptors bound via interceptor bindings are not enabled. An interceptor must be explicitly enabled by listing
-its bean class under the |<Interceptors>| element in |beans.xml|.</text>
+ <text>By default, a bean deployment archive has no enabled interceptors bound via interceptor bindings. An interceptor must be explicitly enabled by listing
+its class under the |<Interceptors>| element of the |beans.xml| file for the bean deployment archive.</text>
</assertion>
-
+
<assertion id="b">
<text>The order of the interceptor declarations determines the interceptor ordering. Interceptors which occur earlier in the list are
called first.</text>
</assertion>
-
- <assertion id="c">
- <text>If a class listed under the |<Interceptors>| element is not the bean class of at least one interceptor, the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+
+ <assertion id="ca">
+ <text>Each child |<class>| element must specify the name of an interceptor class. If there is no class with the specified name, or if the class with the specified name is not an interceptor class, the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
- <assertion id="d">
- <text>If the bean class of an interceptor with a disabled deployment type is listed under the |<Interceptors>| element, the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ <assertion id="cb">
+ <text>If the same class is listed twice under the |<interceptors>| element, the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
- <assertion id="e">
- <text>If the |<Interceptors>| element is specified in more than one |beans.xml| document, the container automatically detects the
-problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
- </assertion>
-
+
<assertion id="f">
- <text>Interceptors declared using |@Interceptors| or in |ejb-jar.xml| are called before interceptors declared using interceptor
-bindings.</text>
+ <text>Interceptors declared using |@Interceptors| or in |ejb-jar.xml| are called before interceptors declared using interceptor bindings.</text>
</assertion>
-
+
<assertion id="g">
<text>Interceptors are called before decorators.</text>
</assertion>
</section>
-
+
<section id="9.5" title="Interceptor resolution">
<assertion id="a">
- <text>For a lifecycle callback, the bean interceptor bindings include the interceptor bindings declared by the bean at the class
-level, including interceptor bindings declared as meta-annotations of other interceptor bindings, recursively, and of stereotypes.
+ <text>For a lifecycle callback, the bean interceptor bindings include the interceptor bindings declared by the bean at the class level, including interceptor bindings declared as meta-annotations of other interceptor bindings, recursively, and of stereotypes.
</text>
</assertion>
-
+
<assertion id="b">
- <text>For a method, the bean interceptor bindings include the interceptor bindings declared by the bean at the class level, including
-interceptor bindings declared as meta-annotations of other interceptor bindings, recursively, and of stereotypes, together with all interceptor bindings declared at the method level, including interceptor bindings declared as meta-annotations of other interceptor bindings, recursively.</text>
+ <text>For a method, the bean interceptor bindings include the interceptor bindings declared by the bean at the class level, including interceptor bindings declared as meta-annotations of other interceptor bindings, recursively, and of stereotypes, together with all interceptor bindings declared at the method level, including interceptor bindings declared as meta-annotations of other interceptor bindings, recursively.</text>
</assertion>
-
- <assertion id="c">
- <text>First, the container identifies the set of matching enabled interceptors where for each declared interceptor binding, there exists an interceptor binding in the set of bean interceptor bindings with (a) the same type and (b) the same annotation member value for each member which is not annotated |(a)javax.enterprise.inject.NonBinding| (see Section
-9.5.2, "Interceptor binding types with members").</text>
+
+ <assertion id="ca">
+ <text>First, the container identifies the set of matching enabled interceptors where, for each interceptor binding declared by the interceptor, there exists an interceptor binding in the set of bean interceptor bindings with (a) the same type and (b) the same annotation member value for each member which is not annotated |(a)javax.enterprise.inject.NonBinding| (see Section 9.5.2, "Interceptor binding types with members"), and the interceptor intercepts the given kind of lifecycle callback or business method, and the interceptor is enabled in the bean deployment archive of the bean.</text>
</assertion>
- <assertion id="d">
- <text>Next, the container narrows the set of matching interceptors according to whether the interceptor intercepts the given kind of lifecycle callback or business method.</text>
+ <assertion id="ea">
+ <text>Next, the container orders the matching interceptors according to the interceptor ordering specified in Section 9.4, "Interceptor enablement and ordering".</text>
</assertion>
- <assertion id="e">
- <text>Next, the container orders the matching interceptors according to the interceptor ordering specified in Section 9.4, "Interceptor enablement and ordering" and returns the resulting list of interceptors. If no matching interceptors exist in the set, an empty list is returned.</text>
- </assertion>
+ <assertion id="f">
+ <text>For a custom implementation of the Interceptor interface defined in Section 11.1.2, "The Interceptor interface", the container calls |getInterceptorBindings()| to determine the interceptor bindings of the interceptor and |intercepts()| to determine if the interceptor intercepts a given kind of lifecycle callback or business method.</text>
+ </assertion>
</section>
-
+
<section id="9.5.1" title="Interceptors with multiple bindings">
<assertion id="a">
<text>An interceptor class may specify multiple interceptor bindings, in which case the interceptor will be applied only to beans
that declare all the bindings at the class level, and to methods of beans for which every binding appears at either the method or class level.</text>
</assertion>
</section>
-
+
<section id="9.5.2" title="Interceptor binding types with members">
<assertion id="a">
<text>Interceptor binding types may have annotation members.</text>
</assertion>
-
+
<assertion id="b">
<text>An annotation member may be excluded from consideration using the @NonBinding annotation.</text>
</assertion>
-
+
<assertion id="c">
<text>Array-valued or annotation-valued members of an interceptor binding type must be annotated |@NonBinding|. If an array-valued or annotation-valued member of an interceptor binding type is not annotated |@NonBinding|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
+
+ <assertion id="d">
+ <text>If the set of interceptor bindings of a bean or interceptor, including bindings inherited from stereotypes and other interceptor bindings, has two instances of a certain interceptor binding type and the instances have different values of some annotation member, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ </assertion>
</section>
<section id="10" title="Events">
-
+
</section>
-
+
<section id="10.1" title="Event types and binding types">
-
+
<assertion id="aa">
<text>An event object is an instance of a concrete Java class with no type variables.</text>
</assertion>
-
+
<assertion id="c">
<text>The event types of the event include all superclasses and interfaces of the runtime class of the event object.</text>
</assertion>
+ <assertion id="cb">
+ <text>An event type may not contain a type variable.</text>
+ </assertion>
+
<assertion id="d">
<text>An event binding type is a Java annotation defined as |@Target({FIELD, PARAMETER})| ~or |@Target({METHOD, FIELD, PARAMETER, TYPE})| and |@Retention(RUNTIME)|~</text>
</assertion>
-
+
<assertion id="e">
<text>An event binding type is a Java annotation defined as ~|@Target({FIELD, PARAMETER})| or~ |@Target({METHOD, FIELD, PARAMETER, TYPE})| ~and |@Retention(RUNTIME)|~</text>
</assertion>
-
+
<assertion id="f">
<text>An event binding type is a Java annotation defined as ~|@Target({FIELD, PARAMETER})| or |@Target({METHOD, FIELD, PARAMETER, TYPE})| and ~|@Retention(RUNTIME)|</text>
</assertion>
-
+
<assertion id="g">
<text>All event binding types must specify the |(a)javax.enterprise.inject.BindingType| meta-annotation</text>
</assertion>
-
+
<assertion id="i">
<text>Every event has the binding |(a)javax.enterprise.inject.Any|, even if it does not explicitly declare this binding.</text>
</assertion>
- </section>
- <section id="10.2" title="Observer resolution algorithm">
+ <assertion id="j">
+ <text>Any Java type may be an observed event type.</text>
+ </assertion>
+ </section>
+
+ <section id="10.2" title="Observer resolution">
<assertion id="h">
- <text>An event consumer will be notified of an event if the observed event type it specifies is one of the event types of the event, and if all the observed event bindings it specifies are event bindings of the event.</text>
+ <text>An observer method will be notified of an event if the observed event type it specifies is one of the event types of the event, and if all the observed event bindings it specifies are event bindings of the event.</text>
</assertion>
-
+
<assertion id="j">
<text>If the runtime type of the event object contains a type variable, the container must throw an |IllegalArgumentException|.</text>
- </assertion>
+ </assertion>
</section>
- <section id="10.2.1" title="Event binding types with members">
+ <section id="10.2.1" title="Assignability of type variables, raw and parameterized types">
<assertion id="a">
- <text>The binding type for an |Event| binding may have annotation members</text>
+ <text>An event type is considered assignable to a type variable if the event type is assignable to the upper bound, if any.</text>
</assertion>
+ <assertion id="b">
+ <text>A parameterized event type is considered assignable to a raw observed event type if the raw types are identical.</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>A parameterized event type is considered assignable to a parameterized observed event type if they have identical raw type and for each parameter the observed event type parameter is an actual type with identical raw type to the event type parameter, and, if the type is parameterized, the event type parameter is assignable to the observed event type parameter according to these rules, or the observed event type parameter is a wildcard and the event type parameter is assignable to the upper bound, if any, of the wildcard and assignable from the lower bound, if any, of the wildcard, or the observed event type parameter is a type variable and the event type parameter is assignable to the upper bound, if any, of the type variable.</text>
+ </assertion>
+ </section>
+
+ <section id="10.2.2" title="Event binding types with members">
+ <assertion id="a">
+ <text>The binding type for an |Event| binding may have annotation members.</text>
+ </assertion>
+
<assertion id="b" testable="false">
- <text>The container uses |equals()| to compare event binding type member values</text>
+ <text>The container uses |equals()| to compare event binding type member values.</text>
<note>Since only primitive types are allowed, the call to equals() cannot be checked</note>
- </assertion>
+ </assertion>
</section>
-
- <section id="10.2.2" title="Multiple event bindings">
+
+ <section id="10.2.3" title="Multiple event bindings">
<assertion id="a">
<text>An event parameter may have multiple bindings</text>
</assertion>
-
+
<assertion id="b">
<text>An observer method will only be notified if all the observed event bindings are specified when the event is fired</text>
</assertion>
-
+
<assertion id="c">
<text>Other, less specific, observers will also be notified of events with multiple event bindings</text>
</assertion>
- </section>
-
- <section id="10.3" title="The Observer interface">
- <assertion id="a">
- <text>Observers of events implement the |javax.enterprise.event.Observer| interface.</text>
- </assertion>
</section>
-
- <section id="10.4" title="Firing events">
+
+ <section id="10.3" title="Firing events">
<assertion id="a">
<text>Beans fire events via an instance of the |javax.enterprise.event.Event| interface, which may be injected.</text>
</assertion>
-
+
<assertion id="b">
<text>The method |fire()| accepts an event object.</text>
</assertion>
-
+
<assertion id="c">
<text>Any combination of bindings may be specified at the injection point.</text>
</assertion>
-
+
<assertion id="d">
<text>Or, the application may specify bindings dynamically.</text>
</assertion>
-
- <assertion id="e">
- <text>The |observe()| method registers an observer.</text>
- </assertion>
</section>
-
- <section id="10.4.1" title="The Event interface">
- <assertion id="c">
- <text>The |Event| interface provides a method for firing events of a specific type</text>
+
+ <section id="10.3.1" title="The Event interface">
+ <assertion id="ca">
+ <text>The |Event| interface provides a method for firing events with a specified combination of type and bindings.</text>
</assertion>
- <assertion id="d">
- <text>The |Event| interface provides a method for registering observers for events of the same type.</text>
+ <assertion id="cb" testable="false">
+ <text>For an injected |Event|, the specified type is the type parameter specified at the injection point, and the specified bindings are the bindings specified at the injection point.</text>
</assertion>
-
- <assertion id="ea">
- <text>The |select()| method of the provided implementation of |Event |returns a child |Event| for a subtype of the event type and additional event bindings. If no subtype is given, the event type is the same as the parent.</text>
+
+ <assertion id="eaa">
+ <text>The |select()| method returns a child |Event| for a given specified type and additional specified bindings. If no specified type is given, the specified type is the same as the parent.</text>
</assertion>
- <assertion id="eb">
- <text>If two instances of the same binding type are passed to |select()|, a |DuplicateBindingTypeException| is thrown.</text>
+ <assertion id="eab">
+ <text>If the specified type contains a type variable, an |IllegalArgumentException| is thrown.</text>
</assertion>
-
+
+ <assertion id="eba">
+ <text>If two instances of the same binding type are passed to |select()|, an |IllegalArgumentException| is thrown.</text>
+ </assertion>
+
<assertion id="ec">
<text>If an instance of an annotation that is not a binding type is passed to |select()|, an |IllegalArgumentException| is thrown.</text>
</assertion>
-
- <assertion id="ed">
- <text>The |fire()| method of the provided implementation of |Event| must call |BeanManager.fireEvent()|, passing the event type and bindings specified at the injection point. A child |Event| passes the event subtype and additional bindings, along with the bindings of its parent.</text>
+
+ <assertion id="eda">
+ <text>The method |fire()| fires an event with the specified bindings and notifies observers, as defined by Section 10.5, "Observer notification".</text>
</assertion>
-
- <assertion id="ee">
- <text>The |observe()| method of the provided implementation of |Event| must call |BeanManager.addObserver()|, passing the given observer object along with the event type and bindings specified at the injection point. A child |Event| passes the event subtype and additional bindings, along with the bindings of its parent.</text>
+
+ <assertion id="f">
+ <text>If the runtime type of the event object contains a type variable, an |IllegalArgumentException| is thrown.</text>
</assertion>
</section>
- <section id="10.4.2" title="The built-in Event">
+ <section id="10.3.2" title="The built-in Event">
<assertion id="a">
<text>The container must provide a built-in bean with |Event<X>| for every legal observed event type X in its set of bean types.</text>
</assertion>
-
+
<assertion id="b">
<text>The container must provide a built-in bean with every event binding type in its set of binding types.</text>
</assertion>
-
- <assertion id="c">
- <text>The container must provide a built-in bean with deployment type |@Standard|.</text>
- </assertion>
-
+
<assertion id="d">
<text>The container must provide a built-in bean with scope |@Dependent|.</text>
</assertion>
-
+
<assertion id="e">
<text>The container must provide a built-in bean with no bean EL name.</text>
</assertion>
-
+
<assertion id="f">
<text>The container must provide a built-in bean with an implementation provided automatically by the container.</text>
</assertion>
@@ -3647,375 +3547,284 @@
<text>The built-in implementation must be a passivation capable dependency, as defined in Section 6.6.2, "Passivation capable
dependencies".</text>
</assertion>
- </section>
-
- <section id="10.5" title="Observer methods">
- <assertion id="a">
- <text>An observer method is an observer defined via annotations, instead of by explicitly implementing the Observer interface. Unlike regular observers, observer methods are automatically discovered and registered by the container</text>
+ </section>
+
+ <section id="10.4" title="Observer methods">
+ <assertion id="aa">
+ <text>An observer method is a non-abstract method of a managed bean class or session bean class.</text>
</assertion>
- <assertion id="b">
- <text>An observer method must be a method of a managed bean class or session bean class</text>
- </assertion>
-
<assertion id="c">
- <text>An observer method may be either static or non-static</text>
+ <text>An observer method may be either static or non-static.</text>
</assertion>
-
+
<assertion id="d">
- <text>If the bean is a session bean, the observer method must be either a business method of the EJB or a static method of the bean class</text>
+ <text>If the bean is a session bean, the observer method must be either a business method of the EJB or a static method of the bean class.</text>
</assertion>
-
+
<assertion id="e">
- <text>There may be arbitrarily many observer methods with the same event parameter type and bindings</text>
+ <text>There may be arbitrarily many observer methods with the same event parameter type and bindings.</text>
</assertion>
-
+
<assertion id="f">
- <text>A bean may declare multiple observer methods</text>
+ <text>A bean may declare multiple observer methods.</text>
</assertion>
</section>
-
- <section id="10.5.1" title="Event parameter of an observer method">
+
+ <section id="10.4.1" title="Event parameter of an observer method">
<assertion id="a">
<text>Each observer method must have exactly one event parameter, of the same type as the event type it observes. When searching for observer methods for an event, the container considers the type and bindings of the event parameter</text>
</assertion>
-
+
<assertion id="b">
<text>If the event parameter does not explicitly declare any binding, the observer method observes events with no binding</text>
- </assertion>
+ </assertion>
<assertion id="ca">
- <text>The event parameter type may contain a type variable or ~wildcard~. (added from 20090610 spec)</text>
+ <text>The event parameter type may contain a type variable or ~wildcard~.</text>
</assertion>
<assertion id="cb">
- <text>The event parameter type may contain a ~type variable~ or wildcard. (added from 20090610 spec)</text>
+ <text>The event parameter type may contain a ~type variable~ or wildcard.</text>
</assertion>
</section>
-
- <section id="10.5.2" title="Declaring an observer method">
+
+ <section id="10.4.2" title="Declaring an observer method">
<assertion id="a">
<text>An observer method may be declared by annotating a parameter |(a)javax.enterprise.event.Observes|. That parameter is the event parameter. The declared type of the parameter is the observed event type.</text>
</assertion>
-
+
<assertion id="b">
<text>If a method has more than one parameter annotated |@Observes|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="c">
<text>Observed event bindings may be declared by annotating the event parameter.</text>
</assertion>
-
+
<assertion id="d">
<text>If an observer method is annotated |@Produces| the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="e">
<text>If an observer method is annotated |@Initializer| the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="f">
<text>If an observer method is has a parameter annotated |@Disposes|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="g">
<text>If a non-static method of a session bean class has a parameter annotated |@Observes|, and the method is not a business method of the EJB, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
- </assertion>
+ </assertion>
+
+ <assertion id="h">
+ <text>Interceptors and decorators may not declare observer methods. If an interceptor or decorator has a method with a parameter annotated |@Observes|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ </assertion>
</section>
-
- <section id="10.5.3" title="Observer method parameters">
+
+ <section id="10.4.3" title="Observer method parameters">
<assertion id="a">
<text>In addition to the event parameter, observer methods may declare additional parameters, which may declare bindings. These additional parameters are injection points.</text>
</assertion>
</section>
-
- <section id="10.5.4" title="Conditional observer methods">
+
+ <section id="10.4.4" title="Conditional observer methods">
<assertion id="a">
- <text>A conditional observer method may be declared by annotating the event parameter with the |(a)javax.enterprise.event.IfExists| annotation.</text>
+ <text>A conditional observer method may be declared by specifying |notify=IF_EXISTS|.</text>
</assertion>
+
+ <assertion id="b">
+ <text>Beans with scope |@Dependent| may not have conditional observer methods. If a bean with scope |@Dependent| has an observer method declared |notify=IF_EXISTS|, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>The enumeration |javax.enterprise.event.Notify| identifies the supported values of |notify|.</text>
+ </assertion>
</section>
-
- <section id="10.5.5" title="Transactional observer methods">
+
+ <section id="10.4.5" title="Transactional observer methods">
<assertion id="a">
<text>Transactional observer methods are observer methods which receive event notifications during the before or after completion phase of the transaction in which the event was fired. If no transaction is in progress when the event is fired, they are notified at the same time as other observers</text>
</assertion>
-
+
<assertion id="b">
<text>A before completion observer method is called during the before completion phase of the transaction</text>
</assertion>
-
+
<assertion id="c">
<text>An after completion observer method is called during the after completion phase of the transaction</text>
</assertion>
-
+
<assertion id="d">
<text>An after success observer method is called during the after completion phase of the transaction, only when the transaction completes successfully</text>
</assertion>
-
+
<assertion id="e">
<text>An after failure observer method is called during the after completion phase of the transaction, only when the transaction fails</text>
</assertion>
- <assertion id="ga">
- <text>A transactional observer method may be declared by annotating the event parameter of the observer method with one of the four following annotations defined in the package |javax.enterprise.event|.</text>
+ <assertion id="f" testable="false">
+ <text>The enumeration |javax.enterprise.event.TransactionPhase| identifies the kind of transactional observer method.</text>
+ <note>Should we just sigtest this?</note>
</assertion>
-
- <assertion id="ha">
- <text>The |@BeforeTransactionCompletion| annotation specifies that the observer method is a before completion observer method.</text>
+
+ <assertion id="gaa">
+ <text>A transactional observer method may be declared by specifying any value other than |IN_PROGRESS| for |during|.</text>
</assertion>
-
- <assertion id="ia">
- <text>The |@AfterTransactionCompletion| annotation specifies that the observer method is an after completion observer method.</text>
- </assertion>
-
- <assertion id="ja">
- <text>The |@AfterTransactionSuccess| annotation specifies that the observer method is an after success observer method.</text>
- </assertion>
-
- <assertion id="ka">
- <text>The |@AfterTransactionFailure| annotation specifies that the observer method is an after failure observer method.</text>
- </assertion>
-
- <assertion id="la">
- <text>A transactional observer method may not specify more than one of the four types. If a transactional observer method specifies more than one of the four types, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
- </assertion>
</section>
-
- <section id="10.5.6" title="Asynchronous observer methods">
- <assertion id="a">
- <text>An asynchronous observer method may be declared by annotating the event parameter of the observer method |(a)javax.enterprise.event.Asynchronously|.</text>
+
+ <section id="10.5" title="Observer notification">
+ <assertion id="aa">
+ <text>When an event is fired by the application, the container must determine the observers for that event according to the observer resolution defined by Section 10.2, "Observer resolution", then then for each observer method, either invoke the observer method immediately or register the observer method for later invocation during the transaction completion phase, using a JTA |Synchronization|.</text>
</assertion>
-
+
<assertion id="b">
- <text>An asynchronous observer method may also be a transactional observer method. However, it may not be a before completion observer method or a conditional observer method. If an asynchronous observer method is specified as a before completion or conditional observer method, the container automatically detects the problem and treats it as a definition error, as defined in Section 12.4, "Problems detected automatically by the container".</text>
- </assertion>
- </section>
-
- <section id="10.6" title="Observer notification">
- <assertion id="a">
- <text>When an event is fired by the application, the container must determine the observers for that event according to the observer resolution algorithm, then for each observer, call the |notify()| method of the |Observer| interface, passing the event object.</text>
- </assertion>
-
- <assertion id="b">
<text>The order in which observers are called in not defined, and so portable applications should not rely upon the order in which observers are called.</text>
</assertion>
- <assertion id="c">
- <text>Observers may throw exceptions. If an observer throws an exception, the exception aborts processing of the event. No other observers of that event will be called. The |fireEvent()| method rethrows the exception.</text>
+ <assertion id="bb">
+ <text>If the observer method is a transactional observer method and there is currently a JTA transaction in progress, the container calls the observer method during the appropriate transaction completion phase. ~Otherwise, the container calls the observer immediately.~</text>
</assertion>
- <assertion id="d">
- <text>Any observer called before completion of a transaction may call setRollbackOnly() to force a transaction rollback.</text>
+ <assertion id="bc">
+ <text>If the observer method is a transactional observer method and there is currently a JTA transaction in progress, ~the container calls the observer method during the appropriate transaction completion phase.~ Otherwise, the container calls the observer immediately.</text>
</assertion>
- <assertion id="e">
- <text>An observer may not directly initiate, commit or rollback JTA transactions.</text>
+ <assertion id="bd">
+ <text>Any observer method called before completion of a transaction may call |setRollbackOnly()| to force a transaction rollback. An observer method may not directly initiate, commit or rollback JTA transactions.</text>
</assertion>
- </section>
-
- <section id="10.6.1" title="Observer method notification">
- <assertion id="aa">
- <text>For every observer method of an enabled bean, the container is responsible for providing and registering an implementation of the |Observer| interface, that delegates event notifications to the observer method, by calling the observer method as defined in Section 5.4.8, "Invocation of observer methods".</text>
+
+ <assertion id="ca">
+ <text>Observers may throw exceptions. If an observer method is a transactional observer method, any exception is caught and logged by the container. ~Otherwise, the exception aborts processing of the event. No other observer methods of that event will be called. The |fireEvent()| method rethrows the exception. If the exception is a checked exception, it is wrapped and rethrown as an (unchecked) |ObserverException|.~</text>
</assertion>
- <assertion id="b">
- <text>The |notify()| method of the |Observer| implementation for an observer method either invokes the observer method ~immediately~, or asynchronously, or registers the observer method for later invocation during the transaction completion phase, using a JTA Synchronization.</text>
+ <assertion id="cb">
+ <text>Observers may throw exceptions. If an observer method is a transactional observer method, ~any exception is caught and logged by the container.~ Otherwise, the exception aborts processing of the event. No other observer methods of that event will be called. The |fireEvent()| method rethrows the exception. If the exception is a checked exception, it is wrapped and rethrown as an (unchecked) |ObserverException|.</text>
</assertion>
-
- <assertion id="c">
- <text>The |notify()| method of the |Observer| implementation for an observer method either invokes the observer method immediately, ~or asynchronously~, or registers the observer method for later invocation during the transaction completion phase, using a JTA Synchronization</text>
- </assertion>
-
- <assertion id="d">
- <text>The |notify()| method of the |Observer| implementation for an observer method either invokes the observer method immediately, or asynchronously, ~or registers the observer method for later invocation during the transaction completion phase, using a JTA Synchronization~</text>
- </assertion>
-
- <assertion id="e">
- <text>If the observer method is an asynchronous transactional observer method and there is currently a JTA transaction in progress, the observer object calls the observer method asynchronously during the after transaction completion phase</text>
- </assertion>
-
+
<assertion id="f">
- <text>If the observer method is a transactional observer method and there is currently a JTA transaction in progress, the observer object calls the observer method during the appropriate transaction completion phase</text>
+ <text>For a custom implementation of the |ObserverMethod| interface defined in Section 11.1.3, "The ObserverMethod interface", the container must call |getNotify()| and |getTransactionPhase()| to determine is the observer method is a conditional or transactional observer method, and |notify()| to invoke the method.</text>
</assertion>
-
- <assertion id="g">
- <text>If the observer method is an asynchronous observer method, the container calls the observer method asynchronously</text>
- </assertion>
-
- <assertion id="h">
- <text>If none of the conditions of assertions e, f, or g are true, the container calls the observer immediately</text>
- </assertion>
-
- <assertion id="i" testable="false">
- <text>The container is not required to guarantee delivery of asynchronous events in the case of a server shutdown or failure</text>
- <note>This is just a note about the lack of an assertion, and therefore is not testable.</note>
- </assertion>
-
- <assertion id="p" testable="false">
- <text>If the observer is a transactional or asynchronous observer method, any exception is caught and logged by the container</text>
- <note>Cannot be tested as they are not under our control</note>
- </assertion>
-
- <assertion id="q">
- <text>If the observer isn't a transactional or asynchronous observer method, the exception is rethrown by the |notify()| method of the observer object</text>
- </assertion>
-
- <assertion id="r">
- <text>If the exception is a checked exception, it is wrapped and rethrown as an (unchecked) |ObserverException|</text>
- </assertion>
</section>
-
- <section id="10.6.2" title="Observer method invocation context">
- <assertion id="a">
- <text>If the observer method is an asynchronous observer method, it is called with no active transaction, no client security context and with a new request context that is destroyed when the observer method returns. The application context is also active</text>
+
+ <section id="10.5.1" title="Observer method invocation context">
+ <assertion id="ba">
+ <text>If the observer method is a before completion transactional observer method, it is called within the context of the transaction that is about to complete and with the same client security context and lifecycle contexts.</text>
</assertion>
-
- <assertion id="b">
- <text>If the observer method is a |@BeforeTransactionCompletion| transactional observer method, it is called within the context of the transaction that is about to complete and with the same client security context and lifecycle contexts</text>
- </assertion>
-
+
<assertion id="c">
- <text>If the observer method is any other kind of transactional observer method, it is called in an unspecified transaction context, but with the same client security context and lifecycle contexts as the transaction that just completed</text>
+ <text>If the observer method is any other kind of transactional observer method, it is called in an unspecified transaction context, but with the same client security context and lifecycle contexts as the transaction that just completed.</text>
</assertion>
-
+
<assertion id="d">
- <text>If an observer method is not an asynchronous observer method, and not a |@BeforeTransactionCompletion| transactional method, and not any other kind of transactional observer method, then the observer method is called in the same transaction context, client security context and lifecycle contexts as the invocation of |Event.fire()|</text>
+ <text>If an observer method is not an asynchronous observer method, and not a before completion transactional method, and not any other kind of transactional observer method, then the observer method is called in the same transaction context, client security context and lifecycle contexts as the invocation of |Event.fire()| or |BeanManager.fireEvent()|.</text>
</assertion>
-
+
<assertion id="e">
- <text>The transaction and security contexts for a business method of a session bean also depend upon the transaction attribute and |@RunAs| descriptor, if any</text>
- </assertion>
- </section>
-
- <section id="10.7" title="JMS event mappings">
- <assertion id="a">
- <text>An event type may be mapped to a JMS topic.</text>
+ <text>The transaction and security contexts for a business method of a session bean also depend upon the transaction attribute and |@RunAs| descriptor, if any.</text>
</assertion>
-
- <assertion id="b">
- <text>An event mapping is a special kind of observer method that is declared by an interface.</text>
- </assertion>
-
- <assertion id="c">
- <text>The event parameter specifies the mapped event type and bindings.</text>
- </assertion>
-
- <assertion id="d">
- <text>Every message destination representing a topic that any injected parameter resolves to is a mapped topic.</text>
- </assertion>
-
- <assertion id="e">
- <text>An event mapping may be specified as a member of any interface.</text>
- </assertion>
-
- <assertion id="f">
- <text>All observers of mapped event types must be asynchronous observer methods. If an observer for a mapped event type is not an asynchronous observer method, the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
- </assertion>
-
- <assertion id="g">
- <text>For every event mapping, the container must send a message containing the serialized event and its event bindings to every mapped topic whenever an event with the mapped event type and bindings is fired, and monitor every mapped topic for messages containing events of that mapped event type and bindings and notify all local observers whenever a message containing an event is received. Thus, events with the mapped event type and bindings are distributed to other processes which have the same event mapping.</text>
- </assertion>
</section>
-
- <section id="11" title="Portable extensions and the bean manager">
+
+ <section id="11" title="Portable extensions">
<assertion id="a" testable="false">
<text>A portable extension may integrate with the container by providing its own beans, interceptors and decorators to the container.</text>
</assertion>
-
+
<assertion id="b" testable="false">
<text>A portable extension may integrate with the container by injecting dependencies into its own objects using the dependency injection service.</text>
</assertion>
-
+
<assertion id="c" testable="false">
<text>A portable extension may integrate with the container by providing a context implementation for a custom scope.</text>
</assertion>
-
+
<assertion id="d" testable="false">
<text>Bean definitions provided by a portable extension may be associated with a certain activity.</text>
</assertion>
-
+
<assertion id="e" testable="false">
<text>Integration with portable extensions is enabled via the important SPI interfaces Bean and BeanManager.</text>
</assertion>
</section>
-
+
<section id="11.1" title="The Bean interface">
<assertion id="a">
<text>Implementations of |Bean| must also implement the inherited operations defined by the |Contextual| interface defined in Section 6.1, "The Contextual interface".</text>
</assertion>
-
+
<assertion id="b">
<text>The methods |getTypes()|, |getBindings()|, |getScopeType()|, |getDeploymentType()|, |getName()|, |getStereotypes()| and |getInterceptorBindings()| must return the bean types, bindings, scope type, deployment type, EL name, stereotypes and interceptor bindings of the bean, as defined in Chapter 2, Bean definition.</text>
</assertion>
-
+
<assertion id="c">
<text>The method |getInjectionPoints()| returns a set of |InjectionPoint| objects, defined in Section 5.4.9, "Injection point
metadata", representing injection points of the bean, that will be validated by the container at initialization time.</text>
</assertion>
-
+
<assertion id="d">
<text>The method |isPassivationCapable()| must return |true| if the bean is passivation capable, as defined in Section 6.6.1, "Passivation capable beans", and |false| otherwise.</text>
</assertion>
-
+
<assertion id="e">
<text>The method |isNullable()| must return |true| if the method |create()| sometimes returns a |null| value, and |false| otherwise, as defined in Section 5.1.3, "Primitive types and null values".</text>
</assertion>
-
+
<assertion id="f">
<text>An instance of |Bean| exists for every enabled bean in a deployment.</text>
</assertion>
-
+
<assertion id="g" testable="false">
<text>An application or portable extension may add support for new kinds of beans beyond those defined by the this specification (managed beans, session beans, producer methods and fields, resources and message destinations) by implementing |Bean| and registering beans with the container, using the mechanism defined in Section 11.2.6, "Bean registration".</text>
- </assertion>
+ </assertion>
</section>
-
+
<section id="11.1.1" title="The Decorator interface">
<assertion id="a">
<text>The |Bean| object for a decorator must implement the interface |javax.enterprise.inject.spi.Decorator|.</text>
</assertion>
-
+
<assertion id="b">
<text>The method |getDecoratedTypes()| returns the decorated types of the decorator.</text>
</assertion>
-
+
<assertion id="c">
<text>The methods |getDelegateType()| and |getDelegateBindings()| return the delegate type and bindings of the decorator.</text>
</assertion>
</section>
-
+
<section id="11.1.2" title="The Interceptor interface">
<assertion id="a">
<text>The |Bean| object for an interceptor must implement |javax.enterprise.inject.spi.Interceptor|.</text>
</assertion>
-
+
<assertion id="b">
<text>The method |getInterceptorBindingTypes()| returns the interceptor bindings of the interceptor.</text>
</assertion>
-
+
<assertion id="c">
<text>The method |intercepts()| returns |true| if the interceptor intercepts callbacks or business methods of the given type, and |false| otherwise.</text>
</assertion>
-
+
<assertion id="d">
<text>The method |intercept()| invokes the specified kind of lifecycle callback or business method upon the given instance.</text>
</assertion>
-
+
<assertion id="e">
<text>An |InterceptionType| identifies the kind of lifecycle callback or business method.</text>
</assertion>
</section>
-
+
<section id="11.2" title="The BeanManager object">
<assertion id="a">
<text>The container provides a built-in bean with bean type |BeanManager|, scope |@Dependent|, deployment type |@Standard| and binding |@Current|.</text>
</assertion>
-
+
<assertion id="b">
<text>The built-in implementation must be a passivation capable dependency, as defined in Section 6.6.2, "Passivation capable dependencies".</text>
</assertion>
-
+
<assertion id="c">
<text>Any bean may obtain an instance of |BeanManager| by injecting it.</text>
</assertion>
@@ -4023,37 +3832,37 @@
<assertion id="d">
<text>A framework may obtain the |BeanManager| object from JNDI. The container must register an instance of |BeanManager| with name |java:app/BeanManager| in JNDI at initialization time.</text>
</assertion>
-
+
<assertion id="e">
<text>Any operation of |BeanManager| may be called at any time during the execution of the application.</text>
</assertion>
</section>
-
+
<section id="11.2.1" title="Obtaining a contextual reference for a bean">
<assertion id="a">
<text>The method |BeanManager.getReference()| returns a contextual reference for a given bean and bean type, as defined in Section 6.5.3, "Contextual reference for a bean".</text>
</assertion>
-
+
<assertion id="b">
<text>The first parameter is the |Bean| object representing the bean. The second parameter represents the bean type that must be implemented by any client proxy that is returned.</text>
- </assertion>
+ </assertion>
</section>
-
+
<section id="11.2.2" title="Obtaining an injectable reference">
<assertion id="a">
<text>The method |BeanManager.getInjectableReference()| returns an injectable reference for a given injection point, as defined in Section 5.4.1, "Injectable references".</text>
</assertion>
-
+
<assertion id="b">
<text>If the |InjectionPoint| represents a decorator delegate injection point, |getInjectableReference()| returns a delegate, as
defined in Section 8.1.2, "Decorator delegate injection points".</text>
</assertion>
-
+
<assertion id="c">
<text>Implementations of |Bean| usually maintain a reference to an instance of |BeanManager|. When the |Bean| implementation performs dependency injection, it must obtain the contextual instances to inject by calling |BeanManager.getInjectableReference()|, passing an instance of |InjectionPoint| that represents the injection point and the instance of |CreationalContext| that was passed to |Bean.create()|.</text>
- </assertion>
+ </assertion>
</section>
-
+
<section id="11.2.3" title="Obtaining a Bean by type">
<assertion id="a">
<text>The |getBeans()| method of the |BeanManager| interface returns the result of the typesafe resolution algorithm defined in Section 5.1, "Typesafe resolution algorithm".</text>
@@ -4062,50 +3871,50 @@
<assertion id="b">
<text>The first parameter is a required bean type. The remaining parameters are required bindings.</text>
</assertion>
-
+
<assertion id="c">
<text>If no bindings are passed to |getBeans()|, the default binding |@Current| is assumed.</text>
</assertion>
-
+
<assertion id="d">
<text>If a parameterized type with a type parameter or wildcard is passed to |getBeans()|, an |IllegalArgumentException| is thrown.</text>
</assertion>
-
+
<assertion id="e">
<text>If two instances of the same binding type are passed to |getBeans()|, a |DuplicateBindingTypeException| is thrown.</text>
</assertion>
-
+
<assertion id="f">
<text>If an instance of an annotation that is not a binding type is passed to |getBeans()|, an |IllegalArgumentException| is thrown.</text>
</assertion>
</section>
-
+
<section id="11.2.4" title="Obtaining a Bean by name">
<assertion id="a">
<text>The |getBeans()| method of the |BeanManager| interface returns the result of the name resolution algorithm defined in Section 5.2, "EL name resolution algorithm".</text>
</assertion>
-
+
<assertion id="b">
<text>The parameter is a bean EL name.</text>
</assertion>
</section>
-
+
<section id="11.2.5" title="Obtaining the most specialized bean">
<assertion id="a">
<text>The method |BeanManager.getMostSpecializedBean()| returns the |Bean| object representing the most specialized enabled bean registered with the container that specializes the given bean, as defined in Section 4.3.2, "Most specialized enabled bean for a bean".</text>
</assertion>
</section>
-
+
<section id="11.2.6" title="Bean registration">
<assertion id="a">
<text>The |BeanManager.addBean()| method registers a new bean with the container, thereby making it available for injection into other beans.</text>
</assertion>
-
+
<assertion id="b">
<text>The |Bean| parameter may represent an interceptor or decorator.</text>
</assertion>
</section>
-
+
<section id="11.2.7" title="Observer registration">
<assertion id="a">
<text>An observer instance may be registered with the container by calling |BeanManager.addObserver()|.</text>
@@ -4114,7 +3923,7 @@
<assertion id="b">
<text>The first parameter is the observer object. The second parameter is the observed event type. The remaining parameters are optional observed event bindings. The observer is notified when an event object that is assignable to the observed event type is raised with the observed event bindings.</text>
</assertion>
-
+
<assertion id="c">
<text>An observer instance may be deregistered by calling |BeanManager.removeObserver()|.</text>
</assertion>
@@ -4122,185 +3931,185 @@
<assertion id="d">
<text>If two instances of the same binding type are passed to |addObserver()| or |removeObserver()|, a |DuplicateBindingTypeException| is thrown.</text>
</assertion>
-
+
<assertion id="e">
<text>If an instance of an annotation that is not a binding type is passed to |addObserver()| or |removeObserver()|, an |IllegalArgumentException| is thrown.</text>
</assertion>
</section>
-
+
<section id="11.2.8" title="Firing an event">
<assertion id="a">
<text>The method |BeanManager.fireEvent()| fires an event and notifies observers, according to Section 10.6, "Observer notification".</text>
</assertion>
-
+
<assertion id="b">
<text>The first argument is the event object. The remaining parameters are event bindings.</text>
</assertion>
-
+
<assertion id="c">
<text>If the runtime type of the event object passed to |fireEvent()| contains a type variable, an |IllegalArgumentException| is thrown.</text>
</assertion>
-
+
<assertion id="d">
<text>If two instances of the same binding type are passed to |fireEvent()|, a |DuplicateBindingTypeException| is thrown.</text>
</assertion>
-
+
<assertion id="e">
<text>If an instance of an annotation that is not a binding type is passed to |fireEvent()|, an |IllegalArgumentException| is thrown.</text>
</assertion>
</section>
-
+
<section id="11.2.9" title="Observer resolution">
<assertion id="a">
<text>The method |BeanManager.resolveObservers()| resolves observers for an event according to the observer resolution algorithm defined in Section 10.2, "Observer resolution algorithm".</text>
</assertion>
-
+
<assertion id="b">
<text>The first parameter of |resolveObservers()| is the event object. The remaining parameters are event bindings.</text>
</assertion>
-
+
<assertion id="c">
<text>If the runtime type of the event object passed to |resolveObservers()| contains a type variable, an |IllegalArgumentException| is thrown.</text>
</assertion>
-
+
<assertion id="d">
<text>If two instances of the same binding type are passed to |resolveObservers()|, a |DuplicateBindingTypeException| is thrown.</text>
</assertion>
-
+
<assertion id="e">
<text>If an instance of an annotation that is not a binding type is passed to |resolveObservers()|, an |IllegalArgumentException| is thrown.</text>
- </assertion>
+ </assertion>
</section>
-
+
<section id="11.2.10" title="Decorator resolution">
<assertion id="a">
<text>The method |BeanManager.resolveDecorators()| returns the ordered list of enabled decorators for a set of bean types and a set of bindings, as defined in Section 8.3, "Decorator resolution".</text>
</assertion>
-
+
<assertion id="b">
<text>The first argument is the set of bean types of the decorated bean. The annotations are bindings declared by the decorated bean.</text>
</assertion>
-
+
<assertion id="c">
<text>If two instances of the same binding type are passed to |resolveDecorators()|, a |DuplicateBindingTypeException| is thrown.</text>
</assertion>
-
+
<assertion id="d">
<text>If an instance of an annotation that is not a binding type is passed to |resolveDecorators()|, an |IllegalArgumentException| is thrown.</text>
</assertion>
-
+
<assertion id="e">
<text>If the set of bean types is empty, an |IllegalArgumentException| is thrown.</text>
</assertion>
</section>
-
+
<section id="11.2.11" title="Interceptor resolution">
<assertion id="a">
<text>The method |BeanManager.resolveInterceptors()| returns the ordered list of enabled interceptors for a set of interceptor bindings, as defined in Section 9.5, "Interceptor resolution".</text>
</assertion>
-
+
<assertion id="b">
<text>If two instances of the same interceptor binding type are passed to |resolveInterceptors()|, a |DuplicateBindingTypeException| is thrown.</text>
</assertion>
-
+
<assertion id="c">
<text>If no interceptor binding type instance is passed to |resolveInterceptors()|, an |IllegalArgumentException| is thrown.</text>
</assertion>
-
+
<assertion id="d">
<text>If an instance of an annotation that is not an interceptor binding type is passed to |resolveInterceptors()|, an |IllegalArgumentException| is thrown.</text>
</assertion>
</section>
-
+
<section id="11.2.12" title="Dependency validation">
<assertion id="a">
<text>The |BeanManager.validate()| operation validates a dependency.</text>
</assertion>
-
+
<assertion id="b">
<text>The method |validate()| validates the dependency and throws an |InjectionException| if there is a deployment problem (for example, an unsatisfied or ambiguous dependency) associated with the injection point.</text>
- </assertion>
+ </assertion>
</section>
-
+
<section id="11.2.13" title="Enabled deployment types">
<assertion id="a">
<text>The method |BeanManager.getEnabledDeploymentTypes()| exposes the list of enabled deployment types, in order of lower to higher precedence, as defined by Section 2.5.5, "Enabled deployment types".</text>
</assertion>
-
+
<assertion id="b">
<text>Portable extensions may use this method to inspect meta-annotations that appear on the deployment types and thereby discover information about the deployment.</text>
</assertion>
</section>
-
+
<section id="11.2.14" title="Registering a Context">
<assertion id="a">
<text>A custom implementation of |Context| may be associated with a scope type by calling |BeanManager.addContext()|.</text>
</assertion>
</section>
-
+
<section id="11.2.15" title="Obtaining the active Context for a scope">
<assertion id="a">
<text>The method |BeanManager.getContext()| retrieves an active context object associated with the a given scope, as defined in Section 6.5.1, "The active context object for a scope".</text>
</assertion>
</section>
-
- <section id="11.3" title="Alternative metadata sources">
+
+ <section id="11.3" title="Alternative metadata sources">
<assertion id="a">
<text>The interfaces |AnnotatedType|, |AnnotatedField|, |AnnotatedMethod|, |AnnotatedConstructor| and |AnnotatedParameter| in the package |javax.enterprise.inject.spi| allow a portable extension to specify metadata that overrides the annotations that exist on a bean class. The portable extension is responsible for implementing the interfaces, thereby exposing the metadata to the container.</text>
</assertion>
-
+
<assertion id="b">
<text>The interface |Annotated| exposes the overriding annotations and type declarations.</text>
</assertion>
</section>
- <section id="11.3.18" title="Obtaining the active Context for a scope">
+ <section id="11.3.18" title="Obtaining the active Context for a scope">
<assertion id="a">
<text>The method |BeanManager.getContext()| retrieves an active context object associated with the a given scope, as defined in Section 6.5.1, "The active context object for a scope".</text>
</assertion>
</section>
-
+
<section id="11.4" title="Helper objects for Bean implementations">
<assertion id="a">
<text>The BeanManager provides access to helper objects which parse and validate the standard metadata defined by this specification and perform injection upon an object according to the standard injection lifecycle defined in Section 5.4.3, "Injection using the bean constructor".</text>
</assertion>
-
+
<assertion id="b">
<text>The method |createInjectionTarget()| returns a container provided instance of |InjectionTarget| for the given type or throws an |IllegalArgumentException| if there is a definition error associated with any injection point of the type.</text>
</assertion>
-
+
<assertion id="c">
<text>The method |createManagedBean()| returns an instance of |ManagedBean| representing the given managed bean type, or throws an |IllegalArgumentException| if there is any kind of definition error associated with the type.</text>
</assertion>
-
+
<assertion id="d">
<text>When an |AnnotatedType| is passed to |createInjectionTarget()| or |createManagedBean()| the container ignores the annotations and types declared by the elements of the actual Java class and uses the metadata provided via the |Annotated| interface instead.</text>
</assertion>
</section>
-
+
<section id="11.4.1" title="The InjectionTarget interface">
<assertion id="a">
<text>The interface |javax.enterprise.inject.spi.InjectionTarget| provides operations for instantiating and performing dependency injection on instances of a type.</text>
</assertion>
-
+
<assertion id="b">
<text>For any container provided implementation of |InjectionTarget| that represents a class, |produce()| calls the constructor annotated |@Initializer| if it exists, or the constructor with no parameters otherwise, as defined in Section 5.4.3, "Injection using the bean constructor".</text>
</assertion>
-
+
<assertion id="c">
<text>For any container provided implementation of |InjectionTarget| that represents a class, |inject()| performs dependency injection upon the given object. First, the container performs Java EE component environment
injection according to the semantics required by the Java EE platform specification. Next, it sets the value all injected fields, and then calls all the initializer methods, as defined in Section 5.4.4, "Injection of fields and initializer methods". Finally, it calls the |@PostConstruct| callback, if it exists, according to the semantics required by the Java EE platform specification.</text>
</assertion>
-
+
<assertion id="d">
<text>For any container provided implementation of |InjectionTarget| that represents a class, |dispose()| calls the |@PreDestroy| callback, if it exists, according to the semantics required by the Java EE platform
specification.</text>
</assertion>
-
+
<assertion id="e">
<text>For any container provided implementation of |InjectionTarget| that represents a class, |destroy()| destroys dependent objects of the given instance, as defined in Section 5.4.5, "Destruction of dependent objects".</text>
</assertion>
-
+
<assertion id="f">
<text>For any container provided implementation of |InjectionTarget| that represents a class, |getInjectionPoints()| returns the set of |InjectionPoint| objects representing all injected fields, bean constructor parameters and initializer method parameters.</text>
</assertion>
@@ -4308,129 +4117,129 @@
<assertion id="g">
<text>For any container provided implementation of |InjectionTarget| that represents a producer method or field, produce() calls the producer method on, or accesses the producer field of, either the given instance or a contextual instance of the most specialized bean that specializes the bean that declares the producer method, as defined in Section 5.4.6, "Invocation of producer or disposal methods".</text>
</assertion>
-
+
<assertion id="h">
<text>For any container provided implementation of |InjectionTarget| that represents a producer method or field, |inject()| does nothing.</text>
</assertion>
-
+
<assertion id="i">
<text>For any container provided implementation of |InjectionTarget| that represents a producer method or field, |dispose()| calls the disposal method, if it exists, on either the given instance or a contextual instance of the most specialized bean that specializes the bean that declares the producer method, as defined in Section 5.4.6, "Invocation of
producer or disposal methods".</text>
</assertion>
-
+
<assertion id="j">
<text>For any container provided implementation of |InjectionTarget| that represents a producer method or field, |destroy()| destroys dependent objects of the given object, as defined in Section 5.4.5, "Destruction of dependent objects".</text>
</assertion>
-
+
<assertion id="k">
<text>For any container provided implementation of |InjectionTarget| that represents a producer method or field, |getInjectionPoints()| returns the set of |InjectionPoint| objects representing all producer and disposal method parameters.</text>
</assertion>
</section>
-
+
<section id="11.4.2" title="ManagedBean and ProducerBean">
<assertion id="a">
<text>The interface |javax.enterprise.inject.spi.ManagedBean| exposes container provided implementations of |Bean| and |InjectionTarget| for a managed bean class.</text>
</assertion>
-
+
<assertion id="b">
<text>The method |getAnnotatedType()| returns the |AnnotatedType| representing the managed bean class.</text>
</assertion>
-
+
<assertion id="c">
<text>The method |getInjectionTarget()| returns a container provided implementation of |InjectionTarget| for the managed bean class.</text>
</assertion>
-
+
<assertion id="d">
<text>The method |getProducerBeans()| returns a set of |ProducerBean| objects representing the producer methods and fields of the managed bean.</text>
</assertion>
-
+
<assertion id="e">
<text>The method |getObserverMethods()| returns a set of |ObserverMethod| objects representing the observer methods of the bean.</text>
</assertion>
-
+
<assertion id="f">
<text>The |ProducerBean| interface exposes container provided implementations of |Bean| and |InjectionTarget| for a producer method or field.</text>
</assertion>
-
+
<assertion id="g">
<text>The methods |getAnnotatedProducer()| and |getAnnotatedDisposer()| return the |AnnotatedMembers| representing the producer method or field and disposal method respectively.</text>
</assertion>
-
+
<assertion id="h">
<text>The method |getDeclaringBean()| returns a container provided implementation of |Bean| for the bean class that declares the producer method or field.</text>
</assertion>
-
+
<assertion id="i">
<text>The method |getInjectionTarget()| returns a container provided implementation of |InjectionTarget| for the producer method or field.</text>
</assertion>
</section>
-
+
<section id="11.4.3" title="The ObserverMethod interface">
<assertion id="a">
<text>The interface |javax.enterprise.inject.spi.ObserverMethod| exposes a container provided implementation of |Observer| for an observer method, as defined in Section 10.6.1, "Observer method notification" along with the observed event type and bindings and an operation for calling the method.</text>
</assertion>
-
+
<assertion id="b">
<text>The methods |getAnnotatedMethod()| returns the |AnnotatedMethod| representing the observer method.</text>
</assertion>
-
+
<assertion id="c">
<text>The method |getDeclaringBean()| returns a container provided implementation of |Bean| for the bean class that declares the observer method.</text>
</assertion>
-
+
<assertion id="d">
<text>The method |notify()| calls the observer method, upon the given bean instance as defined in Section 5.4.8, "Invocation of observer methods".</text>
</assertion>
-
+
<assertion id="e">
<text>The methods |getObservedEventType()| and |getObservedEventBindings()| return the observed event type and bindings of the observer method.</text>
</assertion>
-
+
<assertion id="f">
<text>The method |getInjectionPoints()| returns the set of |InjectionPoint| objects representing all injected method parameters.</text>
</assertion>
</section>
-
+
<section id="11.5" title="Container lifecycle events">
<assertion id="a">
<text>During the application initialization process, the container fires a series of events, allowing portable extensions to integrate with the container initialization process defined in Section 12.2, "Application initialization lifecycle".</text>
</assertion>
-
+
<assertion id="b">
<text>Observers of these events must be service providers of the service |javax.enterprise.inject.spi.Extension| declared in |META-INF/services|.</text>
</assertion>
-
+
<assertion id="c">
<text>The container instantiates a single instance of each service provider at the beginning of the application initialization process and maintains a reference to it until the application shuts down.</text>
</assertion>
</section>
-
+
<section id="11.5.1" title="BeforeBeanDiscovery event">
<assertion id="a">
<text>The container must fire an event before it begins the bean discovery process. The event object must be of type |javax.enterprise.inject.spi.BeforeBeanDiscovery|.</text>
</assertion>
-
+
<assertion id="ba">
<text>The operations of the |BeforeBeanDiscovery| instance allow a portable extension to declare that any annotation as a _binding type_, scope type, stereotype or interceptor binding type.</text>
</assertion>
-
+
<assertion id="bb">
<text>The operations of the |BeforeBeanDiscovery| instance allow a portable extension to declare that any annotation as a binding type, _scope type_, stereotype or interceptor binding type.</text>
</assertion>
-
+
<assertion id="bc">
<text>The operations of the |BeforeBeanDiscovery| instance allow a portable extension to declare that any annotation as a binding type, scope type, _stereotype_ or interceptor binding type.</text>
</assertion>
-
+
<assertion id="bd">
<text>The operations of the |BeforeBeanDiscovery| instance allow a portable extension to declare that any annotation as a binding type, scope type, stereotype or _interceptor binding type_.</text>
</assertion>
-
+
<assertion id="c">
<text>If any observer method of the |BeforeBeanDiscovery| event throws an exception, the exception is treated as a definition error by the container.</text>
</assertion>
</section>
-
+
<section id="11.5.2" title="AfterBeanDiscovery event">
<assertion id="a">
<text>The container must fire a second event when it has fully completed the bean discovery process, validated that there are no definition errors relating to the discovered beans, and registered |Bean| and |Observer| objects for the discovered beans, but before detecting deployment problems. The event object must be of type |javax.enterprise.inject.spi.AfterBeanDiscovery|.</text>
@@ -4439,119 +4248,119 @@
<assertion id="c">
<text>The method |addDefinitionError()| registers a definition error with the container, causing the container to abort deployment after all observers have been notified.</text>
</assertion>
-
+
<assertion id="d">
<text>If any observer method of the |AfterBeanDiscovery| event throws an exception, the exception is treated as a definition error by the container.</text>
</assertion>
</section>
-
+
<section id="11.5.3" title="AfterDeploymentValidation event">
<assertion id="a">
<text>The container must fire a third event after it has validated that there are no deployment problems and before creating contexts or processing requests. The event object must be of type |javax.enterprise.inject.spi.AfterDeploymentValidation|.</text>
</assertion>
-
+
<assertion id="b">
<text>The method |addDeploymentProblem()| registers a deployment problem with the container, causing the container to abort deployment after all observers have been notified.</text>
</assertion>
-
+
<assertion id="c">
<text>If any observer method of the |AfterDeploymentValidation| event throws an exception, the exception is treated as a deployment problem by the container.</text>
</assertion>
-
+
<assertion id="d">
<text>The container must not allow any request to be processed by the deployment until all observers of this event return.</text>
</assertion>
</section>
-
+
<section id="11.5.4" title="BeforeShutdown event">
<assertion id="a">
<text>The container must fire a final event after it has finished processing requests and destroyed all contexts. The event object must be of type |javax.enterprise.inject.spi.BeforeShutdown|.</text>
</assertion>
-
+
<assertion id="b">
<text>If any observer method of the |BeforeShutdown| event throws an exception, the exception is treated as a deployment problem by the container.</text>
</assertion>
</section>
-
+
<section id="11.5.5" title="ProcessAnnotatedType event">
<assertion id="a">
<text>The container must fire an event for each Java class it discovers, before it reads the declared annotations. The event object must be of type |javax.enterprise.inject.spi.ProcessAnnotatedType<X>|, where |X| is the class.</text>
</assertion>
-
+
<assertion id="b">
<text>The |getAnnotatedType()|/|setAnnotatedType()| property accessor pair provides access to the |AnnotatedType| object that will be used by the container to read the declared annotations.</text>
</assertion>
-
+
<assertion id="c">
<text>Any observer of this event is permitted to wrap and/or replace the |annotatedType| property of |ProcessAnnotatedType|.</text>
</assertion>
-
+
<assertion id="d">
<text>The container must use the final value of this property, after all observers have been called, to read the annotations of this class.</text>
</assertion>
</section>
-
+
<section id="11.5.6" title="ProcessInjectionTarget event">
<assertion id="a">
<text>The container must fire an event for each managed bean, session bean, Java EE component class supporting injection, producer method or producer field it discovers. The event object must be of type |javax.enterprise.inject.spi.ProcessInjectionTarget<X>|, where |X| is the managed bean class, session bean class or Java EE component class supporting injection.</text>
</assertion>
-
+
<assertion id="b">
<text>The |getInjectionTarget()|/|setInjectionTarget()| property accessor pair provides access to the |InjectionTarget| object that will be used by the container to perform injection.</text>
</assertion>
-
+
<assertion id="c">
<text>The method |getAnnotatedType()| returns the |AnnotatedType| representing the managed bean, session bean or other Java EE component class supporting injection.</text>
</assertion>
-
+
<assertion id="d">
<text>The method |addDefinitionError()| registers a definition error with the container, causing the container to abort deployment after bean discovery is complete.</text>
</assertion>
-
+
<assertion id="e">
<text>Any observer of this event is permitted to wrap and/or replace the |injectionTarget| property of |ProcessInjectionTarget|. The container must use the final value of this property, after all observers have been called, whenever it performs injection upon the managed bean, session bean or other Java EE component class supporting injection.</text>
</assertion>
</section>
-
+
<section id="11.5.7" title="ProcessBean event">
<assertion id="a">
<text>The container must fire an event for each bean it discovers, before registering the |Bean| object. The event object must be of type |javax.enterprise.inject.spi.ProcessBean|.</text>
</assertion>
-
+
<assertion id="b">
<text>For a managed bean with bean class |X|, the container must raise an event of type |ProcessBean<X>|.</text>
</assertion>
-
+
<assertion id="c">
<text>For a session bean with bean class local view |X|, the container must raise an event of type |ProcessBean<X>|.</text>
</assertion>
-
+
<assertion id="d">
<text>For a session bean with no bean class local view |X|, the container must raise an event of type |ProcessBean<Object>|.</text>
</assertion>
-
+
<assertion id="e">
<text>For a producer method or field with method return type or field type |X|, the container must raise an event of type |ProcessBean<
X>|.</text>
</assertion>
-
+
<assertion id="f">
<text>The |getBean()|/|setBean()| property accessor pair provides access to the |Bean| object that is about to be registered.</text>
</assertion>
-
+
<assertion id="g">
<text>The method |getAnnotated()| returns the |AnnotatedType|, |AnnotatedField| or |AnnotatedMethod|.</text>
</assertion>
-
+
<assertion id="h">
<text>The method |addDefinitionError()| registers a definition error with the container, causing the container to abort deployment after bean discovery is complete.</text>
</assertion>
-
+
<assertion id="i">
<text>Any observer of this event is permitted to wrap and/or replace the bean property of |ProcessBean|. When all observers have been called, the container registers the final value of this property. The container must not register any |Bean| object if any observer called |addDefinitionError()|.</text>
</assertion>
</section>
-
+
<section id="11.5.8" title="ProcessObserver event">
<assertion id="a">
<text>The container must fire an event for each observer method it discovers, before registering the |Observer| object. The event object must be of type |javax.enterprise.inject.spi.ProcessObserver<T>| where |T| is the observed event type.</text>
@@ -4560,186 +4369,186 @@
<assertion id="b">
<text>The |getObserver()|/|setObserver()| property accessor pair provides access to the |Observer| object that is about to be registered.</text>
</assertion>
-
+
<assertion id="c">
<text>The method |getAnnotatedMethod()| returns the |AnnotatedMethod|.</text>
</assertion>
-
+
<assertion id="d">
<text>The method |addDefinitionError()| registers a definition error with the container, causing the container to abort deployment after bean discovery is complete.</text>
</assertion>
-
+
<assertion id="e">
<text>Any observer of this event is permitted to wrap and/or replace the observer property of |ProcessObserver|. When all observers have been called, the container registers the final value of this property. The container must not register any |ObserverMethod| object if any observer called |addDefinitionError()|.</text>
- </assertion>
+ </assertion>
</section>
-
+
<section id="11.6" title="Activities">
<assertion id="a">
<text>Activities are represented by instances of |BeanManager|. The method |createActivity()| creates a new child activity of an activity.</text>
</assertion>
-
+
<assertion id="b">
<text>A child activity inherits all beans, interceptors, decorators, observers, and contexts defined by its direct and indirect parent activities.</text>
</assertion>
-
+
<assertion id="c">
<text>Every bean belonging to a parent activity also belongs to the child activity, is eligible for injection into other beans belonging to the child activity and may be obtained by dynamic lookup via the child activity.</text>
</assertion>
-
+
<assertion id="d">
<text>Every interceptor and decorator belonging to a parent activity also belongs to the child activity and may be applied to any bean belonging to the child activity.</text>
</assertion>
-
+
<assertion id="c">
<text>Every observer belonging to a parent activity also belongs to the child activity and receives events fired via the child activity.</text>
</assertion>
-
+
<assertion id="d">
<text>Every context object belonging to the parent activity also belongs to the child activity.</text>
</assertion>
-
+
<assertion id="e">
<text>Beans and observers may be registered with an activity by calling |addBean()| or |addObserver()| on the |BeanManager| object that represents the activity.</text>
</assertion>
-
+
<assertion id="f">
<text>Beans and observers registered with an activity are visible only to that activity and its children�they are never visible to direct or indirect parent activities, or to other children of the parent activity.</text>
</assertion>
-
+
<assertion id="g">
<text>A bean registered with the child activity is not available for injection into any bean registered with a parent activity.</text>
</assertion>
-
+
<assertion id="h">
<text>A bean registered with a child activity is not available for injection into a non-contextual instance.</text>
</assertion>
-
+
<assertion id="i">
<text>A bean registered with a child activity may not be obtained by dynamic lookup via the parent activity.</text>
</assertion>
-
+
<assertion id="j">
<text>An observer registered with the child activity does not receive events fired via a parent activity.</text>
</assertion>
-
+
<assertion id="k">
<text>If a bean registered with a child activity has the bean type and all bindings of some injection point of some bean registered with a direct or indirect parent activity, the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="l">
<text>Interceptors and decorators may not be registered with a child activity. The |addInterceptor()| and |addDecorator()| methods throw |UnsupportedOperationException| when called on a |BeanManager| object that represents a child activity.</text>
</assertion>
</section>
-
+
<section id="11.6.1" title="Current activity">
<assertion id="a">
<text>An activity may be associated with the current context for a normal scope by calling |setCurrent()|, passing the normal scope type.</text>
</assertion>
-
+
<assertion id="b">
<text>If the given scope is inactive when |setCurrent()| is called, a |ContextNotActiveException| is thrown.</text>
</assertion>
-
+
<assertion id="c">
<text>If the given scope type is not a normal scope, an |IllegalArgumentException| is thrown.</text>
</assertion>
-
+
<assertion id="d">
<text>All EL evaluations (as defined Section 5.6, "Integration with Unified EL"), all calls to any injected |BeanManager| object or |BeanManager| object obtained via JNDI lookup (as defined by Section 11.2, "The BeanManager object"), all calls to any injected |Event| object (as defined in Section 10.4.1, "The Event interface") and all calls to any injected Instance object (as defined by Section 5.5.1, "The Instance interface") are processed by the current activity.</text>
</assertion>
-
+
<assertion id="e">
<text>If the root activity has no active normal scope such that the current context for that scope has an associated activity, the root activity is the current activity.</text>
</assertion>
-
+
<assertion id="f">
<text>If the root activity has exactly one active normal scope such that the current context for that scope has an associated activity, that activity is the current activity.</text>
</assertion>
-
+
<assertion id="g">
<text>Otherwise, there is no well-defined current activity, and the behavior is undefined. Portable frameworks and applications should not depend upon the behavior of the container when two different current contexts have an associated activity.</text>
</assertion>
-
+
<assertion id="h">
<text>A bean registered with an activity is only available to Unified EL expressions that are evaluated when that activity or one of its children is the current activity.</text>
</assertion>
</section>
-
+
<section id="12" title="Packaging and Deployment">
-
+
</section>
-
+
<section id="12.1" title="Bean deployment archives">
<assertion id="a">
<text>Bean classes must be deployed in any EAR, JAR, WAR, EJB-JAR or RAR archive or directory in the application classpath that has a file named |beans.xml| in the metadata directory (META-INF, or WEB-INF in the case of a WAR). Any such archive or directory is called a bean deployment archive.</text>
</assertion>
-
+
<assertion id="b">
<text>When searching for beans, the container considers any Java class in any bean deployment archive, and any |ejb-jar.xml| file in any bean deployment archive.</text>
</assertion>
-
+
<assertion id="c">
<text>If a bean is deployed to a location that is not in the application classpath, or does not contain a file named |beans.xml| in the metadata directory, it will not be discovered by the container.</text>
</assertion>
</section>
-
+
<section id="12.2" title="Application initialization lifecycle">
<assertion id="a">
<text>When an application is started, the container performs the following steps.</text>
</assertion>
-
+
<assertion id="b">
<text>First, the container must search for service providers for the service |javax.enterprise.inject.spi.Extension| defined in Section 11.5, "Container lifecycle events", instantiate a single instance of each service provider, and search the service provider class for observer methods of initialization events.</text>
</assertion>
-
+
<assertion id="c">
<text>Next, the container must fire an event of type |BeforeBeanDiscovery|, as defined in Section 11.5.1, "BeforeBeanDiscovery event".</text>
</assertion>
-
+
<assertion id="d">
<text>Next, the container must perform bean discovery, and abort initialization of the application if any definition errors exist, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="e">
<text>Next, the container must fire an event of type |AfterBeanDiscovery|, as defined in Section 11.5.2, "AfterBeanDiscovery event", and abort initialization of the application if any observer registers a definition error.</text>
</assertion>
-
+
<assertion id="f">
<text>Next, the container must detect deployment problems by validating bean dependencies and specialization and abort initialization of the application if any deployment problems exist, as defined in Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
-
+
<assertion id="g">
<text>Next, the container must fire an event of type |AfterDeploymentValidation|, as defined in Section 11.5.3, "AfterDeploymentValidation event", and abort initialization of the application if any observer registers a deployment problem.</text>
</assertion>
-
+
<assertion id="h">
<text>Finally, the container begins directing requests to the application.</text>
- </assertion>
+ </assertion>
</section>
-
+
<section id="12.3" title="Bean discovery">
<assertion id="a">
<text>The container automatically discovers managed beans (according to the rules of Section 3.2.1, "Which Java classes are managed beans?") and session beans in bean deployment archives and searches the bean classes for producer methods, producer fields, disposal methods and observer methods.</text>
</assertion>
-
+
<assertion id="b">
<text>For each Java class in any bean deployment archive, the container must create an |AnnotatedType| representing the class and fire an event of type |ProcessAnnotatedType|, as defined in Section
11.5.5, "ProcessAnnotatedType event".</text>
</assertion>
-
+
<assertion id="c">
<text>For each Java class in any bean deployment archive, the container must inspect the class metadata to determine if it is a bean or other Java EE component class supporting injection.</text>
</assertion>
-
+
<assertion id="d">
<text>For each Java class in any bean deployment archive, the container must detect definition errors by validating the class and its metadata.</text>
</assertion>
-
+
<assertion id="e">
<text>For each Java class in any bean deployment archive, the container must, if the class is a managed bean, session bean, producer method or field, or other Java EE component class supporting injection, create an |InjectionTarget| for the class, as defined in Section 11.4.1, "The InjectionTarget interface", and fire an event of type |ProcessInjectionTarget|, as defined in Section 11.5.6, "ProcessInjectionTarget event"</text>
</assertion>
-
+
<assertion id="f">
<text>For each Java class in any bean deployment archive, the container must, if the class is a bean, create a |Bean| object that implements the rules defined in Chapter 7, "Bean lifecycle", and fire an event of type |ProcessBean|, as defined in Section 11.5.7, "ProcessBean event".</text>
</assertion>
@@ -4747,49 +4556,49 @@
<assertion id="g">
<text>If the class is a bean, the container must search the class for producer methods and fields, and for each producer method or field create an InjectionTarget, as defined in Section 11.4.1, "The InjectionTarget interface", for the producer method or field and fire an event of type |ProcessInjectionTarget|, as defined in Section 11.5.6, "ProcessInjectionTarget event".</text>
</assertion>
-
+
<assertion id="h">
<text>If the class is a bean, the container must search the class for producer methods and fields, and for each producer method or field create a Bean object that implements the rules defined in Chapter 7, Bean lifecycle and fire an event of type |ProcessBean|, as defined in Section 11.5.7, "ProcessBean event".</text>
</assertion>
-
+
<assertion id="i">
<text>If the class is a bean, the container must search the class for observer methods, and for each observer method create an Observer, as defined in Section 10.6.1, �Observer method notification�, for the observer method and fire an event of type ProcessObserver, as defined in Section 11.5.8, �ProcessObserver event�.</text>
</assertion>
-
+
<assertion id="j">
<text>For each session bean declared in |ejb-jar.xml| in any bean deployment archive the container must create a |Bean| object that implements the rules defined in Chapter 7, "Bean lifecycle" and fire an event of type ProcessBean.</text>
</assertion>
-
+
<assertion id="k">
<text>The container determines which beans, interceptors and decorators are enabled, according to the rules defined in Section 2.5.5, "Enabled deployment types", Section 9.4, "Interceptor enablement and ordering" and Section 8.2, "Decorator enablement and ordering", taking into account any <Deploy>, <Interceptors> and <Decorators> declarations in the |beans.xml| files, and registers the |Bean| and |Observer| objects.</text>
</assertion>
-
+
<assertion id="l">
<text>For each enabled bean that is not an interceptor or decorator, the container creates and registers an instance of |Bean| that implements the rules of Chapter 7, "Bean lifecycle".</text>
</assertion>
-
+
<assertion id="m">
<text>For each enabled interceptor, the container creates and registers an instance of |Interceptor|, as defined in Section 11.1.2, "The Interceptor interface".</text>
</assertion>
-
+
<assertion id="n">
<text>For each enabled decorator, the container creates and registers an instance of |Decorator|, as defined in Section 11.1.1, "The Decorator interface".</text>
</assertion>
-
+
<assertion id="o">
<text>For each observer method of an enabled bean, the container creates and registers an instance of |Observer| that implements the rules of Section 10.6.1, "Observer method notification".</text>
</assertion>
</section>
-
+
<section id="12.4" title="Problems detected automatically by the container">
<assertion id="a">
<text>Definition errors may be detected by tooling at development time, and are also detected by the container at initialization time. If a definition error exists in a deployment, initialization will be aborted by the container.</text>
</assertion>
-
+
<assertion id="b">
<text>Deployment problems are detected by the container at initialization time. If a deployment problem exists in a deployment, initialization will be aborted by the container.</text>
</assertion>
-
+
<assertion id="c">
<text>Execution errors are represented by instances of |javax.enterprise.inject.InjectionException| and its subclasses.</text>
</assertion>
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3044 - in tck/trunk: doc and 2 other directories.
by webbeans-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-07-12 23:41:42 -0400 (Sun, 12 Jul 2009)
New Revision: 3044
Added:
tck/trunk/doc/
tck/trunk/doc/reference/
tck/trunk/doc/reference/Makefile
tck/trunk/doc/reference/en-US/
tck/trunk/doc/reference/en-US/Author_Group.xml
tck/trunk/doc/reference/en-US/Book_Info.xml
tck/trunk/doc/reference/en-US/Book_Preface.xml
tck/trunk/doc/reference/en-US/configuration.xml
tck/trunk/doc/reference/en-US/executing.xml
tck/trunk/doc/reference/en-US/installation.xml
tck/trunk/doc/reference/en-US/introduction.xml
tck/trunk/doc/reference/en-US/master.xml
tck/trunk/doc/reference/en-US/part1-background.xml
tck/trunk/doc/reference/en-US/part2-setup.xml
tck/trunk/doc/reference/en-US/part3-execution.xml
tck/trunk/doc/reference/pom.xml
Log:
initial sketch of TCK documentation...work in progress
Property changes on: tck/trunk/doc/reference
___________________________________________________________________
Name: svn:ignore
+ target
jsr299-tck-reference.pdf
Added: tck/trunk/doc/reference/Makefile
===================================================================
--- tck/trunk/doc/reference/Makefile (rev 0)
+++ tck/trunk/doc/reference/Makefile 2009-07-13 03:41:42 UTC (rev 3044)
@@ -0,0 +1,15 @@
+#Makefile for Red Hat Documentation
+#Created by Jeff Fearn <jfearn(a)redhat.com>
+#Copyright Red Hat Inc. 2006
+
+XML_LANG = en-US
+DOCNAME = JSR299_TCK_Reference_Guide
+PRODUCT = JSR299_TCK
+BRAND = JBoss
+
+TRANSLATIONS = $(XML_LANG)
+OTHER_LANGS = es-ES fr-FR it-IT ja-JP zh-CN ko-KR zh-TW pt-BR de-DE
+#TRANSLATIONS = $(XML_LANG) $(OTHER_LANGS)
+
+COMMON_CONFIG = /usr/share/publican
+include $(COMMON_CONFIG)/make/Makefile.common
Property changes on: tck/trunk/doc/reference/Makefile
___________________________________________________________________
Name: svn:executable
+ *
Added: tck/trunk/doc/reference/en-US/Author_Group.xml
===================================================================
--- tck/trunk/doc/reference/en-US/Author_Group.xml (rev 0)
+++ tck/trunk/doc/reference/en-US/Author_Group.xml 2009-07-13 03:41:42 UTC (rev 3044)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE authorgroup PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
+<authorgroup>
+ <author>
+ <firstname>Gavin</firstname>
+ <surname>King</surname>
+ <affiliation>
+ <jobtitle>JSR-299 specification lead</jobtitle>
+ <orgname>Red Hat Middleware LLC</orgname>
+ </affiliation>
+ </author>
+ <author>
+ <firstname>Pete</firstname>
+ <surname>Muir</surname>
+ <affiliation>
+ <jobtitle>Web Beans (JSR-299 Reference Implementation) lead</jobtitle>
+ <orgname>Red Hat Middleware LLC</orgname>
+ </affiliation>
+ </author>
+ <author>
+ <firstname>Dan</firstname>
+ <surname>Allen</surname>
+ <affiliation>
+ <jobtitle>Web Beans (JSR-299 Reference Implementation) developer</jobtitle>
+ <orgname>Red Hat Middleware LLC</orgname>
+ </affiliation>
+ </author>
+</authorgroup>
Added: tck/trunk/doc/reference/en-US/Book_Info.xml
===================================================================
--- tck/trunk/doc/reference/en-US/Book_Info.xml (rev 0)
+++ tck/trunk/doc/reference/en-US/Book_Info.xml 2009-07-13 03:41:42 UTC (rev 3044)
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE bookinfo PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
+<bookinfo>
+ <title>Technology Compatibility Kit Reference Guide for JSR-299: Context and Dependency Injection for Java EE</title>
+ <subtitle>For Technology Licensees</subtitle>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Author_Group.xml"/>
+</bookinfo>
Added: tck/trunk/doc/reference/en-US/Book_Preface.xml
===================================================================
--- tck/trunk/doc/reference/en-US/Book_Preface.xml (rev 0)
+++ tck/trunk/doc/reference/en-US/Book_Preface.xml 2009-07-13 03:41:42 UTC (rev 3044)
@@ -0,0 +1,32 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- This document was created with Syntext Serna Free. --><!DOCTYPE preface PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
+<preface id="book-preface">
+ <title>Preface</title>
+ <para>This guide describes how to install, configure, and run the Technology Compatibility Kit (TCK) that is used to verify the compatibility of a licensee's implementation of the JSR-299: Context and Dependency Injection for Java EE specification.</para>
+ <para>The JSR-299 TCK is built atop the JBoss Test Harness, a portable and configurable automated test suite for authoring unit and integration tests against Java EE artifacts. The JSR-299 TCK 1.0 uses the JBoss Test Harness version 1.0.0 to execute the test suite.</para>
+ <section id="target-audience">
+ <title>Who Should Use This Book</title>
+ <para>This guide is for licensees of the Context and Dependency Injection for Java EE 1.0 (JSR-299) technology to assist in running the test suite that verifies the compatibility of their implementation.</para>
+ </section>
+ <section id="before-reading">
+ <title>Before You Read This Book</title>
+ <para>Before reading this guide, you should familiarize yourself with the Java EE programming model, specifically the Enterprise JavaBeans (EJB) 3.0 and the Contexts and Dependency Injection (CDI) for Java EE 1.0 specifications. A good resource for the Java EE programming model is the <ulink url="http://jcp.org">JCP</ulink> web site.</para>
+ <para>The JSR-299 TCK is based on the Context and Dependency Injection for Java EE technology specification 1.0 (JSR-299). Information about the specification, including links to the specification documents, can be found on the <ulink url="http://jcp.org/en/jsr/detail?id=299">JSR-299 JCP page</ulink>.</para>
+ <para>Before running the tests in the JSR-299 TCK, read and become familiar with the JBoss Test Harness Reference Guide, which describes how the test harness functions.</para>
+ </section>
+ <section id="book-organization">
+ <title>How This Book Is Organized</title>
+ <para>If you are running the JSR-299 TCK for the first time, read Chapter 1 and Chapter 2 completely for the necessary background information about the TCK and its purpose. Once you have reviewed that material, perform the steps outlined in the remaining chapters.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Chapter 1 gives an overview of the principles that apply generally to all Technology Compatibility Kits (TCKs) and describes the JSR-299 TCK. This chapter also includes a broad listing of the steps for starting and running the JSR-299 TCK.</para>
+ </listitem>
+ <listitem>
+ <para>Chapter 2 describes the conformance testing procedure and testing requirements.</para>
+ </listitem>
+ <listitem>
+ <para>Chapter 3 explains...</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+</preface>
Added: tck/trunk/doc/reference/en-US/configuration.xml
===================================================================
--- tck/trunk/doc/reference/en-US/configuration.xml (rev 0)
+++ tck/trunk/doc/reference/en-US/configuration.xml 2009-07-13 03:41:42 UTC (rev 3044)
@@ -0,0 +1,167 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
+<chapter id="configuration">
+ <title>Configuration</title>
+ <para>This chapter examples...</para>
+ <section>
+ <title>JBoss Test Harness Properties</title>
+ <para>The JBoss Test Harness allows the test suite to be launched in a pluggable fashion. In order to execute the TCK, the JBoss Test Harness must be configured by specifying implementations of the test launcher and container APIs. All the required configuration that pertains to the JBoss Test Harness is applicable to the TCK as well.</para>
+ <para>System properties and/or the resource META-INF/jboss-test-harness.properties, a Java properties file, are used to configure the JBoss Test Harness. The bootstrap configuration builder looks to the property <literal>org.jboss.testharness.api.ConfigurationBuilder</literal>, the first property listed in table X.X, for the fully qualified class name of a concreate configuration builder implementation. This implementation loads the remaining configuration settings and produces a JBoss Test Harness configuration.</para>
+ <para>For you convenience, a default configuration builder implementation is provided, <literal>org.jboss.testharness.impl.PropertiesBasedConfigurationBuilder</literal>, which retrieves all the JBoss Test Harness configuration settings from Java properties. It does so by aggregating the system properties and the properties defined in the META-INF/jboss-test-harness.properties resource in any classpath entry under a single properties map, allowing you to segment the configuration settings as needed.</para>
+ <para>A complete list of configuration properties for the JBoss Test Harness is itemized in table X.X, along with the default value (if any) and a description for each property.</para>
+ <table frame="all">
+ <title/>
+ <tgroup cols="2">
+ <colspec colnum="1" colname="property" colwidth="5*"/>
+ <colspec colnum="2" colname="description" colwidth="2*"/>
+ <thead>
+ <row>
+ <entry>Property = Default Value</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <literal>org.jboss.testharness.api.ConfigurationBuilder=</literal>
+ <literal>o.j.t.impl.PropertiesBasedConfigurationBuilder</literal>
+ </entry>
+ <entry>The configuration bootstrap class for the JBoss Test Harness.</entry>
+ </row>
+ <row>
+ <entry>
+ <literal>org.jboss.testharness.testPackage=</literal>
+ </entry>
+ <entry>The top-level Java package containing the classes to be tested.</entry>
+ </row>
+ <row>
+ <entry>
+ <literal>org.jboss.testharness.libraryDirectory=</literal>
+ </entry>
+ <entry>Directory containing extra JARs.</entry>
+ </row>
+ <row>
+ <entry>
+ <literal>org.jboss.testharness.standalone=true</literal>
+ </entry>
+ <entry>Tests are run using standalone mode if true or using in-container mode if false.</entry>
+ </row>
+ <row>
+ <entry>
+ <literal>org.jboss.testharness.runIntegrationTests=false</literal>
+ </entry>
+ <entry>If true, integration tests are run. In-container mode must be activated.</entry>
+ </row>
+ <row>
+ <entry>
+ <literal>org.jboss.testharness.spi.Containers=</literal>
+ </entry>
+ <entry>The container implementation for deploying and executing in-container tests.</entry>
+ </row>
+ <row>
+ <entry>
+ <literal>org.jboss.testharness.host=localhost:8080</literal>
+ </entry>
+ <entry>The host and port on which the container is running.</entry>
+ </row>
+ <row>
+ <entry>
+ <literal>org.jboss.testharness.connectDelay=5000</literal>
+ </entry>
+ <entry>The timeout (ms) when attempting to connect to the container.</entry>
+ </row>
+ <row>
+ <entry>
+ <literal>org.jboss.testharness.connectRetries=2</literal>
+ </entry>
+ <entry>The number of connection retries used when connecting the the container.</entry>
+ </row>
+ <row>
+ <entry>
+ <literal>org.jboss.testharness.api.TestLauncher=</literal>
+ </entry>
+ <entry>The in-container test launcher.</entry>
+ </row>
+ <row>
+ <entry>
+ <literal>org.jboss.testharness.container.\</literal>
+ <literal>deploymentExceptionTransformer=</literal>
+ </entry>
+ <entry>A class which maps deployment exceptions to expected exceptions declared in test case. Returns original exception by default.</entry>
+ </row>
+ <row>
+ <entry>
+ <literal>org.jboss.testharness.container.forceRestart=false</literal>
+ </entry>
+ <entry>Whether the container should be restarted before the tests are executed.</entry>
+ </row>
+ <row>
+ <entry>
+ <literal>org.jboss.testharness.container.extraConfigurationDir=</literal>
+ </entry>
+ <entry>A directory containing a build.properties or local.build.properties files that define additional properties.</entry>
+ </row>
+ <row>
+ <entry>
+ <literal>org.jboss.testharness.spi.StandaloneContainers=</literal>
+ </entry>
+ <entry>The container implementation for executing standalone tests.</entry>
+ </row>
+ <row>
+ <entry>
+ <literal>dumpArtifacts=false</literal>
+ </entry>
+ <entry>Whether the test artifacts should be written to disk for inspection.</entry>
+ </row>
+ <row>
+ <entry>
+ <literal>org.jboss.testharness.outputDirectory=</literal>
+ <literal>%java.io.tmpdir%/jsr-299-tck/</literal>
+ </entry>
+ <entry>Directory where test artifacts will be written to disk, if <literal>dumpArtifacts</literal> is true.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>The general TCK porting package is also configured using the Java properties file META-INF/jboss-test-harness.properties or system properties. Each implementation of the Porting Package SPI should be specified using the fully-qualified domain name (FQDN) of the interface as the property value. The properties which must be satisified are listed in table X.XX.</para>
+ <table frame="all">
+ <title/>
+ <tgroup cols="2">
+ <colspec colname="property"/>
+ <colspec colname="description"/>
+ <thead>
+ <row>
+ <entry>Property</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <literal>org.jboss.jsr299.tck.spi.Managers</literal>
+ </entry>
+ <entry>Operations pertaining to the BeanManager.</entry>
+ </row>
+ <row>
+ <entry>
+ <literal>org.jboss.jsr299.tck.spi.Beans</literal>
+ </entry>
+ <entry>Operations pertaining to bean types.</entry>
+ </row>
+ <row>
+ <entry>
+ <literal>org.jboss.jsr299.tck.spi.Contexts</literal>
+ </entry>
+ <entry>Operations pertaining to Java EE contexts.</entry>
+ </row>
+ <row>
+ <entry>
+ <literal>org.jboss.jsr299.tck.spi.EL</literal>
+ </entry>
+ <entry>Operations pertaining to the Unified EL.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+</chapter>
Added: tck/trunk/doc/reference/en-US/executing.xml
===================================================================
--- tck/trunk/doc/reference/en-US/executing.xml (rev 0)
+++ tck/trunk/doc/reference/en-US/executing.xml 2009-07-13 03:41:42 UTC (rev 3044)
@@ -0,0 +1,41 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
+<chapter id="executing">
+ <title>Executing Tests</title>
+ <para>This chapter explains how to execute the TCK against the JSR-299 RI as well as your own implementation. The JSR-299 TCK uses the Maven 2 TestNG plugin and the JBoss Test Harness to execute the tests in the test suite. For detailed instructions that explain how to use the JBoss Test Harness, see the JBoss Test Harness documentation.</para>
+ <section>
+ <title>Launching the Test Suite</title>
+ <para>Each test class is treated as an individual artifact (hence the <literal>@Artifact</literal> annotation on the class). All test methods (i.e., methods annotated with <literal>@Test</literal>) in the same class are run in a single environment, meaning bean discovery occurs exactly once per artifact and the same BeanManager is used by each test method in the class.</para>
+ <para>The test suite is executed by the TestNG plugin for Maven 2 during the test phase of the Maven 2 life cycle. The execution happens within a TCK runner project (as opposed to the TCK project itself). Web Beans includes a TCK runner project that executes the JSR-299 TCK against the JSR-299 RI (Web Beans) on JBoss AS 5.1. To execute the JSR-299 TCK against your own JSR-299 implementation, you must modify the TCK runner project included with Web Beans to use your JSR-299 implementation as described in section XX.X.</para>
+ <section>
+ <title>Running the Tests In Standalone Mode</title>
+ <para>To execute the TCK test suite against the JSR-299 RI, first change to the jboss-tck-runner directory in the extracted Web Beans distribution:</para>
+ <programlisting>cd <webbeans_install_dir>/jboss-tck-runner</programlisting>
+ <para>Then execute the Maven 2 life cycle through the test phase:</para>
+ <programlisting>mvn test</programlisting>
+ <para>Without any command-line flags, the test suite is run in standalone mode, which means that any test class with the <literal>@org.jboss.testharness.impl.packaging.IntegrationTest</literal> annotation is skipped. This mode uses the <literal>StandaloneContainers</literal> SPI to invoke the test artifact within a mock Java EE life cycle and capture the results of the test. However, passing the suite in this mode is not sufficient to pass the TCK as a whole. The suite must be passed while executing using in-container mode.</para>
+ </section>
+ <section>
+ <title>Running the Tests In In-Container Mode</title>
+ <para>To execute the test suite using in-container mode, you first have to set the property <literal>jboss.home</literal> to the location of a JBoss AS 5.1 installation in the following Java properties file in the extracted Web Beans distribution:</para>
+ <programlisting><webbeans_install_dir>/jboss-as/local.build.properties</programlisting>
+ <para>Then add the <literal>incontainer</literal> property to the command that launches the Maven 2 life cycle:</para>
+ <programlisting>mvn test -Dincontainer</programlisting>
+ <para>The presence of the <literal>incontainer</literal> property activates a Maven 2 profile that assigns the <literal>org.jboss.testharness.standalone</literal> system property to <literal>false</literal> and the <literal>org.jboss.testharness.runIntegrationTests</literal> system property to <literal>true</literal>, hence activing the in-container test mode.</para>
+ <para>When the Maven 2 life cycle is run with the <literal>incontainer</literal> property present, all the test artifacts in the test suite are executed. The in-container mode uses the <literal>Containers</literal> SPI to deploy the test artifact to the container and execute the test in a true Java EE life cycle.</para>
+ <para>Since in-container tests are executed in a remote JVM, the results of the test must be communicated back to the runner over a container-supported protocol. The TCK provides servlet-based communication over HTTP.</para>
+ </section>
+ <section>
+ <title>Running a Subset of Tests</title>
+ <para/>
+ </section>
+ <section>
+ <title>Dumping a Test Artifact</title>
+ <para/>
+ </section>
+ <section>
+ <title>Running a Test in Eclipse</title>
+ <para/>
+ </section>
+ </section>
+</chapter>
Added: tck/trunk/doc/reference/en-US/installation.xml
===================================================================
--- tck/trunk/doc/reference/en-US/installation.xml (rev 0)
+++ tck/trunk/doc/reference/en-US/installation.xml 2009-07-13 03:41:42 UTC (rev 3044)
@@ -0,0 +1,39 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
+<chapter id="installation">
+ <title>Installation</title>
+ <para>This chapter explains how to obtain the TCK and supporting software and provides recommendations for how to install/extract it on your system.</para>
+ <section>
+ <title>Obtaining the Software</title>
+ <para>You can obtain the JSR-299 TCK project from the <ulink url="http://anonsvn.jboss.org/repos/webbeans/tck/trunk">JBoss SVN repository</ulink> or you can download a release from the <ulink url="http://seamframework.org/Download">download page</ulink> on Seam Framework website. The JSR-299 TCK is distributed as a ZIP file, which contains a multi-module Maven 2 project, the test suite, the test suite descriptor, the audit document and documentation. At the time of writing there is no official release of the JSR-299 TCK available, so you need to check out the TCK from the JBoss SVN repository.</para>
+ <para>The TCK project downloads additional required libraries from the JBoss Maven 2 repository automatically, including the JBoss Test Harness and the JSR-299 API. You may follow this approach when assembling a TCK runner for your JSR-299 implementation.</para>
+ <para>The JSR-299: Contexts and Dependency Injection for Java EE 1.0 reference implementation (RI) is Web Beans. You can obtain the latest Web Beans release from the <ulink url="http://seamframework.org/Download">download page</ulink> on Seam Framework website. Web Beans includes a TCK runner that executes the TCK using the RI by deploying the test artifacts to JBoss AS 5.</para>
+ <note>
+ <para>The JSR-299 RI (Web Beans) is not required for running the JSR-299 TCK, but it can be useful as a reference for familiarizing yourself with the TCK before testing your own JSR-299 implementation.</para>
+ </note>
+ <para>Executing the TCK requires a Java EE 5 or better runtime environment (i.e., application server), to which the test artifacts are deployed. The TCK does not depend on any particular implementation, only that it is compliant. However, if you decide to use JBoss AS 5 as the target container, you can use the JBoss AS 5 connector provided with the JBoss Test Harness, alleviating the requirement of implementing the <literal>org.jboss.jsr299.tck.spi.Containers</literal> interface from the TCK Porting Package. You can download JBoss AS 5 from the JBoss AS <ulink url="http://jboss.org/jbossas/downloads">project page</ulink>.</para>
+ <para>Naturally, to execute Java programs, you must have a Java SE runtime environment. The TCK requires Java SE 1.5 or better, which you can obtain from the <ulink url="http://java.sun.com">Java Software</ulink> website.</para>
+ </section>
+ <section>
+ <title>Installing the Software</title>
+ <para>Installing Java software is a bit of a misnomer. The only software you have to "install" are the runtime environments. The remaining software is merely extracted in a workspace directory of your choice.</para>
+ <para>The TCK requires the following two Java runtime environments:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Java SE 5.0 or better</para>
+ </listitem>
+ <listitem>
+ <para>Java EE 5 or better (e.g., JBoss AS 5 or GlassFish V3)</para>
+ </listitem>
+ </itemizedlist>
+ <para>You can download Java SE from the <ulink url="http://java.sun.com/products">Java Software</ulink>
+web site.
+ Refer to the instructions that accompany
+the software for how to install it on your system.
+You should be sure that the <literal>JAVA_HOME</literal> environment variable is assigned to the location of the Java SE software before you consider the installation complete.</para>
+ <para>Which Java EE runtime environment to use is your choice. Keep in mind, though, that you must provide a custom connector if the application server you are using is not supported by the JBoss Test Harness. At the time of writing, JBoss AS 5 is the only supported application server. Hence, JBoss AS 5 is the recommend Java EE runtime environment.</para>
+ <para>JBoss AS 5 can be downloaded from the JBoss AS project page. Refer to the instructions that accompany the software for how to install it on your system. Although not required, it's recommended that you set the <literal>JBOSS_HOME</literal> environment variable to the location of the JBoss AS software.</para>
+ <para>The remaining components required to setup and execute the TCK are merely extracted. It's recommended that you first create a workspace directory named "jsr299" to host the JSR-299 implementation and the TCK. Within that directory you should extract the TCK software into a folder named "tck".</para>
+ <para>...</para>
+ </section>
+</chapter>
Added: tck/trunk/doc/reference/en-US/introduction.xml
===================================================================
--- tck/trunk/doc/reference/en-US/introduction.xml (rev 0)
+++ tck/trunk/doc/reference/en-US/introduction.xml 2009-07-13 03:41:42 UTC (rev 3044)
@@ -0,0 +1,205 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
+<chapter id="introduction">
+ <title>Introduction</title>
+ <para>This chapter explains the purpose of a TCK and identifies the foundation elements of the JSR-299 TCK.</para>
+ <section>
+ <title>TCK Primer</title>
+ <para>A TCK, or Technology Compatibility Kit, is one of the three required pieces for any JSR (the other two being the specification document and the reference implementation). The TCK is a set of tools and tests to verify that a licensee's implementation of the Sun technology conforms to the specification. The tests are the primary component, but the tools serve an equally critical role of providing a framework and/or set of SPIs for executing the tests.</para>
+ <para>The tests in the TCK are derived from assertions in the written specification document. The assertions materialize as a suite of automated tests that collectively validate whether an implementation complies with the aforementioned assertions, and in turn the specification. For a particular implementation to be certified, all of the required tests must pass (the provided test suite must be run unmodified).</para>
+ <para>A TCK is entirely implementation agnostic. Ideally, it should validate assertions by consulting the specficiation's public API. However, when the information returned by the public API is not low-level enough to validate the assertion, the implementation must be consulted directly. In this case, the TCK provides an independent API as part of a porting package which must also be implemented by the licensee. Section 1.3.4 introduces the porting package and Section X.XX covers the requirements for implementing it.</para>
+ </section>
+ <section>
+ <title>Compatibility Testing</title>
+ <para>The goal of any specification is to eliminate portability problems so long as the program which uses the implementation also conforms to the rules laid out in the specification.</para>
+ <para>Executing the TCK is a form of compatibility testing. It's important to understand that compatibility testing is distinctly different from product testing. The TCK is not concerned with robustness, performance or ease of use, and therefore cannot vouch for how well an implementation meets these criteria. What a TCK can do is ensure the exactness of an implementation as it relates to the specification.</para>
+ <para>Compatibility testing of any feature relies on both a complete specification and a complete reference implementation. The reference implementation demonstrates how each test can be passed and provides additional context to the licensee during development for the cooresponding assertion.</para>
+ <section>
+ <title>Why Compatibility Is Important</title>
+ <para>Java platform compatibility is important to different groups involved with Java technologies for
+different reasons:
+</para>
+ <itemizedlist>
+ <listitem>
+ <para>Compatibility testing is the means by which Sun ensures that the Java platform does not become
+fragmented as it's ported to different operating systems and hardware.
+</para>
+ </listitem>
+ <listitem>
+ <para>Compatibility testing benefits developers working in the Java programming language, enabling
+them to write applications once and deploy them across heterogeneous computing
+ environments without porting.</para>
+ </listitem>
+ <listitem>
+ <para>Compatibility testing enables application users to obtain applications from disparate sources and
+ deploy them with confidence.
+</para>
+ </listitem>
+ <listitem>
+ <para>Conformance testing benefits Java platform implementors by ensuring the same extent of reliability for all Java platform ports.
+</para>
+ </listitem>
+ </itemizedlist>
+ <para>The JSR-299 specification goes to great lengths to ensure that programs written for Java EE are compatible and the TCK is rigourous about enforcing the rules the specification lays down.</para>
+ </section>
+ </section>
+ <section>
+ <title>About the JSR-299 TCK</title>
+ <para>The JSR-299 TCK is designed as a portable, configurable and automated test suite for
+verifying the compatibility of a licensee’s implementation of the JSR-299: Contexts and Dependency Injection for Java EE specification. The test suite is built on TestNG and provides a series of extensions that allow runtime packaging and deployment of JEE artifacts for in-container testing.</para>
+ <note>
+ <para>The JSR-299 TCK harness is based on the JBoss Test harness, which provides most of the aforementioned functionality.</para>
+ </note>
+ <para>Each test class in the suite acts as a deployable unit. The deployable units, or artifacts, are defined declaratively using annotations. The artifact produced can be either a WAR or an EAR.</para>
+ <para>The benefit of the declarative approach is that it allows many of the tests to be executed in a standalone implementation of JSR-299, accounting for a boast in developer productivity. However, an implementation is only valid if all tests pass using the in-container execution mode. The standalone mode is merely a developer convenience.</para>
+ <section>
+ <title>JSR-299 TCK Specifications and Requirements</title>
+ <para>This section lists the applicable requirements and specifications for the JSR-299 TCK.</para>
+ <itemizedlist>
+ <listitem>
+ <para><emphasis role="bold">Specification requirements</emphasis> - Software requirements for a JSR-299 implementation are itermized in Section 1.2 of Chapter 1, "Relationship to other specifications" in the JSR-299 specification, with details provided throughout the specification.</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">Contexts and Dependency Injection for Java EE 1.0 API</emphasis> - The Java API defined in the JSR-299 specification and provided by the reference implementation.</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">JBoss Test Harness</emphasis> - The JSR-299 TCK requires version 1.0.0 of the JBoss Test Harness</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">Porting Package</emphasis> - An implementation of SPIs that are required for the test suite to run the in-container tests and at times, consult the JSR-299 implementation</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">TCK Audit Tool</emphasis> - An itemization of the assertions in the specification documents which are cross referenced by the individual tests. Relevant for producing a test coverage report.</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">Reference runtime</emphasis> - The designated reference runtimes for compatibility testing of the JSR-299 specification is the Sun Java Platform, Enterprise Edition (Java EE) 5
+ reference implementation (RI).
+ See details at Java EE 5
+ (<ulink url="http://java.sun.com/javaee/5/docs/api/">http://java.sun.com/javaee/5/docs/api/</ulink>).</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section>
+ <title>JSR-299 TCK Components</title>
+ <para>The JSR-299 TCK includes the following components:</para>
+ <itemizedlist>
+ <listitem>
+ <para><emphasis role="bold">JBoss Test Harness 1.0.0</emphasis> and related documentation.</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">TestNG 5.9</emphasis>, the testing framework on which the JBoss Test Harness is based and which provides the extension points for selecting an executing the tests in the test suite.</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">Porting Package SPIs</emphasis> - Extensions to the JSR-299 SPIs to allow testing of a container.</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">The test suite</emphasis>, which is a collection of TestNG tests, the TestNG test suite descriptor and supplamental files that provide data for the
+automatic running of tests through the JBoss Test harness.</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">JBoss TCK Runner</emphasis> - An implementation of hte JBoss Test Harness deployment APIs for deploying artifacts to JBoss AS 5</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">TCK documentation</emphasis> accompanied by release notes identifying updates between versions.</para>
+ </listitem>
+ </itemizedlist>
+ <para>The JSR-299 TCK has been tested with the following:</para>
+ <itemizedlist>
+ <listitem>
+ <para> Java Platform, Standard Edition, Version 5.0 (Java SE 1.5)
+</para>
+ </listitem>
+ <listitem>
+ <para> Java Platform, Enterprise Edition, Version 5 reference implementation (Java EE 5 RI)</para>
+ </listitem>
+ <listitem>
+ <para>JBoss AS 5?</para>
+ </listitem>
+ </itemizedlist>
+ <para>The JSR-299 TCK tests run on the following platforms:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Windows XP?</para>
+ </listitem>
+ <listitem>
+ <para>RHEL 5.2?</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section>
+ <title>The JBoss Test Harness</title>
+ <para>JSR-299 TCK leverages the JBoss Test Harness. The JBoss Test Harness is a testing framework based on TestNG that provides a series of extensions that allow runtime packaging and deployment of Java EE artifacts (EAR or WAR) for in-container testing. It's important to note that the JBoss Test Harness has no relation to or dependency on the JBoss Application Server (AS).</para>
+ <para>JSR-299 supports Java EE 5, Java EE 6, Java EE 6 Web Profile and the Embeddable EJB 3.1. Accordingly, the TCK will be able to run in any of these environments, though at the time of writing the Embedded EJB (EEJB) mode isn't operational.</para>
+ <note>
+ <para>You'll often see the term <emphasis role="italic">in-container</emphasis> used in this reference guide. This term refers to running the test suite in any of the aforementioned environments, whilst <emphasis role="italic">standalone</emphasis> refers to running the tests outside the container via a JSR-299 implementation-specific standalone bootstrap. The standalone mode only runs those tests which don't require EJB, Servlet or JSF to be present.</para>
+ </note>
+ <para>The last thing Java developers want is yet another testing framework to make their life more complicated. What they do want is good integration with the their Integrated Development Environment (IDE). These days, if a tool doesn't have an IDE plugin, then it won't get the attention it deserves. That's why the JBoss Test Harness is built entirely TestNG. TestNG is one of the two prominent test frameworks for Java and TestNG plugins are available for all major IDEs (with the exception of NetBeans) and build tools (Ant and Maven 2).</para>
+ <para>Because it leverages the existing TestNG ecosystem, there is no need for a special test launcher for the JBoss Test Harness, and in turn the JSR-299 TCK. You simply use the IDE or build tool of your choice. You also get reporting and debugging for free.</para>
+ <para>The JBoss Test Harness supports the following features:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Test activation via any method supported by the TestNG configuration descriptor (package, group, class)</para>
+ </listitem>
+ <listitem>
+ <para>Exclusion of in-container tests in standalone mode</para>
+ </listitem>
+ <listitem>
+ <para>Exclusion of individual tests labeled as under investigation</para>
+ </listitem>
+ <listitem>
+ <para>Integration with any TestNG plugin (Eclipse, IntelliJ, NetBeans, Ant, Maven)</para>
+ </listitem>
+ <listitem>
+ <para>Automated reporting capability as provided by TestNG</para>
+ </listitem>
+ <listitem>
+ <para>Standalone and in-container test mode</para>
+ </listitem>
+ <listitem>
+ <para>Container pluggability</para>
+ </listitem>
+ <listitem>
+ <para>Declarative packaging of additional resources and classes in artifact</para>
+ </listitem>
+ <listitem>
+ <para>Declarative deployment exception trapping</para>
+ </listitem>
+ <listitem>
+ <para>Artifact dumping for failure and packaging analysis</para>
+ </listitem>
+ </itemizedlist>
+ <para>A test is designated by a method annotated with <literal>@org.testng.annotations.Test</literal> in a class which extends <literal>org.jboss.jsr299.tck.AbstractJSR299Test</literal> and is annotated with <literal>@org.jboss.testharness.impl.packaging.Artifact</literal>.</para>
+ <para>The <literal>@Test</literal> annotation is provided by TestNG, the <literal>@Artifact</literal> annotation is provided by the JBoss Test Harness and the <literal>AbstractJSR299Test</literal> is part of the JSR-299 TCK. There is a one-to-one mapping between a TestNG test class and an artifact. The packaging type is defined by the <literal>@org.jboss.testharness.impl.packaging.Packaging</literal> annotation on the test class, defaulting to a WAR if not specified.</para>
+ <para>Prior to executing the tests for a given class, the JBoss Test Harness packages the class as a deployable artifact (EAR or WAR), along with any extra resources specified, and deploys the artifact to the container. The test execution and results are negotatied via HTTP communication using a thin layer over the TestNG test launcher. The test harness can also catch and affirm expected deployment exceptions. This setup and tear down activity is provided by the super class <literal>org.jboss.jsr299.tck.AbstractJSR299Test</literal>, which all TCK test classes must extend.</para>
+ <para>If the annotation <literal>@org.jboss.testharness.impl.packaging.IntegrationTest</literal> is not present on the test class, then it means the test class can be executed in standalone mode. In standalone mode, the deployable artifact is assembled on the local classpath and the tests execute in the same JVM as the launcher, just as though it were a regular TestNG test case. The standalone mode is provided merely for convenience and efficiency.</para>
+ <para>Chapter X details how to run the TCK test suite using the JBoss Test Harness.</para>
+ </section>
+ <section>
+ <title>The Porting Package</title>
+ <para>The JSR-299 TCK relies on an implemnetation of the Porting Package to function. The Porting Package can be divided into two parts. The first part is comprised of extensions to the JSR-299 SPIs to allow testing of a container. The second part must contain implementations of the JBoss Test Harness deployment APIs for deploying test artifacts to a given container.</para>
+ <para>As mentioned earlier, there are times when the tests need to tap directly into the JSR-299 implementation to manipulate behavior or verify results. The Porting Package includes a set of SPIs that provide the TCK this level of access without tying the tests to a given implementation.</para>
+ <para>The four SPI classes in the JSR-299 TCK are as follows:</para>
+ <itemizedlist>
+ <listitem>
+ <para><literal>org.jboss.jsr299.tck.spi.Beans</literal></para>
+ </listitem>
+ <listitem>
+ <para><literal>org.jboss.jsr299.tck.spi.Contexts</literal></para>
+ </listitem>
+ <listitem>
+ <para><literal>org.jboss.jsr299.tck.spi.EL</literal></para>
+ </listitem>
+ <listitem>
+ <para><literal>org.jboss.jsr299.tck.spi.Managers</literal></para>
+ </listitem>
+ </itemizedlist>
+ <para>To run the full TCK you must additionally implement <literal>org.jboss.testharness.spi.Containers</literal>, which handles deploying the test artifact to the container. If you wish to run the TCK in standalone mode, you must also implement <literal>org.jboss.testharness.spi.StandaloneContainers</literal>. Implementations of these APIs are already available for JBoss AS 5. Therefore, you only need to implement this part of the Porting Package if you wish to use a container other than JBoss AS 5, for instance GlassFish V3.</para>
+ <para>The default configuration for the TCK is property-based. Therefore, you specify the implementation class for all of these SPIs in a properties file. There are additional properties for controlling whether the tests are run in standalone or in-container mode. Optionally, you can use system properties to configure the TCK. Details are provided in Section X.XX.</para>
+ </section>
+ <section>
+ <title>TCK Audit Tool</title>
+ <para>The TCK audit is used to list out the assertions identified in the JSR-299 specification. It uses Java annotation processing to match the assertions to testcases in the test suite and produce a coverage report.</para>
+ <para>The audit document is provided along with the TCK and each assertion matches against at least one test. Each assertion is defined with a reference to a chapter, section and paragraph from the specification document, making it easy for the licensee to locate the language in the specification document that supports the feature being tested.</para>
+ </section>
+ </section>
+</chapter>
Added: tck/trunk/doc/reference/en-US/master.xml
===================================================================
--- tck/trunk/doc/reference/en-US/master.xml (rev 0)
+++ tck/trunk/doc/reference/en-US/master.xml 2009-07-13 03:41:42 UTC (rev 3044)
@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- This document was created with Syntext Serna Free. --><!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
+<book lang="en">
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Book_Info.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Book_Preface.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="part1-background.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="part2-setup.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="part3-execution.xml"/>
+</book>
Added: tck/trunk/doc/reference/en-US/part1-background.xml
===================================================================
--- tck/trunk/doc/reference/en-US/part1-background.xml (rev 0)
+++ tck/trunk/doc/reference/en-US/part1-background.xml 2009-07-13 03:41:42 UTC (rev 3044)
@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
+<part>
+ <title>Getting Acquainted with the TCK</title>
+ <partintro>
+ <para>The JSR-299 TCK must be used to ensure that your implementation conforms to the JSR-299 specification. This part introduces the TCK, gives some background about its purpose and states the requirements for passing the TCK.</para>
+ </partintro>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introduction.xml"/>
+</part>
Added: tck/trunk/doc/reference/en-US/part2-setup.xml
===================================================================
--- tck/trunk/doc/reference/en-US/part2-setup.xml (rev 0)
+++ tck/trunk/doc/reference/en-US/part2-setup.xml 2009-07-13 03:41:42 UTC (rev 3044)
@@ -0,0 +1,10 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
+<part>
+ <title>Installation and Setup</title>
+ <partintro>
+ <para>In this part you learn where to obtain the JSR-299 TCK and supporting software. You are then presented with recommendations of how to organize and configure the software so that you are ready to execute the TCK.</para>
+ </partintro>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="installation.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="configuration.xml"/>
+</part>
Added: tck/trunk/doc/reference/en-US/part3-execution.xml
===================================================================
--- tck/trunk/doc/reference/en-US/part3-execution.xml (rev 0)
+++ tck/trunk/doc/reference/en-US/part3-execution.xml 2009-07-13 03:41:42 UTC (rev 3044)
@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ ]>
+<part>
+ <title>Executing and Debugging Tests</title>
+ <partintro>
+ <para>In this part you learn how to execute the JSR-299 TCK. First, you are taken through the steps necessary to execute the test suite against the JSR-299 RI (Web Beans). Then you discover how to modify the TCK runner to execute the test suite against your own implementation. Finally, you learn how to debug individual tests in the test suite.</para>
+ </partintro>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="executing.xml"/>
+</part>
Added: tck/trunk/doc/reference/pom.xml
===================================================================
--- tck/trunk/doc/reference/pom.xml (rev 0)
+++ tck/trunk/doc/reference/pom.xml 2009-07-13 03:41:42 UTC (rev 3044)
@@ -0,0 +1,352 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ JBoss, Home of Professional Open Source
+ Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ by the @authors tag. See the copyright.txt in the distribution for a
+ full listing of individual contributors.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.jboss.jsr299.tck</groupId>
+ <artifactId>jsr299-tck-reference-guide</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>jdocbook</packaging>
+ <name>JSR-299 TCK Reference Guide</name>
+
+ <pluginRepositories>
+ <pluginRepository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <url>http://repository.jboss.org/maven2</url>
+ </pluginRepository>
+ </pluginRepositories>
+ <repositories>
+ <repository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <url>http://repository.jboss.org/maven2</url>
+ </repository>
+ </repositories>
+
+ <properties>
+ <mpjdocbook.version>2.1.1</mpjdocbook.version>
+ </properties>
+
+ <build>
+ <defaultGoal>process-classes</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jdocbook-plugin</artifactId>
+ <version>${mpjdocbook.version}</version>
+ <extensions>true</extensions>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.webbeans</groupId>
+ <artifactId>webbeans-docbook-xslt</artifactId>
+ <version>1.1.1.BETA2</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.eclipse.wst.css</groupId>
+ <artifactId>core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.eclipse.wst.sse</groupId>
+ <artifactId>core</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>seam-jdocbook-style</artifactId>
+ <version>1.1.0.GA</version>
+ <type>jdocbook-style</type>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jbossorg-jdocbook-style</artifactId>
+ <version>1.1.0</version>
+ <type>jdocbook-style</type>
+ </dependency>
+ </dependencies>
+ <configuration>
+ <sourceDirectory>${pom.basedir}</sourceDirectory>
+ <sourceDocumentName>master.xml</sourceDocumentName>
+ <masterTranslation>en-US</masterTranslation>
+ <!--
+ <translations>
+ <translation>it-IT</translation>
+ <translation>zh-CN</translation>
+ <translation>zh-TW</translation>
+ <translation>es-ES</translation>
+ <translation>ko-KR</translation>
+ <translation>de-DE</translation>
+ <translation>pt-BR</translation>
+ </translations>
+ -->
+ <imageResource>
+ <directory>${pom.basedir}/en-US</directory>
+ <includes>
+ <include>images/*.png</include>
+ </includes>
+ </imageResource>
+ <formats>
+ <format>
+ <formatName>pdf</formatName>
+ <stylesheetResource>
+ classpath:/xslt/org/jboss/webbeans/pdf.xsl
+ </stylesheetResource>
+ <finalName>jsr299-tck-reference.pdf</finalName>
+ </format>
+ <format>
+ <formatName>html</formatName>
+ <stylesheetResource>
+ classpath:/xslt/org/jboss/webbeans/xhtml.xsl
+ </stylesheetResource>
+ <finalName>index.html</finalName>
+ </format>
+ <format>
+ <formatName>html_single</formatName>
+ <stylesheetResource>
+ classpath:/xslt/org/jboss/webbeans/xhtml-single.xsl
+ </stylesheetResource>
+ <finalName>index.html</finalName>
+ </format>
+ </formats>
+ <options>
+ <xincludeSupported>true</xincludeSupported>
+ <xmlTransformerType>saxon</xmlTransformerType>
+ <!-- needed for uri-resolvers; can be ommitted if using 'current' uri scheme -->
+ <!-- could also locate the docbook dependency and inspect its version... -->
+ <docbookVersion>1.72.0</docbookVersion>
+ <localeSeparator>-</localeSeparator>
+ </options>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.4</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <configuration>
+ <arguments>-Dbuild.translations</arguments>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>process-classes</phase>
+ <configuration>
+ <tasks>
+ <copy file="${basedir}/target/docbook/publish/en-US/pdf/jsr299-tck-reference.pdf" todir="${basedir}" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <configuration>
+ <arguments>-Dbuild.translations</arguments>
+ </configuration>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.0</version>
+ </plugin>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jdocbook-plugin</artifactId>
+ <version>${mpjdocbook.version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addDefaultImplementationEntries>
+ true
+ </addDefaultImplementationEntries>
+ <addDefaultSpecificationEntries>
+ true
+ </addDefaultSpecificationEntries>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ <version>2.4.3</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.4.3</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-clean-plugin</artifactId>
+ <version>2.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <version>2.4</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>2.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>2.0-beta-6</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>2.0.4</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.0-beta-7</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <version>1.0-alpha-4</version>
+ <executions>
+ <execution>
+ <id>enforce</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireMavenVersion>
+ <version>2.0.9</version>
+ </requireMavenVersion>
+ <requirePluginVersions>
+ <unCheckedPlugins>
+ <unCheckedPlugin>org.apache.maven.plugins:maven-eclipse-plugin</unCheckedPlugin>
+ </unCheckedPlugins>
+ </requirePluginVersions>
+ </rules>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-webdav</artifactId>
+ <version>1.0-beta-2</version>
+ </extension>
+ </extensions>
+ </build>
+
+ <profiles>
+ <profile>
+ <activation>
+ <property>
+ <name>build.translations</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jdocbook-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>translate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+ <ciManagement>
+ <system>Hudson</system>
+ <url />
+
+ </ciManagement>
+
+ <issueManagement>
+ <system>JIRA</system>
+ <url>http://jira.jboss.org/browse/WBRI</url>
+ </issueManagement>
+
+ <inceptionYear>2008</inceptionYear>
+
+ <scm>
+
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/webbeans/tck</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/webbeans/tck</developerConnection>
+ <url>http://fisheye.jboss.org/browse/WebBeans/tck</url>
+ </scm>
+
+ <distributionManagement>
+ <repository>
+ <!-- Copy the dist to the local checkout of the JBoss maven2 repo ${maven.repository.root} -->
+ <!-- It is anticipated that ${maven.repository.root} be set in user's settings.xml -->
+ <!-- todo : replace this with direct svn access once the svnkit providers are available -->
+ <id>repository.jboss.org</id>
+ <url>file://${maven.repository.root}</url>
+ </repository>
+ <snapshotRepository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshot Repository</name>
+ <url>dav:https://snapshots.jboss.org/maven2</url>
+ </snapshotRepository>
+ </distributionManagement>
+</project>
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3043 - examples/trunk/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess.
by webbeans-commits@lists.jboss.org
Author: dallen6
Date: 2009-07-09 19:42:02 -0400 (Thu, 09 Jul 2009)
New Revision: 3043
Modified:
examples/trunk/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java
Log:
Updated the JSF2 version of numberguess to latest JCDI API.
Modified: examples/trunk/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java
===================================================================
--- examples/trunk/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java 2009-07-09 18:36:17 UTC (rev 3042)
+++ examples/trunk/jsf2/src/main/java/org/jboss/webbeans/examples/numberguess/Game.java 2009-07-09 23:42:02 UTC (rev 3043)
@@ -11,12 +11,13 @@
import javax.faces.component.UIComponent;
import javax.faces.component.UIInput;
import javax.faces.context.FacesContext;
-import javax.inject.Obtains;
@Named
@SessionScoped
public class Game implements Serializable
{
+ private static final long serialVersionUID = 1L;
+
private int number;
private int guess;
@@ -28,7 +29,7 @@
private int biggest;
private int remainingGuesses;
- @Obtains @Random Instance<Integer> randomNumber;
+ @Random Instance<Integer> randomNumber;
public Game()
{
15 years, 5 months