[webbeans-commits] Webbeans SVN: r1724 - examples/trunk/numberguess/WebContent/WEB-INF and 6 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-02-26 15:13:57 -0500 (Thu, 26 Feb 2009)
New Revision: 1724
Added:
examples/trunk/login/WebContent/WEB-INF/beans.xml
examples/trunk/numberguess/WebContent/WEB-INF/beans.xml
examples/trunk/translator/webbeans-translator-ejb/src/main/resources/META-INF/beans.xml
Removed:
examples/trunk/login/WebContent/WEB-INF/web-beans.xml
examples/trunk/numberguess/WebContent/WEB-INF/web-beans.xml
examples/trunk/translator/webbeans-translator-ejb/src/main/resources/META-INF/web-beans.xml
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/jsr299/JSR299ArtifactDescriptor.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/war/WarArtifactDescriptor.java
tck/trunk/impl/src/test/java/org/jboss/jsr299/tck/test/impl/packaging/AbstractArtifactTest.java
tck/trunk/impl/src/test/java/org/jboss/jsr299/tck/test/impl/packaging/descriptors/ear/EarArtifactTest.java
tck/trunk/impl/src/test/java/org/jboss/jsr299/tck/test/impl/packaging/descriptors/war/WarArtifactTest.java
Log:
WBRI-128
Copied: examples/trunk/login/WebContent/WEB-INF/beans.xml (from rev 1425, examples/trunk/login/WebContent/WEB-INF/web-beans.xml)
===================================================================
Deleted: examples/trunk/login/WebContent/WEB-INF/web-beans.xml
===================================================================
Copied: examples/trunk/numberguess/WebContent/WEB-INF/beans.xml (from rev 1425, examples/trunk/numberguess/WebContent/WEB-INF/web-beans.xml)
===================================================================
Property changes on: examples/trunk/numberguess/WebContent/WEB-INF/beans.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: examples/trunk/numberguess/WebContent/WEB-INF/web-beans.xml
===================================================================
Copied: examples/trunk/translator/webbeans-translator-ejb/src/main/resources/META-INF/beans.xml (from rev 1425, examples/trunk/translator/webbeans-translator-ejb/src/main/resources/META-INF/web-beans.xml)
===================================================================
Deleted: examples/trunk/translator/webbeans-translator-ejb/src/main/resources/META-INF/web-beans.xml
===================================================================
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/jsr299/JSR299ArtifactDescriptor.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/jsr299/JSR299ArtifactDescriptor.java 2009-02-26 19:16:58 UTC (rev 1723)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/jsr299/JSR299ArtifactDescriptor.java 2009-02-26 20:13:57 UTC (rev 1724)
@@ -8,7 +8,7 @@
public class JSR299ArtifactDescriptor extends ArtifactDescriptor
{
- public static final String BEANS_XML_DESTINATION = "META-INF/web-beans.xml";
+ public static final String BEANS_XML_DESTINATION = "META-INF/beans.xml";
public static final String STANDARD_BEANS_XML_FILE_NAME = "org/jboss/jsr299/tck/impl/packaging/jsr299/default/beans.xml";
private final ResourceDescriptor beansXml;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/war/WarArtifactDescriptor.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/war/WarArtifactDescriptor.java 2009-02-26 19:16:58 UTC (rev 1723)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/war/WarArtifactDescriptor.java 2009-02-26 20:13:57 UTC (rev 1724)
@@ -57,6 +57,6 @@
@Override
public String getBeansDestination()
{
- return "WEB-INF/web-beans.xml";
+ return "WEB-INF/beans.xml";
}
}
Modified: tck/trunk/impl/src/test/java/org/jboss/jsr299/tck/test/impl/packaging/AbstractArtifactTest.java
===================================================================
--- tck/trunk/impl/src/test/java/org/jboss/jsr299/tck/test/impl/packaging/AbstractArtifactTest.java 2009-02-26 19:16:58 UTC (rev 1723)
+++ tck/trunk/impl/src/test/java/org/jboss/jsr299/tck/test/impl/packaging/AbstractArtifactTest.java 2009-02-26 20:13:57 UTC (rev 1724)
@@ -44,7 +44,7 @@
public boolean accept(File dir, String name)
{
- return name.equals("web-beans.xml");
+ return name.equals("beans.xml");
}
};
Modified: tck/trunk/impl/src/test/java/org/jboss/jsr299/tck/test/impl/packaging/descriptors/ear/EarArtifactTest.java
===================================================================
--- tck/trunk/impl/src/test/java/org/jboss/jsr299/tck/test/impl/packaging/descriptors/ear/EarArtifactTest.java 2009-02-26 19:16:58 UTC (rev 1723)
+++ tck/trunk/impl/src/test/java/org/jboss/jsr299/tck/test/impl/packaging/descriptors/ear/EarArtifactTest.java 2009-02-26 20:13:57 UTC (rev 1724)
@@ -38,7 +38,7 @@
assert webXml.isFile();
assert webXml.getName().equals("web.xml");
assert webXml.length() != 0;
- assert !new File(webInf, "web-beans.xml").exists();
+ assert !new File(webInf, "beans.xml").exists();
File webInfLib = new File(webInf, "lib");
assert !webInfLib.exists();
@@ -81,7 +81,7 @@
assert ejbJarXml.isFile();
assert ejbJarXml.length() > 0;
- File webbeansXml = new File(ejbJarRoot, "META-INF/web-beans.xml");
+ File webbeansXml = new File(ejbJarRoot, "META-INF/beans.xml");
assert webbeansXml.isFile();
assert webbeansXml.length() == 0;
@@ -146,7 +146,7 @@
}
is.close();
assert fileNames.contains("META-INF/ejb-jar.xml");
- assert fileNames.contains("META-INF/web-beans.xml");
+ assert fileNames.contains("META-INF/beans.xml");
assert fileNames.contains("org/jboss/jsr299/tck/test/impl/packaging/descriptors/ear/Cow.class");
}
Modified: tck/trunk/impl/src/test/java/org/jboss/jsr299/tck/test/impl/packaging/descriptors/war/WarArtifactTest.java
===================================================================
--- tck/trunk/impl/src/test/java/org/jboss/jsr299/tck/test/impl/packaging/descriptors/war/WarArtifactTest.java 2009-02-26 19:16:58 UTC (rev 1723)
+++ tck/trunk/impl/src/test/java/org/jboss/jsr299/tck/test/impl/packaging/descriptors/war/WarArtifactTest.java 2009-02-26 20:13:57 UTC (rev 1724)
@@ -35,7 +35,7 @@
assert webXml.length() != 0;
File beansXml = webInf.listFiles(BEANS_XML_FILTER)[0];
assert beansXml.isFile();
- assert beansXml.getName().equals("web-beans.xml");
+ assert beansXml.getName().equals("beans.xml");
assert beansXml.length() == 0;
File currentPackage = getCurrentPackageAsFile(root);
File[] cowClasses = currentPackage.listFiles(new FilenameFilter()
@@ -83,7 +83,7 @@
fileNames.add(entry.getName().replace(File.separator, "/"));
}
is.close();
- assert fileNames.contains("WEB-INF/web-beans.xml");
+ assert fileNames.contains("WEB-INF/beans.xml");
assert fileNames.contains("WEB-INF/web.xml");
assert fileNames.contains("WEB-INF/classes/org/jboss/jsr299/tck/test/impl/packaging/descriptors/war/Cow.class");
assert fileNames.contains("WEB-INF/lib/tck-support.jar");
15 years, 3 months
[webbeans-commits] Webbeans SVN: r1723 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/unit/event and 1 other directories.
by webbeans-commits@lists.jboss.org
Author: dallen6
Date: 2009-02-26 14:16:58 -0500 (Thu, 26 Feb 2009)
New Revision: 1723
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/EventTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/EventTest.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
Additional assertion changes for section 7
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/EventTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/EventTest.java 2009-02-26 16:14:07 UTC (rev 1722)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/EventTest.java 2009-02-26 19:16:58 UTC (rev 1723)
@@ -150,7 +150,7 @@
* completion phase.
*/
@Test(groups = { "stub", "events" })
- @SpecAssertion(section = "7.5.8", id = "unknown")
+ @SpecAssertion(section = "7.5.8", id = "e")
public void testAsynchronousTransactionalObserverCalledAfterCompletion()
{
assert false;
@@ -163,7 +163,7 @@
* phase.
*/
@Test(groups = { "stub", "events" })
- @SpecAssertion(section = "7.5.8", id = "unknown")
+ @SpecAssertion(section = "7.5.8", id = "f")
public void testTransactionalObserverMethodCalledDuringTransactionCompletionPhase()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/EventTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/EventTest.java 2009-02-26 16:14:07 UTC (rev 1722)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/EventTest.java 2009-02-26 19:16:58 UTC (rev 1723)
@@ -326,7 +326,7 @@
* Manager.getInstanceToInject() to each of the other parameters.
*/
@Test(groups = { "events" })
- @SpecAssertions( { @SpecAssertion(section = "7.5.4", id = "a"), @SpecAssertion(section = "7.5.8", id = "unknown") })
+ @SpecAssertions( { @SpecAssertion(section = "7.5.4", id = "a"), @SpecAssertion(section = "7.5.8", id = "j") })
public void testObserverMethodReceivesInjectionsOnNonObservesParameters()
{
Set<Bean<Object>> beans = getCurrentManager().resolveByType(Object.class);
@@ -399,14 +399,14 @@
}
@Test(groups = { "stub", "events" })
- @SpecAssertion(section = "7.5.8", id = "e")
+ @SpecAssertions( { @SpecAssertion(section = "7.5.8", id = "c"), @SpecAssertion(section = "7.5.8", id = "g")} )
public void testAsynchronousObserverMethodCalledAsynchronously()
{
assert false;
}
@Test(groups = { "stub", "events" })
- @SpecAssertion(section = "7.5.8", id = "f")
+ @SpecAssertions( { @SpecAssertion(section = "7.5.8", id = "b"), @SpecAssertion(section = "7.5.8", id = "h")} )
public void testObserverMethodCalledImmediately()
{
@@ -414,8 +414,7 @@
}
@Test(groups = { "events" })
- @SpecAssertions( { @SpecAssertion(section = "7.5", id = "c"), @SpecAssertion(section = "7.5.8", id = "i")} )
- @SpecAssertion(section = "7.5.8", id = "i")
+ @SpecAssertions( { @SpecAssertion(section = "7.5", id = "c"), @SpecAssertion(section = "7.5.8", id = "k")} )
public void testStaticObserverMethodInvoked()
{
getCurrentManager().fireEvent(new Delivery());
@@ -425,40 +424,51 @@
/**
* Otherwise, if the observer method is non-static, the container must:
*
- * obtain the Bean object for the most specialized bean that specializes the
- * bean which declares the observer method, and then
+ * • obtain the Bean object for the most specialized bean that specializes
+ * the bean which declares the observer method, and then
*
+ */
+ @Test(groups = { "events" })
+ @SpecAssertion(section = "7.5.8", id = "l")
+ public void testObserverCalledOnMostSpecializedInstance()
+ {
+ Shop.deliveryObservedBy = null;
+ getCurrentManager().fireEvent(new Delivery());
+ assert Shop.deliveryObservedBy.equals(FarmShop.class.getName());
+ }
+
+ /**
* obtain the context object by calling Manager.getContext(), passing the
* bean scope, then
- *
+ */
+ @Test(groups = { "stub", "events" })
+ @SpecAssertion(section = "7.5.8", id = "m")
+ public void testObserverContextRetrieved()
+ {
+ assert false;
+ }
+
+ /**
* obtain an instance of the bean by calling Context.get(), passing the Bean
* instance representing the bean, together with a CreationalContext unless
* this observer method is a conditional observer method, and then
- *
- * if the get() method returned a non-null value, invoke the observer method
- * on the returned instance
*/
@Test(groups = { "stub", "events" })
- @SpecAssertion(section = "7.5.8", id = "j")
- public void testObserverMethodInvocationProcess()
+ @SpecAssertion(section = "7.5.8", id = "n")
+ public void testObserverInstanceRetrievedFromContext()
{
assert false;
}
/**
- * Otherwise, if the observer method is non-static, the container must:
- *
- * • obtain the Bean object for the most specialized bean that specializes
- * the bean which declares the observer method, and then
- *
+ * if the get() method returned a non-null value, invoke the observer method
+ * on the returned instance
*/
- @Test(groups = { "events" })
- @SpecAssertion(section = "7.5.8", id = "j")
- public void testObserverCalledOnMostSpecializedInstance()
+ @Test(groups = { "stub", "events" })
+ @SpecAssertion(section = "7.5.8", id = "o")
+ public void testObserverMethodInvokedOnReturnedInstanceFromContext()
{
- Shop.deliveryObservedBy = null;
- getCurrentManager().fireEvent(new Delivery());
- assert Shop.deliveryObservedBy.equals(FarmShop.class.getName());
+ assert false;
}
@Test(groups = { "stub", "events" })
@@ -681,7 +691,7 @@
}
@Test(groups = { "events", "underInvestigation" })
- @SpecAssertion(section = "7.6", id = "u")
+ @SpecAssertions( { @SpecAssertion(section = "7.5.8", id = "s"), @SpecAssertion(section = "7.6", id = "u")} )
public void testObserverMethodCallsManagerAddObserverWithObserverObject()
{
assert false;
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-26 16:14:07 UTC (rev 1722)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-26 19:16:58 UTC (rev 1723)
@@ -3905,50 +3905,58 @@
</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>
+ <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="c">
- <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>
+ <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>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>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 observer method, the container calls the observer method asynchronously</text>
+ <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 none of the conditions of assertions c, d, or e are true, the container calls the observer immediately</text>
+ <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>
</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">
<text>The container is not required to guarantee delivery of asynchronous events in the case of a server shutdown or failure</text>
</assertion>
- <assertion id="h">
+ <assertion id="j">
<text>To invoke an observer method, the container must pass the event object to the event parameter and the object returned by Manager.getInstanceToInject() to each of the other parameters</text>
</assertion>
- <assertion id="i">
+ <assertion id="k">
<text>If the observer method is static, the container must invoke the method</text>
</assertion>
- <assertion id="j">
+ <assertion id="l">
<text>If the observer method is non-static, the container must obtain the Bean object for the most specialized bean that specializes the bean which declares the observer method</text>
</assertion>
- <assertion id="k">
+ <assertion id="m">
<text>Placeholder for path 2</text>
</assertion>
- <assertion id="l">
+ <assertion id="n">
<text>Placeholder for path 3</text>
</assertion>
- <assertion id="m">
+ <assertion id="o">
<text>Placeholder for path 4 etc</text>
</assertion>
15 years, 3 months
[webbeans-commits] Webbeans SVN: r1722 - in tck/trunk: impl/src/main/java/org/jboss/jsr299/tck and 1 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-02-26 11:14:07 -0500 (Thu, 26 Feb 2009)
New Revision: 1722
Modified:
tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/EL.java
tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/StandaloneContainers.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/binding/BindingDefinitionTest.java
Log:
Remove remmanants of old infrastructure
Modified: tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/EL.java
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/EL.java 2009-02-26 15:46:00 UTC (rev 1721)
+++ tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/EL.java 2009-02-26 16:14:07 UTC (rev 1722)
@@ -4,13 +4,10 @@
* This interface provides operations relating to EL.
*
* The TCK porting package must provide an implementation of this interface which is
- * suitable for the target Web Beans implementation.
+ * suitable for the target Web Beans implementation.
*
- * NOTE: This interface will be removed
- *
* @author Pete Muir
*/
-@Deprecated
public interface EL
{
Modified: tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/StandaloneContainers.java
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/StandaloneContainers.java 2009-02-26 15:46:00 UTC (rev 1721)
+++ tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/StandaloneContainers.java 2009-02-26 16:14:07 UTC (rev 1722)
@@ -1,8 +1,6 @@
package org.jboss.jsr299.tck.spi;
-import java.lang.annotation.Annotation;
import java.net.URL;
-import java.util.List;
import org.jboss.jsr299.tck.api.DeploymentException;
@@ -39,35 +37,8 @@
* The container should be in an fully initialized state when the
* method returns
*
- * Deprecated, {@link #deploy(Iterable, Iterable)} should be used with real
- * beans.xml files. This method will be removed when the TCK is released.
- *
* @param classes the classes to deploy
- * @return the manager created as a result of initializing the container
*/
- @Deprecated
- public void deploy(List<Class<? extends Annotation>> enabledDeploymentTypes, Iterable<Class<?>> classes) throws DeploymentException;
-
- /**
- * <p>Bootstrap the container by registering Beans and Observers, raising
- * @Initialized event, validating the deployment, and raising the
- * @Deployed event.</p>
- *
- * <p>Any classes passed in should be fully deployed. This includes:</p>
- *
- * <ul>
- * <li>Simple beans</li>
- * <li>Session beans</li>
- * <li>Producer methods and producer fields</li>
- * <li>Observer methods</li>
- * <li>support for Event and Instance injection points</li>
- * </ul>
- *
- * The container should be in an fully initialized state when the
- * method returns
- *
- * @param classes the classes to deploy
- */
public void deploy(Iterable<Class<?>> classes) throws DeploymentException;
/**
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java 2009-02-26 15:46:00 UTC (rev 1721)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java 2009-02-26 16:14:07 UTC (rev 1722)
@@ -27,7 +27,6 @@
{
private static Logger log = Logger.getLogger(AbstractDeclarativeTest.class);
- private static final Class<?>[] EMPTY_CLASS_ARRAY = new Class<?>[0];
private static boolean inContainer = false;
@@ -99,16 +98,8 @@
}
else if (artifact != null && artifact.isUnit())
{
- // Not a legacy test
Set<Class<?>> classes = artifact.getClasses();
- if (getEnabledDeploymentTypes().size() > 0)
- {
- getCurrentConfiguration().getStandaloneContainers().deploy(getEnabledDeploymentTypes(), classes);
- }
- else
- {
- getCurrentConfiguration().getStandaloneContainers().deploy(classes, Arrays.asList(artifact.getBeansXml().getSource()));
- }
+ getCurrentConfiguration().getStandaloneContainers().deploy(classes, Arrays.asList(artifact.getBeansXml().getSource()));
}
}
catch (IOException e)
@@ -213,30 +204,20 @@
@BeforeMethod(alwaysRun=true)
public void beforeMethod(Method method)
- {
- if (!isInContainer() && artifact == null)
- {
- // This is a legacy test
- deployBeans();
- }
+ {
setCurrentManager(getCurrentConfiguration().getManagers().getManager());
}
@AfterMethod(alwaysRun=true)
public void afterMethod()
{
- if (!isInContainer() && artifact == null)
- {
- // This is a legacy test
- getCurrentConfiguration().getStandaloneContainers().undeploy();
- }
setCurrentManager(null);
}
public void run(IHookCallBack callback, ITestResult testResult)
{
- if (artifact == null)
+ if (artifact == null && !isInContainer())
{
log.warn("Non @Artifact-test for testcase " + testResult.getMethod());
}
@@ -247,7 +228,7 @@
else if (!isDeployToContainerNeeded() && !skipTest)
{
callback.runTestMethod(testResult);
- if (!getCurrentConfiguration().isStandalone())
+ if (!getCurrentConfiguration().isStandalone() && !isInContainer())
{
log.warn("Running testcase locally " + testResult.getMethod());
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractTest.java 2009-02-26 15:46:00 UTC (rev 1721)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractTest.java 2009-02-26 16:14:07 UTC (rev 1722)
@@ -5,28 +5,16 @@
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
-import java.lang.annotation.Annotation;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
import javax.context.Context;
-import javax.context.CreationalContext;
-import javax.inject.Production;
-import javax.inject.Standard;
import javax.inject.manager.Manager;
import org.jboss.jsr299.tck.api.Configuration;
-import org.jboss.jsr299.tck.api.DeploymentException;
import org.jboss.jsr299.tck.impl.ConfigurationImpl;
-import org.jboss.jsr299.tck.impl.util.MockCreationalContext;
public abstract class AbstractTest
{
- private static final List<Class<? extends Annotation>> STANDARD_DEPLOYMENT_TYPES = Collections.unmodifiableList(Arrays.asList(Standard.class, Production.class));
-
protected abstract static class RunInDependentContext
{
@@ -56,89 +44,9 @@
protected abstract void execute() throws Exception;
}
-
- /**
- * @see RunInDependentContext
- */
- @Deprecated
- protected static void activateDependentContext()
- {
- getCurrentConfiguration().getContexts().setActive(getCurrentConfiguration().getContexts().getDependentContext());
- }
private Manager currentManager;
- /**
- * Used to deploy simple beans in a standalone container.
- *
- *
- *
- * @param classes A list of classes representing the beans to deploy
- */
- @Deprecated
- protected void deployBeans(Class<?>... classes)
- {
-
- if (getEnabledDeploymentTypes().size() > 0)
- {
- try
- {
- getCurrentConfiguration().getStandaloneContainers().deploy(getEnabledDeploymentTypes(), Arrays.asList(classes));
- }
- catch (DeploymentException e)
- {
- if (e.getCause() instanceof RuntimeException)
- {
- throw (RuntimeException) e.getCause();
- }
- else
- {
- throw new RuntimeException(e.getCause());
- }
- }
- }
- else
- {
- try
- {
- getCurrentConfiguration().getStandaloneContainers().deploy(Arrays.asList(classes));
- }
- catch (DeploymentException e)
- {
- if (e.getCause() instanceof RuntimeException)
- {
- throw (RuntimeException) e.getCause();
- }
- else
- {
- throw new RuntimeException(e.getCause());
- }
- }
- }
- setCurrentManager(getCurrentConfiguration().getManagers().getManager());
- }
-
-
- protected final List<Class<? extends Annotation>> getStandardDeploymentTypes()
- {
- return new ArrayList<Class<? extends Annotation>>(STANDARD_DEPLOYMENT_TYPES);
- }
-
- /**
- * This method should be overridden by test classes which need to enable
- * additional deployment types beyond the normal ones.
- *
- * Deprecated, need to use beans.xml
- *
- * @return the list of enabled deployment types
- */
- @Deprecated
- protected List<Class<? extends Annotation>> getEnabledDeploymentTypes()
- {
- return Collections.emptyList();
- }
-
-
protected void setCurrentManager(Manager currentManager)
{
this.currentManager = currentManager;
@@ -164,15 +72,6 @@
return in.readObject();
}
- /**
- * @see RunInDependentContext
- */
- @Deprecated
- protected static void deactivateDependentContext()
- {
- getCurrentConfiguration().getContexts().setInactive(getCurrentConfiguration().getContexts().getDependentContext());
- }
-
protected static void setContextActive(Context context)
{
getCurrentConfiguration().getContexts().setActive(context);
@@ -188,12 +87,6 @@
getCurrentConfiguration().getContexts().destroyContext(context);
}
- @Deprecated
- public static final <T> CreationalContext<T> mockCreationalContext(Class<T> expectedType)
- {
- return new MockCreationalContext<T>();
- }
-
public AbstractTest()
{
super();
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/binding/BindingDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/binding/BindingDefinitionTest.java 2009-02-26 15:46:00 UTC (rev 1721)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/binding/BindingDefinitionTest.java 2009-02-26 16:14:07 UTC (rev 1722)
@@ -1,7 +1,6 @@
package org.jboss.jsr299.tck.unit.definition.binding;
import java.lang.annotation.Annotation;
-import java.util.List;
import java.util.Set;
import javax.inject.AnnotationLiteral;
@@ -23,14 +22,6 @@
public class BindingDefinitionTest extends AbstractDeclarativeTest
{
- @Override
- protected List<Class<? extends Annotation>> getEnabledDeploymentTypes()
- {
- List<Class<? extends Annotation>> deploymentTypes = super.getStandardDeploymentTypes();
- deploymentTypes.add(AnotherDeploymentType.class);
- return deploymentTypes;
- }
-
@Test
@SpecAssertion(section = "2.3.1", id = "a")
public void testDefaultBindingDeclaredInJava()
15 years, 3 months
[webbeans-commits] Webbeans SVN: r1721 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/unit/event and 6 other directories.
by webbeans-commits@lists.jboss.org
Author: dallen6
Date: 2009-02-26 10:46:00 -0500 (Thu, 26 Feb 2009)
New Revision: 1721
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/EventTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/EventTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer1/EJBObserverMethodNotBusinessMethodTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer7/TransactionalObserverMethodOnlyOnePhaseTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer8/AsynchronousBeforeCompletionObserverTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer9/AsynchronousConditionalObserverTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/register/observer2/ManagerRemoveObserverTest.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
A bit more test coverage for event tests (Section 7)
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/EventTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/EventTest.java 2009-02-26 15:44:39 UTC (rev 1720)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/EventTest.java 2009-02-26 15:46:00 UTC (rev 1721)
@@ -28,6 +28,7 @@
import javax.inject.manager.Bean;
import org.hibernate.tck.annotations.SpecAssertion;
+import org.hibernate.tck.annotations.SpecAssertions;
import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.jboss.jsr299.tck.impl.packaging.Artifact;
import org.jboss.jsr299.tck.impl.packaging.IntegrationTest;
@@ -47,9 +48,11 @@
@IntegrationTest
public class EventTest extends AbstractDeclarativeTest
{
-
- private static final Annotation TAME_LITERAL = new AnnotationLiteral<Tame>() {};
-
+
+ private static final Annotation TAME_LITERAL = new AnnotationLiteral<Tame>()
+ {
+ };
+
@Test(groups = { "stub", "events", "integration" })
@SpecAssertion(section = "7.4", id = "d")
public void testObserverCalledBeforeTransactionCompleteMaySetRollbackOnly()
@@ -79,7 +82,7 @@
}
@Test(groups = { "events", "integration", "broken" })
- @SpecAssertion(section = "7.5.6", id = "unknown")
+ @SpecAssertion(section = "7.5.6", id = "a")
public void testTransactionalObserverNotifiedImmediatelyWhenNoTransactionInProgress()
{
PomeranianInterface dog = (PomeranianInterface) getCurrentManager().getInstanceByName("Teddy");
@@ -92,7 +95,7 @@
}
@Test(groups = { "events", "integration", "broken" })
- @SpecAssertion(section = "7.5.6", id = "unknown")
+ @SpecAssertions( { @SpecAssertion(section = "7.5.6", id = "c"), @SpecAssertion(section = "7.5.6", id = "f"), @SpecAssertion(section = "7.5.6", id = "i") })
public void testAfterTransactionCompletionObserver()
{
PomeranianInterface dog = (PomeranianInterface) getCurrentManager().getInstanceByName("Teddy");
@@ -106,7 +109,7 @@
}
@Test(groups = { "events", "integration", "broken" })
- @SpecAssertion(section = "7.5.6", id = "unknown")
+ @SpecAssertions( { @SpecAssertion(section = "7.5.6", id = "d"), @SpecAssertion(section = "7.5.6", id = "j") })
public void testAfterTransactionSuccessObserver()
{
PomeranianInterface dog = (PomeranianInterface) getCurrentManager().getInstanceByName("Teddy");
@@ -117,7 +120,7 @@
}
@Test(groups = { "events", "integration", "broken" })
- @SpecAssertion(section = "7.5.6", id = "unknown")
+ @SpecAssertions( { @SpecAssertion(section = "7.5.6", id = "e"), @SpecAssertion(section = "7.5.6", id = "k") })
public void testAfterTransactionFailureObserver()
{
PomeranianInterface dog = (PomeranianInterface) getCurrentManager().getInstanceByName("Teddy");
@@ -127,12 +130,19 @@
}
@Test(groups = { "stub", "events", "integration" })
- @SpecAssertion(section = "7.5.6", id = "unknown")
+ @SpecAssertions( { @SpecAssertion(section = "7.5.6", id = "b"), @SpecAssertion(section = "7.5.6", id = "h") })
public void testBeforeTransactionCompletionObserver()
{
assert false;
}
+ @Test(groups = { "stub", "events", "integration" })
+ @SpecAssertions( { @SpecAssertion(section = "7.5.6", id = "g") })
+ public void testTransactionalObserverDefinedByXML()
+ {
+ assert false;
+ }
+
/**
* If the observer method is an asynchronous transactional observer method
* and there is currently a JTA transaction in progress, the observer object
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/EventTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/EventTest.java 2009-02-26 15:44:39 UTC (rev 1720)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/EventTest.java 2009-02-26 15:46:00 UTC (rev 1721)
@@ -245,7 +245,7 @@
}
@Test(groups = { "events" })
- @SpecAssertion(section = "7.5", id = "a")
+ @SpecAssertions( { @SpecAssertion(section = "7.5", id = "a"), @SpecAssertion(section = "7.5.2", id = "a")} )
public void testObserverMethodAutomaticallyRegistered()
{
assert !getCurrentManager().resolveObservers("event").isEmpty();
@@ -301,7 +301,7 @@
}
@Test(groups = { "stub", "events", "webbeansxml" })
- @SpecAssertion(section = "7.5.3", id = "b")
+ @SpecAssertions( { @SpecAssertion(section = "7.5.3", id = "a"), @SpecAssertion(section = "7.5.3", id = "b") } )
public void testXMLDefinedObserverMethodIgnoresBindingAnnotations()
{
assert false;
@@ -336,7 +336,7 @@
// TODO This test was working well in January 2009 but no longer creates the
// observer
@Test(groups = { "events", "broken" })
- @SpecAssertion(section = "7.5.5", id = "a")
+ @SpecAssertions( { @SpecAssertion(section = "7.5.5", id = "a"), @SpecAssertion(section = "7.5.5", id = "b")} )
public void testConditionalObserver() throws Exception
{
RecluseSpider.notified = false;
@@ -361,6 +361,13 @@
}.run();
}
+ @Test(groups = { "events", "stub" })
+ @SpecAssertions( { @SpecAssertion(section = "7.5.5", id = "c") } )
+ public void testConditionalObserverDefinedByXML()
+ {
+ assert false;
+ }
+
@Test(groups = { "stub", "events" })
@SpecAssertion(section = "7.5.7", id = "a")
public void testAsynchronousObserverIsAsynchronous()
@@ -369,14 +376,14 @@
}
@Test(groups = { "stub", "events", "webbeansxml" })
- @SpecAssertion(section = "7.5.7", id = "a")
+ @SpecAssertion(section = "7.5.7", id = "b")
public void testAsynchronousObserverDeclaredByXML()
{
assert false;
}
@Test(groups = { "stub", "events" })
- @SpecAssertion(section = "7.5.7", id = "b")
+ @SpecAssertion(section = "7.5.7", id = "c")
public void testAsynchronousObserverAlsoTransactional()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer1/EJBObserverMethodNotBusinessMethodTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer1/EJBObserverMethodNotBusinessMethodTest.java 2009-02-26 15:44:39 UTC (rev 1720)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer1/EJBObserverMethodNotBusinessMethodTest.java 2009-02-26 15:46:00 UTC (rev 1721)
@@ -20,6 +20,7 @@
import javax.inject.DefinitionException;
import org.hibernate.tck.annotations.SpecAssertion;
+import org.hibernate.tck.annotations.SpecAssertions;
import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.jboss.jsr299.tck.impl.packaging.Artifact;
import org.jboss.jsr299.tck.impl.packaging.ExpectedDeploymentException;
@@ -40,7 +41,7 @@
public class EJBObserverMethodNotBusinessMethodTest extends AbstractDeclarativeTest
{
@Test(groups = { "events" })
- @SpecAssertion(section = "7.5", id = "d")
+ @SpecAssertions( { @SpecAssertion(section = "7.5", id = "d"), @SpecAssertion(section = "7.5.2", id = "f")} )
public void testObserverMethodOnEnterpriseBeanNotBusinessMethodOrStaticFails()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer7/TransactionalObserverMethodOnlyOnePhaseTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer7/TransactionalObserverMethodOnlyOnePhaseTest.java 2009-02-26 15:44:39 UTC (rev 1720)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer7/TransactionalObserverMethodOnlyOnePhaseTest.java 2009-02-26 15:46:00 UTC (rev 1721)
@@ -37,7 +37,7 @@
public class TransactionalObserverMethodOnlyOnePhaseTest extends AbstractDeclarativeTest
{
@Test(groups = { "events" })
- @SpecAssertion(section = "7.5.6", id = "k")
+ @SpecAssertion(section = "7.5.6", id = "l")
public void testTransactionalObserverCanOnlyObserveSinglePhase()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer8/AsynchronousBeforeCompletionObserverTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer8/AsynchronousBeforeCompletionObserverTest.java 2009-02-26 15:44:39 UTC (rev 1720)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer8/AsynchronousBeforeCompletionObserverTest.java 2009-02-26 15:46:00 UTC (rev 1721)
@@ -37,7 +37,7 @@
public class AsynchronousBeforeCompletionObserverTest extends AbstractDeclarativeTest
{
@Test(groups = { "events", "broken" })
- @SpecAssertion(section = "7.5.7", id = "c")
+ @SpecAssertion(section = "7.5.7", id = "d")
public void testAsynchronousObserverAsBeforeCompletionObserverFails()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer9/AsynchronousConditionalObserverTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer9/AsynchronousConditionalObserverTest.java 2009-02-26 15:44:39 UTC (rev 1720)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer9/AsynchronousConditionalObserverTest.java 2009-02-26 15:46:00 UTC (rev 1721)
@@ -37,7 +37,7 @@
public class AsynchronousConditionalObserverTest extends AbstractDeclarativeTest
{
@Test(groups = { "events", "broken" })
- @SpecAssertion(section = "7.5.7", id = "c")
+ @SpecAssertion(section = "7.5.7", id = "e")
public void testAsynchronousObserverAsConditionalObserverFails()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/register/observer2/ManagerRemoveObserverTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/register/observer2/ManagerRemoveObserverTest.java 2009-02-26 15:44:39 UTC (rev 1720)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/register/observer2/ManagerRemoveObserverTest.java 2009-02-26 15:46:00 UTC (rev 1721)
@@ -25,6 +25,7 @@
import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractDeclarativeTest;
+import org.jboss.jsr299.tck.impl.packaging.Artifact;
import org.testng.annotations.Test;
/**
@@ -33,6 +34,7 @@
* @author David Allen
*
*/
+@Artifact
public class ManagerRemoveObserverTest extends AbstractDeclarativeTest
{
public static class AnEventType
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-26 15:44:39 UTC (rev 1720)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-26 15:46:00 UTC (rev 1721)
@@ -3849,42 +3849,54 @@
</assertion>
<assertion id="f">
- <text>A transactional observer method may be declared by annotating the event parameter of the observer method or in XML by a child element of the <Observes> element</text>
+ <text>A transactional observer method may be declared by ~annotating the event parameter of the observer method~ or in XML by a child element of the <Observes> element</text>
</assertion>
<assertion id="g">
+ <text>A transactional observer method may be declared by annotating the event parameter of the observer method or ~in XML by a child element of the <Observes> element~</text>
+ </assertion>
+
+ <assertion id="h">
<text>The @javax.event.BeforeTransactionCompletion annotation or <BeforeTransactionCompletion> element specifies that the observer method is a before completion observer method</text>
</assertion>
- <assertion id="h">
+ <assertion id="i">
<text>The @javax.event.AfterTransactionCompletion annotation or <AfterTransactionCompletion> element specifies that the observer method is an after completion observer method</text>
</assertion>
- <assertion id="i">
+ <assertion id="j">
<text>The @javax.event.AfterTransactionSuccess annotation or <AfterTransactionSuccess> element specifies that the observer method is an after success observer method</text>
</assertion>
- <assertion id="j">
+ <assertion id="k">
<text>The @javax.event.AfterTransactionFailure annotation or <AfterTransactionFailure> element specifies that the observer method is an after failure observer method</text>
</assertion>
- <assertion id="k">
+ <assertion id="l">
<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, a DefinitionException is thrown by the container at deployment time</text>
</assertion>
</section>
<section id="7.5.7" title="Asynchronous observer methods">
<assertion id="a">
- <text>An asynchronous observer method may be declared by annotating the event parameter of the observer method @javax.event.Asynchronously or in XML by a child <Asynchronously> element of the <Observes> element</text>
+ <text>An asynchronous observer method may be declared by ~annotating the event parameter of the observer method @javax.event.Asynchronously~ or in XML by a child <Asynchronously> element of the <Observes> element</text>
</assertion>
<assertion id="b">
- <text>An asynchronous observer method may also be a transactional observer method</text>
+ <text>An asynchronous observer method may be declared by annotating the event parameter of the observer method @javax.event.Asynchronously or ~in XML by a child <Asynchronously> element of the <Observes> element~</text>
</assertion>
<assertion id="c">
- <text>If an asynchronous observer method is also a transactional observer method, 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, a DefinitionException is thrown by the container at deployment time</text>
+ <text>An asynchronous observer method may also be a transactional observer method</text>
</assertion>
+
+ <assertion id="d">
+ <text>If an asynchronous observer method is also a transactional observer method, 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, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>If an asynchronous observer method is also a transactional observer method, 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, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
</section>
<section id="7.5.8" title="Observer object for an observer method">
15 years, 3 months
[webbeans-commits] Webbeans SVN: r1720 - in tck/trunk/impl/src/main/java/org/jboss/jsr299/tck: unit/context and 1 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-02-26 10:44:39 -0500 (Thu, 26 Feb 2009)
New Revision: 1720
Removed:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Animal.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/AnimalStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/AnotherDeploymentType.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/BlackWidow.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DaddyLongLegs.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DeadlyAnimal.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DeadlySpider.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DefangedTarantula.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/FunnelWeaver.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/HighestDeploymentType.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/LadybirdSpider.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/NullSpiderConsumer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/NullSpiderProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/NullSpiderProducer_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/OtherSpiderProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/SpecializedTarantulaProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Spider.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Tame.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Tarantula.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/TarantulaProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/VibratingSpider.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/VibratingSpiderImpl_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/WolfSpider.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/ContextTest.java
Log:
Clean up
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java 2009-02-26 15:02:21 UTC (rev 1719)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java 2009-02-26 15:44:39 UTC (rev 1720)
@@ -30,7 +30,6 @@
private static final Class<?>[] EMPTY_CLASS_ARRAY = new Class<?>[0];
private static boolean inContainer = false;
- private static int numberOfTestsRunInContainer = 0;
public static boolean isInContainer()
{
@@ -185,10 +184,6 @@
@AfterSuite(alwaysRun=true)
public void afterSuite() throws Exception
{
- if (!isInContainer())
- {
- log.info("Ran " + numberOfTestsRunInContainer + " tests in the container");
- }
if (isSuiteDeployingTestsToContainer())
{
getCurrentConfiguration().getContainers().cleanup();
@@ -241,9 +236,9 @@
public void run(IHookCallBack callback, ITestResult testResult)
{
- if(isDeployToContainerNeeded())
+ if (artifact == null)
{
- numberOfTestsRunInContainer++;
+ log.warn("Non @Artifact-test for testcase " + testResult.getMethod());
}
if (deploymentException != null)
{
@@ -252,6 +247,10 @@
else if (!isDeployToContainerNeeded() && !skipTest)
{
callback.runTestMethod(testResult);
+ if (!getCurrentConfiguration().isStandalone())
+ {
+ log.warn("Running testcase locally " + testResult.getMethod());
+ }
}
else if (!skipTest)
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/ContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/ContextTest.java 2009-02-26 15:02:21 UTC (rev 1719)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/ContextTest.java 2009-02-26 15:44:39 UTC (rev 1720)
@@ -10,12 +10,14 @@
import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractDeclarativeTest;
+import org.jboss.jsr299.tck.impl.packaging.Artifact;
import org.testng.annotations.Test;
/**
*
* Spec version: PRD2
*/
+@Artifact
public class ContextTest extends AbstractDeclarativeTest
{
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Animal.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Animal.java 2009-02-26 15:02:21 UTC (rev 1719)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Animal.java 2009-02-26 15:44:39 UTC (rev 1720)
@@ -1,6 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-interface Animal
-{
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/AnimalStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/AnimalStereotype.java 2009-02-26 15:02:21 UTC (rev 1719)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/AnimalStereotype.java 2009-02-26 15:44:39 UTC (rev 1720)
@@ -1,21 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.annotation.Stereotype;
-import javax.context.RequestScoped;
-
-(a)Stereotype(requiredTypes=Animal.class)
-@Target( { TYPE, METHOD, FIELD })
-@Retention(RUNTIME)
-@RequestScoped
-@interface AnimalStereotype
-{
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/AnotherDeploymentType.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/AnotherDeploymentType.java 2009-02-26 15:02:21 UTC (rev 1719)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/AnotherDeploymentType.java 2009-02-26 15:44:39 UTC (rev 1720)
@@ -1,21 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-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.inject.DeploymentType;
-
-@Target( { TYPE, METHOD, FIELD })
-@Retention(RUNTIME)
-@Documented
-@DeploymentType
-@interface AnotherDeploymentType
-{
-
-}
\ No newline at end of file
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/BlackWidow.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/BlackWidow.java 2009-02-26 15:02:21 UTC (rev 1719)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/BlackWidow.java 2009-02-26 15:44:39 UTC (rev 1720)
@@ -1,10 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-class BlackWidow extends Spider implements DeadlySpider
-{
- public void bite()
- {
- // Test method used for proxy instances to force
- // creation of the instance.
- }
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DaddyLongLegs.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DaddyLongLegs.java 2009-02-26 15:02:21 UTC (rev 1719)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DaddyLongLegs.java 2009-02-26 15:44:39 UTC (rev 1720)
@@ -1,7 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-
-class DaddyLongLegs extends Spider
-{
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DeadlyAnimal.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DeadlyAnimal.java 2009-02-26 15:02:21 UTC (rev 1719)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DeadlyAnimal.java 2009-02-26 15:44:39 UTC (rev 1720)
@@ -1,6 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-interface DeadlyAnimal
-{
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DeadlySpider.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DeadlySpider.java 2009-02-26 15:02:21 UTC (rev 1719)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DeadlySpider.java 2009-02-26 15:44:39 UTC (rev 1720)
@@ -1,6 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-interface DeadlySpider extends DeadlyAnimal
-{
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DefangedTarantula.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DefangedTarantula.java 2009-02-26 15:02:21 UTC (rev 1719)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DefangedTarantula.java 2009-02-26 15:44:39 UTC (rev 1720)
@@ -1,7 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-
-class DefangedTarantula extends Tarantula
-{
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/FunnelWeaver.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/FunnelWeaver.java 2009-02-26 15:02:21 UTC (rev 1719)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/FunnelWeaver.java 2009-02-26 15:44:39 UTC (rev 1720)
@@ -1,6 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-class FunnelWeaver<T>
-{
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/HighestDeploymentType.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/HighestDeploymentType.java 2009-02-26 15:02:21 UTC (rev 1719)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/HighestDeploymentType.java 2009-02-26 15:44:39 UTC (rev 1720)
@@ -1,21 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-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.inject.DeploymentType;
-
-@Target( { TYPE, METHOD, FIELD })
-@Retention(RUNTIME)
-@Documented
-@DeploymentType
-@interface HighestDeploymentType
-{
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/LadybirdSpider.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/LadybirdSpider.java 2009-02-26 15:02:21 UTC (rev 1719)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/LadybirdSpider.java 2009-02-26 15:44:39 UTC (rev 1720)
@@ -1,14 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-import javax.context.ApplicationScoped;
-
-@ApplicationScoped
-class LadybirdSpider extends Spider
-{
-
- public void spinWeb()
- {
-
- }
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/NullSpiderConsumer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/NullSpiderConsumer.java 2009-02-26 15:02:21 UTC (rev 1719)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/NullSpiderConsumer.java 2009-02-26 15:44:39 UTC (rev 1720)
@@ -1,41 +0,0 @@
-/*
- * 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.
- */
-
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-import java.io.Serializable;
-
-import javax.inject.Current;
-
-/**
- * Simple bean that has an injection point for a spider
- *
- * @author David Allen
- *
- */
-public class NullSpiderConsumer implements Serializable
-{
- private static final long serialVersionUID = 1L;
-
- @Current
- private BlackWidow injectedSpider;
-
- public BlackWidow getInjectedSpider()
- {
- return injectedSpider;
- }
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/NullSpiderProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/NullSpiderProducer.java 2009-02-26 15:02:21 UTC (rev 1719)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/NullSpiderProducer.java 2009-02-26 15:44:39 UTC (rev 1720)
@@ -1,34 +0,0 @@
-/*
- * 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.
- */
-
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-import javax.annotation.Named;
-import javax.inject.Produces;
-
-/**
- * Contains producer for Spider which always is a null value and
- * in Dependent scope
- *
- * @author David Allen
- *
- */
-public class NullSpiderProducer
-{
- @Produces @Named("blackWidow") public BlackWidow produceBlackWidow = null;
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/NullSpiderProducer_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/NullSpiderProducer_Broken.java 2009-02-26 15:02:21 UTC (rev 1719)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/NullSpiderProducer_Broken.java 2009-02-26 15:44:39 UTC (rev 1720)
@@ -1,35 +0,0 @@
-/*
- * 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.
- */
-
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-import javax.annotation.Named;
-import javax.context.RequestScoped;
-import javax.inject.Produces;
-
-/**
- * Bean with a producer field that always returns null and is not
- * in Dependent context (the produced result)
- *
- * @author David Allen
- *
- */
-public class NullSpiderProducer_Broken
-{
- @Produces @RequestScoped @Named("blackWidow") public BlackWidow produceBlackWidow = null;
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/OtherSpiderProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/OtherSpiderProducer.java 2009-02-26 15:02:21 UTC (rev 1719)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/OtherSpiderProducer.java 2009-02-26 15:44:39 UTC (rev 1720)
@@ -1,38 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-import javax.annotation.Named;
-import javax.inject.Produces;
-import javax.inject.Production;
-
-
-@AnotherDeploymentType
-class OtherSpiderProducer
-{
-
- private static Spider[] ALL_SPIDERS = { new Tarantula(), new LadybirdSpider(), new DaddyLongLegs() };
- @Produces public Spider[] getSpiders = ALL_SPIDERS;
-
- @Produces @Tame public Tarantula produceTameTarantula = new DefangedTarantula();
-
- @Produces public static Tarantula produceTarantula = new Tarantula();
-
- public static BlackWidow blackWidow = new BlackWidow();
- @Produces @Named("blackWidow") public BlackWidow produceBlackWidow = blackWidow;
-
- //@Produces @Named @RequestScoped public DaddyLongLegs produceDaddyLongLegs = new DaddyLongLegs();
-
- @Produces @Named @Production public LadybirdSpider getLadybirdSpider = new LadybirdSpider();
-
- @Produces @AnimalStereotype public WolfSpider produceWolfSpider = new WolfSpider();
-
- @Produces public Animal makeASpider = new WolfSpider();
-
- @Produces @Named("SpiderSize") public int getWolfSpiderSize = 4;
-
-
-
- @Produces public FunnelWeaver<Spider> getFunnelWeaverSpider = new FunnelWeaver<Spider>();
-
- @Produces public Spider getNullSpider = null;
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/SpecializedTarantulaProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/SpecializedTarantulaProducer.java 2009-02-26 15:02:21 UTC (rev 1719)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/SpecializedTarantulaProducer.java 2009-02-26 15:44:39 UTC (rev 1720)
@@ -1,36 +0,0 @@
-/*
- * 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.
- */
-
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-import javax.inject.Produces;
-import javax.inject.Specializes;
-
-/**
- * This bean contains a producer field and specializes another bean
- * which has the same producer field.
- *
- * @author David Allen
- *
- */
-@Specializes
-@HighestDeploymentType
-public class SpecializedTarantulaProducer extends TarantulaProducer
-{
- @Produces public Tarantula produceTarantula = new DefangedTarantula();
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Spider.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Spider.java 2009-02-26 15:02:21 UTC (rev 1719)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Spider.java 2009-02-26 15:44:39 UTC (rev 1720)
@@ -1,13 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-class Spider implements Animal
-{
-
- private static final long serialVersionUID = 1L;
-
- public void layEggs()
- {
-
- }
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Tame.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Tame.java 2009-02-26 15:02:21 UTC (rev 1719)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Tame.java 2009-02-26 15:44:39 UTC (rev 1720)
@@ -1,22 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-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.inject.BindingType;
-
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@BindingType
-@interface Tame
-{
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Tarantula.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Tarantula.java 2009-02-26 15:02:21 UTC (rev 1719)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Tarantula.java 2009-02-26 15:44:39 UTC (rev 1720)
@@ -1,6 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-class Tarantula extends Spider implements DeadlySpider
-{
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/TarantulaProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/TarantulaProducer.java 2009-02-26 15:02:21 UTC (rev 1719)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/TarantulaProducer.java 2009-02-26 15:44:39 UTC (rev 1720)
@@ -1,10 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-import javax.inject.Produces;
-
-@AnotherDeploymentType
-class TarantulaProducer
-{
- @Produces public Tarantula produceTarantula = new Tarantula();
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/VibratingSpider.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/VibratingSpider.java 2009-02-26 15:02:21 UTC (rev 1719)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/VibratingSpider.java 2009-02-26 15:44:39 UTC (rev 1720)
@@ -1,12 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-import javax.ejb.Local;
-import javax.inject.Produces;
-
-@Local
-public interface VibratingSpider
-{
- @Produces public Integer numberOfEyes = 5;
-
- @Produces public Integer numberOfLegs = 8;
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/VibratingSpiderImpl_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/VibratingSpiderImpl_Broken.java 2009-02-26 15:02:21 UTC (rev 1719)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/VibratingSpiderImpl_Broken.java 2009-02-26 15:44:39 UTC (rev 1720)
@@ -1,10 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-import javax.ejb.Stateless;
-import javax.inject.Produces;
-
-@Stateless
-public class VibratingSpiderImpl_Broken implements VibratingSpider
-{
- @Produces public Integer numberOfEggs = 5000;
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/WolfSpider.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/WolfSpider.java 2009-02-26 15:02:21 UTC (rev 1719)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/WolfSpider.java 2009-02-26 15:44:39 UTC (rev 1720)
@@ -1,7 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-
-class WolfSpider implements Animal
-{
-
-}
15 years, 3 months
[webbeans-commits] Webbeans SVN: r1719 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/unit/implementation/producer/field and 4 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-02-26 10:02:21 -0500 (Thu, 26 Feb 2009)
New Revision: 1719
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Animal.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/AnotherDeploymentType.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/BlackWidow.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DeadlyAnimal.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DeadlySpider.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DefangedTarantula.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Spider.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Tame.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Tarantula.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/TarantulaProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/WolfSpider.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Animal.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/AnotherDeploymentType.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/AsAnimal.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/BlackWidow.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/BlackWidowProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Chicken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/DaddyLongLegs.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/DeadlyAnimal.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/DeadlySpider.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/DefangedTarantula.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Egg.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Foo.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/FunnelWeaver.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/FunnelWeaverSpiderConsumer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/FunnelWeaverSpiderProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/InfertileChicken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/LadybirdSpider.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/OtherSpiderProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/ProducerFieldDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Spider.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/SpiderAsAnimalProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/SpiderStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Static.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/StaticTarantulaProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Tame.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/TameAnnotationLiteral.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/TameTarantulaProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Tarantula.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/TarantulaConsumer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/TarantulaProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/WolfSpider.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/parameterizedReturnTypeWithWildcard/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/parameterizedReturnTypeWithWildcard/FunnelWeaver.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/parameterizedReturnTypeWithWildcard/ParameterizedReturnTypeWithWildcardTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/parameterizedReturnTypeWithWildcard/SpiderProducerWildCardType_Broken.java
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/beans.xml
Removed:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Animal.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/AnotherDeploymentType.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/BlackWidow.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/BlackWidowProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Chicken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DeadlyAnimal.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DeadlySpider.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DefangedTarantula.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Egg.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/FunnelWeaverSpiderConsumer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/FunnelWeaverSpiderProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/InfertileChicken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Spider.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/SpiderAsAnimalProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/SpiderProducerWildCardType_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/SpiderStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/StaticTarantulaProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Tame.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/TameAnnotationLiteral.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/TameTarantulaProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Tarantula.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/TarantulaConsumer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/TarantulaProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/WolfSpider.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/dependent/OtherSpiderProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DaddyLongLegs.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/OtherSpiderProducer.java
Log:
Migrate more tests to @Artifact
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/dependent/OtherSpiderProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/dependent/OtherSpiderProducer.java 2009-02-26 12:22:44 UTC (rev 1718)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/dependent/OtherSpiderProducer.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -3,7 +3,7 @@
import javax.inject.Produces;
@AnotherDeploymentType
-public class OtherSpiderProducer
+class OtherSpiderProducer
{
@Produces @Tame public Tarantula produceTarantula = new Tarantula();
}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Animal.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Animal.java 2009-02-26 12:22:44 UTC (rev 1718)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Animal.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -1,6 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-interface Animal
-{
-
-}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Animal.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Animal.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Animal.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field;
+
+interface Animal
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Animal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/AnotherDeploymentType.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/AnotherDeploymentType.java 2009-02-26 12:22:44 UTC (rev 1718)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/AnotherDeploymentType.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -1,21 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-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.inject.DeploymentType;
-
-@Target( { TYPE, METHOD, FIELD })
-@Retention(RUNTIME)
-@Documented
-@DeploymentType
-@interface AnotherDeploymentType
-{
-
-}
\ No newline at end of file
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/AnotherDeploymentType.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/AnotherDeploymentType.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/AnotherDeploymentType.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+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.inject.DeploymentType;
+
+@Target( { TYPE, METHOD, FIELD })
+@Retention(RUNTIME)
+@Documented
+@DeploymentType
+@interface AnotherDeploymentType
+{
+
+}
\ No newline at end of file
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/AnotherDeploymentType.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/BlackWidow.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/BlackWidow.java 2009-02-26 12:22:44 UTC (rev 1718)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/BlackWidow.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -1,10 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-class BlackWidow extends Spider implements DeadlySpider
-{
- public void bite()
- {
- // Test method used for proxy instances to force
- // creation of the instance.
- }
-}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/BlackWidow.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/BlackWidow.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/BlackWidow.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,10 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field;
+
+class BlackWidow extends Spider implements DeadlySpider
+{
+ public void bite()
+ {
+ // Test method used for proxy instances to force
+ // creation of the instance.
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/BlackWidow.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/BlackWidowProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/BlackWidowProducer.java 2009-02-26 12:22:44 UTC (rev 1718)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/BlackWidowProducer.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -1,13 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-import javax.annotation.Named;
-import javax.inject.Produces;
-
-public class BlackWidowProducer
-{
- public static BlackWidow blackWidow = new BlackWidow();
- @Produces
- @Named("blackWidow")
- public BlackWidow produceBlackWidow = blackWidow;
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Chicken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Chicken.java 2009-02-26 12:22:44 UTC (rev 1718)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Chicken.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -1,11 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-import javax.inject.Produces;
-
-class Chicken
-{
-
- @Produces
- private Egg egg = new Egg();
-
-}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DaddyLongLegs.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DaddyLongLegs.java 2009-02-26 12:22:44 UTC (rev 1718)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DaddyLongLegs.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -1,5 +1,6 @@
package org.jboss.jsr299.tck.unit.implementation.producer.field;
+
class DaddyLongLegs extends Spider
{
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DeadlyAnimal.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DeadlyAnimal.java 2009-02-26 12:22:44 UTC (rev 1718)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DeadlyAnimal.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -1,6 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-interface DeadlyAnimal
-{
-
-}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DeadlyAnimal.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DeadlyAnimal.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DeadlyAnimal.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field;
+
+interface DeadlyAnimal
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DeadlyAnimal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DeadlySpider.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DeadlySpider.java 2009-02-26 12:22:44 UTC (rev 1718)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DeadlySpider.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -1,6 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-interface DeadlySpider extends DeadlyAnimal
-{
-
-}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DeadlySpider.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DeadlySpider.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DeadlySpider.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field;
+
+interface DeadlySpider extends DeadlyAnimal
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DeadlySpider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DefangedTarantula.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DefangedTarantula.java 2009-02-26 12:22:44 UTC (rev 1718)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DefangedTarantula.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -1,5 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-class DefangedTarantula extends Tarantula
-{
-
-}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DefangedTarantula.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DefangedTarantula.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DefangedTarantula.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,7 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field;
+
+
+class DefangedTarantula extends Tarantula
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DefangedTarantula.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Egg.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Egg.java 2009-02-26 12:22:44 UTC (rev 1718)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Egg.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -1,6 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-class Egg
-{
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/FunnelWeaverSpiderConsumer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/FunnelWeaverSpiderConsumer.java 2009-02-26 12:22:44 UTC (rev 1718)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/FunnelWeaverSpiderConsumer.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -1,14 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-import javax.inject.Current;
-
-public class FunnelWeaverSpiderConsumer
-{
- @Current
- private FunnelWeaver<Spider> injectedSpider;
-
- public FunnelWeaver<Spider> getInjectedSpider()
- {
- return injectedSpider;
- }
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/FunnelWeaverSpiderProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/FunnelWeaverSpiderProducer.java 2009-02-26 12:22:44 UTC (rev 1718)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/FunnelWeaverSpiderProducer.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -1,19 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-import javax.inject.Produces;
-
-public class FunnelWeaverSpiderProducer
-{
- private static FunnelWeaver<Spider> spider;
- @Produces public FunnelWeaver<Spider> getFunnelWeaverSpider = new FunnelWeaver<Spider>();
-
- public FunnelWeaverSpiderProducer()
- {
- spider = this.getFunnelWeaverSpider;
- }
-
- public static FunnelWeaver<Spider> getSpider()
- {
- return spider;
- }
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/InfertileChicken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/InfertileChicken.java 2009-02-26 12:22:44 UTC (rev 1718)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/InfertileChicken.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -1,6 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-class InfertileChicken extends Chicken
-{
-
-}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/OtherSpiderProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/OtherSpiderProducer.java 2009-02-26 12:22:44 UTC (rev 1718)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/OtherSpiderProducer.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -10,6 +10,7 @@
{
private static Spider[] ALL_SPIDERS = { new Tarantula(), new LadybirdSpider(), new DaddyLongLegs() };
+ @Produces public Spider[] getSpiders = ALL_SPIDERS;
@Produces @Tame public Tarantula produceTameTarantula = new DefangedTarantula();
@@ -28,8 +29,8 @@
@Produces @Named("SpiderSize") public int getWolfSpiderSize = 4;
- @Produces public Spider[] getSpiders = ALL_SPIDERS;
+
@Produces public FunnelWeaver<Spider> getFunnelWeaverSpider = new FunnelWeaver<Spider>();
@Produces public Spider getNullSpider = null;
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java 2009-02-26 12:22:44 UTC (rev 1718)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -1,251 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-import java.lang.annotation.Annotation;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import java.util.Set;
-
-import javax.context.RequestScoped;
-import javax.inject.DefinitionException;
-import javax.inject.Production;
-import javax.inject.Standard;
-import javax.inject.manager.Bean;
-
-import org.hibernate.tck.annotations.SpecAssertion;
-import org.hibernate.tck.annotations.SpecAssertions;
-import org.jboss.jsr299.tck.AbstractDeclarativeTest;
-import org.jboss.jsr299.tck.literals.CurrentBinding;
-import org.testng.annotations.Test;
-
-/**
- *
- * Spec version: PRD2
- *
- */
-public class ProducerFieldDefinitionTest extends AbstractDeclarativeTest
-{
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.webbeans.tck.AbstractTest#getEnabledDeploymentTypes()
- */
- @SuppressWarnings("unchecked")
- @Override
- protected List<Class<? extends Annotation>> getEnabledDeploymentTypes()
- {
- // Add a local deployment type used in tests
- return Collections.unmodifiableList(Arrays.asList(Standard.class, Production.class, AnotherDeploymentType.class));
- }
-
- @Test(groups = { "producerField" })
- @SpecAssertion(section = "2.5.3", id = "h")
- public void testProducerFieldInheritsDeploymentTypeOfDeclaringWebBean() throws Exception
- {
- deployBeans(TarantulaProducer.class, TarantulaConsumer.class);
- Set<Bean<Tarantula>> tarantulaBeans = getCurrentManager().resolveByType(Tarantula.class);
- assert !tarantulaBeans.isEmpty();
- assert tarantulaBeans.iterator().next().getDeploymentType().equals(AnotherDeploymentType.class);
- }
-
- @Test(groups = "producerField")
- @SpecAssertion(section = "3.5", id = "f")
- public void testParameterizedReturnType() throws Exception
- {
- deployBeans(FunnelWeaverSpiderProducer.class, FunnelWeaverSpiderConsumer.class);
- new RunInDependentContext()
- {
- public void execute()
- {
- FunnelWeaverSpiderConsumer spiderConsumer = getCurrentManager().getInstanceByType(FunnelWeaverSpiderConsumer.class);
- assert spiderConsumer != null;
- assert spiderConsumer.getInjectedSpider() != null;
- assert spiderConsumer.getInjectedSpider().equals(FunnelWeaverSpiderProducer.getSpider());
- }
- }.run();
- }
-
- @Test(groups = "producerField", expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.5", id = "g")
- public void testParameterizedReturnTypeWithWildcard()
- {
- deployBeans(SpiderProducerWildCardType_Broken.class);
- }
-
- @Test(groups = { "producerField", "deployment" })
- @SpecAssertions({
- @SpecAssertion(section = "3.5", id = "j"),
- @SpecAssertion(section = "3.5", id = "c"),
- @SpecAssertion(section = "3.5.2", id ="a")
- })
- public void testBeanDeclaresMultipleProducerFields()
- {
- deployBeans(OtherSpiderProducer.class);
- }
-
- @Test(groups = "producerField")
- @SpecAssertions({
- @SpecAssertion(section = "2.3.1", id = "a")
- })
- public void testDefaultBindingType()
- {
- deployBeans(StaticTarantulaProducer.class);
- Set<Bean<Tarantula>> tarantulaBeans = getCurrentManager().resolveByType(Tarantula.class);
- assert !tarantulaBeans.isEmpty();
- assert tarantulaBeans.iterator().next().getBindings().contains(new CurrentBinding());
- }
-
- @Test(groups = "producerField")
- @SpecAssertion(section = "3.5.1", id = "c")
- public void testApiTypeForClassReturn()
- {
- deployBeans(StaticTarantulaProducer.class);
- Set<Bean<Tarantula>> tarantulaBeans = getCurrentManager().resolveByType(Tarantula.class);
- assert !tarantulaBeans.isEmpty();
- Bean<Tarantula> tarantulaModel = tarantulaBeans.iterator().next();
- assert tarantulaModel.getTypes().size() == 6;
- assert tarantulaModel.getTypes().contains(Tarantula.class);
- assert tarantulaModel.getTypes().contains(DeadlySpider.class);
- assert tarantulaModel.getTypes().contains(Spider.class);
- assert tarantulaModel.getTypes().contains(Animal.class);
- assert tarantulaModel.getTypes().contains(DeadlyAnimal.class);
- assert tarantulaModel.getTypes().contains(Object.class);
- }
-
- @Test(groups = { "producerField" })
- @SpecAssertion(section = "3.5.1", id = "a")
- public void testApiTypeForInterfaceReturn()
- {
- deployBeans(SpiderAsAnimalProducer.class);
- Set<Bean<Animal>> animalBeans = getCurrentManager().resolveByType(Animal.class);
- assert !animalBeans.isEmpty();
- Bean<Animal> animalModel = animalBeans.iterator().next();
- assert animalModel.getTypes().size() == 2;
- assert animalModel.getTypes().contains(Animal.class);
- assert animalModel.getTypes().contains(Object.class);
- }
-
- @Test(groups = { "producerField" })
- @SpecAssertion(section = "3.5.1", id = "b")
- public void testApiTypeForPrimitiveReturn()
- {
- deployBeans(OtherSpiderProducer.class);
- Set<Bean<?>> beans = getCurrentManager().resolveByName("SpiderSize");
- assert !beans.isEmpty();
- Bean<?> intModel = beans.iterator().next();
- assert intModel.getTypes().size() == 2;
- assert intModel.getTypes().contains(int.class);
- assert intModel.getTypes().contains(Object.class);
- }
-
- @Test(groups = { "producerField" })
- @SpecAssertions({
- @SpecAssertion(section = "3.5.1", id = "b"),
- @SpecAssertion(section = "2.2", id = "j")
- })
- public void testApiTypeForArrayTypeReturn()
- {
- deployBeans(OtherSpiderProducer.class);
- Set<Bean<Spider[]>> spidersModels = getCurrentManager().resolveByType(Spider[].class);
- assert !spidersModels.isEmpty();
- Bean<Spider[]> spidersModel = spidersModels.iterator().next();
- assert spidersModel.getTypes().size() == 2;
- assert spidersModel.getTypes().contains(Spider[].class);
- assert spidersModel.getTypes().contains(Object.class);
- }
-
- @Test(groups = "producerField")
- @SpecAssertions({
- @SpecAssertion(section = "3.5.2", id = "f"),
- @SpecAssertion(section="2.3.3", id="c")
- })
- public void testBindingType()
- {
- deployBeans(TameTarantulaProducer.class);
- Set<Bean<Tarantula>> tarantulaBeans = getCurrentManager().resolveByType(Tarantula.class, new TameAnnotationLiteral());
- assert !tarantulaBeans.isEmpty();
- Bean<Tarantula> tarantulaModel = tarantulaBeans.iterator().next();
- assert tarantulaModel.getBindings().size() == 1;
- assert tarantulaModel.getBindings().iterator().next().annotationType().equals(Tame.class);
- }
-
- @Test(groups = "producerField")
- @SpecAssertion(section = "3.5.2", id = "b")
- public void testScopeType()
- {
- deployBeans(TameTarantulaProducer.class);
- Set<Bean<Tarantula>> tarantulaBeans = getCurrentManager().resolveByType(Tarantula.class, new TameAnnotationLiteral());
- assert !tarantulaBeans.isEmpty();
- Bean<Tarantula> tarantulaModel = tarantulaBeans.iterator().next();
- assert tarantulaModel.getScopeType().equals(RequestScoped.class);
-
- // TODO Inherit scope from returned web bean?
- }
-
- @Test(groups = "producerField")
- @SpecAssertion(section = "3.5.2", id = "d")
- public void testDeploymentType()
- {
- deployBeans(TameTarantulaProducer.class);
- Set<Bean<Tarantula>> tarantulaBeans = getCurrentManager().resolveByType(Tarantula.class, new TameAnnotationLiteral());
- assert !tarantulaBeans.isEmpty();
- Bean<Tarantula> tarantulaModel = tarantulaBeans.iterator().next();
- assert tarantulaModel.getDeploymentType().equals(Production.class);
- }
-
- @Test(groups = "producerField")
- @SpecAssertions({
- @SpecAssertion(section = "3.5.2", id = "c"),
- @SpecAssertion(section="2.6.1", id = "d")
- })
- public void testNamedField()
- {
- deployBeans(BlackWidowProducer.class);
- Set<Bean<?>> beans = getCurrentManager().resolveByName("blackWidow");
- assert !beans.isEmpty();
-
- @SuppressWarnings("unchecked")
- Bean<BlackWidow> blackWidowModel = (Bean<BlackWidow>) beans.iterator().next();
- assert blackWidowModel.getName().equals("blackWidow");
- }
-
- @Test(groups = { "producerField" })
- @SpecAssertions({
- @SpecAssertion(section = "2.6.3", id = "b"),
- @SpecAssertion(section = "3.5.4", id = "a"),
- @SpecAssertion(section = "2.6.1", id = "d")
- })
- public void testDefaultNamedField()
- {
- deployBeans(StaticTarantulaProducer.class);
- Set<Bean<Tarantula>> tarantulaBeans = getCurrentManager().resolveByType(Tarantula.class);
- assert !tarantulaBeans.isEmpty();
- Bean<Tarantula> tarantulaModel = tarantulaBeans.iterator().next();
- assert tarantulaModel.getName().equals("produceTarantula");
- }
-
- // review 2.2
- @Test(groups = "producerField")
- @SpecAssertions({
- @SpecAssertion(section = "2.7.2", id = "c"),
- @SpecAssertion(section = "3.5.2", id = "e")
- })
- public void testStereotype()
- {
- deployBeans(StaticTarantulaProducer.class);
- Set<Bean<Tarantula>> tarantulaBeans = getCurrentManager().resolveByType(Tarantula.class);
- assert !tarantulaBeans.isEmpty();
- Bean<Tarantula> tarantulaModel = tarantulaBeans.iterator().next();
- assert tarantulaModel.getScopeType().equals(RequestScoped.class);
- assert tarantulaModel.getDeploymentType().equals(Production.class);
- }
-
- @Test(groups = "producerField")
- @SpecAssertion(section = "4.2", id = "k")
- public void testNonStaticProducerFieldNotInherited()
- {
- deployBeans(InfertileChicken.class);
- assert getCurrentManager().resolveByType(Egg.class).size() == 0;
- }
-}
\ No newline at end of file
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Spider.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Spider.java 2009-02-26 12:22:44 UTC (rev 1718)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Spider.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -1,13 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-class Spider implements Animal
-{
-
- private static final long serialVersionUID = 1L;
-
- public void layEggs()
- {
-
- }
-
-}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Spider.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Spider.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Spider.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,13 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field;
+
+class Spider implements Animal
+{
+
+ private static final long serialVersionUID = 1L;
+
+ public void layEggs()
+ {
+
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Spider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/SpiderAsAnimalProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/SpiderAsAnimalProducer.java 2009-02-26 12:22:44 UTC (rev 1718)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/SpiderAsAnimalProducer.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -1,10 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-import javax.inject.Produces;
-
-public class SpiderAsAnimalProducer
-{
- @Produces
- public Animal makeASpider = new WolfSpider();
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/SpiderProducerWildCardType_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/SpiderProducerWildCardType_Broken.java 2009-02-26 12:22:44 UTC (rev 1718)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/SpiderProducerWildCardType_Broken.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -1,9 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-import javax.inject.Produces;
-
-public class SpiderProducerWildCardType_Broken
-{
- @Produces public FunnelWeaver<?> getAnotherFunnelWeaver = new FunnelWeaver<Object>();
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/SpiderStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/SpiderStereotype.java 2009-02-26 12:22:44 UTC (rev 1718)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/SpiderStereotype.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -1,49 +0,0 @@
-/*
- * 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.
- */
-
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.annotation.Named;
-import javax.annotation.Stereotype;
-import javax.context.RequestScoped;
-import javax.inject.Production;
-
-/**
- * Test stereotype used to change the scope type and deployment type
- * of another bean, in particular a producer field bean.
- *
- * @author David Allen
- *
- */
-(a)Stereotype(requiredTypes=Spider.class)
-@Target( { TYPE, METHOD, FIELD })
-@Retention(RUNTIME)
-@RequestScoped
-@Production
-@Named
-public @interface SpiderStereotype
-{
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/StaticTarantulaProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/StaticTarantulaProducer.java 2009-02-26 12:22:44 UTC (rev 1718)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/StaticTarantulaProducer.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -1,26 +0,0 @@
-/*
- * 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.
- */
-
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-import javax.inject.Produces;
-
-public class StaticTarantulaProducer
-{
- @Produces @SpiderStereotype public static Tarantula produceTarantula = new Tarantula();
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Tame.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Tame.java 2009-02-26 12:22:44 UTC (rev 1718)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Tame.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -1,22 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-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.inject.BindingType;
-
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@BindingType
-@interface Tame
-{
-
-}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Tame.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Tame.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Tame.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field;
+
+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.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface Tame
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Tame.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/TameAnnotationLiteral.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/TameAnnotationLiteral.java 2009-02-26 12:22:44 UTC (rev 1718)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/TameAnnotationLiteral.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -1,8 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-import javax.inject.AnnotationLiteral;
-
-class TameAnnotationLiteral extends AnnotationLiteral<Tame> implements Tame
-{
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/TameTarantulaProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/TameTarantulaProducer.java 2009-02-26 12:22:44 UTC (rev 1718)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/TameTarantulaProducer.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -1,11 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-import javax.context.RequestScoped;
-import javax.inject.Produces;
-import javax.inject.Production;
-
-public class TameTarantulaProducer
-{
- @Produces @Tame @RequestScoped @Production public Tarantula produceTarantula = new DefangedTarantula();
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Tarantula.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Tarantula.java 2009-02-26 12:22:44 UTC (rev 1718)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Tarantula.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -1,6 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-class Tarantula extends Spider implements DeadlySpider
-{
-
-}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Tarantula.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Tarantula.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Tarantula.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field;
+
+class Tarantula extends Spider implements DeadlySpider
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Tarantula.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/TarantulaConsumer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/TarantulaConsumer.java 2009-02-26 12:22:44 UTC (rev 1718)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/TarantulaConsumer.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -1,39 +0,0 @@
-/*
- * 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.
- */
-
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-import javax.inject.Current;
-
-/**
- * This bean contains an injection point for a Tarantula that must be provided
- * by the container via a (static) producer field.
- *
- * @author David Allen
- *
- */
-public class TarantulaConsumer
-{
- @Current
- private Tarantula consumedTarantula;
-
- public Tarantula getConsumedTarantula()
- {
- return consumedTarantula;
- }
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/TarantulaProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/TarantulaProducer.java 2009-02-26 12:22:44 UTC (rev 1718)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/TarantulaProducer.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -1,10 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-import javax.inject.Produces;
-
-@AnotherDeploymentType
-public class TarantulaProducer
-{
- @Produces public Tarantula produceTarantula = new Tarantula();
-
-}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/TarantulaProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/TarantulaProducer.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/TarantulaProducer.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,10 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field;
+
+import javax.inject.Produces;
+
+@AnotherDeploymentType
+class TarantulaProducer
+{
+ @Produces public Tarantula produceTarantula = new Tarantula();
+
+}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/WolfSpider.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/WolfSpider.java 2009-02-26 12:22:44 UTC (rev 1718)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/WolfSpider.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -1,6 +0,0 @@
-package org.jboss.jsr299.tck.unit.implementation.producer.field;
-
-class WolfSpider implements Animal
-{
-
-}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/WolfSpider.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/WolfSpider.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/WolfSpider.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,7 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field;
+
+
+class WolfSpider implements Animal
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/WolfSpider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Animal.java (from rev 1718, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Animal.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Animal.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Animal.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition;
+
+interface Animal
+{
+
+}
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/AnotherDeploymentType.java (from rev 1718, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/AnotherDeploymentType.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/AnotherDeploymentType.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/AnotherDeploymentType.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+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.inject.DeploymentType;
+
+@Target( { TYPE, METHOD, FIELD })
+@Retention(RUNTIME)
+@Documented
+@DeploymentType
+@interface AnotherDeploymentType
+{
+
+}
\ No newline at end of file
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/AsAnimal.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/AsAnimal.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/AsAnimal.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition;
+
+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.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface AsAnimal
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/AsAnimal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/BlackWidow.java (from rev 1718, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/BlackWidow.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/BlackWidow.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/BlackWidow.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,10 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition;
+
+class BlackWidow extends Spider implements DeadlySpider
+{
+ public void bite()
+ {
+ // Test method used for proxy instances to force
+ // creation of the instance.
+ }
+}
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/BlackWidowProducer.java (from rev 1718, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/BlackWidowProducer.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/BlackWidowProducer.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/BlackWidowProducer.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,13 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition;
+
+import javax.annotation.Named;
+import javax.inject.Produces;
+
+public class BlackWidowProducer
+{
+ public static BlackWidow blackWidow = new BlackWidow();
+ @Produces
+ @Named("blackWidow")
+ public BlackWidow produceBlackWidow = blackWidow;
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/BlackWidowProducer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Chicken.java (from rev 1718, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Chicken.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Chicken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Chicken.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,12 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition;
+
+import javax.inject.Produces;
+
+
+class Chicken
+{
+
+ @Produces @Foo
+ private Egg egg = new Egg(this);
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/DaddyLongLegs.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/DaddyLongLegs.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/DaddyLongLegs.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,7 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition;
+
+
+class DaddyLongLegs extends Spider
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/DaddyLongLegs.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/DeadlyAnimal.java (from rev 1718, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DeadlyAnimal.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/DeadlyAnimal.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/DeadlyAnimal.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition;
+
+interface DeadlyAnimal
+{
+
+}
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/DeadlySpider.java (from rev 1718, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DeadlySpider.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/DeadlySpider.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/DeadlySpider.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition;
+
+interface DeadlySpider extends DeadlyAnimal
+{
+
+}
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/DefangedTarantula.java (from rev 1718, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/DefangedTarantula.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/DefangedTarantula.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/DefangedTarantula.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,7 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition;
+
+
+class DefangedTarantula extends Tarantula
+{
+
+}
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Egg.java (from rev 1718, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Egg.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Egg.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Egg.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,19 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition;
+
+class Egg
+{
+
+ private final Chicken mother;
+
+ public Egg(Chicken mother)
+ {
+ super();
+ this.mother = mother;
+ }
+
+ public Chicken getMother()
+ {
+ return mother;
+ }
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Foo.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Foo.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Foo.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition;
+
+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.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface Foo
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Foo.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/FunnelWeaver.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/FunnelWeaver.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/FunnelWeaver.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition;
+
+class FunnelWeaver<T>
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/FunnelWeaver.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/FunnelWeaverSpiderConsumer.java (from rev 1718, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/FunnelWeaverSpiderConsumer.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/FunnelWeaverSpiderConsumer.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/FunnelWeaverSpiderConsumer.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,14 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition;
+
+import javax.inject.Current;
+
+class FunnelWeaverSpiderConsumer
+{
+ @Current
+ private FunnelWeaver<Spider> injectedSpider;
+
+ public FunnelWeaver<Spider> getInjectedSpider()
+ {
+ return injectedSpider;
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/FunnelWeaverSpiderConsumer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/FunnelWeaverSpiderProducer.java (from rev 1718, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/FunnelWeaverSpiderProducer.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/FunnelWeaverSpiderProducer.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/FunnelWeaverSpiderProducer.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,19 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition;
+
+import javax.inject.Produces;
+
+class FunnelWeaverSpiderProducer
+{
+ private static FunnelWeaver<Spider> spider;
+ @Produces public FunnelWeaver<Spider> getFunnelWeaverSpider = new FunnelWeaver<Spider>();
+
+ public FunnelWeaverSpiderProducer()
+ {
+ spider = this.getFunnelWeaverSpider;
+ }
+
+ public static FunnelWeaver<Spider> getSpider()
+ {
+ return spider;
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/FunnelWeaverSpiderProducer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/InfertileChicken.java (from rev 1718, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/InfertileChicken.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/InfertileChicken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/InfertileChicken.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition;
+
+
+@AnotherDeploymentType
+class InfertileChicken extends Chicken
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/LadybirdSpider.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/LadybirdSpider.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/LadybirdSpider.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,14 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition;
+
+import javax.context.ApplicationScoped;
+
+@ApplicationScoped
+class LadybirdSpider extends Spider
+{
+
+ public void spinWeb()
+ {
+
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/LadybirdSpider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/OtherSpiderProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/OtherSpiderProducer.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/OtherSpiderProducer.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition;
+
+import javax.annotation.Named;
+import javax.inject.Produces;
+
+@AnotherDeploymentType
+class OtherSpiderProducer
+{
+
+ public static final Tarantula TARANTULA = new Tarantula();
+ public static final BlackWidow BLACK_WIDOW = new BlackWidow();
+
+ @Produces @Tame public Tarantula produceTarantula = TARANTULA;
+
+ @Produces @Tame private BlackWidow produceBlackWidow = BLACK_WIDOW;
+
+ private static Spider[] ALL_SPIDERS = { new Tarantula(), new LadybirdSpider(), new DaddyLongLegs() };
+ @Produces public Spider[] getSpiders = ALL_SPIDERS;
+
+ @Produces @Named("SpiderSize") public int getWolfSpiderSize = 4;
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/OtherSpiderProducer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/ProducerFieldDefinitionTest.java (from rev 1718, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/ProducerFieldDefinitionTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/ProducerFieldDefinitionTest.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,222 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition;
+
+import java.lang.annotation.Annotation;
+import java.util.Set;
+
+import javax.context.RequestScoped;
+import javax.inject.AnnotationLiteral;
+import javax.inject.Production;
+import javax.inject.manager.Bean;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.hibernate.tck.annotations.SpecAssertions;
+import org.jboss.jsr299.tck.AbstractDeclarativeTest;
+import org.jboss.jsr299.tck.impl.packaging.Artifact;
+import org.jboss.jsr299.tck.impl.packaging.jsr299.BeansXml;
+import org.jboss.jsr299.tck.literals.CurrentBinding;
+import org.testng.annotations.Test;
+
+/**
+ *
+ * Spec version: PRD2
+ *
+ */
+@Artifact
+@BeansXml("beans.xml")
+public class ProducerFieldDefinitionTest extends AbstractDeclarativeTest
+{
+
+ private static final Annotation TAME_LITERAL = new AnnotationLiteral<Tame>() {};
+ private static final Annotation FOO_LITERAL = new AnnotationLiteral<Foo>() {};
+ private static final Annotation STATIC_LITERAL = new AnnotationLiteral<Static>() {};
+
+ @Test(groups = { "producerField" })
+ @SpecAssertion(section = "2.5.3", id = "h")
+ public void testProducerFieldInheritsDeploymentTypeOfDeclaringWebBean() throws Exception
+ {
+ Set<Bean<Tarantula>> tarantulaBeans = getCurrentManager().resolveByType(Tarantula.class);
+ assert tarantulaBeans.size() == 1;
+ assert tarantulaBeans.iterator().next().getDeploymentType().equals(AnotherDeploymentType.class);
+ }
+
+ @Test(groups = "producerField")
+ @SpecAssertion(section = "3.5", id = "f")
+ public void testParameterizedReturnType() throws Exception
+ {
+ new RunInDependentContext()
+ {
+ public void execute()
+ {
+ FunnelWeaverSpiderConsumer spiderConsumer = getCurrentManager().getInstanceByType(FunnelWeaverSpiderConsumer.class);
+ assert spiderConsumer != null;
+ assert spiderConsumer.getInjectedSpider() != null;
+ assert spiderConsumer.getInjectedSpider().equals(FunnelWeaverSpiderProducer.getSpider());
+ }
+ }.run();
+ }
+
+ @Test(groups = { "producerField", "deployment" })
+ @SpecAssertions({
+ @SpecAssertion(section = "3.5", id = "j"),
+ @SpecAssertion(section = "3.5", id = "c"),
+ @SpecAssertion(section = "3.5.2", id ="a")
+ })
+ public void testBeanDeclaresMultipleProducerFields()
+ {
+ assert getCurrentManager().resolveByType(Tarantula.class, TAME_LITERAL).size() == 1;
+ assert getCurrentManager().getInstanceByType(Tarantula.class, TAME_LITERAL).equals(OtherSpiderProducer.TARANTULA) ;
+ assert getCurrentManager().resolveByType(BlackWidow.class, TAME_LITERAL).size() == 1;
+ assert getCurrentManager().getInstanceByType(BlackWidow.class, TAME_LITERAL).equals(OtherSpiderProducer.BLACK_WIDOW) ;
+ }
+
+ @Test(groups = "producerField")
+ @SpecAssertions({
+ @SpecAssertion(section = "2.3.1", id = "a")
+ })
+ public void testDefaultBindingType()
+ {
+ Set<Bean<Tarantula>> tarantulaBeans = getCurrentManager().resolveByType(Tarantula.class);
+ assert tarantulaBeans.size() == 1;
+ assert tarantulaBeans.iterator().next().getBindings().contains(new CurrentBinding());
+ }
+
+ @Test(groups = "producerField")
+ @SpecAssertion(section = "3.5.1", id = "c")
+ public void testApiTypeForClassReturn()
+ {
+ Set<Bean<Tarantula>> tarantulaBeans = getCurrentManager().resolveByType(Tarantula.class);
+ assert tarantulaBeans.size() == 1;
+ Bean<Tarantula> tarantulaBean = tarantulaBeans.iterator().next();
+ assert tarantulaBean.getTypes().size() == 6;
+ assert tarantulaBean.getTypes().contains(Tarantula.class);
+ assert tarantulaBean.getTypes().contains(DeadlySpider.class);
+ assert tarantulaBean.getTypes().contains(Spider.class);
+ assert tarantulaBean.getTypes().contains(Animal.class);
+ assert tarantulaBean.getTypes().contains(DeadlyAnimal.class);
+ assert tarantulaBean.getTypes().contains(Object.class);
+ }
+
+ @Test(groups = { "producerField" })
+ @SpecAssertion(section = "3.5.1", id = "a")
+ public void testApiTypeForInterfaceReturn()
+ {
+ Set<Bean<Animal>> animalBeans = getCurrentManager().resolveByType(Animal.class, new AnnotationLiteral<AsAnimal>() {});
+ assert animalBeans.size() == 1;
+ Bean<Animal> animalModel = animalBeans.iterator().next();
+ assert animalModel.getTypes().size() == 2;
+ assert animalModel.getTypes().contains(Animal.class);
+ assert animalModel.getTypes().contains(Object.class);
+ }
+
+ @Test(groups = { "producerField" })
+ @SpecAssertion(section = "3.5.1", id = "b")
+ public void testApiTypeForPrimitiveReturn()
+ {
+ Set<Bean<?>> beans = getCurrentManager().resolveByName("SpiderSize");
+ assert beans.size() == 1;
+ Bean<?> intModel = beans.iterator().next();
+ assert intModel.getTypes().size() == 2;
+ assert intModel.getTypes().contains(int.class);
+ assert intModel.getTypes().contains(Object.class);
+ }
+
+ @Test(groups = { "producerField" })
+ @SpecAssertions({
+ @SpecAssertion(section = "3.5.1", id = "b"),
+ @SpecAssertion(section = "2.2", id = "j")
+ })
+ public void testApiTypeForArrayTypeReturn()
+ {
+ Set<Bean<Spider[]>> spidersBeans = getCurrentManager().resolveByType(Spider[].class);
+ assert spidersBeans.size() == 1;
+ Bean<Spider[]> spidersModel = spidersBeans.iterator().next();
+ assert spidersModel.getTypes().size() == 2;
+ assert spidersModel.getTypes().contains(Spider[].class);
+ assert spidersModel.getTypes().contains(Object.class);
+ }
+
+ @Test(groups = "producerField")
+ @SpecAssertions({
+ @SpecAssertion(section = "3.5.2", id = "f"),
+ @SpecAssertion(section="2.3.3", id="c")
+ })
+ public void testBindingType()
+ {
+ Set<Bean<Tarantula>> tarantulaBeans = getCurrentManager().resolveByType(Tarantula.class, new TameAnnotationLiteral());
+ assert tarantulaBeans.size() == 1;
+ Bean<Tarantula> tarantulaModel = tarantulaBeans.iterator().next();
+ assert tarantulaModel.getBindings().size() == 1;
+ assert tarantulaModel.getBindings().iterator().next().annotationType().equals(Tame.class);
+ }
+
+ @Test(groups = "producerField")
+ @SpecAssertion(section = "3.5.2", id = "b")
+ public void testScopeType()
+ {
+ Set<Bean<Tarantula>> tarantulaBeans = getCurrentManager().resolveByType(Tarantula.class, TAME_LITERAL, FOO_LITERAL);
+ assert !tarantulaBeans.isEmpty();
+ Bean<Tarantula> tarantulaModel = tarantulaBeans.iterator().next();
+ assert tarantulaModel.getScopeType().equals(RequestScoped.class);
+ }
+
+ @Test(groups = "producerField")
+ @SpecAssertion(section = "3.5.2", id = "d")
+ public void testDeploymentType()
+ {
+ Set<Bean<Tarantula>> tarantulaBeans = getCurrentManager().resolveByType(Tarantula.class, TAME_LITERAL, FOO_LITERAL);
+ assert !tarantulaBeans.isEmpty();
+ Bean<Tarantula> tarantulaModel = tarantulaBeans.iterator().next();
+ assert tarantulaModel.getDeploymentType().equals(Production.class);
+ }
+
+ @Test(groups = "producerField")
+ @SpecAssertions({
+ @SpecAssertion(section = "3.5.2", id = "c"),
+ @SpecAssertion(section="2.6.1", id = "d")
+ })
+ public void testNamedField()
+ {
+ Set<Bean<?>> beans = getCurrentManager().resolveByName("blackWidow");
+ assert beans.size() == 1;
+
+ @SuppressWarnings("unchecked")
+ Bean<BlackWidow> blackWidowModel = (Bean<BlackWidow>) beans.iterator().next();
+ assert blackWidowModel.getName().equals("blackWidow");
+ }
+
+ @Test(groups = { "producerField" })
+ @SpecAssertions({
+ @SpecAssertion(section = "2.6.3", id = "b"),
+ @SpecAssertion(section = "3.5.4", id = "a"),
+ @SpecAssertion(section = "2.6.1", id = "d")
+ })
+ public void testDefaultNamedField()
+ {
+ Set<Bean<Tarantula>> tarantulaBeans = getCurrentManager().resolveByType(Tarantula.class, STATIC_LITERAL);
+ assert tarantulaBeans.size() == 1;
+ Bean<Tarantula> tarantulaModel = tarantulaBeans.iterator().next();
+ assert tarantulaModel.getName().equals("produceTarantula");
+ }
+
+ // review 2.2
+ @Test(groups = "producerField")
+ @SpecAssertions({
+ @SpecAssertion(section = "2.7.2", id = "c"),
+ @SpecAssertion(section = "3.5.2", id = "e")
+ })
+ public void testStereotype()
+ {
+ Set<Bean<Tarantula>> tarantulaBeans = getCurrentManager().resolveByType(Tarantula.class, STATIC_LITERAL);
+ assert !tarantulaBeans.isEmpty();
+ Bean<Tarantula> tarantulaModel = tarantulaBeans.iterator().next();
+ assert tarantulaModel.getScopeType().equals(RequestScoped.class);
+ assert tarantulaModel.getDeploymentType().equals(Production.class);
+ }
+
+ @Test(groups = "producerField")
+ @SpecAssertion(section = "4.2", id = "k")
+ public void testNonStaticProducerFieldNotInherited()
+ {
+ assert !(getCurrentManager().getInstanceByType(Egg.class, FOO_LITERAL).getMother() instanceof InfertileChicken);
+ }
+}
\ No newline at end of file
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Spider.java (from rev 1718, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Spider.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Spider.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Spider.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,13 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition;
+
+class Spider implements Animal
+{
+
+ private static final long serialVersionUID = 1L;
+
+ public void layEggs()
+ {
+
+ }
+
+}
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/SpiderAsAnimalProducer.java (from rev 1718, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/SpiderAsAnimalProducer.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/SpiderAsAnimalProducer.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/SpiderAsAnimalProducer.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,12 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition;
+
+import javax.inject.Produces;
+
+
+@AnotherDeploymentType
+class SpiderAsAnimalProducer
+{
+ @Produces @AsAnimal
+ public Animal makeASpider = new WolfSpider();
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/SpiderAsAnimalProducer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/SpiderStereotype.java (from rev 1718, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/SpiderStereotype.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/SpiderStereotype.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/SpiderStereotype.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.annotation.Named;
+import javax.annotation.Stereotype;
+import javax.context.RequestScoped;
+import javax.inject.Production;
+
+/**
+ * Test stereotype used to change the scope type and deployment type
+ * of another bean, in particular a producer field bean.
+ *
+ * @author David Allen
+ *
+ */
+(a)Stereotype(requiredTypes=Spider.class)
+@Target( { TYPE, METHOD, FIELD })
+@Retention(RUNTIME)
+@RequestScoped
+@Named
+@Production
+@interface SpiderStereotype
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/SpiderStereotype.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Static.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Static.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Static.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition;
+
+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.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface Static
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Static.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/StaticTarantulaProducer.java (from rev 1718, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/StaticTarantulaProducer.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/StaticTarantulaProducer.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/StaticTarantulaProducer.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ */
+
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition;
+
+import javax.inject.Produces;
+
+
+@AnotherDeploymentType
+class StaticTarantulaProducer
+{
+ @Produces @SpiderStereotype @Static public static Tarantula produceTarantula = new Tarantula();
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/StaticTarantulaProducer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Tame.java (from rev 1718, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Tame.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Tame.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Tame.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition;
+
+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.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface Tame
+{
+
+}
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/TameAnnotationLiteral.java (from rev 1718, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/TameAnnotationLiteral.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/TameAnnotationLiteral.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/TameAnnotationLiteral.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition;
+
+import javax.inject.AnnotationLiteral;
+
+class TameAnnotationLiteral extends AnnotationLiteral<Tame> implements Tame
+{
+
+}
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/TameTarantulaProducer.java (from rev 1718, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/TameTarantulaProducer.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/TameTarantulaProducer.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/TameTarantulaProducer.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,13 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition;
+
+import javax.context.RequestScoped;
+import javax.inject.Produces;
+import javax.inject.Production;
+
+
+@AnotherDeploymentType
+class TameTarantulaProducer
+{
+ @Produces @Foo @Tame @RequestScoped @Production public Tarantula produceTarantula = new DefangedTarantula();
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/TameTarantulaProducer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Tarantula.java (from rev 1718, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/Tarantula.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Tarantula.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/Tarantula.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition;
+
+class Tarantula extends Spider implements DeadlySpider
+{
+
+}
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/TarantulaConsumer.java (from rev 1718, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/TarantulaConsumer.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/TarantulaConsumer.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/TarantulaConsumer.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,39 @@
+/*
+ * 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.
+ */
+
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition;
+
+import javax.inject.Current;
+
+/**
+ * This bean contains an injection point for a Tarantula that must be provided
+ * by the container via a (static) producer field.
+ *
+ * @author David Allen
+ *
+ */
+class TarantulaConsumer
+{
+ @Current
+ private Tarantula consumedTarantula;
+
+ public Tarantula getConsumedTarantula()
+ {
+ return consumedTarantula;
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/TarantulaConsumer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/TarantulaProducer.java (from rev 1718, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/TarantulaProducer.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/TarantulaProducer.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/TarantulaProducer.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,10 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition;
+
+import javax.inject.Produces;
+
+@AnotherDeploymentType
+class TarantulaProducer
+{
+ @Produces public Tarantula produceTarantula = new Tarantula();
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/TarantulaProducer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/WolfSpider.java (from rev 1718, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/WolfSpider.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/WolfSpider.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/WolfSpider.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,7 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition;
+
+
+class WolfSpider implements Animal
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/parameterizedReturnTypeWithWildcard/FunnelWeaver.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/parameterizedReturnTypeWithWildcard/FunnelWeaver.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/parameterizedReturnTypeWithWildcard/FunnelWeaver.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition.parameterizedReturnTypeWithWildcard;
+
+class FunnelWeaver<T>
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/parameterizedReturnTypeWithWildcard/FunnelWeaver.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/parameterizedReturnTypeWithWildcard/ParameterizedReturnTypeWithWildcardTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/parameterizedReturnTypeWithWildcard/ParameterizedReturnTypeWithWildcardTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/parameterizedReturnTypeWithWildcard/ParameterizedReturnTypeWithWildcardTest.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,25 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition.parameterizedReturnTypeWithWildcard;
+
+import javax.inject.DefinitionException;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.AbstractDeclarativeTest;
+import org.jboss.jsr299.tck.impl.packaging.Artifact;
+import org.jboss.jsr299.tck.impl.packaging.ExpectedDeploymentException;
+import org.testng.annotations.Test;
+
+@Artifact
+(a)ExpectedDeploymentException(DefinitionException.class)
+public class ParameterizedReturnTypeWithWildcardTest extends AbstractDeclarativeTest
+{
+
+
+ @Test(groups = "producerField")
+ @SpecAssertion(section = "3.5", id = "g")
+ public void testParameterizedReturnTypeWithWildcard()
+ {
+ assert false;
+ }
+
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/parameterizedReturnTypeWithWildcard/ParameterizedReturnTypeWithWildcardTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/parameterizedReturnTypeWithWildcard/SpiderProducerWildCardType_Broken.java (from rev 1718, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/SpiderProducerWildCardType_Broken.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/parameterizedReturnTypeWithWildcard/SpiderProducerWildCardType_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/parameterizedReturnTypeWithWildcard/SpiderProducerWildCardType_Broken.java 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.unit.implementation.producer.field.definition.parameterizedReturnTypeWithWildcard;
+
+import javax.inject.Produces;
+
+public class SpiderProducerWildCardType_Broken
+{
+ @Produces public FunnelWeaver<?> getAnotherFunnelWeaver = new FunnelWeaver<Object>();
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/parameterizedReturnTypeWithWildcard/SpiderProducerWildCardType_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/beans.xml
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/beans.xml (rev 0)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/beans.xml 2009-02-26 15:02:21 UTC (rev 1719)
@@ -0,0 +1,8 @@
+<Beans xmlns="urn:java:ee"
+ xmlns:test="urn:java:org.jboss.jsr299.tck.unit.implementation.producer.field.definition">
+ <Deploy>
+ <Standard />
+ <Production />
+ <test:AnotherDeploymentType />
+ </Deploy>
+</Beans>
Property changes on: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/unit/implementation/producer/field/definition/beans.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 3 months
[webbeans-commits] Webbeans SVN: r1718 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck and 9 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-02-26 07:22:44 -0500 (Thu, 26 Feb 2009)
New Revision: 1718
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/definition/statelessDecorator/PekingeseLocal_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/definition/statelessInterceptor/PugLocal_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithApplicationScope/DachshundLocal_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithConversationScope/BoxerLocal_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithRequestScope/BeagleLocal_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithSessionScope/BullmastiffLocal_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/enterprise/directlyExtendsNothing/CowLocal_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/enterprise/samePrecedence/FarmerLocal.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/simple/broken/extendejb/FarmEquipmentLocal.java
Removed:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/enterprise/samePrecedence/FarmerInterface.java
Modified:
ri/trunk/jboss-tck-runner/src/main/java/org/jboss/webbeans/tck/integration/jbossas/ProfileServiceContainersImpl.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/definition/statelessDecorator/Pekingese_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/definition/statelessInterceptor/Pug_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithApplicationScope/Dachshund_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithConversationScope/Boxer_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithRequestScope/Beagle_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithSessionScope/Bullmastiff_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/enterprise/directlyExtendsNothing/Cow_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/enterprise/samePrecedence/Farmer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/simple/broken/extendejb/FarmEquipment.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/simple/broken/extendejb/SpecializingBeanExtendsEnterpriseBeanTest.java
Log:
Enable incontainer deployment exceptions
Modified: ri/trunk/jboss-tck-runner/src/main/java/org/jboss/webbeans/tck/integration/jbossas/ProfileServiceContainersImpl.java
===================================================================
--- ri/trunk/jboss-tck-runner/src/main/java/org/jboss/webbeans/tck/integration/jbossas/ProfileServiceContainersImpl.java 2009-02-26 12:19:29 UTC (rev 1717)
+++ ri/trunk/jboss-tck-runner/src/main/java/org/jboss/webbeans/tck/integration/jbossas/ProfileServiceContainersImpl.java 2009-02-26 12:22:44 UTC (rev 1718)
@@ -5,10 +5,12 @@
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
+import java.util.Map.Entry;
import javax.naming.InitialContext;
import org.apache.log4j.Logger;
+import org.jboss.deployers.client.spi.IncompleteDeploymentException;
import org.jboss.deployers.spi.management.deploy.DeploymentManager;
import org.jboss.deployers.spi.management.deploy.DeploymentProgress;
import org.jboss.deployers.spi.management.deploy.DeploymentStatus;
@@ -84,12 +86,23 @@
}
catch (Exception e)
{
- IOException ioe = new IOException();
- ioe.initCause(e);
- throw ioe;
+ IOException ioe = new IOException();
+ ioe.initCause(e);
+ throw ioe;
}
if (failure != null)
{
+ if (failure.getCause() instanceof IncompleteDeploymentException)
+ {
+ IncompleteDeploymentException incompleteDeploymentException = (IncompleteDeploymentException) failure.getCause();
+ for (Entry<String, Throwable> entry : incompleteDeploymentException.getIncompleteDeployments().getContextsInError().entrySet())
+ {
+ if (entry.getKey().endsWith(name + "/_WebBeansBootstrap"))
+ {
+ throw new DeploymentException(entry.getValue());
+ }
+ }
+ }
throw new DeploymentException(failure);
}
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java 2009-02-26 12:19:29 UTC (rev 1717)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java 2009-02-26 12:22:44 UTC (rev 1718)
@@ -130,11 +130,6 @@
deploymentException = null;
skipTest = true;
}
- else if (!getCurrentConfiguration().isStandalone())
- {
- deploymentException = null;
- skipTest = true;
- }
}
else
{
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/definition/statelessDecorator/PekingeseLocal_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/definition/statelessDecorator/PekingeseLocal_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/definition/statelessDecorator/PekingeseLocal_Broken.java 2009-02-26 12:22:44 UTC (rev 1718)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.unit.implementation.enterprise.definition.statelessDecorator;
+
+import javax.ejb.Local;
+
+@Local
+public interface PekingeseLocal_Broken
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/definition/statelessDecorator/PekingeseLocal_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/definition/statelessDecorator/Pekingese_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/definition/statelessDecorator/Pekingese_Broken.java 2009-02-26 12:19:29 UTC (rev 1717)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/definition/statelessDecorator/Pekingese_Broken.java 2009-02-26 12:22:44 UTC (rev 1718)
@@ -5,7 +5,7 @@
@Stateless
@Decorator
-class Pekingese_Broken
+class Pekingese_Broken implements PekingeseLocal_Broken
{
}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/definition/statelessInterceptor/PugLocal_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/definition/statelessInterceptor/PugLocal_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/definition/statelessInterceptor/PugLocal_Broken.java 2009-02-26 12:22:44 UTC (rev 1718)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.unit.implementation.enterprise.definition.statelessInterceptor;
+
+import javax.ejb.Local;
+
+@Local
+public interface PugLocal_Broken
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/definition/statelessInterceptor/PugLocal_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/definition/statelessInterceptor/Pug_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/definition/statelessInterceptor/Pug_Broken.java 2009-02-26 12:19:29 UTC (rev 1717)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/definition/statelessInterceptor/Pug_Broken.java 2009-02-26 12:22:44 UTC (rev 1718)
@@ -5,7 +5,7 @@
@Stateless
@Interceptor
-class Pug_Broken
+class Pug_Broken implements PugLocal_Broken
{
}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithApplicationScope/DachshundLocal_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithApplicationScope/DachshundLocal_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithApplicationScope/DachshundLocal_Broken.java 2009-02-26 12:22:44 UTC (rev 1718)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.unit.implementation.enterprise.statelessWithApplicationScope;
+
+import javax.ejb.Local;
+
+@Local
+public interface DachshundLocal_Broken
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithApplicationScope/DachshundLocal_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithApplicationScope/Dachshund_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithApplicationScope/Dachshund_Broken.java 2009-02-26 12:19:29 UTC (rev 1717)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithApplicationScope/Dachshund_Broken.java 2009-02-26 12:22:44 UTC (rev 1718)
@@ -5,7 +5,7 @@
@Stateless
@ApplicationScoped
-class Dachshund_Broken
+class Dachshund_Broken implements DachshundLocal_Broken
{
}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithConversationScope/BoxerLocal_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithConversationScope/BoxerLocal_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithConversationScope/BoxerLocal_Broken.java 2009-02-26 12:22:44 UTC (rev 1718)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.unit.implementation.enterprise.statelessWithConversationScope;
+
+import javax.ejb.Local;
+
+@Local
+public interface BoxerLocal_Broken
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithConversationScope/BoxerLocal_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithConversationScope/Boxer_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithConversationScope/Boxer_Broken.java 2009-02-26 12:19:29 UTC (rev 1717)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithConversationScope/Boxer_Broken.java 2009-02-26 12:22:44 UTC (rev 1718)
@@ -5,7 +5,7 @@
@Stateless
@ConversationScoped
-class Boxer_Broken
+class Boxer_Broken implements BoxerLocal_Broken
{
}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithRequestScope/BeagleLocal_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithRequestScope/BeagleLocal_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithRequestScope/BeagleLocal_Broken.java 2009-02-26 12:22:44 UTC (rev 1718)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.unit.implementation.enterprise.statelessWithRequestScope;
+
+import javax.ejb.Local;
+
+@Local
+public interface BeagleLocal_Broken
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithRequestScope/BeagleLocal_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithRequestScope/Beagle_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithRequestScope/Beagle_Broken.java 2009-02-26 12:19:29 UTC (rev 1717)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithRequestScope/Beagle_Broken.java 2009-02-26 12:22:44 UTC (rev 1718)
@@ -5,7 +5,7 @@
@Stateless
@RequestScoped
-class Beagle_Broken
+class Beagle_Broken implements BeagleLocal_Broken
{
}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithSessionScope/BullmastiffLocal_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithSessionScope/BullmastiffLocal_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithSessionScope/BullmastiffLocal_Broken.java 2009-02-26 12:22:44 UTC (rev 1718)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.unit.implementation.enterprise.statelessWithSessionScope;
+
+import javax.ejb.Local;
+
+@Local
+public interface BullmastiffLocal_Broken
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithSessionScope/BullmastiffLocal_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithSessionScope/Bullmastiff_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithSessionScope/Bullmastiff_Broken.java 2009-02-26 12:19:29 UTC (rev 1717)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/statelessWithSessionScope/Bullmastiff_Broken.java 2009-02-26 12:22:44 UTC (rev 1718)
@@ -5,7 +5,7 @@
@Stateless
@SessionScoped
-class Bullmastiff_Broken
+class Bullmastiff_Broken implements BullmastiffLocal_Broken
{
}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/enterprise/directlyExtendsNothing/CowLocal_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/enterprise/directlyExtendsNothing/CowLocal_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/enterprise/directlyExtendsNothing/CowLocal_Broken.java 2009-02-26 12:22:44 UTC (rev 1718)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.unit.inheritance.specialization.enterprise.directlyExtendsNothing;
+
+import javax.ejb.Local;
+
+@Local
+public interface CowLocal_Broken
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/enterprise/directlyExtendsNothing/CowLocal_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/enterprise/directlyExtendsNothing/Cow_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/enterprise/directlyExtendsNothing/Cow_Broken.java 2009-02-26 12:19:29 UTC (rev 1717)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/enterprise/directlyExtendsNothing/Cow_Broken.java 2009-02-26 12:22:44 UTC (rev 1718)
@@ -5,7 +5,7 @@
@Specializes
@Stateful
-class Cow_Broken
+class Cow_Broken implements CowLocal_Broken
{
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/enterprise/samePrecedence/Farmer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/enterprise/samePrecedence/Farmer.java 2009-02-26 12:19:29 UTC (rev 1717)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/enterprise/samePrecedence/Farmer.java 2009-02-26 12:22:44 UTC (rev 1718)
@@ -3,9 +3,7 @@
import javax.annotation.Named;
import javax.ejb.Stateful;
-import org.jboss.jsr299.tck.unit.inheritance.specialization.enterprise.FarmerLocal;
-
@Landowner
@Named
@Stateful
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/enterprise/samePrecedence/FarmerInterface.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/enterprise/samePrecedence/FarmerInterface.java 2009-02-26 12:19:29 UTC (rev 1717)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/enterprise/samePrecedence/FarmerInterface.java 2009-02-26 12:22:44 UTC (rev 1718)
@@ -1,9 +0,0 @@
-package org.jboss.jsr299.tck.unit.inheritance.specialization.enterprise.samePrecedence;
-
-import javax.ejb.Local;
-
-@Local
-public interface FarmerInterface
-{
-
-}
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/enterprise/samePrecedence/FarmerLocal.java (from rev 1713, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/enterprise/samePrecedence/FarmerInterface.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/enterprise/samePrecedence/FarmerLocal.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/enterprise/samePrecedence/FarmerLocal.java 2009-02-26 12:22:44 UTC (rev 1718)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.unit.inheritance.specialization.enterprise.samePrecedence;
+
+import javax.ejb.Local;
+
+@Local
+public interface FarmerLocal
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/enterprise/samePrecedence/FarmerLocal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/simple/broken/extendejb/FarmEquipment.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/simple/broken/extendejb/FarmEquipment.java 2009-02-26 12:19:29 UTC (rev 1717)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/simple/broken/extendejb/FarmEquipment.java 2009-02-26 12:22:44 UTC (rev 1718)
@@ -6,7 +6,7 @@
@Named("plough")
@Stateful
-class FarmEquipment
+class FarmEquipment implements FarmEquipmentLocal
{
}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/simple/broken/extendejb/FarmEquipmentLocal.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/simple/broken/extendejb/FarmEquipmentLocal.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/simple/broken/extendejb/FarmEquipmentLocal.java 2009-02-26 12:22:44 UTC (rev 1718)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.unit.inheritance.specialization.simple.broken.extendejb;
+
+import javax.ejb.Local;
+
+@Local
+public interface FarmEquipmentLocal
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/simple/broken/extendejb/FarmEquipmentLocal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/simple/broken/extendejb/SpecializingBeanExtendsEnterpriseBeanTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/simple/broken/extendejb/SpecializingBeanExtendsEnterpriseBeanTest.java 2009-02-26 12:19:29 UTC (rev 1717)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/simple/broken/extendejb/SpecializingBeanExtendsEnterpriseBeanTest.java 2009-02-26 12:22:44 UTC (rev 1718)
@@ -6,9 +6,12 @@
import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.jboss.jsr299.tck.impl.packaging.Artifact;
import org.jboss.jsr299.tck.impl.packaging.ExpectedDeploymentException;
+import org.jboss.jsr299.tck.impl.packaging.Packaging;
+import org.jboss.jsr299.tck.impl.packaging.PackagingType;
import org.testng.annotations.Test;
@Artifact
+(a)Packaging(PackagingType.EAR)
@ExpectedDeploymentException(DefinitionException.class)
public class SpecializingBeanExtendsEnterpriseBeanTest extends AbstractDeclarativeTest
{
15 years, 3 months
[webbeans-commits] Webbeans SVN: r1717 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/unit/event and 5 other directories.
by webbeans-commits@lists.jboss.org
Author: dallen6
Date: 2009-02-26 07:19:29 -0500 (Thu, 26 Feb 2009)
New Revision: 1717
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/StringObserver.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer12/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer12/NonSimpleBean_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer12/ObserverMethodOnIncorrectBeanTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/register/observer1/DuplicateBindingsToRemoveObserverTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/register/observer1/NonBindingTypesToRemoveObserverTest.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/EventTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/EventTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/register/observer1/DuplicateBindingsToAddObserverTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/register/observer1/NonBindingTypesToAddObserverTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/resolve/nonbinding/NonBindingTypesWhenResolvingTest.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
Fixed test assignments through section 7.5 for events
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/EventTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/EventTest.java 2009-02-26 12:00:55 UTC (rev 1716)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/EventTest.java 2009-02-26 12:19:29 UTC (rev 1717)
@@ -51,19 +51,33 @@
private static final Annotation TAME_LITERAL = new AnnotationLiteral<Tame>() {};
@Test(groups = { "stub", "events", "integration" })
- @SpecAssertion(section = "7.4", id = "unknown")
+ @SpecAssertion(section = "7.4", id = "d")
public void testObserverCalledBeforeTransactionCompleteMaySetRollbackOnly()
{
assert false;
}
@Test(groups = { "stub", "events", "integration" })
- @SpecAssertion(section = "7.4", id = "unknown")
- public void testObserverManipulatingJTATransactionsDirectlyFails()
+ @SpecAssertion(section = "7.4", id = "e")
+ public void testObserverInitiatingJTATransactionsDirectlyFails()
{
assert false;
}
+ @Test(groups = { "stub", "events", "integration" })
+ @SpecAssertion(section = "7.4", id = "f")
+ public void testObserverCommittingJTATransactionsDirectlyFails()
+ {
+ assert false;
+ }
+
+ @Test(groups = { "stub", "events", "integration" })
+ @SpecAssertion(section = "7.4", id = "g")
+ public void testObserverRollingbackJTATransactionsDirectlyFails()
+ {
+ assert false;
+ }
+
@Test(groups = { "events", "integration", "broken" })
@SpecAssertion(section = "7.5.6", id = "unknown")
public void testTransactionalObserverNotifiedImmediatelyWhenNoTransactionInProgress()
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/EventTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/EventTest.java 2009-02-26 12:00:55 UTC (rev 1716)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/EventTest.java 2009-02-26 12:19:29 UTC (rev 1717)
@@ -98,6 +98,7 @@
/**
* An event binding type is a Java annotation defined as ~@Target({FIELD,
* PARAMETER}) or~ @Target({METHOD, FIELD, PARAMETER, TYPE}) ~and
+ *
* @Retention(RUNTIME)~
*/
@Test(groups = { "events", "stub" })
@@ -110,8 +111,8 @@
/**
* An event binding type is a Java annotation defined as ~@Target({FIELD,
* PARAMETER}) or @Target({METHOD, FIELD, PARAMETER, TYPE}) and
- * ~@Retention(RUNTIME)
- * TODO If the binding does not have RUNTIME retention, it cannot be tested
+ * ~@Retention(RUNTIME) TODO If the binding does not have RUNTIME retention,
+ * it cannot be tested
*/
@Test(groups = { "events", "broken" })
@SpecAssertions( { @SpecAssertion(section = "7.1", id = "f") })
@@ -180,7 +181,7 @@
getCurrentManager().fireEvent(anEvent, new RoleBinding("Admin"));
}
- //TODO This is not an assertion but a definition which is circular and non-testable
+ // TODO This is not an assertion but a definition which is circular
@Test(groups = { "events" })
@SpecAssertion(section = "7.3", id = "a")
public void testObserversImplementObserverInterface()
@@ -194,10 +195,73 @@
assert observer != null;
}
+ @Test(groups = { "events", "broken" }, expectedExceptions = { IllegalArgumentException.class })
+ @SpecAssertions( { @SpecAssertion(section = "7.3", id = "f") })
+ public void testManagerAddObserverWithEventTypeParametersFails()
+ {
+ assert false;
+ // ATemplatedEventType<String> anEvent = new
+ // ATemplatedEventType<String>();
+ // Observer<AnEventType> observer = new AnObserver();
+ // getCurrentManager().addObserver(observer, anEvent.getClass());
+ }
+
+ @Test(groups = { "events", "broken" }, expectedExceptions = { IllegalArgumentException.class })
+ @SpecAssertions( { @SpecAssertion(section = "7.3", id = "g") })
+ public void testManagerAddObserverWithEventTypeWildcardsFails()
+ {
+ // Although the above test is really the same as with a wildcard,
+ // we will test it anyhow since the specification calls it out separately.
+ ATemplatedEventType<?> anEventOnAnyType = new ATemplatedEventType<String>();
+ assert false;
+ }
+
+ @Test(groups = { "events", "broken" }, expectedExceptions = { IllegalArgumentException.class })
+ @SpecAssertions( { @SpecAssertion(section = "7.3", id = "h") })
+ public void testManagerRemoveObserverWithEventTypeParametersFails()
+ {
+ assert false;
+ // ATemplatedEventType<String> anEvent = new
+ // ATemplatedEventType<String>();
+ // Observer<AnEventType> observer = new AnObserver();
+ // getCurrentManager().addObserver(observer, anEvent.getClass());
+ }
+
+ @Test(groups = { "events", "stub" }, expectedExceptions = { IllegalArgumentException.class })
+ @SpecAssertions( { @SpecAssertion(section = "7.3", id = "i") })
+ public void testManagerRemoveObserverWithEventTypeWildcardsFails()
+ {
+ // Although the above test is really the same as with a wildcard,
+ // we will test it anyhow since the specification calls it out separately.
+ ATemplatedEventType<?> anEventOnAnyType = new ATemplatedEventType<String>();
+ assert false;
+ }
+
+ @Test(groups = { "events", "stub" })
+ @SpecAssertions( { @SpecAssertion(section = "7.4", id = "a") })
+ public void testObserverNotificationCallsResolveObservers()
+ {
+ assert false;
+ }
+
@Test(groups = { "events" })
+ @SpecAssertion(section = "7.5", id = "a")
+ public void testObserverMethodAutomaticallyRegistered()
+ {
+ assert !getCurrentManager().resolveObservers("event").isEmpty();
+ }
+
+ @Test(groups = { "events" })
@SpecAssertion(section = "7.5", id = "e")
- public void testMultipleObserverMethodsOK()
+ public void testMultipleObserverMethodsForSameEventOK()
{
+ assert getCurrentManager().resolveObservers("event").size() > 1;
+ }
+
+ @Test(groups = { "events" })
+ @SpecAssertion(section = "7.5", id = "f")
+ public void testMultipleObserverMethodsOnBeanOK()
+ {
// Resolve the observers for types 1 and 2
Set<Observer<ObservedType1>> resolvedStringObservers = getCurrentManager().resolveObservers(new ObservedType1());
assert resolvedStringObservers.size() == 1;
@@ -343,6 +407,7 @@
}
@Test(groups = { "events" })
+ @SpecAssertions( { @SpecAssertion(section = "7.5", id = "c"), @SpecAssertion(section = "7.5.8", id = "i")} )
@SpecAssertion(section = "7.5.8", id = "i")
public void testStaticObserverMethodInvoked()
{
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/StringObserver.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/StringObserver.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/StringObserver.java 2009-02-26 12:19:29 UTC (rev 1717)
@@ -0,0 +1,11 @@
+package org.jboss.jsr299.tck.unit.event;
+
+import javax.event.Observes;
+
+class StringObserver
+{
+ public void anotherObserver(@Observes String event)
+ {
+
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/StringObserver.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer12/NonSimpleBean_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer12/NonSimpleBean_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer12/NonSimpleBean_Broken.java 2009-02-26 12:19:29 UTC (rev 1717)
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+package org.jboss.jsr299.tck.unit.event.broken.observer12;
+
+import javax.event.Observes;
+
+/**
+ * This bean is neither simple nor session. As such, an observer method is not
+ * allowed to be here.
+ *
+ * @author David Allen
+ *
+ */
+class NonSimpleBean_Broken
+{
+ public NonSimpleBean_Broken(String name)
+ {
+
+ }
+
+ public void observe(@Observes String event)
+ {
+
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer12/NonSimpleBean_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer12/ObserverMethodOnIncorrectBeanTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer12/ObserverMethodOnIncorrectBeanTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer12/ObserverMethodOnIncorrectBeanTest.java 2009-02-26 12:19:29 UTC (rev 1717)
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ */
+
+package org.jboss.jsr299.tck.unit.event.broken.observer12;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.AbstractDeclarativeTest;
+import org.jboss.jsr299.tck.impl.packaging.Artifact;
+import org.testng.annotations.Test;
+
+/**
+ * Tests an observer method on something that is not a simple bean
+ * or session bean.
+ *
+ * @author David Allen
+ *
+ */
+@Artifact
+public class ObserverMethodOnIncorrectBeanTest extends AbstractDeclarativeTest
+{
+ @Test(groups = { "events" })
+ @SpecAssertion(section = "7.5", id = "b")
+ public void testObserverMethodNotOnSimpleOrSessionBeanFails()
+ {
+ assert getCurrentManager().resolveObservers("event").isEmpty();
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer12/ObserverMethodOnIncorrectBeanTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/register/observer1/DuplicateBindingsToAddObserverTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/register/observer1/DuplicateBindingsToAddObserverTest.java 2009-02-26 12:00:55 UTC (rev 1716)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/register/observer1/DuplicateBindingsToAddObserverTest.java 2009-02-26 12:19:29 UTC (rev 1717)
@@ -26,7 +26,7 @@
}
@Test(groups = { "events" }, expectedExceptions = { DuplicateBindingTypeException.class })
- @SpecAssertion(section = "7.3", id = "g")
+ @SpecAssertion(section = "7.3", id = "j")
public void testMultipleInstancesOfSameBindingTypeWhenAddingObserverFails()
{
Observer<AnEventType> observer = new AnObserver();
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/register/observer1/DuplicateBindingsToRemoveObserverTest.java (from rev 1712, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/register/observer1/DuplicateBindingsToAddObserverTest.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/register/observer1/DuplicateBindingsToRemoveObserverTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/register/observer1/DuplicateBindingsToRemoveObserverTest.java 2009-02-26 12:19:29 UTC (rev 1717)
@@ -0,0 +1,35 @@
+package org.jboss.jsr299.tck.unit.event.register.observer1;
+
+import javax.event.Observer;
+import javax.inject.DuplicateBindingTypeException;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.AbstractDeclarativeTest;
+import org.jboss.jsr299.tck.impl.packaging.Artifact;
+import org.testng.annotations.Test;
+
+@Artifact
+public class DuplicateBindingsToRemoveObserverTest extends AbstractDeclarativeTest
+{
+ public static class AnEventType
+ {
+ }
+
+ public static class AnObserver implements Observer<AnEventType>
+ {
+ public boolean wasNotified = false;
+
+ public void notify(AnEventType event)
+ {
+ wasNotified = true;
+ }
+ }
+
+ @Test(groups = { "events" }, expectedExceptions = { DuplicateBindingTypeException.class })
+ @SpecAssertion(section = "7.3", id = "k")
+ public void testMultipleInstancesOfSameBindingTypeWhenRemovingObserverFails()
+ {
+ Observer<AnEventType> observer = new AnObserver();
+ getCurrentManager().removeObserver(observer, AnEventType.class, new RoleBinding("Admin"), new TameAnnotationLiteral(), new TameAnnotationLiteral());
+ }
+}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/register/observer1/NonBindingTypesToAddObserverTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/register/observer1/NonBindingTypesToAddObserverTest.java 2009-02-26 12:00:55 UTC (rev 1716)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/register/observer1/NonBindingTypesToAddObserverTest.java 2009-02-26 12:19:29 UTC (rev 1717)
@@ -25,7 +25,7 @@
}
@Test(groups = { "events" }, expectedExceptions = { IllegalArgumentException.class })
- @SpecAssertion(section = "7.3", id = "h")
+ @SpecAssertion(section = "7.3", id = "l")
public void testNonBindingTypePassedToAddObserverFails()
{
Observer<AnEventType> observer = new AnObserver();
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/register/observer1/NonBindingTypesToRemoveObserverTest.java (from rev 1712, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/register/observer1/NonBindingTypesToAddObserverTest.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/register/observer1/NonBindingTypesToRemoveObserverTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/register/observer1/NonBindingTypesToRemoveObserverTest.java 2009-02-26 12:19:29 UTC (rev 1717)
@@ -0,0 +1,35 @@
+package org.jboss.jsr299.tck.unit.event.register.observer1;
+
+import javax.event.Observer;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.AbstractDeclarativeTest;
+import org.jboss.jsr299.tck.impl.packaging.Artifact;
+import org.testng.annotations.Test;
+
+@Artifact
+public class NonBindingTypesToRemoveObserverTest extends AbstractDeclarativeTest
+{
+ public static class AnEventType
+ {
+ }
+
+ public static class AnObserver implements Observer<AnEventType>
+ {
+ public boolean wasNotified = false;
+
+ public void notify(AnEventType event)
+ {
+ wasNotified = true;
+ }
+ }
+
+ @Test(groups = { "events" }, expectedExceptions = { IllegalArgumentException.class })
+ @SpecAssertion(section = "7.3", id = "m")
+ public void testNonBindingTypePassedToRemoveObserverFails()
+ {
+ Observer<AnEventType> observer = new AnObserver();
+ getCurrentManager().removeObserver(observer, AnEventType.class, new AnimalStereotypeAnnotationLiteral());
+ }
+
+}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/resolve/nonbinding/NonBindingTypesWhenResolvingTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/resolve/nonbinding/NonBindingTypesWhenResolvingTest.java 2009-02-26 12:00:55 UTC (rev 1716)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/resolve/nonbinding/NonBindingTypesWhenResolvingTest.java 2009-02-26 12:19:29 UTC (rev 1717)
@@ -8,13 +8,25 @@
import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.jboss.jsr299.tck.impl.packaging.Artifact;
-import org.jboss.jsr299.tck.unit.event.EventTest.AnEventType;
-import org.jboss.jsr299.tck.unit.event.EventTest.AnObserver;
import org.testng.annotations.Test;
@Artifact
public class NonBindingTypesWhenResolvingTest extends AbstractDeclarativeTest
{
+ public static class AnEventType
+ {
+ }
+
+ public static class AnObserver implements Observer<AnEventType>
+ {
+ public boolean wasNotified = false;
+
+ public void notify(AnEventType event)
+ {
+ wasNotified = true;
+ }
+ }
+
@Test(groups = { "events" }, expectedExceptions = { IllegalArgumentException.class })
@SpecAssertion(section = "7.7", id = "e")
public void testNonBindingTypeAnnotationWhenResolvingFails()
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-26 12:00:55 UTC (rev 1716)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-26 12:19:29 UTC (rev 1717)
@@ -3644,7 +3644,7 @@
</assertion>
<assertion id="c">
- <text>In an observer method, the first parameter is the observer object, the second parameter is the observed event type, and the remaining parameters are
+ <text>In the signature of Manager.addObserver(), the first parameter is the observer object, the second parameter is the observed event type, and the remaining parameters are
optional observed event bindings</text>
</assertion>
@@ -3657,16 +3657,36 @@
</assertion>
<assertion id="f">
- <text>If the observed event type passed to addObserver() or removeObserver() contains type variables or wildcards, an IllegalArgumentException is thrown</text>
+ <text>If the observed event type passed to ~addObserver()~ or removeObserver() contains ~type variables~ or wildcards, an IllegalArgumentException is thrown</text>
</assertion>
<assertion id="g">
- <text>If two instances of the same binding type are passed to addObserver() or removeObserver(), a DuplicateBindingTypeException is thrown</text>
+ <text>If the observed event type passed to ~addObserver()~ or removeObserver() contains type variables or ~wildcards~, an IllegalArgumentException is thrown</text>
</assertion>
<assertion id="h">
- <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>If the observed event type passed to addObserver() or ~removeObserver()~ contains ~type variables~ or wildcards, an IllegalArgumentException is thrown</text>
</assertion>
+
+ <assertion id="i">
+ <text>If the observed event type passed to addObserver() or ~removeObserver()~ contains type variables or ~wildcards~, an IllegalArgumentException is thrown</text>
+ </assertion>
+
+ <assertion id="j">
+ <text>If two instances of the same binding type are passed to ~addObserver()~ or removeObserver(), a DuplicateBindingTypeException is thrown</text>
+ </assertion>
+
+ <assertion id="k">
+ <text>If two instances of the same binding type are passed to addObserver() or ~removeObserver()~, a DuplicateBindingTypeException is thrown</text>
+ </assertion>
+
+ <assertion id="l">
+ <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>
+
+ <assertion id="m">
+ <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="7.4" title="Observer notification">
@@ -3688,9 +3708,17 @@
</assertion>
<assertion id="e">
- <text>An observer may not directly initiate, commit or rollback JTA transactions</text>
+ <text>An observer may not directly ~initiate~, commit or rollback JTA transactions</text>
</assertion>
+ <assertion id="f">
+ <text>An observer may not directly initiate, ~commit~ or rollback JTA transactions</text>
+ </assertion>
+
+ <assertion id="g">
+ <text>An observer may not directly initiate, commit or ~rollback~ JTA transactions</text>
+ </assertion>
+
</section>
<section id="7.5" title="Observer methods">
15 years, 3 months
[webbeans-commits] Webbeans SVN: r1716 - ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-02-26 07:00:55 -0500 (Thu, 26 Feb 2009)
New Revision: 1716
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/WebBeansListener.java
Log:
minor
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java 2009-02-26 11:22:53 UTC (rev 1715)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java 2009-02-26 12:00:55 UTC (rev 1716)
@@ -17,7 +17,6 @@
package org.jboss.webbeans.servlet;
-import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
@@ -36,7 +35,6 @@
* @author Pete Muir
* @author Nicklas Karlsson
*/
-@Deprecated
public class ServletLifecycle extends AbstractLifecycle
{
@@ -55,32 +53,6 @@
private static LogProvider log = Logging.getLogProvider(ServletLifecycle.class);
/**
- * Starts the application
- *
- * Runs the bootstrapper for bean discover and initialization
- *
- * @param context The servlet context
- */
- public void beginApplication(ServletContext servletContext)
- {
- /*ServletInitialization servletInitialization = new ServletInitialization(servletContext).initialize();
- super.initialize();
- super.beginApplication(servletContext.getServletContextName(), new ApplicationBeanStore(servletContext));
- BeanStore requestBeanStore = new ConcurrentHashMapBeanStore();
- super.beginDeploy(requestBeanStore);
- servletInitialization.start();
- super.endDeploy(requestBeanStore);*/
- }
-
- /**
- * Ends the application
- */
- public void endApplication(ServletContext servletContext)
- {
- //super.endApplication(servletContext.getServletContextName(), new ApplicationBeanStore(servletContext));
- }
-
- /**
* Begins a session
*
* @param session The HTTP session
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/WebBeansListener.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/WebBeansListener.java 2009-02-26 11:22:53 UTC (rev 1715)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/WebBeansListener.java 2009-02-26 12:00:55 UTC (rev 1716)
@@ -17,8 +17,6 @@
package org.jboss.webbeans.servlet;
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
import javax.servlet.ServletRequestEvent;
import javax.servlet.ServletRequestListener;
import javax.servlet.http.HttpServletRequest;
@@ -35,7 +33,7 @@
* @author Nicklas Karlsson
*
*/
-public class WebBeansListener implements ServletContextListener, HttpSessionListener, ServletRequestListener
+public class WebBeansListener implements HttpSessionListener, ServletRequestListener
{
private final ServletLifecycle lifecycle;
@@ -44,17 +42,6 @@
{
lifecycle = ServletLifecycle.instance();
}
-
- /**
- * Called when the context is initialized (application started)
- *
- * @param event The context event
- */
- public void contextInitialized(ServletContextEvent event)
- {
-
- lifecycle.beginApplication(event.getServletContext());
- }
/**
* Called when the session is created
@@ -77,16 +64,6 @@
}
/**
- * Called when the context is destroyed (application scoped)
- *
- * @param event The context event
- */
- public void contextDestroyed(ServletContextEvent event)
- {
- lifecycle.endApplication(event.getServletContext());
- }
-
- /**
* Called when the request is destroyed
*
* @param event The request event
15 years, 3 months
[webbeans-commits] Webbeans SVN: r1715 - in ri/trunk: webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap and 3 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-02-26 06:22:53 -0500 (Thu, 26 Feb 2009)
New Revision: 1715
Removed:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle2.java
Modified:
ri/trunk/porting-package/src/main/java/org/jboss/webbeans/tck/StandaloneContainersImpl.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/mock/MockLifecycle.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/AbstractLifecycle.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/WebBeansListener.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/AbstractTest.java
Log:
New bootstrap for WB
Modified: ri/trunk/porting-package/src/main/java/org/jboss/webbeans/tck/StandaloneContainersImpl.java
===================================================================
--- ri/trunk/porting-package/src/main/java/org/jboss/webbeans/tck/StandaloneContainersImpl.java 2009-02-26 11:19:38 UTC (rev 1714)
+++ ri/trunk/porting-package/src/main/java/org/jboss/webbeans/tck/StandaloneContainersImpl.java 2009-02-26 11:22:53 UTC (rev 1715)
@@ -26,7 +26,6 @@
this.lifecycle = new MockLifecycle();
try
{
- lifecycle.initialize();
ManagerImpl manager = lifecycle.getBootstrap().getManager();
if (enabledDeploymentTypes != null)
{
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java 2009-02-26 11:19:38 UTC (rev 1714)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java 2009-02-26 11:22:53 UTC (rev 1715)
@@ -27,6 +27,13 @@
import org.jboss.webbeans.bean.standard.ManagerBean;
import org.jboss.webbeans.bootstrap.api.Bootstrap;
import org.jboss.webbeans.bootstrap.api.helpers.AbstractBootstrap;
+import org.jboss.webbeans.context.ApplicationContext;
+import org.jboss.webbeans.context.ConversationContext;
+import org.jboss.webbeans.context.DependentContext;
+import org.jboss.webbeans.context.RequestContext;
+import org.jboss.webbeans.context.SessionContext;
+import org.jboss.webbeans.context.api.BeanStore;
+import org.jboss.webbeans.context.api.helpers.ConcurrentHashMapBeanStore;
import org.jboss.webbeans.conversation.ConversationImpl;
import org.jboss.webbeans.conversation.JavaSEConversationTerminator;
import org.jboss.webbeans.conversation.NumericConversationIdGenerator;
@@ -77,6 +84,7 @@
this.manager = new ManagerImpl(getNamingContext(), getEjbResolver(), getResourceLoader());
getManager().getNaming().bind(ManagerImpl.JNDI_KEY, getManager());
CurrentManager.setRootManager(manager);
+ initializeContexts();
}
public ManagerImpl getManager()
@@ -126,6 +134,13 @@
{
throw new IllegalStateException("ResourceLoader not set");
}
+ if (getApplicationContext() == null)
+ {
+ throw new IllegalStateException("No application context BeanStore set");
+ }
+ beginApplication(getApplicationContext());
+ BeanStore requestBeanStore = new ConcurrentHashMapBeanStore();
+ beginDeploy(requestBeanStore);
// Must populate EJB cache first, as we need it to detect whether a
// bean is an EJB!
manager.getEjbDescriptorCache().addAll(getEjbDiscovery().discoverEjbs());
@@ -143,6 +158,7 @@
manager.getResolver().resolveInjectionPoints();
new BeanValidator(manager).validate();
manager.fireEvent(manager, new DeployedLiteral());
+ endDeploy(requestBeanStore);
}
}
@@ -156,5 +172,42 @@
Package pkg = WebBeansBootstrap.class.getPackage();
return pkg != null ? pkg.getImplementationVersion() : null;
}
+
+ protected void initializeContexts()
+ {
+ manager.addContext(DependentContext.create());
+ manager.addContext(RequestContext.create());
+ manager.addContext(SessionContext.create());
+ manager.addContext(ApplicationContext.create());
+ manager.addContext(ConversationContext.create());
+ }
+ protected void beginApplication(BeanStore applicationBeanStore)
+ {
+ log.trace("Starting application");
+ ApplicationContext.INSTANCE.setBeanStore(applicationBeanStore);
+ ApplicationContext.INSTANCE.setActive(true);
+
+ }
+
+ protected void beginDeploy(BeanStore requestBeanStore)
+ {
+ RequestContext.INSTANCE.setBeanStore(requestBeanStore);
+ RequestContext.INSTANCE.setActive(true);
+ }
+
+ protected void endDeploy(BeanStore requestBeanStore)
+ {
+ RequestContext.INSTANCE.setBeanStore(null);
+ RequestContext.INSTANCE.setActive(false);
+ }
+
+ protected void endApplication(BeanStore applicationBeanStore)
+ {
+ log.trace("Ending application");
+ ApplicationContext.INSTANCE.destroy();
+ ApplicationContext.INSTANCE.setActive(false);
+ ApplicationContext.INSTANCE.setBeanStore(null);
+ }
+
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/mock/MockLifecycle.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/mock/MockLifecycle.java 2009-02-26 11:19:38 UTC (rev 1714)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/mock/MockLifecycle.java 2009-02-26 11:22:53 UTC (rev 1715)
@@ -54,13 +54,8 @@
bootstrap.setEjbResolver(MOCK_EJB_RESOLVER);
bootstrap.setResourceLoader(MOCK_RESOURCE_LOADER);
bootstrap.setWebBeanDiscovery(webBeanDiscovery);
- }
-
- @Override
- public void initialize()
- {
+ bootstrap.setApplicationContext(applicationBeanStore);
bootstrap.initialize();
- super.initialize();
}
public MockWebBeanDiscovery getWebBeanDiscovery()
@@ -75,22 +70,18 @@
public void beginApplication()
{
- super.beginApplication("Mock", applicationBeanStore);
- BeanStore requestBeanStore = new ConcurrentHashMapBeanStore();
- super.beginDeploy(requestBeanStore);
bootstrap.setEjbDiscovery(new MockEjbDiscovery(webBeanDiscovery.discoverWebBeanClasses()));
bootstrap.boot();
- super.endDeploy(requestBeanStore);
}
- public void resetContexts()
+ public void endApplication()
{
}
- public void endApplication()
+ public void resetContexts()
{
- super.endApplication("Mock", applicationBeanStore);
+
}
public void beginRequest()
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/AbstractLifecycle.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/AbstractLifecycle.java 2009-02-26 11:19:38 UTC (rev 1714)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/AbstractLifecycle.java 2009-02-26 11:22:53 UTC (rev 1715)
@@ -1,8 +1,6 @@
package org.jboss.webbeans.servlet;
import org.jboss.webbeans.CurrentManager;
-import org.jboss.webbeans.ManagerImpl;
-import org.jboss.webbeans.context.ApplicationContext;
import org.jboss.webbeans.context.ConversationContext;
import org.jboss.webbeans.context.DependentContext;
import org.jboss.webbeans.context.RequestContext;
@@ -36,48 +34,6 @@
private static LogProvider log = Logging.getLogProvider(AbstractLifecycle.class);
- protected void initialize()
- {
- ManagerImpl manager = CurrentManager.rootManager();
- if (manager == null)
- {
- throw new IllegalStateException("Manager has not been initialized, check that Bootstrap.initialize() has run");
- }
- manager.addContext(DependentContext.create());
- manager.addContext(RequestContext.create());
- manager.addContext(SessionContext.create());
- manager.addContext(ApplicationContext.create());
- manager.addContext(ConversationContext.create());
- }
-
- protected void beginApplication(String id, BeanStore applicationBeanStore)
- {
- log.trace("Starting application " + id);
- ApplicationContext.INSTANCE.setBeanStore(applicationBeanStore);
- ApplicationContext.INSTANCE.setActive(true);
-
- }
-
- protected void beginDeploy(BeanStore requestBeanStore)
- {
- RequestContext.INSTANCE.setBeanStore(requestBeanStore);
- RequestContext.INSTANCE.setActive(true);
- }
-
- protected void endDeploy(BeanStore requestBeanStore)
- {
- RequestContext.INSTANCE.setBeanStore(null);
- RequestContext.INSTANCE.setActive(false);
- }
-
- protected void endApplication(String id, BeanStore applicationBeanStore)
- {
- log.trace("Ending application " + id);
- ApplicationContext.INSTANCE.destroy();
- ApplicationContext.INSTANCE.setActive(false);
- ApplicationContext.INSTANCE.setBeanStore(null);
- }
-
protected void beginSession(String id, BeanStore sessionBeanStore)
{
log.trace("Starting session " + id);
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java 2009-02-26 11:19:38 UTC (rev 1714)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java 2009-02-26 11:22:53 UTC (rev 1715)
@@ -54,12 +54,6 @@
private static LogProvider log = Logging.getLogProvider(ServletLifecycle.class);
- @Override
- public void initialize()
- {
- // No-op, we'll do the init ourselves!
- }
-
/**
* Starts the application
*
@@ -69,13 +63,13 @@
*/
public void beginApplication(ServletContext servletContext)
{
- ServletInitialization servletInitialization = new ServletInitialization(servletContext).initialize();
+ /*ServletInitialization servletInitialization = new ServletInitialization(servletContext).initialize();
super.initialize();
super.beginApplication(servletContext.getServletContextName(), new ApplicationBeanStore(servletContext));
BeanStore requestBeanStore = new ConcurrentHashMapBeanStore();
super.beginDeploy(requestBeanStore);
servletInitialization.start();
- super.endDeploy(requestBeanStore);
+ super.endDeploy(requestBeanStore);*/
}
/**
@@ -83,7 +77,7 @@
*/
public void endApplication(ServletContext servletContext)
{
- super.endApplication(servletContext.getServletContextName(), new ApplicationBeanStore(servletContext));
+ //super.endApplication(servletContext.getServletContextName(), new ApplicationBeanStore(servletContext));
}
/**
Deleted: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle2.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle2.java 2009-02-26 11:19:38 UTC (rev 1714)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle2.java 2009-02-26 11:22:53 UTC (rev 1715)
@@ -1,135 +0,0 @@
-/*
- * 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.
- */
-
-package org.jboss.webbeans.servlet;
-
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
-
-import org.jboss.webbeans.CurrentManager;
-import org.jboss.webbeans.context.SessionContext;
-import org.jboss.webbeans.context.api.BeanStore;
-import org.jboss.webbeans.context.api.helpers.ConcurrentHashMapBeanStore;
-
-/**
- * Implementation of the Web Beans lifecycle that can react to servlet events.
- *
- * This implementation does not boot the Web Beans container.
- *
- * @author Pete Muir
- * @author Nicklas Karlsson
- */
-public class ServletLifecycle2 extends AbstractLifecycle
-{
-
- public static final String REQUEST_ATTRIBUTE_NAME = ServletLifecycle2.class.getName() + ".requestBeanStore";
-
- public static ServletLifecycle2 instance()
- {
- return (ServletLifecycle2) AbstractLifecycle.instance();
- }
-
- static
- {
- AbstractLifecycle.setInstance(new ServletLifecycle2());
- }
-
- /**
- * Starts the application
- *
- * Runs the bootstrapper for bean discover and initialization
- *
- * @param context The servlet context
- */
- public void beginApplication(ServletContext servletContext)
- {
- super.beginApplication(servletContext.getServletContextName(), new ApplicationBeanStore(servletContext));
- }
-
- /**
- * Ends the application
- */
- public void endApplication(ServletContext servletContext)
- {
- super.endApplication(servletContext.getServletContextName(), new ApplicationBeanStore(servletContext));
- }
-
- /**
- * Begins a session
- *
- * @param session The HTTP session
- */
- public void beginSession(HttpSession session)
- {
- super.beginSession(session.getId(), null);
- }
-
- /**
- * Ends a session
- *
- * @param session The HTTP session
- */
- public void endSession(HttpSession session)
- {
- super.endSession(session.getId(), restoreSessionContext(session));
- }
-
- /**
- * Restore the session from the underlying session object. Also allow the
- * session to be injected by the Session manager
- *
- * @param session
- * @return
- */
- protected BeanStore restoreSessionContext(HttpSession session)
- {
- BeanStore sessionBeanStore = new HttpSessionBeanStore(session);
- SessionContext.INSTANCE.setBeanStore(sessionBeanStore);
- CurrentManager.rootManager().getInstanceByType(HttpSessionManager.class).setSession(session);
- return sessionBeanStore;
- }
-
- /**
- * Begins a HTTP request
- *
- * Sets the session into the session context
- *
- * @param request The request
- */
- public void beginRequest(HttpServletRequest request)
- {
- restoreSessionContext(request.getSession());
- BeanStore beanStore = new ConcurrentHashMapBeanStore();
- request.setAttribute(REQUEST_ATTRIBUTE_NAME, beanStore);
- super.beginRequest(request.getRequestURI(), beanStore);
- }
-
- /**
- * Ends a HTTP request
- *
- * @param request The request
- */
- public void endRequest(HttpServletRequest request)
- {
- BeanStore beanStore = (BeanStore) request.getAttribute(REQUEST_ATTRIBUTE_NAME);
- request.removeAttribute(REQUEST_ATTRIBUTE_NAME);
- super.endRequest(request.getRequestURI(), beanStore);
- SessionContext.INSTANCE.setBeanStore(null);
- }
-
-}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/WebBeansListener.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/WebBeansListener.java 2009-02-26 11:19:38 UTC (rev 1714)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/WebBeansListener.java 2009-02-26 11:22:53 UTC (rev 1715)
@@ -43,7 +43,6 @@
public WebBeansListener()
{
lifecycle = ServletLifecycle.instance();
- lifecycle.initialize();
}
/**
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/AbstractTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/AbstractTest.java 2009-02-26 11:19:38 UTC (rev 1714)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/AbstractTest.java 2009-02-26 11:22:53 UTC (rev 1715)
@@ -72,7 +72,6 @@
public void before() throws Exception
{
lifecycle = new MockLifecycle();
- lifecycle.initialize();
this.discovery = lifecycle.getWebBeanDiscovery();
this.manager = lifecycle.getBootstrap().getManager();
lifecycle.beginApplication();
15 years, 3 months