[webbeans-commits] Webbeans SVN: r1352 - in tck/tags: 1.0.0.ALPHA1 and 5 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-01-29 13:13:55 -0500 (Thu, 29 Jan 2009)
New Revision: 1352
Added:
tck/tags/1.0.0.ALPHA1/
tck/tags/1.0.0.ALPHA1/api/pom.xml
tck/tags/1.0.0.ALPHA1/impl/pom.xml
tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java
tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/Farm.java
tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/Horse.java
tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/Stable.java
tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/FooConsumer.java
tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Generator.java
tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/NumberConsumer.java
tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java
tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/SerializableFoo.java
tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/event/BindingTypeCBinding.java
tck/tags/1.0.0.ALPHA1/pom.xml
Removed:
tck/tags/1.0.0.ALPHA1/api/pom.xml
tck/tags/1.0.0.ALPHA1/impl/pom.xml
tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java
tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java
tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/event/BindingTypeCBinding.java
tck/tags/1.0.0.ALPHA1/pom.xml
Log:
[maven-release-plugin] copy for tag 1.0.0.ALPHA1
Copied: tck/tags/1.0.0.ALPHA1 (from rev 1284, tck/trunk)
Deleted: tck/tags/1.0.0.ALPHA1/api/pom.xml
===================================================================
--- tck/trunk/api/pom.xml 2009-01-29 14:40:51 UTC (rev 1284)
+++ tck/tags/1.0.0.ALPHA1/api/pom.xml 2009-01-29 18:13:55 UTC (rev 1352)
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-JBoss, Home of Professional Open Source
-Copyright 2008, Red Hat Middleware LLC, and individual contributors
-by the @authors tag. See the copyright.txt in the distribution for a
-full listing of individual contributors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-http://www.apache.org/licenses/LICENSE-2.0
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.jboss.webbeans.tck</groupId>
- <artifactId>parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.jboss.webbeans.tck</groupId>
- <artifactId>webbeans-tck-api</artifactId>
- <packaging>jar</packaging>
- <name>Web Beans TCK API</name>
- <url>http://www.seamframework.org/WebBeans</url>
-
- <dependencies>
-
- <dependency>
- <groupId>org.jboss.webbeans</groupId>
- <artifactId>webbeans-api</artifactId>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.2</version>
- <configuration>
- <archive>
- <manifest>
- <mainClass>org.jboss.webbeans.tck.api.WebBeansTCK</mainClass>
- </manifest>
- </archive>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-
-
-</project>
Copied: tck/tags/1.0.0.ALPHA1/api/pom.xml (from rev 1351, tck/trunk/api/pom.xml)
===================================================================
--- tck/tags/1.0.0.ALPHA1/api/pom.xml (rev 0)
+++ tck/tags/1.0.0.ALPHA1/api/pom.xml 2009-01-29 18:13:55 UTC (rev 1352)
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2008, Red Hat Middleware LLC, and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.jboss.webbeans.tck</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0.0.ALPHA1</version>
+ </parent>
+
+ <groupId>org.jboss.webbeans.tck</groupId>
+ <artifactId>webbeans-tck-api</artifactId>
+ <packaging>jar</packaging>
+ <name>Web Beans TCK API</name>
+ <url>http://www.seamframework.org/WebBeans</url>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.jboss.webbeans</groupId>
+ <artifactId>webbeans-api</artifactId>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.2</version>
+ <configuration>
+ <archive>
+ <manifest>
+ <mainClass>org.jboss.webbeans.tck.api.WebBeansTCK</mainClass>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+
+
+</project>
Deleted: tck/tags/1.0.0.ALPHA1/impl/pom.xml
===================================================================
--- tck/trunk/impl/pom.xml 2009-01-29 14:40:51 UTC (rev 1284)
+++ tck/tags/1.0.0.ALPHA1/impl/pom.xml 2009-01-29 18:13:55 UTC (rev 1352)
@@ -1,135 +0,0 @@
-<?xml version="1.0"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <artifactId>parent</artifactId>
- <groupId>org.jboss.webbeans.tck</groupId>
- <version>1.0.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.webbeans.tck</groupId>
- <artifactId>webbeans-tck-impl</artifactId>
- <name>Web Beans TCK</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.jboss.webbeans</groupId>
- <artifactId>webbeans-api</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.webbeans.tck</groupId>
- <artifactId>webbeans-tck-api</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <classifier>jdk15</classifier>
- </dependency>
-
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- </dependency>
-
- <dependency>
- <groupId>javax.transaction</groupId>
- <artifactId>jta</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-api</artifactId>
- <exclusions>
- <exclusion>
- <artifactId>jboss-jaxrpc</artifactId>
- <groupId>jbossws</groupId>
- </exclusion>
- <exclusion>
- <artifactId>jboss-transaction-api</artifactId>
- <groupId>org.jboss.javaee</groupId>
- </exclusion>
- <exclusion>
- <artifactId>jboss-jaxrpc</artifactId>
- <groupId>jboss.jbossws</groupId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>javax.annotation</groupId>
- <artifactId>jsr250-api</artifactId>
- </dependency>
-
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </dependency>
-
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- </dependency>
-
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>tck-utils</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.persistence</groupId>
- <artifactId>persistence-api</artifactId>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <version>1.2</version>
- <executions>
- <execution>
- <id>attach-artifacts</id>
- <phase>package</phase>
- <goals>
- <goal>attach-artifact</goal>
- </goals>
- <configuration>
- <artifacts>
- <artifact>
- <file>${basedir}/src/main/resources/tck-unit-tests.xml</file>
- <type>xml</type>
- <classifier>suite</classifier>
- </artifact>
- </artifacts>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>apt-maven-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>test-process</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <testOutputDirectory>${project.build.directory}/site</testOutputDirectory>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
Copied: tck/tags/1.0.0.ALPHA1/impl/pom.xml (from rev 1351, tck/trunk/impl/pom.xml)
===================================================================
--- tck/tags/1.0.0.ALPHA1/impl/pom.xml (rev 0)
+++ tck/tags/1.0.0.ALPHA1/impl/pom.xml 2009-01-29 18:13:55 UTC (rev 1352)
@@ -0,0 +1,133 @@
+<?xml version="1.0"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>parent</artifactId>
+ <groupId>org.jboss.webbeans.tck</groupId>
+ <version>1.0.0.ALPHA1</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.webbeans.tck</groupId>
+ <artifactId>webbeans-tck-impl</artifactId>
+ <name>Web Beans TCK</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.jboss.webbeans</groupId>
+ <artifactId>webbeans-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.webbeans.tck</groupId>
+ <artifactId>webbeans-tck-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <classifier>jdk15</classifier>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.ejb3</groupId>
+ <artifactId>jboss-ejb3-api</artifactId>
+ <exclusions>
+ <exclusion>
+ <artifactId>jboss-jaxrpc</artifactId>
+ <groupId>jbossws</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>jboss-transaction-api</artifactId>
+ <groupId>org.jboss.javaee</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>jboss-jaxrpc</artifactId>
+ <groupId>jboss.jbossws</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.annotation</groupId>
+ <artifactId>jsr250-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>tck-utils</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.persistence</groupId>
+ <artifactId>persistence-api</artifactId>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.2</version>
+ <executions>
+ <execution>
+ <id>attach-artifacts</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>${basedir}/src/main/resources/tck-unit-tests.xml</file>
+ <type>xml</type>
+ <classifier>suite</classifier>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>apt-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test-process</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <testOutputDirectory>${project.build.directory}/site</testOutputDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Deleted: tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java 2009-01-29 14:40:51 UTC (rev 1284)
+++ tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java 2009-01-29 18:13:55 UTC (rev 1352)
@@ -1,626 +0,0 @@
-package org.jboss.webbeans.tck.unit.context.dependent;
-
-import static org.jboss.webbeans.tck.impl.WebBeansTCKImpl.configuration;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.Set;
-
-import javax.context.Context;
-import javax.context.ContextNotActiveException;
-import javax.context.Dependent;
-import javax.inject.manager.Bean;
-
-import org.jboss.webbeans.tck.AbstractTest;
-import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.util.MockCreationalContext;
-import org.testng.annotations.Test;
-
-/**
- * Spec version: PRD2
- */
-public class DependentContextTest extends AbstractTest
-{
- /**
- * No injected instance of the (@Dependent-scoped) Web Bean is ever shared between multiple
- * injection points.
- */
- @Test(groups = { "contexts", "injection" })
- @SpecAssertion(section = "8.3")
- public void testInstanceNotSharedBetweenInjectionPoints()
- {
- deployBeans(Fox.class, FoxRun.class);
- Set<Bean<Fox>> foxBeans = manager.resolveByType(Fox.class);
- assert foxBeans.size() == 1;
- Bean<Fox> foxBean = foxBeans.iterator().next();
- Set<Bean<FoxRun>> foxRunBeans = manager.resolveByType(FoxRun.class);
- assert foxRunBeans.size() == 1;
- Bean<FoxRun> foxRunBean = foxRunBeans.iterator().next();
- manager.addBean(foxBean);
- FoxRun foxRun = foxRunBean.create(new MockCreationalContext<FoxRun>());
- assert !foxRun.fox.equals(foxRun.anotherFox);
- }
-
- /**
- * Any instance of the (@Dependent-scoped) Web Bean that is used to evaluate a Unified EL
- * expression exists to service that evaluation only.
- */
- @Test(groups = { "contexts", "el"})
- @SpecAssertion(section = "8.3")
- public void testInstanceUsedForElEvaluationNotShared() throws Exception
- {
- deployBeans(Fox.class);
- new RunInDependentContext()
- {
- @Override
- protected void execute() throws Exception
- {
- Set<Bean<Fox>> foxBeans = manager.resolveByType(Fox.class);
- assert foxBeans.size() == 1;
- Bean<Fox> foxBean = foxBeans.iterator().next();
- manager.addBean(foxBean);
-
- Fox fox1 = configuration().getContainers().evaluateValueExpression("#{fox}", Fox.class);
- Fox fox2 = configuration().getContainers().evaluateValueExpression("#{fox}", Fox.class);
- assert !fox1.equals(fox2);
- }
- }.run();
- }
-
- /**
- * Any instance of the (@Dependent-scoped) Web Bean that receives a producer method, producer
- * field, disposal method or observer method invocation exists to service
- * that invocation only
- */
- @Test(groups = { "contexts", "producerMethod" })
- @SpecAssertion(section = "8.3")
- public void testInstanceUsedForProducerMethodNotShared() throws Exception
- {
- Bean<SpiderProducer> spiderProducer = createSimpleBean(SpiderProducer.class);
- manager.addBean(spiderProducer);
- Method method = SpiderProducer.class.getMethod("produceTarantula");
- Bean<Tarantula> tarantulaBean = createProducerMethodBean(method, spiderProducer);
- Tarantula tarantula = tarantulaBean.create(new MockCreationalContext<Tarantula>());
- Tarantula tarantula2 = tarantulaBean.create(new MockCreationalContext<Tarantula>());
- assert tarantula != null;
- assert tarantula2 != null;
- assert tarantula != tarantula2;
- }
-
- /**
- * Any instance of the (@Dependent-scoped) Web Bean that receives a producer method, producer
- * field, disposal method or observer method invocation exists to service
- * that invocation only
- */
- @Test(groups = { "contexts", "producerMethod" })
- @SpecAssertion(section = "8.3")
- public void testInstanceUsedForProducerFieldNotShared() throws Exception
- {
- Bean<OtherSpiderProducer> spiderProducer = createSimpleBean(OtherSpiderProducer.class);
- manager.addBean(spiderProducer);
- Field field = OtherSpiderProducer.class.getField("produceTarantula");
- Bean<Tarantula> tarantulaBean = createProducerFieldBean(field, spiderProducer);
- Tarantula tarantula = tarantulaBean.create(new MockCreationalContext<Tarantula>());
- Tarantula tarantula2 = tarantulaBean.create(new MockCreationalContext<Tarantula>());
- assert tarantula != null;
- assert tarantula2 != null;
- assert tarantula != tarantula2;
- }
-
- /**
- * Any instance of the (@Dependent-scoped) Web Bean that receives a producer method, producer
- * field, disposal method or observer method invocation exists to service
- * that invocation only
- */
- @Test(groups = { "stub", "contexts", "disposalMethod" })
- @SpecAssertion(section = "8.3")
- public void testInstanceUsedForDisposalMethodNotShared()
- {
- assert false;
- }
-
- /**
- * Any instance of the (@Dependent-scoped) Web Bean that receives a producer method, producer
- * field, disposal method or observer method invocation exists to service
- * that invocation only
- */
- @Test(groups = { "stub", "contexts", "observerMethod" })
- @SpecAssertion(section = "8.3")
- public void testInstanceUsedForObserverMethodNotShared()
- {
- assert false;
- }
-
- /**
- * Every invocation of the get() operation of the Context object for the @Dependent
- * scope with the value true for the create parameter returns a new instance
- * of the given Web Bean
- */
- @Test(groups = "contexts")
- @SpecAssertion(section = "8.3")
- public void testContextGetWithCreateTrueReturnsNewInstance() throws Exception
- {
- deployBeans(Fox.class);
- new RunInDependentContext()
- {
-
- @Override
- protected void execute() throws Exception
- {
- Set<Bean<Fox>> foxBeans = manager.resolveByType(Fox.class);
- assert foxBeans.size() == 1;
- Bean<Fox> foxBean = foxBeans.iterator().next();
- Context context = manager.getContext(Dependent.class);
- assert context.get(foxBean, new MockCreationalContext<Fox>()) != null;
- assert context.get(foxBean, new MockCreationalContext<Fox>()) instanceof Fox;
- }
-
- }.run();
- }
-
- /**
- * Every invocation of the get() operation of the Context object for the @Dependent
- * scope with the value false for the create parameter returns a null value
- */
- @Test(groups = "contexts")
- @SpecAssertion(section = "8.3")
- public void testContextGetWithCreateFalseReturnsNull() throws Exception
- {
- deployBeans(Fox.class);
- new RunInDependentContext()
- {
-
- @Override
- protected void execute() throws Exception
- {
- Set<Bean<Fox>> foxBeans = manager.resolveByType(Fox.class);
- assert foxBeans.size() == 1;
- Bean<Fox> foxBean = foxBeans.iterator().next();
- Context context = manager.getContext(Dependent.class);
- assert context.get(foxBean, null) == null;
- }
-
- }.run();
- }
-
- /**
- * The @Dependent scope is inactive except:
- */
- @Test(groups = {"contexts"}, expectedExceptions = ContextNotActiveException.class)
- @SpecAssertion(section = "8.3")
- public void testContextIsInactive()
- {
- assert !manager.getContext(Dependent.class).isActive();
- }
-
- /**
- * when an instance of a Web Bean with scope @Dependent is created by the Web
- * Bean manager to receive a producer method, producer field, disposal method
- * or observer method invocation, or
- */
- @Test(groups = { "stub", "contexts", "producerMethod" })
- @SpecAssertion(section = "8.3")
- public void testContextIsActiveWhenInvokingProducerMethod()
- {
- assert false;
- }
-
- /**
- * when an instance of a Web Bean with scope @Dependent is created by the Web
- * Bean manager to receive a producer method, producer field, disposal method
- * or observer method invocation, or
- */
- @Test(groups = { "stub", "contexts", "producerField" })
- @SpecAssertion(section = "8.3")
- public void testContextIsActiveWhenInvokingProducerField()
- {
- assert false;
- //assert manager.getContext(Dependent.class).isActive();
- }
-
- /**
- * when an instance of a Web Bean with scope @Dependent is created by the Web
- * Bean manager to receive a producer method, producer field, disposal method
- * or observer method invocation, or
- */
- @Test(groups = { "stub", "contexts", "disposalMethod" })
- @SpecAssertion(section = "8.3")
- public void testContextIsActiveWhenInvokingDisposalMethod()
- {
- assert false;
- }
-
- /**
- * when an instance of a Web Bean with scope @Dependent is created by the Web
- * Bean manager to receive a producer method, producer field, disposal method
- * or observer method invocation, or
- */
- @Test(groups = { "stub", "contexts", "observerMethod" })
- @SpecAssertion(section = "8.3")
- public void testContextIsActiveWhenInvokingObserverMethod()
- {
- assert false;
- }
-
- /**
- * while a Unified EL expression is evaluated, or
- */
- @Test(groups = { "stub", "contexts", "el" })
- @SpecAssertion(section = "8.3")
- public void testContextIsActiveWhenEvaluatingElExpression()
- {
- assert false;
- }
-
- /**
- * when the Web Bean manager is creating or destroying a Web Bean instance or
- * injecting its dependencies, or
- */
- @Test(groups = { "contexts", "beanLifecycle" })
- @SpecAssertion(section = "8.3")
- public void testContextIsActiveDuringBeanCreation()
- {
- // Slightly roundabout, but I can't see a better way to test atm
- Bean<FoxRun> foxRunBean = createSimpleBean(FoxRun.class);
- Bean<Fox> foxBean = createSimpleBean(Fox.class);
- manager.addBean(foxBean);
- FoxRun foxRun = foxRunBean.create(new MockCreationalContext<FoxRun>());
- assert foxRun.fox != null;
- }
-
- /**
- * when the Web Bean manager is creating or destroying a Web Bean instance or
- * injecting its dependencies, or
- */
- @Test(groups = { "stub", "contexts", "beanDestruction" })
- @SpecAssertion(section = "8.3")
- public void testContextIsActiveDuringBeanDestruction()
- {
- assert false;
- }
-
- /**
- * when the Web Bean manager is creating or destroying a Web Bean instance or
- * injecting its dependencies, or
- */
- @Test(groups = { "contexts", "injection" })
- @SpecAssertion(section = "8.4")
- public void testContextIsActiveDuringInjection()
- {
- Bean<FoxRun> foxRunBean = createSimpleBean(FoxRun.class);
- Bean<Fox> foxBean = createSimpleBean(Fox.class);
- manager.addBean(foxBean);
- FoxRun foxRun = foxRunBean.create(new MockCreationalContext<FoxRun>());
- assert foxRun.fox != null;
- }
-
- /**
- * when the Web Bean manager is injecting dependencies of an EJB bean or
- * Servlet or when an EJB bean @PostConstruct or @PreDestroy callback is
- * invoked by the EJB container
- */
- @Test(groups = { "contexts", "injection", "stub", "ejb3" })
- @SpecAssertion(section = "8.3")
- public void testContextIsActiveDuringEJBDependencyInjection()
- {
- assert false;
- }
-
- /**
- * when the Web Bean manager is injecting dependencies of an EJB bean or
- * Servlet or when an EJB bean @PostConstruct or @PreDestroy callback is
- * invoked by the EJB container
- */
- @Test(groups = { "contexts", "injection", "stub", "servlet" })
- @SpecAssertion(section = "8.3")
- public void testContextIsActiveDuringServletDependencyInjection()
- {
- assert false;
- }
-
- /**
- * when the Web Bean manager is injecting dependencies of an EJB bean or
- * Servlet or when an EJB bean @PostConstruct or @PreDestroy callback is
- * invoked by the EJB container
- */
- @Test(groups = { "contexts", "postconstruct", "stub", "ejb3" })
- @SpecAssertion(section = "8.3")
- public void testContextIsActiveDuringEJBPostConstruct()
- {
- assert false;
- }
-
- /**
- * when the Web Bean manager is injecting dependencies of an EJB bean or
- * Servlet or when an EJB bean @PostConstruct or @PreDestroy callback is
- * invoked by the EJB container
- */
- @Test(groups = { "contexts", "predestroy", "stub", "ejb3" })
- @SpecAssertion(section = "8.3")
- public void testContextIsActiveDuringEJBPreDestroy()
- {
- assert false;
- }
-
- /**
- * A Web Bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from the Web Bean constructor, from the
- * Web Bean remove method, from initializer methods, from producer methods,
- * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
- * from Web Beans interceptors or decorators for any of these methods
- */
- @Test(groups = { "stub", "contexts", "constructor" })
- @SpecAssertion(section = "8.3.1")
- public void testWebBeanMayCreateInstanceFromConstructor()
- {
- assert false;
- }
-
- /**
- * A Web Bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from the Web Bean constructor, from the
- * Web Bean remove method, from initializer methods, from producer methods,
- * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
- * from Web Beans interceptors or decorators for any of these methods
- */
- @Test(groups = { "stub", "contexts", "removeMethod" })
- @SpecAssertion(section = "8.3.1")
- public void testWebBeanMayCreateInstanceFromRemoveMethod()
- {
- assert false;
- }
-
- /**
- * A Web Bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from the Web Bean constructor, from the
- * Web Bean remove method, from initializer methods, from producer methods,
- * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
- * from Web Beans interceptors or decorators for any of these methods
- */
- @Test(groups = { "stub", "contexts", "initalizerMethod" })
- @SpecAssertion(section = "8.3.1")
- public void testWebBeanMayCreateInstanceFromInitializerMethod()
- {
- assert false;
- }
-
- /**
- * A Web Bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from the Web Bean constructor, from the
- * Web Bean remove method, from initializer methods, from producer methods,
- * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
- * from Web Beans interceptors or decorators for any of these methods
- */
- @Test(groups = { "stub", "contexts", "producerMethod" })
- @SpecAssertion(section = "8.3.1")
- public void testWebBeanMayCreateInstanceFromProducerMethod()
- {
- assert false;
- }
-
- /**
- * A Web Bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from the Web Bean constructor, from the
- * Web Bean remove method, from initializer methods, from producer methods,
- * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
- * from Web Beans interceptors or decorators for any of these methods
- */
- @Test(groups = { "stub", "contexts", "disposalMethod" })
- @SpecAssertion(section = "8.3.1")
- public void testWebBeanMayCreateInstanceFromDisposalMethod()
- {
- assert false;
- }
-
- /**
- * A Web Bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from the Web Bean constructor, from the
- * Web Bean remove method, from initializer methods, from producer methods,
- * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
- * from Web Beans interceptors or decorators for any of these methods
- */
- @Test(groups = { "stub", "contexts", "preDestroy" })
- @SpecAssertion(section = "8.3.1")
- public void testWebBeanMayCreateInstanceFromPreDestroy()
- {
- assert false;
- }
-
- /**
- * A Web Bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from the Web Bean constructor, from the
- * Web Bean remove method, from initializer methods, from producer methods,
- * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
- * from Web Beans interceptors or decorators for any of these methods
- */
- @Test(groups = { "stub", "contexts", "postConstruct" })
- @SpecAssertion(section = "8.3.1")
- public void testWebBeanMayCreateInstanceFromPostConstruct()
- {
- assert false;
- }
-
- /**
- * A Web Bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from the Web Bean constructor, from the
- * Web Bean remove method, from initializer methods, from producer methods,
- * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
- * from Web Beans interceptors or decorators for any of these methods
- */
- @Test(groups = { "stub", "contexts", "interceptor" })
- @SpecAssertion(section = "8.3.1")
- public void testWebBeanMayCreateInstanceFromInterceptorOfActiveMethod()
- {
- assert false;
- }
-
- /**
- * A Web Bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from the Web Bean constructor, from the
- * Web Bean remove method, from initializer methods, from producer methods,
- * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
- * from Web Beans interceptors or decorators for any of these methods
- */
- @Test(groups = { "stub", "contexts", "decorator" })
- @SpecAssertion(section = "8.3.1")
- public void testWebBeanMayCreateInstanceFromDecoratorOfActiveMethod()
- {
- assert false;
- }
-
- /**
- * An EJB bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from initializer methods, from @PostConstruct
- * and @PreDestroy callbacks and from Web Beans interceptors for these
- * methods.
- */
- @Test(groups = { "stub", "contexts", "ejb3", "initializerMethod" })
- @SpecAssertion(section = "8.3.1")
- public void testEjbBeanMayCreateInstanceFromInitializer()
- {
- assert false;
- }
-
- /**
- * An EJB bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from initializer methods, from @PostConstruct
- * and @PreDestroy callbacks and from Web Beans interceptors for these
- * methods.
- */
- @Test(groups = { "stub", "contexts", "ejb3", "postConstruct" })
- @SpecAssertion(section = "8.3.1")
- public void testEjbBeanMayCreateInstanceFromPostConstruct()
- {
- assert false;
- }
-
- /**
- * An EJB bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from initializer methods, from @PostConstruct
- * and @PreDestroy callbacks and from Web Beans interceptors for these
- * methods.
- */
- @Test(groups = { "stub", "contexts", "ejb3", "preDestroy" })
- @SpecAssertion(section = "8.3.1")
- public void testEjbBeanMayCreateInstanceFromPreDestroy()
- {
- assert false;
- }
-
- /**
- * An EJB bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from initializer methods, from @PostConstruct
- * and @PreDestroy callbacks and from Web Beans interceptors for these
- * methods.
- */
- @Test(groups = { "stub", "contexts", "ejb3", "interceptor" })
- @SpecAssertion(section = "8.3.1")
- public void testEjbBeanMayCreateInstanceFromInterceptorOfActiveMethod()
- {
- assert false;
- }
-
- /**
- * A Servlet may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from initializer methods
- */
- @Test(groups = { "stub", "contexts", "servlet", "initializerMethod" })
- @SpecAssertion(section = "8.3.1")
- public void testServletBeanMayCreateInstanceFromInitializer()
- {
- assert false;
- }
-
- /**
- * destroy all dependent objects of a Web Bean instance when the instance is
- * destroyed,
- */
- @Test(groups = { "stub", "contexts", "beanDestruction" })
- @SpecAssertion(section = "8.3.2")
- public void testDestroyingParentDestroysDependents()
- {
- assert false;
- }
-
- /**
- * destroy all dependent objects of an EJB bean or Servlet when the EJB bean
- * or Servlet is destroyed,
- */
- @Test(groups = { "stub", "contexts", "ejb3" })
- @SpecAssertion(section = "8.3.2")
- public void testDestroyingEjbDestroysDependents()
- {
- assert false;
- }
-
- /**
- * destroy all dependent objects of an EJB bean or Servlet when the EJB bean
- * or Servlet is destroyed,
- */
- @Test(groups = { "stub", "contexts", "servlet" })
- @SpecAssertion(section = "8.3.2")
- public void testDestroyingServletDestroysDependents()
- {
- assert false;
- }
-
- /**
- * destroy all @Dependent scoped contextual instances created during an EL
- * expression evaluation when the evaluation completes, and
- */
- @Test(groups = { "stub", "contexts", "el" })
- @SpecAssertion(section = "8.3.2")
- public void testDependentsDestroyedWhenElEvaluationCompletes()
- {
- assert false;
- }
-
- /**
- * destroy any @Dependent scoped contextual instance created to receive a
- * producer method, producer field, disposal method or observer method
- * invocation when the invocation completes
- */
- @Test(groups = { "stub", "contexts", "producerMethod" })
- @SpecAssertion(section = "8.3.2")
- public void testDependentsDestroyedWhenProducerMethodCompletes()
- {
- assert false;
- }
-
- /**
- * destroy any @Dependent scoped contextual instance created to receive a
- * producer method, producer field, disposal method or observer method
- * invocation when the invocation completes
- */
- @Test(groups = { "stub", "contexts", "producerField" })
- @SpecAssertion(section = "8.3.2")
- public void testDependentsDestroyedWhenProducerFieldCompletes()
- {
- assert false;
- }
-
- /**
- * destroy any @Dependent scoped contextual instance created to receive a
- * producer method, producer field, disposal method or observer method
- * invocation when the invocation completes
- */
- @Test(groups = { "stub", "contexts", "disposalMethod" })
- @SpecAssertion(section = "8.3.2")
- public void testDependentsDestroyedWhenDisposalMethodCompletes()
- {
- assert false;
- }
-
- /**
- * destroy any @Dependent scoped contextual instance created to receive a
- * producer method, producer field, disposal method or observer method
- * invocation when the invocation completes
- */
- @Test(groups = { "stub", "contexts", "observerMethod" })
- @SpecAssertion(section = "8.3")
- public void testDependentsDestroyedWhenObserverMethodEvaluationCompletes()
- {
- assert false;
- }
-
-}
Copied: tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java (from rev 1289, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java)
===================================================================
--- tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java (rev 0)
+++ tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java 2009-01-29 18:13:55 UTC (rev 1352)
@@ -0,0 +1,634 @@
+package org.jboss.webbeans.tck.unit.context.dependent;
+
+import static org.jboss.webbeans.tck.impl.WebBeansTCKImpl.configuration;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.Set;
+
+import javax.context.Context;
+import javax.context.ContextNotActiveException;
+import javax.context.Dependent;
+import javax.inject.manager.Bean;
+
+import org.jboss.webbeans.tck.AbstractTest;
+import org.jboss.webbeans.tck.impl.SpecAssertion;
+import org.jboss.webbeans.tck.impl.util.MockCreationalContext;
+import org.testng.annotations.Test;
+
+/**
+ * Spec version: PRD2
+ */
+public class DependentContextTest extends AbstractTest
+{
+ /**
+ * No injected instance of the (@Dependent-scoped) Web Bean is ever shared between multiple
+ * injection points.
+ */
+ @Test(groups = { "contexts", "injection" })
+ @SpecAssertion(section = "8.3")
+ public void testInstanceNotSharedBetweenInjectionPoints()
+ {
+ deployBeans(Fox.class, FoxRun.class);
+ Set<Bean<Fox>> foxBeans = manager.resolveByType(Fox.class);
+ assert foxBeans.size() == 1;
+ Bean<Fox> foxBean = foxBeans.iterator().next();
+ Set<Bean<FoxRun>> foxRunBeans = manager.resolveByType(FoxRun.class);
+ assert foxRunBeans.size() == 1;
+ Bean<FoxRun> foxRunBean = foxRunBeans.iterator().next();
+ manager.addBean(foxBean);
+ FoxRun foxRun = foxRunBean.create(new MockCreationalContext<FoxRun>());
+ assert !foxRun.fox.equals(foxRun.anotherFox);
+ }
+
+ /**
+ * Any instance of the (@Dependent-scoped) Web Bean that is used to evaluate a Unified EL
+ * expression exists to service that evaluation only.
+ */
+ @Test(groups = { "contexts", "el"})
+ @SpecAssertion(section = "8.3")
+ public void testInstanceUsedForElEvaluationNotShared() throws Exception
+ {
+ deployBeans(Fox.class);
+ new RunInDependentContext()
+ {
+ @Override
+ protected void execute() throws Exception
+ {
+ Set<Bean<Fox>> foxBeans = manager.resolveByType(Fox.class);
+ assert foxBeans.size() == 1;
+ Bean<Fox> foxBean = foxBeans.iterator().next();
+ manager.addBean(foxBean);
+
+ Fox fox1 = configuration().getContainers().evaluateValueExpression("#{fox}", Fox.class);
+ Fox fox2 = configuration().getContainers().evaluateValueExpression("#{fox}", Fox.class);
+ assert !fox1.equals(fox2);
+ }
+ }.run();
+ }
+
+ /**
+ * Any instance of the (@Dependent-scoped) Web Bean that receives a producer method, producer
+ * field, disposal method or observer method invocation exists to service
+ * that invocation only
+ */
+ @Test(groups = { "contexts", "producerMethod" })
+ @SpecAssertion(section = "8.3")
+ public void testInstanceUsedForProducerMethodNotShared() throws Exception
+ {
+ Bean<SpiderProducer> spiderProducer = createSimpleBean(SpiderProducer.class);
+ manager.addBean(spiderProducer);
+ Method method = SpiderProducer.class.getMethod("produceTarantula");
+ Bean<Tarantula> tarantulaBean = createProducerMethodBean(method, spiderProducer);
+ Tarantula tarantula = tarantulaBean.create(new MockCreationalContext<Tarantula>());
+ Tarantula tarantula2 = tarantulaBean.create(new MockCreationalContext<Tarantula>());
+ assert tarantula != null;
+ assert tarantula2 != null;
+ assert tarantula != tarantula2;
+ }
+
+ /**
+ * Any instance of the (@Dependent-scoped) Web Bean that receives a producer method, producer
+ * field, disposal method or observer method invocation exists to service
+ * that invocation only
+ */
+ @Test(groups = { "contexts", "producerMethod" })
+ @SpecAssertion(section = "8.3")
+ public void testInstanceUsedForProducerFieldNotShared() throws Exception
+ {
+ Bean<OtherSpiderProducer> spiderProducer = createSimpleBean(OtherSpiderProducer.class);
+ manager.addBean(spiderProducer);
+ Field field = OtherSpiderProducer.class.getField("produceTarantula");
+ Bean<Tarantula> tarantulaBean = createProducerFieldBean(field, spiderProducer);
+ Tarantula tarantula = tarantulaBean.create(new MockCreationalContext<Tarantula>());
+ Tarantula tarantula2 = tarantulaBean.create(new MockCreationalContext<Tarantula>());
+ assert tarantula != null;
+ assert tarantula2 != null;
+ assert tarantula != tarantula2;
+ }
+
+ /**
+ * Any instance of the (@Dependent-scoped) Web Bean that receives a producer method, producer
+ * field, disposal method or observer method invocation exists to service
+ * that invocation only
+ */
+ @Test(groups = { "stub", "contexts", "disposalMethod" })
+ @SpecAssertion(section = "8.3")
+ public void testInstanceUsedForDisposalMethodNotShared()
+ {
+ assert false;
+ }
+
+ /**
+ * Any instance of the (@Dependent-scoped) Web Bean that receives a producer method, producer
+ * field, disposal method or observer method invocation exists to service
+ * that invocation only
+ */
+ @Test(groups = { "stub", "contexts", "observerMethod" })
+ @SpecAssertion(section = "8.3")
+ public void testInstanceUsedForObserverMethodNotShared()
+ {
+ assert false;
+ }
+
+ /**
+ * Every invocation of the get() operation of the Context object for the @Dependent
+ * scope with the value true for the create parameter returns a new instance
+ * of the given Web Bean
+ */
+ @Test(groups = "contexts")
+ @SpecAssertion(section = "8.3")
+ public void testContextGetWithCreateTrueReturnsNewInstance() throws Exception
+ {
+ deployBeans(Fox.class);
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ Set<Bean<Fox>> foxBeans = manager.resolveByType(Fox.class);
+ assert foxBeans.size() == 1;
+ Bean<Fox> foxBean = foxBeans.iterator().next();
+ Context context = manager.getContext(Dependent.class);
+ assert context.get(foxBean, new MockCreationalContext<Fox>()) != null;
+ assert context.get(foxBean, new MockCreationalContext<Fox>()) instanceof Fox;
+ }
+
+ }.run();
+ }
+
+ /**
+ * Every invocation of the get() operation of the Context object for the @Dependent
+ * scope with the value false for the create parameter returns a null value
+ */
+ @Test(groups = "contexts")
+ @SpecAssertion(section = "8.3")
+ public void testContextGetWithCreateFalseReturnsNull() throws Exception
+ {
+ deployBeans(Fox.class);
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ Set<Bean<Fox>> foxBeans = manager.resolveByType(Fox.class);
+ assert foxBeans.size() == 1;
+ Bean<Fox> foxBean = foxBeans.iterator().next();
+ Context context = manager.getContext(Dependent.class);
+ assert context.get(foxBean, null) == null;
+ }
+
+ }.run();
+ }
+
+ /**
+ * The @Dependent scope is inactive except:
+ */
+ @Test(groups = {"contexts"}, expectedExceptions = ContextNotActiveException.class)
+ @SpecAssertion(section = "8.3")
+ public void testContextIsInactive()
+ {
+ assert !manager.getContext(Dependent.class).isActive();
+ }
+
+ /**
+ * when an instance of a Web Bean with scope @Dependent is created by the Web
+ * Bean manager to receive a producer method, producer field, disposal method
+ * or observer method invocation, or
+ */
+ @Test(groups = { "stub", "contexts", "producerMethod" })
+ @SpecAssertion(section = "8.3")
+ public void testContextIsActiveWhenInvokingProducerMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * when an instance of a Web Bean with scope @Dependent is created by the Web
+ * Bean manager to receive a producer method, producer field, disposal method
+ * or observer method invocation, or
+ */
+ @Test(groups = { "stub", "contexts", "producerField" })
+ @SpecAssertion(section = "8.3")
+ public void testContextIsActiveWhenInvokingProducerField()
+ {
+ assert false;
+ //assert manager.getContext(Dependent.class).isActive();
+ }
+
+ /**
+ * when an instance of a Web Bean with scope @Dependent is created by the Web
+ * Bean manager to receive a producer method, producer field, disposal method
+ * or observer method invocation, or
+ */
+ @Test(groups = { "stub", "contexts", "disposalMethod" })
+ @SpecAssertion(section = "8.3")
+ public void testContextIsActiveWhenInvokingDisposalMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * when an instance of a Web Bean with scope @Dependent is created by the Web
+ * Bean manager to receive a producer method, producer field, disposal method
+ * or observer method invocation, or
+ */
+ @Test(groups = { "stub", "contexts", "observerMethod" })
+ @SpecAssertion(section = "8.3")
+ public void testContextIsActiveWhenInvokingObserverMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * while a Unified EL expression is evaluated, or
+ */
+ @Test(groups = { "stub", "contexts", "el" })
+ @SpecAssertion(section = "8.3")
+ public void testContextIsActiveWhenEvaluatingElExpression()
+ {
+ assert false;
+ }
+
+ /**
+ * when the Web Bean manager is creating or destroying a Web Bean instance or
+ * injecting its dependencies, or
+ */
+ @Test(groups = { "contexts", "beanLifecycle" })
+ @SpecAssertion(section = "8.3")
+ public void testContextIsActiveDuringBeanCreation()
+ {
+ // Slightly roundabout, but I can't see a better way to test atm
+ Bean<FoxRun> foxRunBean = createSimpleBean(FoxRun.class);
+ Bean<Fox> foxBean = createSimpleBean(Fox.class);
+ manager.addBean(foxBean);
+ FoxRun foxRun = foxRunBean.create(new MockCreationalContext<FoxRun>());
+ assert foxRun.fox != null;
+ }
+
+ /**
+ * when the Web Bean manager is creating or destroying a Web Bean instance or
+ * injecting its dependencies, or
+ */
+ @Test(groups = { "stub", "contexts", "beanDestruction" })
+ @SpecAssertion(section = "8.3")
+ public void testContextIsActiveDuringBeanDestruction()
+ {
+ assert false;
+ }
+
+ /**
+ * when the Web Bean manager is creating or destroying a Web Bean instance or
+ * injecting its dependencies, or
+ */
+ @Test(groups = { "contexts", "injection" })
+ @SpecAssertion(section = "8.4")
+ public void testContextIsActiveDuringInjection()
+ {
+ Bean<FoxRun> foxRunBean = createSimpleBean(FoxRun.class);
+ Bean<Fox> foxBean = createSimpleBean(Fox.class);
+ manager.addBean(foxBean);
+ FoxRun foxRun = foxRunBean.create(new MockCreationalContext<FoxRun>());
+ assert foxRun.fox != null;
+ }
+
+ /**
+ * when the Web Bean manager is injecting dependencies of an EJB bean or
+ * Servlet or when an EJB bean @PostConstruct or @PreDestroy callback is
+ * invoked by the EJB container
+ */
+ @Test(groups = { "contexts", "injection", "stub", "ejb3" })
+ @SpecAssertion(section = "8.3")
+ public void testContextIsActiveDuringEJBDependencyInjection()
+ {
+ assert false;
+ }
+
+ /**
+ * when the Web Bean manager is injecting dependencies of an EJB bean or
+ * Servlet or when an EJB bean @PostConstruct or @PreDestroy callback is
+ * invoked by the EJB container
+ */
+ @Test(groups = { "contexts", "injection", "stub", "servlet" })
+ @SpecAssertion(section = "8.3")
+ public void testContextIsActiveDuringServletDependencyInjection()
+ {
+ assert false;
+ }
+
+ /**
+ * when the Web Bean manager is injecting dependencies of an EJB bean or
+ * Servlet or when an EJB bean @PostConstruct or @PreDestroy callback is
+ * invoked by the EJB container
+ */
+ @Test(groups = { "contexts", "postconstruct", "stub", "ejb3" })
+ @SpecAssertion(section = "8.3")
+ public void testContextIsActiveDuringEJBPostConstruct()
+ {
+ assert false;
+ }
+
+ /**
+ * when the Web Bean manager is injecting dependencies of an EJB bean or
+ * Servlet or when an EJB bean @PostConstruct or @PreDestroy callback is
+ * invoked by the EJB container
+ */
+ @Test(groups = { "contexts", "predestroy", "stub", "ejb3" })
+ @SpecAssertion(section = "8.3")
+ public void testContextIsActiveDuringEJBPreDestroy()
+ {
+ assert false;
+ }
+
+ /**
+ * A Web Bean may create an instance of a Web Bean with scope type @Dependent
+ * by calling Manager.getInstance() from the Web Bean constructor, from the
+ * Web Bean remove method, from initializer methods, from producer methods,
+ * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
+ * from Web Beans interceptors or decorators for any of these methods
+ */
+ @Test(groups = { "stub", "contexts", "constructor" })
+ @SpecAssertion(section = "8.3.1")
+ public void testWebBeanMayCreateInstanceFromConstructor()
+ {
+ assert false;
+ }
+
+ /**
+ * A Web Bean may create an instance of a Web Bean with scope type @Dependent
+ * by calling Manager.getInstance() from the Web Bean constructor, from the
+ * Web Bean remove method, from initializer methods, from producer methods,
+ * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
+ * from Web Beans interceptors or decorators for any of these methods
+ */
+ @Test(groups = { "stub", "contexts", "removeMethod" })
+ @SpecAssertion(section = "8.3.1")
+ public void testWebBeanMayCreateInstanceFromRemoveMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * A Web Bean may create an instance of a Web Bean with scope type @Dependent
+ * by calling Manager.getInstance() from the Web Bean constructor, from the
+ * Web Bean remove method, from initializer methods, from producer methods,
+ * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
+ * from Web Beans interceptors or decorators for any of these methods
+ */
+ @Test(groups = { "stub", "contexts", "initalizerMethod" })
+ @SpecAssertion(section = "8.3.1")
+ public void testWebBeanMayCreateInstanceFromInitializerMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * A Web Bean may create an instance of a Web Bean with scope type @Dependent
+ * by calling Manager.getInstance() from the Web Bean constructor, from the
+ * Web Bean remove method, from initializer methods, from producer methods,
+ * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
+ * from Web Beans interceptors or decorators for any of these methods
+ */
+ @Test(groups = { "stub", "contexts", "producerMethod" })
+ @SpecAssertion(section = "8.3.1")
+ public void testWebBeanMayCreateInstanceFromProducerMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * A Web Bean may create an instance of a Web Bean with scope type @Dependent
+ * by calling Manager.getInstance() from the Web Bean constructor, from the
+ * Web Bean remove method, from initializer methods, from producer methods,
+ * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
+ * from Web Beans interceptors or decorators for any of these methods
+ */
+ @Test(groups = { "stub", "contexts", "disposalMethod" })
+ @SpecAssertion(section = "8.3.1")
+ public void testWebBeanMayCreateInstanceFromDisposalMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * A Web Bean may create an instance of a Web Bean with scope type @Dependent
+ * by calling Manager.getInstance() from the Web Bean constructor, from the
+ * Web Bean remove method, from initializer methods, from producer methods,
+ * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
+ * from Web Beans interceptors or decorators for any of these methods
+ */
+ @Test(groups = { "stub", "contexts", "preDestroy" })
+ @SpecAssertion(section = "8.3.1")
+ public void testWebBeanMayCreateInstanceFromPreDestroy()
+ {
+ assert false;
+ }
+
+ /**
+ * A Web Bean may create an instance of a Web Bean with scope type @Dependent
+ * by calling Manager.getInstance() from the Web Bean constructor, from the
+ * Web Bean remove method, from initializer methods, from producer methods,
+ * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
+ * from Web Beans interceptors or decorators for any of these methods
+ */
+ @Test(groups = { "stub", "contexts", "postConstruct" })
+ @SpecAssertion(section = "8.3.1")
+ public void testWebBeanMayCreateInstanceFromPostConstruct()
+ {
+ assert false;
+ }
+
+ /**
+ * A Web Bean may create an instance of a Web Bean with scope type @Dependent
+ * by calling Manager.getInstance() from the Web Bean constructor, from the
+ * Web Bean remove method, from initializer methods, from producer methods,
+ * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
+ * from Web Beans interceptors or decorators for any of these methods
+ */
+ @Test(groups = { "stub", "contexts", "interceptor" })
+ @SpecAssertion(section = "8.3.1")
+ public void testWebBeanMayCreateInstanceFromInterceptorOfActiveMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * A Web Bean may create an instance of a Web Bean with scope type @Dependent
+ * by calling Manager.getInstance() from the Web Bean constructor, from the
+ * Web Bean remove method, from initializer methods, from producer methods,
+ * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
+ * from Web Beans interceptors or decorators for any of these methods
+ */
+ @Test(groups = { "stub", "contexts", "decorator" })
+ @SpecAssertion(section = "8.3.1")
+ public void testWebBeanMayCreateInstanceFromDecoratorOfActiveMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * An EJB bean may create an instance of a Web Bean with scope type @Dependent
+ * by calling Manager.getInstance() from initializer methods, from @PostConstruct
+ * and @PreDestroy callbacks and from Web Beans interceptors for these
+ * methods.
+ */
+ @Test(groups = { "stub", "contexts", "ejb3", "initializerMethod" })
+ @SpecAssertion(section = "8.3.1")
+ public void testEjbBeanMayCreateInstanceFromInitializer()
+ {
+ assert false;
+ }
+
+ /**
+ * An EJB bean may create an instance of a Web Bean with scope type @Dependent
+ * by calling Manager.getInstance() from initializer methods, from @PostConstruct
+ * and @PreDestroy callbacks and from Web Beans interceptors for these
+ * methods.
+ */
+ @Test(groups = { "stub", "contexts", "ejb3", "postConstruct" })
+ @SpecAssertion(section = "8.3.1")
+ public void testEjbBeanMayCreateInstanceFromPostConstruct()
+ {
+ assert false;
+ }
+
+ /**
+ * An EJB bean may create an instance of a Web Bean with scope type @Dependent
+ * by calling Manager.getInstance() from initializer methods, from @PostConstruct
+ * and @PreDestroy callbacks and from Web Beans interceptors for these
+ * methods.
+ */
+ @Test(groups = { "stub", "contexts", "ejb3", "preDestroy" })
+ @SpecAssertion(section = "8.3.1")
+ public void testEjbBeanMayCreateInstanceFromPreDestroy()
+ {
+ assert false;
+ }
+
+ /**
+ * An EJB bean may create an instance of a Web Bean with scope type @Dependent
+ * by calling Manager.getInstance() from initializer methods, from @PostConstruct
+ * and @PreDestroy callbacks and from Web Beans interceptors for these
+ * methods.
+ */
+ @Test(groups = { "stub", "contexts", "ejb3", "interceptor" })
+ @SpecAssertion(section = "8.3.1")
+ public void testEjbBeanMayCreateInstanceFromInterceptorOfActiveMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * A Servlet may create an instance of a Web Bean with scope type @Dependent
+ * by calling Manager.getInstance() from initializer methods
+ */
+ @Test(groups = { "stub", "contexts", "servlet", "initializerMethod" })
+ @SpecAssertion(section = "8.3.1")
+ public void testServletBeanMayCreateInstanceFromInitializer()
+ {
+ assert false;
+ }
+
+ /**
+ * destroy all dependent objects of a Web Bean instance when the instance is
+ * destroyed,
+ */
+ @Test(groups = { "broken", "contexts", "beanDestruction" })
+ @SpecAssertion(section = "8.3.2")
+ public void testDestroyingParentDestroysDependents()
+ {
+ deployBeans(Farm.class, Horse.class, Stable.class);
+ assert manager.resolveByType(Farm.class).size() == 1;
+ Bean<Farm> farmBean = manager.resolveByType(Farm.class).iterator().next();
+ Farm farm = manager.getInstanceByType(Farm.class);
+ Stable.destroyed = false;
+ Horse.destroyed = false;
+ farmBean.destroy(farm);
+ assert Stable.destroyed;
+ assert Horse.destroyed;
+ }
+
+ /**
+ * destroy all dependent objects of an EJB bean or Servlet when the EJB bean
+ * or Servlet is destroyed,
+ */
+ @Test(groups = { "stub", "contexts", "ejb3" })
+ @SpecAssertion(section = "8.3.2")
+ public void testDestroyingEjbDestroysDependents()
+ {
+ assert false;
+ }
+
+ /**
+ * destroy all dependent objects of an EJB bean or Servlet when the EJB bean
+ * or Servlet is destroyed,
+ */
+ @Test(groups = { "stub", "contexts", "servlet" })
+ @SpecAssertion(section = "8.3.2")
+ public void testDestroyingServletDestroysDependents()
+ {
+ assert false;
+ }
+
+ /**
+ * destroy all @Dependent scoped contextual instances created during an EL
+ * expression evaluation when the evaluation completes, and
+ */
+ @Test(groups = { "stub", "contexts", "el" })
+ @SpecAssertion(section = "8.3.2")
+ public void testDependentsDestroyedWhenElEvaluationCompletes()
+ {
+ assert false;
+ }
+
+ /**
+ * destroy any @Dependent scoped contextual instance created to receive a
+ * producer method, producer field, disposal method or observer method
+ * invocation when the invocation completes
+ */
+ @Test(groups = { "stub", "contexts", "producerMethod" })
+ @SpecAssertion(section = "8.3.2")
+ public void testDependentsDestroyedWhenProducerMethodCompletes()
+ {
+ assert false;
+ }
+
+ /**
+ * destroy any @Dependent scoped contextual instance created to receive a
+ * producer method, producer field, disposal method or observer method
+ * invocation when the invocation completes
+ */
+ @Test(groups = { "stub", "contexts", "producerField" })
+ @SpecAssertion(section = "8.3.2")
+ public void testDependentsDestroyedWhenProducerFieldCompletes()
+ {
+ assert false;
+ }
+
+ /**
+ * destroy any @Dependent scoped contextual instance created to receive a
+ * producer method, producer field, disposal method or observer method
+ * invocation when the invocation completes
+ */
+ @Test(groups = { "stub", "contexts", "disposalMethod" })
+ @SpecAssertion(section = "8.3.2")
+ public void testDependentsDestroyedWhenDisposalMethodCompletes()
+ {
+ assert false;
+ }
+
+ /**
+ * destroy any @Dependent scoped contextual instance created to receive a
+ * producer method, producer field, disposal method or observer method
+ * invocation when the invocation completes
+ */
+ @Test(groups = { "stub", "contexts", "observerMethod" })
+ @SpecAssertion(section = "8.3")
+ public void testDependentsDestroyedWhenObserverMethodEvaluationCompletes()
+ {
+ assert false;
+ }
+
+}
Copied: tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/Farm.java (from rev 1289, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/Farm.java)
===================================================================
--- tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/Farm.java (rev 0)
+++ tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/Farm.java 2009-01-29 18:13:55 UTC (rev 1352)
@@ -0,0 +1,12 @@
+package org.jboss.webbeans.tck.unit.context.dependent;
+
+import javax.context.RequestScoped;
+import javax.inject.Current;
+
+@RequestScoped
+public class Farm
+{
+
+ @Current Stable stable;
+
+}
Copied: tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/Horse.java (from rev 1289, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/Horse.java)
===================================================================
--- tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/Horse.java (rev 0)
+++ tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/Horse.java 2009-01-29 18:13:55 UTC (rev 1352)
@@ -0,0 +1,16 @@
+package org.jboss.webbeans.tck.unit.context.dependent;
+
+import javax.annotation.PreDestroy;
+
+class Horse
+{
+
+ public static boolean destroyed;
+
+ @PreDestroy
+ public void preDestroy()
+ {
+ destroyed = true;
+ }
+
+}
Copied: tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/Stable.java (from rev 1289, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/Stable.java)
===================================================================
--- tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/Stable.java (rev 0)
+++ tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/Stable.java 2009-01-29 18:13:55 UTC (rev 1352)
@@ -0,0 +1,19 @@
+package org.jboss.webbeans.tck.unit.context.dependent;
+
+import javax.annotation.PreDestroy;
+import javax.inject.Current;
+
+class Stable
+{
+
+ @Current Horse horse;
+
+ public static boolean destroyed;
+
+ @PreDestroy
+ public void preDestroy()
+ {
+ destroyed = true;
+ }
+
+}
Copied: tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/FooConsumer.java (from rev 1287, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/FooConsumer.java)
===================================================================
--- tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/FooConsumer.java (rev 0)
+++ tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/FooConsumer.java 2009-01-29 18:13:55 UTC (rev 1352)
@@ -0,0 +1,14 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import javax.context.RequestScoped;
+import javax.inject.Current;
+
+@RequestScoped
+class FooConsumer
+{
+
+ @Current SerializableFoo foo;
+
+ public void ping(){};
+
+}
Copied: tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Generator.java (from rev 1287, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Generator.java)
===================================================================
--- tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Generator.java (rev 0)
+++ tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Generator.java 2009-01-29 18:13:55 UTC (rev 1352)
@@ -0,0 +1,27 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+
+import java.io.Serializable;
+
+import javax.context.ApplicationScoped;
+import javax.inject.Produces;
+
+@ApplicationScoped
+class Generator implements Serializable
+{
+
+ private static final long serialVersionUID = -7213673465118041882L;
+
+ private int number = 100;
+
+ @Produces int getNumber()
+ {
+ return number;
+ }
+
+ @Produces SerializableFoo getFoo()
+ {
+ return new SerializableFoo();
+ }
+
+}
Copied: tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/NumberConsumer.java (from rev 1287, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/NumberConsumer.java)
===================================================================
--- tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/NumberConsumer.java (rev 0)
+++ tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/NumberConsumer.java 2009-01-29 18:13:55 UTC (rev 1352)
@@ -0,0 +1,14 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import javax.context.RequestScoped;
+import javax.inject.Current;
+
+@RequestScoped
+class NumberConsumer
+{
+
+ @Current int number;
+
+ public void ping(){};
+
+}
Deleted: tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java 2009-01-29 14:40:51 UTC (rev 1284)
+++ tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java 2009-01-29 18:13:55 UTC (rev 1352)
@@ -1,454 +0,0 @@
-package org.jboss.webbeans.tck.unit.context.passivating;
-
-import java.io.IOException;
-import java.util.Set;
-
-import javax.inject.DefinitionException;
-import javax.inject.IllegalProductException;
-import javax.inject.UnserializableDependencyException;
-import javax.inject.manager.Bean;
-
-import org.jboss.webbeans.tck.AbstractTest;
-import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.testng.annotations.Test;
-
-/**
- *
- * @author Nicklas Karlsson
- * @author David Allen
- *
- * Spec version: PRD2
- */
-public class PassivatingContextTest extends AbstractTest
-{
-
- /**
- * Simple Web Beans are not required to be serializable. If a simple Web Bean
- * declares a passivating scope, and the implementation class is not
- * serializable, a DefinitionException is thrown by the Web Bean manager at
- * initialization time.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "8.4")
- public void testSimpleWebBeanWithNonSerializableImplementationClassFails()
- {
- deployBeans(Hamina_Broken.class);
- }
-
- /**
- * Simple Web Beans are not required to be serializable. If a simple Web Bean
- * declares a passivating scope, and the implementation class is not
- * serializable, a DefinitionException is thrown by the Web Bean manager at
- * initialization time.
- */
- @Test(groups = { "contexts", "passivation" })
- @SpecAssertion(section = "8.4")
- public void testSimpleWebBeanWithSerializableImplementationClassOK()
- {
- createSimpleBean(Jyvaskyla.class);
- }
-
- /**
- * the Web Bean declares a passivating scope type, and context passivation
- * occurs, or
- *
- * @throws IOException
- * @throws ClassNotFoundException
- */
- @Test(groups = { "contexts", "passivation", "stub" })
- @SpecAssertion(section = "8.4")
- public void testSimpleWebBeanDeclaringPassivatingScopeIsSerializedWhenContextIsPassivated() throws IOException, ClassNotFoundException
- {
- assert false;
- }
-
- @SuppressWarnings("unchecked")
- private <T> boolean testSerialize(Bean<T> bean) throws IOException, ClassNotFoundException
- {
- manager.addBean(bean);
- T instance = manager.getInstance(bean);
- byte[] data = serialize(instance);
- T resurrected = (T) deserialize(data);
- return resurrected.toString().equals(instance.toString());
- }
-
- /**
- * the Web Bean is an EJB stateful session bean, and it is passivated by the
- * EJB container.
- *
- * @throws ClassNotFoundException
- * @throws IOException
- */
- // TODO requires an EJB instance
- @Test(groups = { "contexts", "passivation", "broken", "stub" })
- @SpecAssertion(section = "8.4")
- public void testStatefulEJBIsSerializedWhenPassivatedByEJBContainer() throws IOException, ClassNotFoundException
- {
- assert false;
- }
-
- /**
- * On the other hand, dependent objects (including interceptors and
- * decorators with scope @Dependent) of a stateful session bean or of a Web
- * Bean with a passivating scope must be serialized and deserialized along
- * with their owner
- */
- @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
- @SpecAssertion(section = "8.4")
- public void testDependentInterceptorsOfStatefulEnterpriseBeanMustBeSerializable()
- {
- deployBeans(Kaarina_Broken.class);
- }
-
- /**
- * On the other hand, dependent objects (including interceptors and
- * decorators with scope @Dependent) of a stateful session bean or of a Web
- * Bean with a passivating scope must be serialized and deserialized along
- * with their owner
- */
- @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
- @SpecAssertion(section = "8.4")
- public void testDependentDecoratorsOfStatefulEnterpriseBeanMustBeSerializable()
- {
- deployBeans(Porvoo_Broken.class);
- }
-
- /**
- * On the other hand, dependent objects (including interceptors and
- * decorators with scope @Dependent) of a stateful session bean or of a Web
- * Bean with a passivating scope must be serialized and deserialized along
- * with their owner
- */
- @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
- @SpecAssertion(section = "8.4")
- public void testDependentInterceptorsOfWebBeanWithPassivatingScopeMustBeSerializable()
- {
- deployBeans(Kotka_Broken.class);
- }
-
- /**
- * On the other hand, dependent objects (including interceptors and
- * decorators with scope @Dependent) of a stateful session bean or of a Web
- * Bean with a passivating scope must be serialized and deserialized along
- * with their owner
- */
- @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
- @SpecAssertion(section = "8.4")
- public void testDependentDecoratorsOfWebBeansWithPassivatingScopeMustBeSerializable()
- {
- deployBeans(Raisio_Broken.class);
- }
-
- /**
- * EJB local objects are serializable. Therefore, any reference to an
- * enterprise Web Bean of scope @Dependent is serializable.
- *
- * @throws ClassNotFoundException
- * @throws IOException
- */
- @Test(groups = { "contexts", "passivation" })
- @SpecAssertion(section = "8.4")
- public void testDependentEJBsAreSerializable() throws IOException, ClassNotFoundException
- {
- deployBeans(Vaasa.class, Helsinki.class);
- Set<Bean<Vaasa>> vaasaBeans = manager.resolveByType(Vaasa.class);
- assert vaasaBeans.size() == 1;
- assert testSerialize(vaasaBeans.iterator().next());
- }
-
- /**
- * If a simple Web Bean of scope @Dependent and a non-serializable
- * implementation class is injected into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * UnserializableDependencyException must be thrown by the Web Bean manager
- * at initialization time.
- */
- @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
- @SpecAssertion(section = "8.4")
- public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoStatefulSessionBeanFails()
- {
- deployBeans(Violation.class, Espoo_Broken.class);
- manager.getInstanceByType(Espoo_Broken.class);
- }
-
- /**
- * If a simple Web Bean of scope @Dependent and a non-serializable
- * implementation class is injected into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * UnserializableDependencyException must be thrown by the Web Bean manager
- * at initialization time.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
- @SpecAssertion(section = "8.4")
- public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoNonTransientFieldOfWebBeanWithPassivatingScopeFails()
- {
- deployBeans(Vantaa_Broken.class, Violation.class);
- }
-
- /**
- * If a simple Web Bean of scope @Dependent and a non-serializable
- * implementation class is injected into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * UnserializableDependencyException must be thrown by the Web Bean manager
- * at initialization time.
- */
- @Test(groups = { "contexts", "passivation" })
- @SpecAssertion(section = "8.4")
- public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoTransientFieldOK()
- {
- createSimpleBean(Joensuu.class);
- }
-
- /**
- * If a simple Web Bean of scope @Dependent and a non-serializable
- * implementation class is injected into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * UnserializableDependencyException must be thrown by the Web Bean manager
- * at initialization time.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
- @SpecAssertion(section = "8.4")
- public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoConstructorParameterOfWebBeanWithPassivatingScopeFails()
- {
- deployBeans(Loviisa_Broken.class, Violation.class);
- }
-
- /**
- * If a simple Web Bean of scope @Dependent and a non-serializable
- * implementation class is injected into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * UnserializableDependencyException must be thrown by the Web Bean manager
- * at initialization time.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
- @SpecAssertion(section = "8.4")
- public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoInitializerParameterOfWebBeanWithPassivatingScopeFails()
- {
- deployBeans(Forssa_Broken.class, Violation.class);
- }
-
- /**
- * If a simple Web Bean of scope @Dependent and a non-serializable
- * implementation class is injected into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * UnserializableDependencyException must be thrown by the Web Bean manager
- * at initialization time.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
- @SpecAssertion(section = "8.4")
- public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoProducerMethodParameterWithPassivatingScopeFails()
- {
- deployBeans(Peraseinajoki.class, Violation.class, Violation2.class);
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- *
- * @throws NoSuchMethodException
- * @throws SecurityException
- */
- @Test(groups = { "contexts", "passivation", "integration", "broken" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "8.4")
- public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoStatefulSessionBeanFails() throws SecurityException, NoSuchMethodException
- {
- deployBeans(CityProducer2.class, Maarianhamina_Broken.class);
- manager.getInstanceByType(Maarianhamina_Broken.class);
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "8.4")
- public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoNonTransientFieldOfWebBeanWithPassivatingScopeFails()
- {
- deployBeans(CityProducer2.class, Nokia_Broken.class);
- manager.getInstanceByType(Nokia_Broken.class).ping();
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- */
- @Test(groups = { "contexts", "passivation" })
- @SpecAssertion(section = "8.4")
- public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoTransientFieldOfWebBeanWithPassivatingScopeOK()
- {
- createSimpleBean(CityProducer2.class);
- createSimpleBean(Hyvinkaa.class);
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "8.4")
- public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoConstructorParameterOfWebBeanWithPassivatingScopeFails()
- {
- deployBeans(CityProducer2.class, Loviisa_Broken.class);
- manager.getInstanceByType(Loviisa_Broken.class).ping();
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "8.4")
- public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoInitializerParameterOfWebBeanWithPassivatingScopeFails()
- {
- deployBeans(CityProducer2.class, Kuopio_Broken.class);
- manager.getInstanceByType(Kuopio_Broken.class).ping();
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "8.4")
- public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoProducerMethodParameterWithPassivatingScopeFails()
- {
- deployBeans(CityProducer2.class, Jamsa_Broken.class);
- manager.getInstanceByType(Jamsa_Broken.class).ping();
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- *
- */
- @Test(groups = { "contexts", "passivation", "stub" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "8.4")
- public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoStatefulSessionBeanFails() throws Exception
- {
- // TODO This doesn't test injction in a SFSB, but into a Enterprise bean
- // deployBeans(CityProducer.class, Pietarsaari_Broken.class);
- // manager.getInstanceByType(Pietarsaari_Broken.class);
- assert false;
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "8.4")
- public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoNonTransientFieldOfWebBeanWithPassivatingScopeFails()
- {
- deployBeans(CityProducer.class, Uusikaupunki_Broken.class);
- manager.getInstanceByType(Uusikaupunki_Broken.class).ping();
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- */
- @Test(groups = { "contexts", "passivation" })
- @SpecAssertion(section = "8.4")
- public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoTransientFieldOfWebBeanWithPassivatingScopeOK()
- {
- deployBeans(CityProducer.class, Salo_Broken.class);
- manager.getInstanceByType(Salo_Broken.class).ping();
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "8.4")
- public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoConstructorParameterOfWebBeanWithPassivatingScopeFails()
- {
- deployBeans(CityProducer.class, Loviisa_Broken.class);
- manager.getInstanceByType(Loviisa_Broken.class).ping();
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "8.4")
- public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoInitializerParameterOfWebBeanWithPassivatingScopeFails()
- {
- deployBeans(CityProducer.class, Mikkeli_Broken.class);
- manager.getInstanceByType(Mikkeli_Broken.class).ping();
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "8.4")
- public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoProducerMethodParameterWithPassivatingScopeFails()
- {
- // TODO Not quite sure what this test is doing
- deployBeans(CityProducer.class, Jamsa_Broken.class);
- manager.getInstanceByType(Jamsa_Broken.class).ping();
- }
-}
Copied: tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java (from rev 1287, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java)
===================================================================
--- tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java (rev 0)
+++ tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java 2009-01-29 18:13:55 UTC (rev 1352)
@@ -0,0 +1,468 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import java.io.IOException;
+import java.util.Set;
+
+import javax.inject.DefinitionException;
+import javax.inject.IllegalProductException;
+import javax.inject.UnserializableDependencyException;
+import javax.inject.manager.Bean;
+
+import org.jboss.webbeans.tck.AbstractTest;
+import org.jboss.webbeans.tck.impl.SpecAssertion;
+import org.testng.annotations.Test;
+
+/**
+ *
+ * @author Nicklas Karlsson
+ * @author David Allen
+ *
+ * Spec version: PRD2
+ */
+public class PassivatingContextTest extends AbstractTest
+{
+
+ /**
+ * Simple Web Beans are not required to be serializable. If a simple Web Bean
+ * declares a passivating scope, and the implementation class is not
+ * serializable, a DefinitionException is thrown by the Web Bean manager at
+ * initialization time.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = "8.4")
+ public void testSimpleWebBeanWithNonSerializableImplementationClassFails()
+ {
+ deployBeans(Hamina_Broken.class);
+ }
+
+ /**
+ * Simple Web Beans are not required to be serializable. If a simple Web Bean
+ * declares a passivating scope, and the implementation class is not
+ * serializable, a DefinitionException is thrown by the Web Bean manager at
+ * initialization time.
+ */
+ @Test(groups = { "contexts", "passivation" })
+ @SpecAssertion(section = "8.4")
+ public void testSimpleWebBeanWithSerializableImplementationClassOK()
+ {
+ createSimpleBean(Jyvaskyla.class);
+ }
+
+ @Test @SpecAssertion(section="8.4")
+ public void testInjectionOfDependentSerializableProductIntoNormalBean()
+ {
+ deployBeans(Generator.class, NumberConsumer.class);
+ manager.getInstanceByType(NumberConsumer.class).ping();
+ }
+
+ @Test @SpecAssertion(section="8.4")
+ public void testInjectionOfDependentPrimitiveProductIntoNormalBean()
+ {
+ deployBeans(Generator.class, FooConsumer.class);
+ manager.getInstanceByType(FooConsumer.class).ping();
+ }
+
+ /**
+ * the Web Bean declares a passivating scope type, and context passivation
+ * occurs, or
+ *
+ * @throws IOException
+ * @throws ClassNotFoundException
+ */
+ @Test(groups = { "contexts", "passivation", "stub" })
+ @SpecAssertion(section = "8.4")
+ public void testSimpleWebBeanDeclaringPassivatingScopeIsSerializedWhenContextIsPassivated() throws IOException, ClassNotFoundException
+ {
+ assert false;
+ }
+
+ @SuppressWarnings("unchecked")
+ private <T> boolean testSerialize(Bean<T> bean) throws IOException, ClassNotFoundException
+ {
+ manager.addBean(bean);
+ T instance = manager.getInstance(bean);
+ byte[] data = serialize(instance);
+ T resurrected = (T) deserialize(data);
+ return resurrected.toString().equals(instance.toString());
+ }
+
+ /**
+ * the Web Bean is an EJB stateful session bean, and it is passivated by the
+ * EJB container.
+ *
+ * @throws ClassNotFoundException
+ * @throws IOException
+ */
+ // TODO requires an EJB instance
+ @Test(groups = { "contexts", "passivation", "broken", "stub" })
+ @SpecAssertion(section = "8.4")
+ public void testStatefulEJBIsSerializedWhenPassivatedByEJBContainer() throws IOException, ClassNotFoundException
+ {
+ assert false;
+ }
+
+ /**
+ * On the other hand, dependent objects (including interceptors and
+ * decorators with scope @Dependent) of a stateful session bean or of a Web
+ * Bean with a passivating scope must be serialized and deserialized along
+ * with their owner
+ */
+ @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
+ @SpecAssertion(section = "8.4")
+ public void testDependentInterceptorsOfStatefulEnterpriseBeanMustBeSerializable()
+ {
+ deployBeans(Kaarina_Broken.class);
+ }
+
+ /**
+ * On the other hand, dependent objects (including interceptors and
+ * decorators with scope @Dependent) of a stateful session bean or of a Web
+ * Bean with a passivating scope must be serialized and deserialized along
+ * with their owner
+ */
+ @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
+ @SpecAssertion(section = "8.4")
+ public void testDependentDecoratorsOfStatefulEnterpriseBeanMustBeSerializable()
+ {
+ deployBeans(Porvoo_Broken.class);
+ }
+
+ /**
+ * On the other hand, dependent objects (including interceptors and
+ * decorators with scope @Dependent) of a stateful session bean or of a Web
+ * Bean with a passivating scope must be serialized and deserialized along
+ * with their owner
+ */
+ @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
+ @SpecAssertion(section = "8.4")
+ public void testDependentInterceptorsOfWebBeanWithPassivatingScopeMustBeSerializable()
+ {
+ deployBeans(Kotka_Broken.class);
+ }
+
+ /**
+ * On the other hand, dependent objects (including interceptors and
+ * decorators with scope @Dependent) of a stateful session bean or of a Web
+ * Bean with a passivating scope must be serialized and deserialized along
+ * with their owner
+ */
+ @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
+ @SpecAssertion(section = "8.4")
+ public void testDependentDecoratorsOfWebBeansWithPassivatingScopeMustBeSerializable()
+ {
+ deployBeans(Raisio_Broken.class);
+ }
+
+ /**
+ * EJB local objects are serializable. Therefore, any reference to an
+ * enterprise Web Bean of scope @Dependent is serializable.
+ *
+ * @throws ClassNotFoundException
+ * @throws IOException
+ */
+ @Test(groups = { "contexts", "passivation" })
+ @SpecAssertion(section = "8.4")
+ public void testDependentEJBsAreSerializable() throws IOException, ClassNotFoundException
+ {
+ deployBeans(Vaasa.class, Helsinki.class);
+ Set<Bean<Vaasa>> vaasaBeans = manager.resolveByType(Vaasa.class);
+ assert vaasaBeans.size() == 1;
+ assert testSerialize(vaasaBeans.iterator().next());
+ }
+
+ /**
+ * If a simple Web Bean of scope @Dependent and a non-serializable
+ * implementation class is injected into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * UnserializableDependencyException must be thrown by the Web Bean manager
+ * at initialization time.
+ */
+ @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
+ @SpecAssertion(section = "8.4")
+ public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoStatefulSessionBeanFails()
+ {
+ deployBeans(Violation.class, Espoo_Broken.class);
+ manager.getInstanceByType(Espoo_Broken.class);
+ }
+
+ /**
+ * If a simple Web Bean of scope @Dependent and a non-serializable
+ * implementation class is injected into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * UnserializableDependencyException must be thrown by the Web Bean manager
+ * at initialization time.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
+ @SpecAssertion(section = "8.4")
+ public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoNonTransientFieldOfWebBeanWithPassivatingScopeFails()
+ {
+ deployBeans(Vantaa_Broken.class, Violation.class);
+ }
+
+ /**
+ * If a simple Web Bean of scope @Dependent and a non-serializable
+ * implementation class is injected into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * UnserializableDependencyException must be thrown by the Web Bean manager
+ * at initialization time.
+ */
+ @Test(groups = { "contexts", "passivation" })
+ @SpecAssertion(section = "8.4")
+ public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoTransientFieldOK()
+ {
+ createSimpleBean(Joensuu.class);
+ }
+
+ /**
+ * If a simple Web Bean of scope @Dependent and a non-serializable
+ * implementation class is injected into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * UnserializableDependencyException must be thrown by the Web Bean manager
+ * at initialization time.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
+ @SpecAssertion(section = "8.4")
+ public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoConstructorParameterOfWebBeanWithPassivatingScopeFails()
+ {
+ deployBeans(Loviisa_Broken.class, Violation.class);
+ }
+
+ /**
+ * If a simple Web Bean of scope @Dependent and a non-serializable
+ * implementation class is injected into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * UnserializableDependencyException must be thrown by the Web Bean manager
+ * at initialization time.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
+ @SpecAssertion(section = "8.4")
+ public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoInitializerParameterOfWebBeanWithPassivatingScopeFails()
+ {
+ deployBeans(Forssa_Broken.class, Violation.class);
+ }
+
+ /**
+ * If a simple Web Bean of scope @Dependent and a non-serializable
+ * implementation class is injected into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * UnserializableDependencyException must be thrown by the Web Bean manager
+ * at initialization time.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
+ @SpecAssertion(section = "8.4")
+ public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoProducerMethodParameterWithPassivatingScopeFails()
+ {
+ deployBeans(Peraseinajoki.class, Violation.class, Violation2.class);
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ *
+ * @throws NoSuchMethodException
+ * @throws SecurityException
+ */
+ @Test(groups = { "contexts", "passivation", "integration", "broken" }, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "8.4")
+ public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoStatefulSessionBeanFails() throws SecurityException, NoSuchMethodException
+ {
+ deployBeans(CityProducer2.class, Maarianhamina_Broken.class);
+ manager.getInstanceByType(Maarianhamina_Broken.class);
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "8.4")
+ public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoNonTransientFieldOfWebBeanWithPassivatingScopeFails()
+ {
+ deployBeans(CityProducer2.class, Nokia_Broken.class);
+ manager.getInstanceByType(Nokia_Broken.class).ping();
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ */
+ @Test(groups = { "contexts", "passivation" })
+ @SpecAssertion(section = "8.4")
+ public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoTransientFieldOfWebBeanWithPassivatingScopeOK()
+ {
+ createSimpleBean(CityProducer2.class);
+ createSimpleBean(Hyvinkaa.class);
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "8.4")
+ public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoConstructorParameterOfWebBeanWithPassivatingScopeFails()
+ {
+ deployBeans(CityProducer2.class, Loviisa_Broken.class);
+ manager.getInstanceByType(Loviisa_Broken.class).ping();
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "8.4")
+ public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoInitializerParameterOfWebBeanWithPassivatingScopeFails()
+ {
+ deployBeans(CityProducer2.class, Kuopio_Broken.class);
+ manager.getInstanceByType(Kuopio_Broken.class).ping();
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "8.4")
+ public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoProducerMethodParameterWithPassivatingScopeFails()
+ {
+ deployBeans(CityProducer2.class, Jamsa_Broken.class);
+ manager.getInstanceByType(Jamsa_Broken.class).ping();
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ *
+ */
+ @Test(groups = { "contexts", "passivation", "stub" }, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "8.4")
+ public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoStatefulSessionBeanFails() throws Exception
+ {
+ // TODO This doesn't test injction in a SFSB, but into a Enterprise bean
+ // deployBeans(CityProducer.class, Pietarsaari_Broken.class);
+ // manager.getInstanceByType(Pietarsaari_Broken.class);
+ assert false;
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "8.4")
+ public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoNonTransientFieldOfWebBeanWithPassivatingScopeFails()
+ {
+ deployBeans(CityProducer.class, Uusikaupunki_Broken.class);
+ manager.getInstanceByType(Uusikaupunki_Broken.class).ping();
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ */
+ @Test(groups = { "contexts", "passivation" })
+ @SpecAssertion(section = "8.4")
+ public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoTransientFieldOfWebBeanWithPassivatingScopeOK()
+ {
+ deployBeans(CityProducer.class, Salo_Broken.class);
+ manager.getInstanceByType(Salo_Broken.class).ping();
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "8.4")
+ public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoConstructorParameterOfWebBeanWithPassivatingScopeFails()
+ {
+ deployBeans(CityProducer.class, Loviisa_Broken.class);
+ manager.getInstanceByType(Loviisa_Broken.class).ping();
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "8.4")
+ public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoInitializerParameterOfWebBeanWithPassivatingScopeFails()
+ {
+ deployBeans(CityProducer.class, Mikkeli_Broken.class);
+ manager.getInstanceByType(Mikkeli_Broken.class).ping();
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "8.4")
+ public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoProducerMethodParameterWithPassivatingScopeFails()
+ {
+ // TODO Not quite sure what this test is doing
+ deployBeans(CityProducer.class, Jamsa_Broken.class);
+ manager.getInstanceByType(Jamsa_Broken.class).ping();
+ }
+}
Copied: tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/SerializableFoo.java (from rev 1287, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/SerializableFoo.java)
===================================================================
--- tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/SerializableFoo.java (rev 0)
+++ tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/SerializableFoo.java 2009-01-29 18:13:55 UTC (rev 1352)
@@ -0,0 +1,8 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import java.io.Serializable;
+
+public class SerializableFoo implements Serializable
+{
+
+}
Deleted: tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/event/BindingTypeCBinding.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/BindingTypeCBinding.java 2009-01-29 14:40:51 UTC (rev 1284)
+++ tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/event/BindingTypeCBinding.java 2009-01-29 18:13:55 UTC (rev 1352)
@@ -1,20 +0,0 @@
-package org.jboss.webbeans.tck.unit.event;
-
-import javax.inject.AnnotationLiteral;
-
-public class BindingTypeCBinding extends AnnotationLiteral<BindingTypeC> implements BindingTypeC
-{
-
- private String stringValue;
-
- public BindingTypeCBinding(String value)
- {
- this.stringValue = value;
- }
-
- @Override
- public String value()
- {
- return this.stringValue;
- }
-}
Copied: tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/event/BindingTypeCBinding.java (from rev 1286, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/BindingTypeCBinding.java)
===================================================================
--- tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/event/BindingTypeCBinding.java (rev 0)
+++ tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/event/BindingTypeCBinding.java 2009-01-29 18:13:55 UTC (rev 1352)
@@ -0,0 +1,19 @@
+package org.jboss.webbeans.tck.unit.event;
+
+import javax.inject.AnnotationLiteral;
+
+public class BindingTypeCBinding extends AnnotationLiteral<BindingTypeC> implements BindingTypeC
+{
+
+ private String stringValue;
+
+ public BindingTypeCBinding(String value)
+ {
+ this.stringValue = value;
+ }
+
+ public String value()
+ {
+ return this.stringValue;
+ }
+}
Deleted: tck/tags/1.0.0.ALPHA1/pom.xml
===================================================================
--- tck/trunk/pom.xml 2009-01-29 14:40:51 UTC (rev 1284)
+++ tck/tags/1.0.0.ALPHA1/pom.xml 2009-01-29 18:13:55 UTC (rev 1352)
@@ -1,254 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.webbeans.tck</groupId>
- <artifactId>parent</artifactId>
- <packaging>pom</packaging>
- <version>1.0.0-SNAPSHOT</version>
- <name>Web Beans</name>
- <url>http://www.seamframework.org/WebBeans</url>
-
- <description>
- The TCK of JSR 299: Web Beans
- </description>
-
- <developers>
- <developer>
- <name>Pete Muir</name>
- <email>pete.muir(a)jboss.org</email>
- <organization>JBoss, a division of Red Hat</organization>
- <url>http://in.relation.to/Bloggers/Pete</url>
- </developer>
-
- <developer>
- <name>Shane Bryzak</name>
- <organization>JBoss, a division of Red Hat</organization>
- </developer>
-
- <developer>
- <name>David Allen</name>
- </developer>
-
- <developer>
- <name>Nicklas Karlsson</name>
- </developer>
- </developers>
-
- <repositories>
- <repository>
- <id>repository.jboss.org</id>
- <name>JBoss Repository</name>
- <url>http://repository.jboss.org/maven2</url>
- </repository>
- <repository>
- <id>snapshots.jboss.org</id>
- <name>JBoss Repository</name>
- <url>http://snapshots.jboss.org/maven2</url>
- </repository>
- </repositories>
-
- <pluginRepositories>
- <pluginRepository>
- <id>repository.jboss.org</id>
- <name>JBoss Repository</name>
- <url>http://repository.jboss.org/maven2</url>
- </pluginRepository>
- </pluginRepositories>
-
- <modules>
- <module>api</module>
- <module>impl</module>
- </modules>
-
- <dependencyManagement>
- <dependencies>
-
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <version>5.8</version>
- <classifier>jdk15</classifier>
- </dependency>
-
- <dependency>
- <groupId>javax.annotation</groupId>
- <artifactId>jsr250-api</artifactId>
- <version>1.0</version>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.5</version>
- </dependency>
- <dependency>
- <groupId>javax.transaction</groupId>
- <artifactId>jta</artifactId>
- <version>1.0.1B</version>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.14</version>
- </dependency>
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- <version>1.2</version>
- </dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <version>1.2_10</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.webbeans</groupId>
- <artifactId>webbeans-api</artifactId>
- <version>${webbeans.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.webbeans.tck</groupId>
- <artifactId>webbeans-tck-api</artifactId>
- <version>${webbeans.tck.version}</version>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>tck-utils</artifactId>
- <version>0.9-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-api</artifactId>
- <version>3.1.0-Alpha1</version>
- <exclusions>
- <exclusion>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>javax.persistence</groupId>
- <artifactId>persistence-api</artifactId>
- <version>1.0</version>
- </dependency>
-
-
- </dependencies>
- </dependencyManagement>
-
- <build>
- <extensions>
- <extension>
- <groupId>org.apache.maven.wagon</groupId>
- <artifactId>wagon-webdav</artifactId>
- <version>1.0-beta-2</version>
- </extension>
- </extensions>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-sources</id>
- <phase>verify</phase>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>apt-maven-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>test-process</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <testOutputDirectory>${project.build.directory}/site</testOutputDirectory>
- </configuration>
- </plugin>
- </plugins>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.0.2</version>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifest>
- <addDefaultImplementationEntries>
- true
- </addDefaultImplementationEntries>
- <addDefaultSpecificationEntries>
- true
- </addDefaultSpecificationEntries>
- </manifest>
- </archive>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
-
- <ciManagement>
- <system>Hudson</system>
- <url></url>
- </ciManagement>
-
- <issueManagement>
- <system>JIRA</system>
- <url>http://jira.jboss.org/browse/WBTCK</url>
- </issueManagement>
-
- <inceptionYear>2008</inceptionYear>
-
- <licenses>
- <license>
- <name>Apache License, Version 2.0</name>
- <url>http://www.apache.org/licenses/LICENSE-2.0</url>
- </license>
- </licenses>
-
- <scm>
- <connection>http://anonsvn.jboss.org/repos/webbeans</connection>
- <developerConnection>
- https://svn.jboss.org/repos/webbeans
- </developerConnection>
- <url>http://fisheye.jboss.org/browse/WebBeans</url>
- </scm>
-
- <distributionManagement>
- <repository>
- <!-- Copy the dist to the local checkout of the JBoss maven2 repo ${maven.repository.root} -->
- <!-- It is anticipated that ${maven.repository.root} be set in user's settings.xml -->
- <!-- todo : replace this with direct svn access once the svnkit providers are available -->
- <id>repository.jboss.org</id>
- <url>file://${maven.repository.root}</url>
- </repository>
- <snapshotRepository>
- <id>snapshots.jboss.org</id>
- <name>JBoss Snapshot Repository</name>
- <url>dav:https://snapshots.jboss.org/maven2</url>
- </snapshotRepository>
- </distributionManagement>
-
- <properties>
- <webbeans.version>1.0.0-SNAPSHOT</webbeans.version>
- <webbeans.tck.version>1.0.0-SNAPSHOT</webbeans.tck.version>
- </properties>
-
-</project>
Copied: tck/tags/1.0.0.ALPHA1/pom.xml (from rev 1351, tck/trunk/pom.xml)
===================================================================
--- tck/tags/1.0.0.ALPHA1/pom.xml (rev 0)
+++ tck/tags/1.0.0.ALPHA1/pom.xml 2009-01-29 18:13:55 UTC (rev 1352)
@@ -0,0 +1,262 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.webbeans.tck</groupId>
+ <artifactId>parent</artifactId>
+ <packaging>pom</packaging>
+ <version>1.0.0.ALPHA1</version>
+ <name>Web Beans</name>
+ <url>http://www.seamframework.org/WebBeans</url>
+
+ <description>
+ The TCK of JSR 299: Web Beans
+ </description>
+
+ <developers>
+ <developer>
+ <name>Pete Muir</name>
+ <email>pete.muir(a)jboss.org</email>
+ <organization>JBoss, a division of Red Hat</organization>
+ <url>http://in.relation.to/Bloggers/Pete</url>
+ </developer>
+
+ <developer>
+ <name>Shane Bryzak</name>
+ <organization>JBoss, a division of Red Hat</organization>
+ </developer>
+
+ <developer>
+ <name>David Allen</name>
+ </developer>
+
+ <developer>
+ <name>Nicklas Karlsson</name>
+ </developer>
+ </developers>
+
+ <repositories>
+ <repository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <url>http://repository.jboss.org/maven2</url>
+ </repository>
+ <repository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Repository</name>
+ <url>http://snapshots.jboss.org/maven2</url>
+ </repository>
+ </repositories>
+
+ <pluginRepositories>
+ <pluginRepository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <url>http://repository.jboss.org/maven2</url>
+ </pluginRepository>
+ </pluginRepositories>
+
+ <modules>
+ <module>api</module>
+ <module>impl</module>
+ </modules>
+
+ <dependencyManagement>
+ <dependencies>
+
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>5.8</version>
+ <classifier>jdk15</classifier>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.annotation</groupId>
+ <artifactId>jsr250-api</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ <version>1.0.1B</version>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>1.2_10</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.webbeans</groupId>
+ <artifactId>webbeans-api</artifactId>
+ <version>${webbeans.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.webbeans.tck</groupId>
+ <artifactId>webbeans-tck-api</artifactId>
+ <version>${webbeans.tck.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>tck-utils</artifactId>
+ <version>0.9-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.ejb3</groupId>
+ <artifactId>jboss-ejb3-api</artifactId>
+ <version>3.1.0-Alpha1</version>
+ <exclusions>
+ <exclusion>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>javax.persistence</groupId>
+ <artifactId>persistence-api</artifactId>
+ <version>1.0</version>
+ </dependency>
+
+
+ </dependencies>
+ </dependencyManagement>
+
+ <build>
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-webdav</artifactId>
+ <version>1.0-beta-2</version>
+ </extension>
+ </extensions>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>apt-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test-process</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <testOutputDirectory>${project.build.directory}/site</testOutputDirectory>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.0-beta-8</version>
+ <configuration>
+ <tagBase>https://svn.jboss.org/repos/webbeans/tck/tags</tagBase>
+ <autoVersionSubmodules>true</autoVersionSubmodules>
+ <allowTimestampedSnapshots>true</allowTimestampedSnapshots>
+ </configuration>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addDefaultImplementationEntries>
+ true
+ </addDefaultImplementationEntries>
+ <addDefaultSpecificationEntries>
+ true
+ </addDefaultSpecificationEntries>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <ciManagement>
+ <system>Hudson</system>
+ <url />
+ </ciManagement>
+
+ <issueManagement>
+ <system>JIRA</system>
+ <url>http://jira.jboss.org/browse/WBTCK</url>
+ </issueManagement>
+
+ <inceptionYear>2008</inceptionYear>
+
+ <licenses>
+ <license>
+ <name>Apache License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0</url>
+ </license>
+ </licenses>
+
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/webbeans/1.0.0.ALPHA1</connection>
+ <developerConnection>
+ scm:svn:https://svn.jboss.org/repos/webbeans/tck/tags/1.0.0.ALPHA1
+ </developerConnection>
+ <url>http://fisheye.jboss.org/browse/WebBeans/1.0.0.ALPHA1</url>
+ </scm>
+
+ <distributionManagement>
+ <repository>
+ <!-- Copy the dist to the local checkout of the JBoss maven2 repo ${maven.repository.root} -->
+ <!-- It is anticipated that ${maven.repository.root} be set in user's settings.xml -->
+ <!-- todo : replace this with direct svn access once the svnkit providers are available -->
+ <id>repository.jboss.org</id>
+ <url>file://${maven.repository.root}</url>
+ </repository>
+ <snapshotRepository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshot Repository</name>
+ <url>dav:https://snapshots.jboss.org/maven2</url>
+ </snapshotRepository>
+ </distributionManagement>
+
+ <properties>
+ <webbeans.version>1.0.0.ALPHA2</webbeans.version>
+ <webbeans.tck.version>1.0.0.ALPHA1</webbeans.tck.version>
+ </properties>
+
+</project>
15 years, 11 months
[webbeans-commits] Webbeans SVN: r1351 - in tck/trunk: api and 1 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-01-29 13:13:41 -0500 (Thu, 29 Jan 2009)
New Revision: 1351
Modified:
tck/trunk/api/pom.xml
tck/trunk/impl/pom.xml
tck/trunk/pom.xml
Log:
[maven-release-plugin] prepare release 1.0.0.ALPHA1
Modified: tck/trunk/api/pom.xml
===================================================================
--- tck/trunk/api/pom.xml 2009-01-29 18:12:43 UTC (rev 1350)
+++ tck/trunk/api/pom.xml 2009-01-29 18:13:41 UTC (rev 1351)
@@ -17,15 +17,13 @@
limitations under the License.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jboss.webbeans.tck</groupId>
<artifactId>parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.0.ALPHA1</version>
</parent>
<groupId>org.jboss.webbeans.tck</groupId>
Modified: tck/trunk/impl/pom.xml
===================================================================
--- tck/trunk/impl/pom.xml 2009-01-29 18:12:43 UTC (rev 1350)
+++ tck/trunk/impl/pom.xml 2009-01-29 18:13:41 UTC (rev 1351)
@@ -1,11 +1,9 @@
<?xml version="1.0"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>parent</artifactId>
<groupId>org.jboss.webbeans.tck</groupId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.0.ALPHA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.webbeans.tck</groupId>
Modified: tck/trunk/pom.xml
===================================================================
--- tck/trunk/pom.xml 2009-01-29 18:12:43 UTC (rev 1350)
+++ tck/trunk/pom.xml 2009-01-29 18:13:41 UTC (rev 1351)
@@ -1,12 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.webbeans.tck</groupId>
<artifactId>parent</artifactId>
<packaging>pom</packaging>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.0.ALPHA1</version>
<name>Web Beans</name>
<url>http://www.seamframework.org/WebBeans</url>
@@ -216,7 +214,7 @@
<ciManagement>
<system>Hudson</system>
- <url></url>
+ <url />
</ciManagement>
<issueManagement>
@@ -234,11 +232,11 @@
</licenses>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/webbeans</connection>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/webbeans/1.0.0.ALPHA1</connection>
<developerConnection>
- scm:svn:https://svn.jboss.org/repos/webbeans
+ scm:svn:https://svn.jboss.org/repos/webbeans/tck/tags/1.0.0.ALPHA1
</developerConnection>
- <url>http://fisheye.jboss.org/browse/WebBeans</url>
+ <url>http://fisheye.jboss.org/browse/WebBeans/1.0.0.ALPHA1</url>
</scm>
<distributionManagement>
15 years, 11 months
[webbeans-commits] Webbeans SVN: r1350 - tck/trunk.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-01-29 13:12:43 -0500 (Thu, 29 Jan 2009)
New Revision: 1350
Modified:
tck/trunk/pom.xml
Log:
prep for release
Modified: tck/trunk/pom.xml
===================================================================
--- tck/trunk/pom.xml 2009-01-29 18:12:11 UTC (rev 1349)
+++ tck/trunk/pom.xml 2009-01-29 18:12:43 UTC (rev 1350)
@@ -179,7 +179,7 @@
<configuration>
<tagBase>https://svn.jboss.org/repos/webbeans/tck/tags</tagBase>
<autoVersionSubmodules>true</autoVersionSubmodules>
- <allowTimestampedSnapshots>true</true>
+ <allowTimestampedSnapshots>true</allowTimestampedSnapshots>
</configuration>
</plugin>
</plugins>
15 years, 11 months
[webbeans-commits] Webbeans SVN: r1349 - tck/trunk.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-01-29 13:12:11 -0500 (Thu, 29 Jan 2009)
New Revision: 1349
Modified:
tck/trunk/pom.xml
Log:
prep for release
Modified: tck/trunk/pom.xml
===================================================================
--- tck/trunk/pom.xml 2009-01-29 18:11:10 UTC (rev 1348)
+++ tck/trunk/pom.xml 2009-01-29 18:12:11 UTC (rev 1349)
@@ -179,6 +179,7 @@
<configuration>
<tagBase>https://svn.jboss.org/repos/webbeans/tck/tags</tagBase>
<autoVersionSubmodules>true</autoVersionSubmodules>
+ <allowTimestampedSnapshots>true</true>
</configuration>
</plugin>
</plugins>
15 years, 11 months
[webbeans-commits] Webbeans SVN: r1348 - tck/trunk.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-01-29 13:11:10 -0500 (Thu, 29 Jan 2009)
New Revision: 1348
Modified:
tck/trunk/pom.xml
Log:
prep for release
Modified: tck/trunk/pom.xml
===================================================================
--- tck/trunk/pom.xml 2009-01-29 18:10:59 UTC (rev 1347)
+++ tck/trunk/pom.xml 2009-01-29 18:11:10 UTC (rev 1348)
@@ -59,7 +59,7 @@
<modules>
<module>api</module>
-<!-- <module>impl</module>-->
+ <module>impl</module>
</modules>
<dependencyManagement>
15 years, 11 months
[webbeans-commits] Webbeans SVN: r1344 - in tck/tags: 1.0.0.ALPHA1 and 4 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-01-29 13:09:07 -0500 (Thu, 29 Jan 2009)
New Revision: 1344
Added:
tck/tags/1.0.0.ALPHA1/
tck/tags/1.0.0.ALPHA1/api/pom.xml
tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java
tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/Farm.java
tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/Horse.java
tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/Stable.java
tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/FooConsumer.java
tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Generator.java
tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/NumberConsumer.java
tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java
tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/SerializableFoo.java
tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/event/BindingTypeCBinding.java
tck/tags/1.0.0.ALPHA1/pom.xml
Removed:
tck/tags/1.0.0.ALPHA1/api/pom.xml
tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java
tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java
tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/event/BindingTypeCBinding.java
tck/tags/1.0.0.ALPHA1/pom.xml
Log:
[maven-release-plugin] copy for tag 1.0.0.ALPHA1
Copied: tck/tags/1.0.0.ALPHA1 (from rev 1284, tck/trunk)
Deleted: tck/tags/1.0.0.ALPHA1/api/pom.xml
===================================================================
--- tck/trunk/api/pom.xml 2009-01-29 14:40:51 UTC (rev 1284)
+++ tck/tags/1.0.0.ALPHA1/api/pom.xml 2009-01-29 18:09:07 UTC (rev 1344)
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-JBoss, Home of Professional Open Source
-Copyright 2008, Red Hat Middleware LLC, and individual contributors
-by the @authors tag. See the copyright.txt in the distribution for a
-full listing of individual contributors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-http://www.apache.org/licenses/LICENSE-2.0
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.jboss.webbeans.tck</groupId>
- <artifactId>parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.jboss.webbeans.tck</groupId>
- <artifactId>webbeans-tck-api</artifactId>
- <packaging>jar</packaging>
- <name>Web Beans TCK API</name>
- <url>http://www.seamframework.org/WebBeans</url>
-
- <dependencies>
-
- <dependency>
- <groupId>org.jboss.webbeans</groupId>
- <artifactId>webbeans-api</artifactId>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.2</version>
- <configuration>
- <archive>
- <manifest>
- <mainClass>org.jboss.webbeans.tck.api.WebBeansTCK</mainClass>
- </manifest>
- </archive>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-
-
-</project>
Copied: tck/tags/1.0.0.ALPHA1/api/pom.xml (from rev 1342, tck/trunk/api/pom.xml)
===================================================================
--- tck/tags/1.0.0.ALPHA1/api/pom.xml (rev 0)
+++ tck/tags/1.0.0.ALPHA1/api/pom.xml 2009-01-29 18:09:07 UTC (rev 1344)
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2008, Red Hat Middleware LLC, and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.jboss.webbeans.tck</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0.0.ALPHA1</version>
+ </parent>
+
+ <groupId>org.jboss.webbeans.tck</groupId>
+ <artifactId>webbeans-tck-api</artifactId>
+ <packaging>jar</packaging>
+ <name>Web Beans TCK API</name>
+ <url>http://www.seamframework.org/WebBeans</url>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.jboss.webbeans</groupId>
+ <artifactId>webbeans-api</artifactId>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.2</version>
+ <configuration>
+ <archive>
+ <manifest>
+ <mainClass>org.jboss.webbeans.tck.api.WebBeansTCK</mainClass>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+
+
+</project>
Deleted: tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java 2009-01-29 14:40:51 UTC (rev 1284)
+++ tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java 2009-01-29 18:09:07 UTC (rev 1344)
@@ -1,626 +0,0 @@
-package org.jboss.webbeans.tck.unit.context.dependent;
-
-import static org.jboss.webbeans.tck.impl.WebBeansTCKImpl.configuration;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.Set;
-
-import javax.context.Context;
-import javax.context.ContextNotActiveException;
-import javax.context.Dependent;
-import javax.inject.manager.Bean;
-
-import org.jboss.webbeans.tck.AbstractTest;
-import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.util.MockCreationalContext;
-import org.testng.annotations.Test;
-
-/**
- * Spec version: PRD2
- */
-public class DependentContextTest extends AbstractTest
-{
- /**
- * No injected instance of the (@Dependent-scoped) Web Bean is ever shared between multiple
- * injection points.
- */
- @Test(groups = { "contexts", "injection" })
- @SpecAssertion(section = "8.3")
- public void testInstanceNotSharedBetweenInjectionPoints()
- {
- deployBeans(Fox.class, FoxRun.class);
- Set<Bean<Fox>> foxBeans = manager.resolveByType(Fox.class);
- assert foxBeans.size() == 1;
- Bean<Fox> foxBean = foxBeans.iterator().next();
- Set<Bean<FoxRun>> foxRunBeans = manager.resolveByType(FoxRun.class);
- assert foxRunBeans.size() == 1;
- Bean<FoxRun> foxRunBean = foxRunBeans.iterator().next();
- manager.addBean(foxBean);
- FoxRun foxRun = foxRunBean.create(new MockCreationalContext<FoxRun>());
- assert !foxRun.fox.equals(foxRun.anotherFox);
- }
-
- /**
- * Any instance of the (@Dependent-scoped) Web Bean that is used to evaluate a Unified EL
- * expression exists to service that evaluation only.
- */
- @Test(groups = { "contexts", "el"})
- @SpecAssertion(section = "8.3")
- public void testInstanceUsedForElEvaluationNotShared() throws Exception
- {
- deployBeans(Fox.class);
- new RunInDependentContext()
- {
- @Override
- protected void execute() throws Exception
- {
- Set<Bean<Fox>> foxBeans = manager.resolveByType(Fox.class);
- assert foxBeans.size() == 1;
- Bean<Fox> foxBean = foxBeans.iterator().next();
- manager.addBean(foxBean);
-
- Fox fox1 = configuration().getContainers().evaluateValueExpression("#{fox}", Fox.class);
- Fox fox2 = configuration().getContainers().evaluateValueExpression("#{fox}", Fox.class);
- assert !fox1.equals(fox2);
- }
- }.run();
- }
-
- /**
- * Any instance of the (@Dependent-scoped) Web Bean that receives a producer method, producer
- * field, disposal method or observer method invocation exists to service
- * that invocation only
- */
- @Test(groups = { "contexts", "producerMethod" })
- @SpecAssertion(section = "8.3")
- public void testInstanceUsedForProducerMethodNotShared() throws Exception
- {
- Bean<SpiderProducer> spiderProducer = createSimpleBean(SpiderProducer.class);
- manager.addBean(spiderProducer);
- Method method = SpiderProducer.class.getMethod("produceTarantula");
- Bean<Tarantula> tarantulaBean = createProducerMethodBean(method, spiderProducer);
- Tarantula tarantula = tarantulaBean.create(new MockCreationalContext<Tarantula>());
- Tarantula tarantula2 = tarantulaBean.create(new MockCreationalContext<Tarantula>());
- assert tarantula != null;
- assert tarantula2 != null;
- assert tarantula != tarantula2;
- }
-
- /**
- * Any instance of the (@Dependent-scoped) Web Bean that receives a producer method, producer
- * field, disposal method or observer method invocation exists to service
- * that invocation only
- */
- @Test(groups = { "contexts", "producerMethod" })
- @SpecAssertion(section = "8.3")
- public void testInstanceUsedForProducerFieldNotShared() throws Exception
- {
- Bean<OtherSpiderProducer> spiderProducer = createSimpleBean(OtherSpiderProducer.class);
- manager.addBean(spiderProducer);
- Field field = OtherSpiderProducer.class.getField("produceTarantula");
- Bean<Tarantula> tarantulaBean = createProducerFieldBean(field, spiderProducer);
- Tarantula tarantula = tarantulaBean.create(new MockCreationalContext<Tarantula>());
- Tarantula tarantula2 = tarantulaBean.create(new MockCreationalContext<Tarantula>());
- assert tarantula != null;
- assert tarantula2 != null;
- assert tarantula != tarantula2;
- }
-
- /**
- * Any instance of the (@Dependent-scoped) Web Bean that receives a producer method, producer
- * field, disposal method or observer method invocation exists to service
- * that invocation only
- */
- @Test(groups = { "stub", "contexts", "disposalMethod" })
- @SpecAssertion(section = "8.3")
- public void testInstanceUsedForDisposalMethodNotShared()
- {
- assert false;
- }
-
- /**
- * Any instance of the (@Dependent-scoped) Web Bean that receives a producer method, producer
- * field, disposal method or observer method invocation exists to service
- * that invocation only
- */
- @Test(groups = { "stub", "contexts", "observerMethod" })
- @SpecAssertion(section = "8.3")
- public void testInstanceUsedForObserverMethodNotShared()
- {
- assert false;
- }
-
- /**
- * Every invocation of the get() operation of the Context object for the @Dependent
- * scope with the value true for the create parameter returns a new instance
- * of the given Web Bean
- */
- @Test(groups = "contexts")
- @SpecAssertion(section = "8.3")
- public void testContextGetWithCreateTrueReturnsNewInstance() throws Exception
- {
- deployBeans(Fox.class);
- new RunInDependentContext()
- {
-
- @Override
- protected void execute() throws Exception
- {
- Set<Bean<Fox>> foxBeans = manager.resolveByType(Fox.class);
- assert foxBeans.size() == 1;
- Bean<Fox> foxBean = foxBeans.iterator().next();
- Context context = manager.getContext(Dependent.class);
- assert context.get(foxBean, new MockCreationalContext<Fox>()) != null;
- assert context.get(foxBean, new MockCreationalContext<Fox>()) instanceof Fox;
- }
-
- }.run();
- }
-
- /**
- * Every invocation of the get() operation of the Context object for the @Dependent
- * scope with the value false for the create parameter returns a null value
- */
- @Test(groups = "contexts")
- @SpecAssertion(section = "8.3")
- public void testContextGetWithCreateFalseReturnsNull() throws Exception
- {
- deployBeans(Fox.class);
- new RunInDependentContext()
- {
-
- @Override
- protected void execute() throws Exception
- {
- Set<Bean<Fox>> foxBeans = manager.resolveByType(Fox.class);
- assert foxBeans.size() == 1;
- Bean<Fox> foxBean = foxBeans.iterator().next();
- Context context = manager.getContext(Dependent.class);
- assert context.get(foxBean, null) == null;
- }
-
- }.run();
- }
-
- /**
- * The @Dependent scope is inactive except:
- */
- @Test(groups = {"contexts"}, expectedExceptions = ContextNotActiveException.class)
- @SpecAssertion(section = "8.3")
- public void testContextIsInactive()
- {
- assert !manager.getContext(Dependent.class).isActive();
- }
-
- /**
- * when an instance of a Web Bean with scope @Dependent is created by the Web
- * Bean manager to receive a producer method, producer field, disposal method
- * or observer method invocation, or
- */
- @Test(groups = { "stub", "contexts", "producerMethod" })
- @SpecAssertion(section = "8.3")
- public void testContextIsActiveWhenInvokingProducerMethod()
- {
- assert false;
- }
-
- /**
- * when an instance of a Web Bean with scope @Dependent is created by the Web
- * Bean manager to receive a producer method, producer field, disposal method
- * or observer method invocation, or
- */
- @Test(groups = { "stub", "contexts", "producerField" })
- @SpecAssertion(section = "8.3")
- public void testContextIsActiveWhenInvokingProducerField()
- {
- assert false;
- //assert manager.getContext(Dependent.class).isActive();
- }
-
- /**
- * when an instance of a Web Bean with scope @Dependent is created by the Web
- * Bean manager to receive a producer method, producer field, disposal method
- * or observer method invocation, or
- */
- @Test(groups = { "stub", "contexts", "disposalMethod" })
- @SpecAssertion(section = "8.3")
- public void testContextIsActiveWhenInvokingDisposalMethod()
- {
- assert false;
- }
-
- /**
- * when an instance of a Web Bean with scope @Dependent is created by the Web
- * Bean manager to receive a producer method, producer field, disposal method
- * or observer method invocation, or
- */
- @Test(groups = { "stub", "contexts", "observerMethod" })
- @SpecAssertion(section = "8.3")
- public void testContextIsActiveWhenInvokingObserverMethod()
- {
- assert false;
- }
-
- /**
- * while a Unified EL expression is evaluated, or
- */
- @Test(groups = { "stub", "contexts", "el" })
- @SpecAssertion(section = "8.3")
- public void testContextIsActiveWhenEvaluatingElExpression()
- {
- assert false;
- }
-
- /**
- * when the Web Bean manager is creating or destroying a Web Bean instance or
- * injecting its dependencies, or
- */
- @Test(groups = { "contexts", "beanLifecycle" })
- @SpecAssertion(section = "8.3")
- public void testContextIsActiveDuringBeanCreation()
- {
- // Slightly roundabout, but I can't see a better way to test atm
- Bean<FoxRun> foxRunBean = createSimpleBean(FoxRun.class);
- Bean<Fox> foxBean = createSimpleBean(Fox.class);
- manager.addBean(foxBean);
- FoxRun foxRun = foxRunBean.create(new MockCreationalContext<FoxRun>());
- assert foxRun.fox != null;
- }
-
- /**
- * when the Web Bean manager is creating or destroying a Web Bean instance or
- * injecting its dependencies, or
- */
- @Test(groups = { "stub", "contexts", "beanDestruction" })
- @SpecAssertion(section = "8.3")
- public void testContextIsActiveDuringBeanDestruction()
- {
- assert false;
- }
-
- /**
- * when the Web Bean manager is creating or destroying a Web Bean instance or
- * injecting its dependencies, or
- */
- @Test(groups = { "contexts", "injection" })
- @SpecAssertion(section = "8.4")
- public void testContextIsActiveDuringInjection()
- {
- Bean<FoxRun> foxRunBean = createSimpleBean(FoxRun.class);
- Bean<Fox> foxBean = createSimpleBean(Fox.class);
- manager.addBean(foxBean);
- FoxRun foxRun = foxRunBean.create(new MockCreationalContext<FoxRun>());
- assert foxRun.fox != null;
- }
-
- /**
- * when the Web Bean manager is injecting dependencies of an EJB bean or
- * Servlet or when an EJB bean @PostConstruct or @PreDestroy callback is
- * invoked by the EJB container
- */
- @Test(groups = { "contexts", "injection", "stub", "ejb3" })
- @SpecAssertion(section = "8.3")
- public void testContextIsActiveDuringEJBDependencyInjection()
- {
- assert false;
- }
-
- /**
- * when the Web Bean manager is injecting dependencies of an EJB bean or
- * Servlet or when an EJB bean @PostConstruct or @PreDestroy callback is
- * invoked by the EJB container
- */
- @Test(groups = { "contexts", "injection", "stub", "servlet" })
- @SpecAssertion(section = "8.3")
- public void testContextIsActiveDuringServletDependencyInjection()
- {
- assert false;
- }
-
- /**
- * when the Web Bean manager is injecting dependencies of an EJB bean or
- * Servlet or when an EJB bean @PostConstruct or @PreDestroy callback is
- * invoked by the EJB container
- */
- @Test(groups = { "contexts", "postconstruct", "stub", "ejb3" })
- @SpecAssertion(section = "8.3")
- public void testContextIsActiveDuringEJBPostConstruct()
- {
- assert false;
- }
-
- /**
- * when the Web Bean manager is injecting dependencies of an EJB bean or
- * Servlet or when an EJB bean @PostConstruct or @PreDestroy callback is
- * invoked by the EJB container
- */
- @Test(groups = { "contexts", "predestroy", "stub", "ejb3" })
- @SpecAssertion(section = "8.3")
- public void testContextIsActiveDuringEJBPreDestroy()
- {
- assert false;
- }
-
- /**
- * A Web Bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from the Web Bean constructor, from the
- * Web Bean remove method, from initializer methods, from producer methods,
- * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
- * from Web Beans interceptors or decorators for any of these methods
- */
- @Test(groups = { "stub", "contexts", "constructor" })
- @SpecAssertion(section = "8.3.1")
- public void testWebBeanMayCreateInstanceFromConstructor()
- {
- assert false;
- }
-
- /**
- * A Web Bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from the Web Bean constructor, from the
- * Web Bean remove method, from initializer methods, from producer methods,
- * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
- * from Web Beans interceptors or decorators for any of these methods
- */
- @Test(groups = { "stub", "contexts", "removeMethod" })
- @SpecAssertion(section = "8.3.1")
- public void testWebBeanMayCreateInstanceFromRemoveMethod()
- {
- assert false;
- }
-
- /**
- * A Web Bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from the Web Bean constructor, from the
- * Web Bean remove method, from initializer methods, from producer methods,
- * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
- * from Web Beans interceptors or decorators for any of these methods
- */
- @Test(groups = { "stub", "contexts", "initalizerMethod" })
- @SpecAssertion(section = "8.3.1")
- public void testWebBeanMayCreateInstanceFromInitializerMethod()
- {
- assert false;
- }
-
- /**
- * A Web Bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from the Web Bean constructor, from the
- * Web Bean remove method, from initializer methods, from producer methods,
- * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
- * from Web Beans interceptors or decorators for any of these methods
- */
- @Test(groups = { "stub", "contexts", "producerMethod" })
- @SpecAssertion(section = "8.3.1")
- public void testWebBeanMayCreateInstanceFromProducerMethod()
- {
- assert false;
- }
-
- /**
- * A Web Bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from the Web Bean constructor, from the
- * Web Bean remove method, from initializer methods, from producer methods,
- * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
- * from Web Beans interceptors or decorators for any of these methods
- */
- @Test(groups = { "stub", "contexts", "disposalMethod" })
- @SpecAssertion(section = "8.3.1")
- public void testWebBeanMayCreateInstanceFromDisposalMethod()
- {
- assert false;
- }
-
- /**
- * A Web Bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from the Web Bean constructor, from the
- * Web Bean remove method, from initializer methods, from producer methods,
- * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
- * from Web Beans interceptors or decorators for any of these methods
- */
- @Test(groups = { "stub", "contexts", "preDestroy" })
- @SpecAssertion(section = "8.3.1")
- public void testWebBeanMayCreateInstanceFromPreDestroy()
- {
- assert false;
- }
-
- /**
- * A Web Bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from the Web Bean constructor, from the
- * Web Bean remove method, from initializer methods, from producer methods,
- * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
- * from Web Beans interceptors or decorators for any of these methods
- */
- @Test(groups = { "stub", "contexts", "postConstruct" })
- @SpecAssertion(section = "8.3.1")
- public void testWebBeanMayCreateInstanceFromPostConstruct()
- {
- assert false;
- }
-
- /**
- * A Web Bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from the Web Bean constructor, from the
- * Web Bean remove method, from initializer methods, from producer methods,
- * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
- * from Web Beans interceptors or decorators for any of these methods
- */
- @Test(groups = { "stub", "contexts", "interceptor" })
- @SpecAssertion(section = "8.3.1")
- public void testWebBeanMayCreateInstanceFromInterceptorOfActiveMethod()
- {
- assert false;
- }
-
- /**
- * A Web Bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from the Web Bean constructor, from the
- * Web Bean remove method, from initializer methods, from producer methods,
- * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
- * from Web Beans interceptors or decorators for any of these methods
- */
- @Test(groups = { "stub", "contexts", "decorator" })
- @SpecAssertion(section = "8.3.1")
- public void testWebBeanMayCreateInstanceFromDecoratorOfActiveMethod()
- {
- assert false;
- }
-
- /**
- * An EJB bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from initializer methods, from @PostConstruct
- * and @PreDestroy callbacks and from Web Beans interceptors for these
- * methods.
- */
- @Test(groups = { "stub", "contexts", "ejb3", "initializerMethod" })
- @SpecAssertion(section = "8.3.1")
- public void testEjbBeanMayCreateInstanceFromInitializer()
- {
- assert false;
- }
-
- /**
- * An EJB bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from initializer methods, from @PostConstruct
- * and @PreDestroy callbacks and from Web Beans interceptors for these
- * methods.
- */
- @Test(groups = { "stub", "contexts", "ejb3", "postConstruct" })
- @SpecAssertion(section = "8.3.1")
- public void testEjbBeanMayCreateInstanceFromPostConstruct()
- {
- assert false;
- }
-
- /**
- * An EJB bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from initializer methods, from @PostConstruct
- * and @PreDestroy callbacks and from Web Beans interceptors for these
- * methods.
- */
- @Test(groups = { "stub", "contexts", "ejb3", "preDestroy" })
- @SpecAssertion(section = "8.3.1")
- public void testEjbBeanMayCreateInstanceFromPreDestroy()
- {
- assert false;
- }
-
- /**
- * An EJB bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from initializer methods, from @PostConstruct
- * and @PreDestroy callbacks and from Web Beans interceptors for these
- * methods.
- */
- @Test(groups = { "stub", "contexts", "ejb3", "interceptor" })
- @SpecAssertion(section = "8.3.1")
- public void testEjbBeanMayCreateInstanceFromInterceptorOfActiveMethod()
- {
- assert false;
- }
-
- /**
- * A Servlet may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from initializer methods
- */
- @Test(groups = { "stub", "contexts", "servlet", "initializerMethod" })
- @SpecAssertion(section = "8.3.1")
- public void testServletBeanMayCreateInstanceFromInitializer()
- {
- assert false;
- }
-
- /**
- * destroy all dependent objects of a Web Bean instance when the instance is
- * destroyed,
- */
- @Test(groups = { "stub", "contexts", "beanDestruction" })
- @SpecAssertion(section = "8.3.2")
- public void testDestroyingParentDestroysDependents()
- {
- assert false;
- }
-
- /**
- * destroy all dependent objects of an EJB bean or Servlet when the EJB bean
- * or Servlet is destroyed,
- */
- @Test(groups = { "stub", "contexts", "ejb3" })
- @SpecAssertion(section = "8.3.2")
- public void testDestroyingEjbDestroysDependents()
- {
- assert false;
- }
-
- /**
- * destroy all dependent objects of an EJB bean or Servlet when the EJB bean
- * or Servlet is destroyed,
- */
- @Test(groups = { "stub", "contexts", "servlet" })
- @SpecAssertion(section = "8.3.2")
- public void testDestroyingServletDestroysDependents()
- {
- assert false;
- }
-
- /**
- * destroy all @Dependent scoped contextual instances created during an EL
- * expression evaluation when the evaluation completes, and
- */
- @Test(groups = { "stub", "contexts", "el" })
- @SpecAssertion(section = "8.3.2")
- public void testDependentsDestroyedWhenElEvaluationCompletes()
- {
- assert false;
- }
-
- /**
- * destroy any @Dependent scoped contextual instance created to receive a
- * producer method, producer field, disposal method or observer method
- * invocation when the invocation completes
- */
- @Test(groups = { "stub", "contexts", "producerMethod" })
- @SpecAssertion(section = "8.3.2")
- public void testDependentsDestroyedWhenProducerMethodCompletes()
- {
- assert false;
- }
-
- /**
- * destroy any @Dependent scoped contextual instance created to receive a
- * producer method, producer field, disposal method or observer method
- * invocation when the invocation completes
- */
- @Test(groups = { "stub", "contexts", "producerField" })
- @SpecAssertion(section = "8.3.2")
- public void testDependentsDestroyedWhenProducerFieldCompletes()
- {
- assert false;
- }
-
- /**
- * destroy any @Dependent scoped contextual instance created to receive a
- * producer method, producer field, disposal method or observer method
- * invocation when the invocation completes
- */
- @Test(groups = { "stub", "contexts", "disposalMethod" })
- @SpecAssertion(section = "8.3.2")
- public void testDependentsDestroyedWhenDisposalMethodCompletes()
- {
- assert false;
- }
-
- /**
- * destroy any @Dependent scoped contextual instance created to receive a
- * producer method, producer field, disposal method or observer method
- * invocation when the invocation completes
- */
- @Test(groups = { "stub", "contexts", "observerMethod" })
- @SpecAssertion(section = "8.3")
- public void testDependentsDestroyedWhenObserverMethodEvaluationCompletes()
- {
- assert false;
- }
-
-}
Copied: tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java (from rev 1289, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java)
===================================================================
--- tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java (rev 0)
+++ tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java 2009-01-29 18:09:07 UTC (rev 1344)
@@ -0,0 +1,634 @@
+package org.jboss.webbeans.tck.unit.context.dependent;
+
+import static org.jboss.webbeans.tck.impl.WebBeansTCKImpl.configuration;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.Set;
+
+import javax.context.Context;
+import javax.context.ContextNotActiveException;
+import javax.context.Dependent;
+import javax.inject.manager.Bean;
+
+import org.jboss.webbeans.tck.AbstractTest;
+import org.jboss.webbeans.tck.impl.SpecAssertion;
+import org.jboss.webbeans.tck.impl.util.MockCreationalContext;
+import org.testng.annotations.Test;
+
+/**
+ * Spec version: PRD2
+ */
+public class DependentContextTest extends AbstractTest
+{
+ /**
+ * No injected instance of the (@Dependent-scoped) Web Bean is ever shared between multiple
+ * injection points.
+ */
+ @Test(groups = { "contexts", "injection" })
+ @SpecAssertion(section = "8.3")
+ public void testInstanceNotSharedBetweenInjectionPoints()
+ {
+ deployBeans(Fox.class, FoxRun.class);
+ Set<Bean<Fox>> foxBeans = manager.resolveByType(Fox.class);
+ assert foxBeans.size() == 1;
+ Bean<Fox> foxBean = foxBeans.iterator().next();
+ Set<Bean<FoxRun>> foxRunBeans = manager.resolveByType(FoxRun.class);
+ assert foxRunBeans.size() == 1;
+ Bean<FoxRun> foxRunBean = foxRunBeans.iterator().next();
+ manager.addBean(foxBean);
+ FoxRun foxRun = foxRunBean.create(new MockCreationalContext<FoxRun>());
+ assert !foxRun.fox.equals(foxRun.anotherFox);
+ }
+
+ /**
+ * Any instance of the (@Dependent-scoped) Web Bean that is used to evaluate a Unified EL
+ * expression exists to service that evaluation only.
+ */
+ @Test(groups = { "contexts", "el"})
+ @SpecAssertion(section = "8.3")
+ public void testInstanceUsedForElEvaluationNotShared() throws Exception
+ {
+ deployBeans(Fox.class);
+ new RunInDependentContext()
+ {
+ @Override
+ protected void execute() throws Exception
+ {
+ Set<Bean<Fox>> foxBeans = manager.resolveByType(Fox.class);
+ assert foxBeans.size() == 1;
+ Bean<Fox> foxBean = foxBeans.iterator().next();
+ manager.addBean(foxBean);
+
+ Fox fox1 = configuration().getContainers().evaluateValueExpression("#{fox}", Fox.class);
+ Fox fox2 = configuration().getContainers().evaluateValueExpression("#{fox}", Fox.class);
+ assert !fox1.equals(fox2);
+ }
+ }.run();
+ }
+
+ /**
+ * Any instance of the (@Dependent-scoped) Web Bean that receives a producer method, producer
+ * field, disposal method or observer method invocation exists to service
+ * that invocation only
+ */
+ @Test(groups = { "contexts", "producerMethod" })
+ @SpecAssertion(section = "8.3")
+ public void testInstanceUsedForProducerMethodNotShared() throws Exception
+ {
+ Bean<SpiderProducer> spiderProducer = createSimpleBean(SpiderProducer.class);
+ manager.addBean(spiderProducer);
+ Method method = SpiderProducer.class.getMethod("produceTarantula");
+ Bean<Tarantula> tarantulaBean = createProducerMethodBean(method, spiderProducer);
+ Tarantula tarantula = tarantulaBean.create(new MockCreationalContext<Tarantula>());
+ Tarantula tarantula2 = tarantulaBean.create(new MockCreationalContext<Tarantula>());
+ assert tarantula != null;
+ assert tarantula2 != null;
+ assert tarantula != tarantula2;
+ }
+
+ /**
+ * Any instance of the (@Dependent-scoped) Web Bean that receives a producer method, producer
+ * field, disposal method or observer method invocation exists to service
+ * that invocation only
+ */
+ @Test(groups = { "contexts", "producerMethod" })
+ @SpecAssertion(section = "8.3")
+ public void testInstanceUsedForProducerFieldNotShared() throws Exception
+ {
+ Bean<OtherSpiderProducer> spiderProducer = createSimpleBean(OtherSpiderProducer.class);
+ manager.addBean(spiderProducer);
+ Field field = OtherSpiderProducer.class.getField("produceTarantula");
+ Bean<Tarantula> tarantulaBean = createProducerFieldBean(field, spiderProducer);
+ Tarantula tarantula = tarantulaBean.create(new MockCreationalContext<Tarantula>());
+ Tarantula tarantula2 = tarantulaBean.create(new MockCreationalContext<Tarantula>());
+ assert tarantula != null;
+ assert tarantula2 != null;
+ assert tarantula != tarantula2;
+ }
+
+ /**
+ * Any instance of the (@Dependent-scoped) Web Bean that receives a producer method, producer
+ * field, disposal method or observer method invocation exists to service
+ * that invocation only
+ */
+ @Test(groups = { "stub", "contexts", "disposalMethod" })
+ @SpecAssertion(section = "8.3")
+ public void testInstanceUsedForDisposalMethodNotShared()
+ {
+ assert false;
+ }
+
+ /**
+ * Any instance of the (@Dependent-scoped) Web Bean that receives a producer method, producer
+ * field, disposal method or observer method invocation exists to service
+ * that invocation only
+ */
+ @Test(groups = { "stub", "contexts", "observerMethod" })
+ @SpecAssertion(section = "8.3")
+ public void testInstanceUsedForObserverMethodNotShared()
+ {
+ assert false;
+ }
+
+ /**
+ * Every invocation of the get() operation of the Context object for the @Dependent
+ * scope with the value true for the create parameter returns a new instance
+ * of the given Web Bean
+ */
+ @Test(groups = "contexts")
+ @SpecAssertion(section = "8.3")
+ public void testContextGetWithCreateTrueReturnsNewInstance() throws Exception
+ {
+ deployBeans(Fox.class);
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ Set<Bean<Fox>> foxBeans = manager.resolveByType(Fox.class);
+ assert foxBeans.size() == 1;
+ Bean<Fox> foxBean = foxBeans.iterator().next();
+ Context context = manager.getContext(Dependent.class);
+ assert context.get(foxBean, new MockCreationalContext<Fox>()) != null;
+ assert context.get(foxBean, new MockCreationalContext<Fox>()) instanceof Fox;
+ }
+
+ }.run();
+ }
+
+ /**
+ * Every invocation of the get() operation of the Context object for the @Dependent
+ * scope with the value false for the create parameter returns a null value
+ */
+ @Test(groups = "contexts")
+ @SpecAssertion(section = "8.3")
+ public void testContextGetWithCreateFalseReturnsNull() throws Exception
+ {
+ deployBeans(Fox.class);
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ Set<Bean<Fox>> foxBeans = manager.resolveByType(Fox.class);
+ assert foxBeans.size() == 1;
+ Bean<Fox> foxBean = foxBeans.iterator().next();
+ Context context = manager.getContext(Dependent.class);
+ assert context.get(foxBean, null) == null;
+ }
+
+ }.run();
+ }
+
+ /**
+ * The @Dependent scope is inactive except:
+ */
+ @Test(groups = {"contexts"}, expectedExceptions = ContextNotActiveException.class)
+ @SpecAssertion(section = "8.3")
+ public void testContextIsInactive()
+ {
+ assert !manager.getContext(Dependent.class).isActive();
+ }
+
+ /**
+ * when an instance of a Web Bean with scope @Dependent is created by the Web
+ * Bean manager to receive a producer method, producer field, disposal method
+ * or observer method invocation, or
+ */
+ @Test(groups = { "stub", "contexts", "producerMethod" })
+ @SpecAssertion(section = "8.3")
+ public void testContextIsActiveWhenInvokingProducerMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * when an instance of a Web Bean with scope @Dependent is created by the Web
+ * Bean manager to receive a producer method, producer field, disposal method
+ * or observer method invocation, or
+ */
+ @Test(groups = { "stub", "contexts", "producerField" })
+ @SpecAssertion(section = "8.3")
+ public void testContextIsActiveWhenInvokingProducerField()
+ {
+ assert false;
+ //assert manager.getContext(Dependent.class).isActive();
+ }
+
+ /**
+ * when an instance of a Web Bean with scope @Dependent is created by the Web
+ * Bean manager to receive a producer method, producer field, disposal method
+ * or observer method invocation, or
+ */
+ @Test(groups = { "stub", "contexts", "disposalMethod" })
+ @SpecAssertion(section = "8.3")
+ public void testContextIsActiveWhenInvokingDisposalMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * when an instance of a Web Bean with scope @Dependent is created by the Web
+ * Bean manager to receive a producer method, producer field, disposal method
+ * or observer method invocation, or
+ */
+ @Test(groups = { "stub", "contexts", "observerMethod" })
+ @SpecAssertion(section = "8.3")
+ public void testContextIsActiveWhenInvokingObserverMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * while a Unified EL expression is evaluated, or
+ */
+ @Test(groups = { "stub", "contexts", "el" })
+ @SpecAssertion(section = "8.3")
+ public void testContextIsActiveWhenEvaluatingElExpression()
+ {
+ assert false;
+ }
+
+ /**
+ * when the Web Bean manager is creating or destroying a Web Bean instance or
+ * injecting its dependencies, or
+ */
+ @Test(groups = { "contexts", "beanLifecycle" })
+ @SpecAssertion(section = "8.3")
+ public void testContextIsActiveDuringBeanCreation()
+ {
+ // Slightly roundabout, but I can't see a better way to test atm
+ Bean<FoxRun> foxRunBean = createSimpleBean(FoxRun.class);
+ Bean<Fox> foxBean = createSimpleBean(Fox.class);
+ manager.addBean(foxBean);
+ FoxRun foxRun = foxRunBean.create(new MockCreationalContext<FoxRun>());
+ assert foxRun.fox != null;
+ }
+
+ /**
+ * when the Web Bean manager is creating or destroying a Web Bean instance or
+ * injecting its dependencies, or
+ */
+ @Test(groups = { "stub", "contexts", "beanDestruction" })
+ @SpecAssertion(section = "8.3")
+ public void testContextIsActiveDuringBeanDestruction()
+ {
+ assert false;
+ }
+
+ /**
+ * when the Web Bean manager is creating or destroying a Web Bean instance or
+ * injecting its dependencies, or
+ */
+ @Test(groups = { "contexts", "injection" })
+ @SpecAssertion(section = "8.4")
+ public void testContextIsActiveDuringInjection()
+ {
+ Bean<FoxRun> foxRunBean = createSimpleBean(FoxRun.class);
+ Bean<Fox> foxBean = createSimpleBean(Fox.class);
+ manager.addBean(foxBean);
+ FoxRun foxRun = foxRunBean.create(new MockCreationalContext<FoxRun>());
+ assert foxRun.fox != null;
+ }
+
+ /**
+ * when the Web Bean manager is injecting dependencies of an EJB bean or
+ * Servlet or when an EJB bean @PostConstruct or @PreDestroy callback is
+ * invoked by the EJB container
+ */
+ @Test(groups = { "contexts", "injection", "stub", "ejb3" })
+ @SpecAssertion(section = "8.3")
+ public void testContextIsActiveDuringEJBDependencyInjection()
+ {
+ assert false;
+ }
+
+ /**
+ * when the Web Bean manager is injecting dependencies of an EJB bean or
+ * Servlet or when an EJB bean @PostConstruct or @PreDestroy callback is
+ * invoked by the EJB container
+ */
+ @Test(groups = { "contexts", "injection", "stub", "servlet" })
+ @SpecAssertion(section = "8.3")
+ public void testContextIsActiveDuringServletDependencyInjection()
+ {
+ assert false;
+ }
+
+ /**
+ * when the Web Bean manager is injecting dependencies of an EJB bean or
+ * Servlet or when an EJB bean @PostConstruct or @PreDestroy callback is
+ * invoked by the EJB container
+ */
+ @Test(groups = { "contexts", "postconstruct", "stub", "ejb3" })
+ @SpecAssertion(section = "8.3")
+ public void testContextIsActiveDuringEJBPostConstruct()
+ {
+ assert false;
+ }
+
+ /**
+ * when the Web Bean manager is injecting dependencies of an EJB bean or
+ * Servlet or when an EJB bean @PostConstruct or @PreDestroy callback is
+ * invoked by the EJB container
+ */
+ @Test(groups = { "contexts", "predestroy", "stub", "ejb3" })
+ @SpecAssertion(section = "8.3")
+ public void testContextIsActiveDuringEJBPreDestroy()
+ {
+ assert false;
+ }
+
+ /**
+ * A Web Bean may create an instance of a Web Bean with scope type @Dependent
+ * by calling Manager.getInstance() from the Web Bean constructor, from the
+ * Web Bean remove method, from initializer methods, from producer methods,
+ * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
+ * from Web Beans interceptors or decorators for any of these methods
+ */
+ @Test(groups = { "stub", "contexts", "constructor" })
+ @SpecAssertion(section = "8.3.1")
+ public void testWebBeanMayCreateInstanceFromConstructor()
+ {
+ assert false;
+ }
+
+ /**
+ * A Web Bean may create an instance of a Web Bean with scope type @Dependent
+ * by calling Manager.getInstance() from the Web Bean constructor, from the
+ * Web Bean remove method, from initializer methods, from producer methods,
+ * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
+ * from Web Beans interceptors or decorators for any of these methods
+ */
+ @Test(groups = { "stub", "contexts", "removeMethod" })
+ @SpecAssertion(section = "8.3.1")
+ public void testWebBeanMayCreateInstanceFromRemoveMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * A Web Bean may create an instance of a Web Bean with scope type @Dependent
+ * by calling Manager.getInstance() from the Web Bean constructor, from the
+ * Web Bean remove method, from initializer methods, from producer methods,
+ * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
+ * from Web Beans interceptors or decorators for any of these methods
+ */
+ @Test(groups = { "stub", "contexts", "initalizerMethod" })
+ @SpecAssertion(section = "8.3.1")
+ public void testWebBeanMayCreateInstanceFromInitializerMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * A Web Bean may create an instance of a Web Bean with scope type @Dependent
+ * by calling Manager.getInstance() from the Web Bean constructor, from the
+ * Web Bean remove method, from initializer methods, from producer methods,
+ * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
+ * from Web Beans interceptors or decorators for any of these methods
+ */
+ @Test(groups = { "stub", "contexts", "producerMethod" })
+ @SpecAssertion(section = "8.3.1")
+ public void testWebBeanMayCreateInstanceFromProducerMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * A Web Bean may create an instance of a Web Bean with scope type @Dependent
+ * by calling Manager.getInstance() from the Web Bean constructor, from the
+ * Web Bean remove method, from initializer methods, from producer methods,
+ * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
+ * from Web Beans interceptors or decorators for any of these methods
+ */
+ @Test(groups = { "stub", "contexts", "disposalMethod" })
+ @SpecAssertion(section = "8.3.1")
+ public void testWebBeanMayCreateInstanceFromDisposalMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * A Web Bean may create an instance of a Web Bean with scope type @Dependent
+ * by calling Manager.getInstance() from the Web Bean constructor, from the
+ * Web Bean remove method, from initializer methods, from producer methods,
+ * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
+ * from Web Beans interceptors or decorators for any of these methods
+ */
+ @Test(groups = { "stub", "contexts", "preDestroy" })
+ @SpecAssertion(section = "8.3.1")
+ public void testWebBeanMayCreateInstanceFromPreDestroy()
+ {
+ assert false;
+ }
+
+ /**
+ * A Web Bean may create an instance of a Web Bean with scope type @Dependent
+ * by calling Manager.getInstance() from the Web Bean constructor, from the
+ * Web Bean remove method, from initializer methods, from producer methods,
+ * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
+ * from Web Beans interceptors or decorators for any of these methods
+ */
+ @Test(groups = { "stub", "contexts", "postConstruct" })
+ @SpecAssertion(section = "8.3.1")
+ public void testWebBeanMayCreateInstanceFromPostConstruct()
+ {
+ assert false;
+ }
+
+ /**
+ * A Web Bean may create an instance of a Web Bean with scope type @Dependent
+ * by calling Manager.getInstance() from the Web Bean constructor, from the
+ * Web Bean remove method, from initializer methods, from producer methods,
+ * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
+ * from Web Beans interceptors or decorators for any of these methods
+ */
+ @Test(groups = { "stub", "contexts", "interceptor" })
+ @SpecAssertion(section = "8.3.1")
+ public void testWebBeanMayCreateInstanceFromInterceptorOfActiveMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * A Web Bean may create an instance of a Web Bean with scope type @Dependent
+ * by calling Manager.getInstance() from the Web Bean constructor, from the
+ * Web Bean remove method, from initializer methods, from producer methods,
+ * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
+ * from Web Beans interceptors or decorators for any of these methods
+ */
+ @Test(groups = { "stub", "contexts", "decorator" })
+ @SpecAssertion(section = "8.3.1")
+ public void testWebBeanMayCreateInstanceFromDecoratorOfActiveMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * An EJB bean may create an instance of a Web Bean with scope type @Dependent
+ * by calling Manager.getInstance() from initializer methods, from @PostConstruct
+ * and @PreDestroy callbacks and from Web Beans interceptors for these
+ * methods.
+ */
+ @Test(groups = { "stub", "contexts", "ejb3", "initializerMethod" })
+ @SpecAssertion(section = "8.3.1")
+ public void testEjbBeanMayCreateInstanceFromInitializer()
+ {
+ assert false;
+ }
+
+ /**
+ * An EJB bean may create an instance of a Web Bean with scope type @Dependent
+ * by calling Manager.getInstance() from initializer methods, from @PostConstruct
+ * and @PreDestroy callbacks and from Web Beans interceptors for these
+ * methods.
+ */
+ @Test(groups = { "stub", "contexts", "ejb3", "postConstruct" })
+ @SpecAssertion(section = "8.3.1")
+ public void testEjbBeanMayCreateInstanceFromPostConstruct()
+ {
+ assert false;
+ }
+
+ /**
+ * An EJB bean may create an instance of a Web Bean with scope type @Dependent
+ * by calling Manager.getInstance() from initializer methods, from @PostConstruct
+ * and @PreDestroy callbacks and from Web Beans interceptors for these
+ * methods.
+ */
+ @Test(groups = { "stub", "contexts", "ejb3", "preDestroy" })
+ @SpecAssertion(section = "8.3.1")
+ public void testEjbBeanMayCreateInstanceFromPreDestroy()
+ {
+ assert false;
+ }
+
+ /**
+ * An EJB bean may create an instance of a Web Bean with scope type @Dependent
+ * by calling Manager.getInstance() from initializer methods, from @PostConstruct
+ * and @PreDestroy callbacks and from Web Beans interceptors for these
+ * methods.
+ */
+ @Test(groups = { "stub", "contexts", "ejb3", "interceptor" })
+ @SpecAssertion(section = "8.3.1")
+ public void testEjbBeanMayCreateInstanceFromInterceptorOfActiveMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * A Servlet may create an instance of a Web Bean with scope type @Dependent
+ * by calling Manager.getInstance() from initializer methods
+ */
+ @Test(groups = { "stub", "contexts", "servlet", "initializerMethod" })
+ @SpecAssertion(section = "8.3.1")
+ public void testServletBeanMayCreateInstanceFromInitializer()
+ {
+ assert false;
+ }
+
+ /**
+ * destroy all dependent objects of a Web Bean instance when the instance is
+ * destroyed,
+ */
+ @Test(groups = { "broken", "contexts", "beanDestruction" })
+ @SpecAssertion(section = "8.3.2")
+ public void testDestroyingParentDestroysDependents()
+ {
+ deployBeans(Farm.class, Horse.class, Stable.class);
+ assert manager.resolveByType(Farm.class).size() == 1;
+ Bean<Farm> farmBean = manager.resolveByType(Farm.class).iterator().next();
+ Farm farm = manager.getInstanceByType(Farm.class);
+ Stable.destroyed = false;
+ Horse.destroyed = false;
+ farmBean.destroy(farm);
+ assert Stable.destroyed;
+ assert Horse.destroyed;
+ }
+
+ /**
+ * destroy all dependent objects of an EJB bean or Servlet when the EJB bean
+ * or Servlet is destroyed,
+ */
+ @Test(groups = { "stub", "contexts", "ejb3" })
+ @SpecAssertion(section = "8.3.2")
+ public void testDestroyingEjbDestroysDependents()
+ {
+ assert false;
+ }
+
+ /**
+ * destroy all dependent objects of an EJB bean or Servlet when the EJB bean
+ * or Servlet is destroyed,
+ */
+ @Test(groups = { "stub", "contexts", "servlet" })
+ @SpecAssertion(section = "8.3.2")
+ public void testDestroyingServletDestroysDependents()
+ {
+ assert false;
+ }
+
+ /**
+ * destroy all @Dependent scoped contextual instances created during an EL
+ * expression evaluation when the evaluation completes, and
+ */
+ @Test(groups = { "stub", "contexts", "el" })
+ @SpecAssertion(section = "8.3.2")
+ public void testDependentsDestroyedWhenElEvaluationCompletes()
+ {
+ assert false;
+ }
+
+ /**
+ * destroy any @Dependent scoped contextual instance created to receive a
+ * producer method, producer field, disposal method or observer method
+ * invocation when the invocation completes
+ */
+ @Test(groups = { "stub", "contexts", "producerMethod" })
+ @SpecAssertion(section = "8.3.2")
+ public void testDependentsDestroyedWhenProducerMethodCompletes()
+ {
+ assert false;
+ }
+
+ /**
+ * destroy any @Dependent scoped contextual instance created to receive a
+ * producer method, producer field, disposal method or observer method
+ * invocation when the invocation completes
+ */
+ @Test(groups = { "stub", "contexts", "producerField" })
+ @SpecAssertion(section = "8.3.2")
+ public void testDependentsDestroyedWhenProducerFieldCompletes()
+ {
+ assert false;
+ }
+
+ /**
+ * destroy any @Dependent scoped contextual instance created to receive a
+ * producer method, producer field, disposal method or observer method
+ * invocation when the invocation completes
+ */
+ @Test(groups = { "stub", "contexts", "disposalMethod" })
+ @SpecAssertion(section = "8.3.2")
+ public void testDependentsDestroyedWhenDisposalMethodCompletes()
+ {
+ assert false;
+ }
+
+ /**
+ * destroy any @Dependent scoped contextual instance created to receive a
+ * producer method, producer field, disposal method or observer method
+ * invocation when the invocation completes
+ */
+ @Test(groups = { "stub", "contexts", "observerMethod" })
+ @SpecAssertion(section = "8.3")
+ public void testDependentsDestroyedWhenObserverMethodEvaluationCompletes()
+ {
+ assert false;
+ }
+
+}
Copied: tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/Farm.java (from rev 1289, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/Farm.java)
===================================================================
--- tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/Farm.java (rev 0)
+++ tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/Farm.java 2009-01-29 18:09:07 UTC (rev 1344)
@@ -0,0 +1,12 @@
+package org.jboss.webbeans.tck.unit.context.dependent;
+
+import javax.context.RequestScoped;
+import javax.inject.Current;
+
+@RequestScoped
+public class Farm
+{
+
+ @Current Stable stable;
+
+}
Copied: tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/Horse.java (from rev 1289, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/Horse.java)
===================================================================
--- tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/Horse.java (rev 0)
+++ tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/Horse.java 2009-01-29 18:09:07 UTC (rev 1344)
@@ -0,0 +1,16 @@
+package org.jboss.webbeans.tck.unit.context.dependent;
+
+import javax.annotation.PreDestroy;
+
+class Horse
+{
+
+ public static boolean destroyed;
+
+ @PreDestroy
+ public void preDestroy()
+ {
+ destroyed = true;
+ }
+
+}
Copied: tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/Stable.java (from rev 1289, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/Stable.java)
===================================================================
--- tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/Stable.java (rev 0)
+++ tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/Stable.java 2009-01-29 18:09:07 UTC (rev 1344)
@@ -0,0 +1,19 @@
+package org.jboss.webbeans.tck.unit.context.dependent;
+
+import javax.annotation.PreDestroy;
+import javax.inject.Current;
+
+class Stable
+{
+
+ @Current Horse horse;
+
+ public static boolean destroyed;
+
+ @PreDestroy
+ public void preDestroy()
+ {
+ destroyed = true;
+ }
+
+}
Copied: tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/FooConsumer.java (from rev 1287, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/FooConsumer.java)
===================================================================
--- tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/FooConsumer.java (rev 0)
+++ tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/FooConsumer.java 2009-01-29 18:09:07 UTC (rev 1344)
@@ -0,0 +1,14 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import javax.context.RequestScoped;
+import javax.inject.Current;
+
+@RequestScoped
+class FooConsumer
+{
+
+ @Current SerializableFoo foo;
+
+ public void ping(){};
+
+}
Copied: tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Generator.java (from rev 1287, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Generator.java)
===================================================================
--- tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Generator.java (rev 0)
+++ tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Generator.java 2009-01-29 18:09:07 UTC (rev 1344)
@@ -0,0 +1,27 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+
+import java.io.Serializable;
+
+import javax.context.ApplicationScoped;
+import javax.inject.Produces;
+
+@ApplicationScoped
+class Generator implements Serializable
+{
+
+ private static final long serialVersionUID = -7213673465118041882L;
+
+ private int number = 100;
+
+ @Produces int getNumber()
+ {
+ return number;
+ }
+
+ @Produces SerializableFoo getFoo()
+ {
+ return new SerializableFoo();
+ }
+
+}
Copied: tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/NumberConsumer.java (from rev 1287, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/NumberConsumer.java)
===================================================================
--- tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/NumberConsumer.java (rev 0)
+++ tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/NumberConsumer.java 2009-01-29 18:09:07 UTC (rev 1344)
@@ -0,0 +1,14 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import javax.context.RequestScoped;
+import javax.inject.Current;
+
+@RequestScoped
+class NumberConsumer
+{
+
+ @Current int number;
+
+ public void ping(){};
+
+}
Deleted: tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java 2009-01-29 14:40:51 UTC (rev 1284)
+++ tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java 2009-01-29 18:09:07 UTC (rev 1344)
@@ -1,454 +0,0 @@
-package org.jboss.webbeans.tck.unit.context.passivating;
-
-import java.io.IOException;
-import java.util.Set;
-
-import javax.inject.DefinitionException;
-import javax.inject.IllegalProductException;
-import javax.inject.UnserializableDependencyException;
-import javax.inject.manager.Bean;
-
-import org.jboss.webbeans.tck.AbstractTest;
-import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.testng.annotations.Test;
-
-/**
- *
- * @author Nicklas Karlsson
- * @author David Allen
- *
- * Spec version: PRD2
- */
-public class PassivatingContextTest extends AbstractTest
-{
-
- /**
- * Simple Web Beans are not required to be serializable. If a simple Web Bean
- * declares a passivating scope, and the implementation class is not
- * serializable, a DefinitionException is thrown by the Web Bean manager at
- * initialization time.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "8.4")
- public void testSimpleWebBeanWithNonSerializableImplementationClassFails()
- {
- deployBeans(Hamina_Broken.class);
- }
-
- /**
- * Simple Web Beans are not required to be serializable. If a simple Web Bean
- * declares a passivating scope, and the implementation class is not
- * serializable, a DefinitionException is thrown by the Web Bean manager at
- * initialization time.
- */
- @Test(groups = { "contexts", "passivation" })
- @SpecAssertion(section = "8.4")
- public void testSimpleWebBeanWithSerializableImplementationClassOK()
- {
- createSimpleBean(Jyvaskyla.class);
- }
-
- /**
- * the Web Bean declares a passivating scope type, and context passivation
- * occurs, or
- *
- * @throws IOException
- * @throws ClassNotFoundException
- */
- @Test(groups = { "contexts", "passivation", "stub" })
- @SpecAssertion(section = "8.4")
- public void testSimpleWebBeanDeclaringPassivatingScopeIsSerializedWhenContextIsPassivated() throws IOException, ClassNotFoundException
- {
- assert false;
- }
-
- @SuppressWarnings("unchecked")
- private <T> boolean testSerialize(Bean<T> bean) throws IOException, ClassNotFoundException
- {
- manager.addBean(bean);
- T instance = manager.getInstance(bean);
- byte[] data = serialize(instance);
- T resurrected = (T) deserialize(data);
- return resurrected.toString().equals(instance.toString());
- }
-
- /**
- * the Web Bean is an EJB stateful session bean, and it is passivated by the
- * EJB container.
- *
- * @throws ClassNotFoundException
- * @throws IOException
- */
- // TODO requires an EJB instance
- @Test(groups = { "contexts", "passivation", "broken", "stub" })
- @SpecAssertion(section = "8.4")
- public void testStatefulEJBIsSerializedWhenPassivatedByEJBContainer() throws IOException, ClassNotFoundException
- {
- assert false;
- }
-
- /**
- * On the other hand, dependent objects (including interceptors and
- * decorators with scope @Dependent) of a stateful session bean or of a Web
- * Bean with a passivating scope must be serialized and deserialized along
- * with their owner
- */
- @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
- @SpecAssertion(section = "8.4")
- public void testDependentInterceptorsOfStatefulEnterpriseBeanMustBeSerializable()
- {
- deployBeans(Kaarina_Broken.class);
- }
-
- /**
- * On the other hand, dependent objects (including interceptors and
- * decorators with scope @Dependent) of a stateful session bean or of a Web
- * Bean with a passivating scope must be serialized and deserialized along
- * with their owner
- */
- @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
- @SpecAssertion(section = "8.4")
- public void testDependentDecoratorsOfStatefulEnterpriseBeanMustBeSerializable()
- {
- deployBeans(Porvoo_Broken.class);
- }
-
- /**
- * On the other hand, dependent objects (including interceptors and
- * decorators with scope @Dependent) of a stateful session bean or of a Web
- * Bean with a passivating scope must be serialized and deserialized along
- * with their owner
- */
- @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
- @SpecAssertion(section = "8.4")
- public void testDependentInterceptorsOfWebBeanWithPassivatingScopeMustBeSerializable()
- {
- deployBeans(Kotka_Broken.class);
- }
-
- /**
- * On the other hand, dependent objects (including interceptors and
- * decorators with scope @Dependent) of a stateful session bean or of a Web
- * Bean with a passivating scope must be serialized and deserialized along
- * with their owner
- */
- @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
- @SpecAssertion(section = "8.4")
- public void testDependentDecoratorsOfWebBeansWithPassivatingScopeMustBeSerializable()
- {
- deployBeans(Raisio_Broken.class);
- }
-
- /**
- * EJB local objects are serializable. Therefore, any reference to an
- * enterprise Web Bean of scope @Dependent is serializable.
- *
- * @throws ClassNotFoundException
- * @throws IOException
- */
- @Test(groups = { "contexts", "passivation" })
- @SpecAssertion(section = "8.4")
- public void testDependentEJBsAreSerializable() throws IOException, ClassNotFoundException
- {
- deployBeans(Vaasa.class, Helsinki.class);
- Set<Bean<Vaasa>> vaasaBeans = manager.resolveByType(Vaasa.class);
- assert vaasaBeans.size() == 1;
- assert testSerialize(vaasaBeans.iterator().next());
- }
-
- /**
- * If a simple Web Bean of scope @Dependent and a non-serializable
- * implementation class is injected into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * UnserializableDependencyException must be thrown by the Web Bean manager
- * at initialization time.
- */
- @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
- @SpecAssertion(section = "8.4")
- public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoStatefulSessionBeanFails()
- {
- deployBeans(Violation.class, Espoo_Broken.class);
- manager.getInstanceByType(Espoo_Broken.class);
- }
-
- /**
- * If a simple Web Bean of scope @Dependent and a non-serializable
- * implementation class is injected into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * UnserializableDependencyException must be thrown by the Web Bean manager
- * at initialization time.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
- @SpecAssertion(section = "8.4")
- public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoNonTransientFieldOfWebBeanWithPassivatingScopeFails()
- {
- deployBeans(Vantaa_Broken.class, Violation.class);
- }
-
- /**
- * If a simple Web Bean of scope @Dependent and a non-serializable
- * implementation class is injected into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * UnserializableDependencyException must be thrown by the Web Bean manager
- * at initialization time.
- */
- @Test(groups = { "contexts", "passivation" })
- @SpecAssertion(section = "8.4")
- public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoTransientFieldOK()
- {
- createSimpleBean(Joensuu.class);
- }
-
- /**
- * If a simple Web Bean of scope @Dependent and a non-serializable
- * implementation class is injected into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * UnserializableDependencyException must be thrown by the Web Bean manager
- * at initialization time.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
- @SpecAssertion(section = "8.4")
- public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoConstructorParameterOfWebBeanWithPassivatingScopeFails()
- {
- deployBeans(Loviisa_Broken.class, Violation.class);
- }
-
- /**
- * If a simple Web Bean of scope @Dependent and a non-serializable
- * implementation class is injected into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * UnserializableDependencyException must be thrown by the Web Bean manager
- * at initialization time.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
- @SpecAssertion(section = "8.4")
- public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoInitializerParameterOfWebBeanWithPassivatingScopeFails()
- {
- deployBeans(Forssa_Broken.class, Violation.class);
- }
-
- /**
- * If a simple Web Bean of scope @Dependent and a non-serializable
- * implementation class is injected into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * UnserializableDependencyException must be thrown by the Web Bean manager
- * at initialization time.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
- @SpecAssertion(section = "8.4")
- public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoProducerMethodParameterWithPassivatingScopeFails()
- {
- deployBeans(Peraseinajoki.class, Violation.class, Violation2.class);
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- *
- * @throws NoSuchMethodException
- * @throws SecurityException
- */
- @Test(groups = { "contexts", "passivation", "integration", "broken" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "8.4")
- public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoStatefulSessionBeanFails() throws SecurityException, NoSuchMethodException
- {
- deployBeans(CityProducer2.class, Maarianhamina_Broken.class);
- manager.getInstanceByType(Maarianhamina_Broken.class);
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "8.4")
- public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoNonTransientFieldOfWebBeanWithPassivatingScopeFails()
- {
- deployBeans(CityProducer2.class, Nokia_Broken.class);
- manager.getInstanceByType(Nokia_Broken.class).ping();
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- */
- @Test(groups = { "contexts", "passivation" })
- @SpecAssertion(section = "8.4")
- public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoTransientFieldOfWebBeanWithPassivatingScopeOK()
- {
- createSimpleBean(CityProducer2.class);
- createSimpleBean(Hyvinkaa.class);
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "8.4")
- public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoConstructorParameterOfWebBeanWithPassivatingScopeFails()
- {
- deployBeans(CityProducer2.class, Loviisa_Broken.class);
- manager.getInstanceByType(Loviisa_Broken.class).ping();
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "8.4")
- public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoInitializerParameterOfWebBeanWithPassivatingScopeFails()
- {
- deployBeans(CityProducer2.class, Kuopio_Broken.class);
- manager.getInstanceByType(Kuopio_Broken.class).ping();
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "8.4")
- public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoProducerMethodParameterWithPassivatingScopeFails()
- {
- deployBeans(CityProducer2.class, Jamsa_Broken.class);
- manager.getInstanceByType(Jamsa_Broken.class).ping();
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- *
- */
- @Test(groups = { "contexts", "passivation", "stub" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "8.4")
- public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoStatefulSessionBeanFails() throws Exception
- {
- // TODO This doesn't test injction in a SFSB, but into a Enterprise bean
- // deployBeans(CityProducer.class, Pietarsaari_Broken.class);
- // manager.getInstanceByType(Pietarsaari_Broken.class);
- assert false;
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "8.4")
- public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoNonTransientFieldOfWebBeanWithPassivatingScopeFails()
- {
- deployBeans(CityProducer.class, Uusikaupunki_Broken.class);
- manager.getInstanceByType(Uusikaupunki_Broken.class).ping();
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- */
- @Test(groups = { "contexts", "passivation" })
- @SpecAssertion(section = "8.4")
- public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoTransientFieldOfWebBeanWithPassivatingScopeOK()
- {
- deployBeans(CityProducer.class, Salo_Broken.class);
- manager.getInstanceByType(Salo_Broken.class).ping();
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "8.4")
- public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoConstructorParameterOfWebBeanWithPassivatingScopeFails()
- {
- deployBeans(CityProducer.class, Loviisa_Broken.class);
- manager.getInstanceByType(Loviisa_Broken.class).ping();
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "8.4")
- public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoInitializerParameterOfWebBeanWithPassivatingScopeFails()
- {
- deployBeans(CityProducer.class, Mikkeli_Broken.class);
- manager.getInstanceByType(Mikkeli_Broken.class).ping();
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "8.4")
- public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoProducerMethodParameterWithPassivatingScopeFails()
- {
- // TODO Not quite sure what this test is doing
- deployBeans(CityProducer.class, Jamsa_Broken.class);
- manager.getInstanceByType(Jamsa_Broken.class).ping();
- }
-}
Copied: tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java (from rev 1287, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java)
===================================================================
--- tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java (rev 0)
+++ tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java 2009-01-29 18:09:07 UTC (rev 1344)
@@ -0,0 +1,468 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import java.io.IOException;
+import java.util.Set;
+
+import javax.inject.DefinitionException;
+import javax.inject.IllegalProductException;
+import javax.inject.UnserializableDependencyException;
+import javax.inject.manager.Bean;
+
+import org.jboss.webbeans.tck.AbstractTest;
+import org.jboss.webbeans.tck.impl.SpecAssertion;
+import org.testng.annotations.Test;
+
+/**
+ *
+ * @author Nicklas Karlsson
+ * @author David Allen
+ *
+ * Spec version: PRD2
+ */
+public class PassivatingContextTest extends AbstractTest
+{
+
+ /**
+ * Simple Web Beans are not required to be serializable. If a simple Web Bean
+ * declares a passivating scope, and the implementation class is not
+ * serializable, a DefinitionException is thrown by the Web Bean manager at
+ * initialization time.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = "8.4")
+ public void testSimpleWebBeanWithNonSerializableImplementationClassFails()
+ {
+ deployBeans(Hamina_Broken.class);
+ }
+
+ /**
+ * Simple Web Beans are not required to be serializable. If a simple Web Bean
+ * declares a passivating scope, and the implementation class is not
+ * serializable, a DefinitionException is thrown by the Web Bean manager at
+ * initialization time.
+ */
+ @Test(groups = { "contexts", "passivation" })
+ @SpecAssertion(section = "8.4")
+ public void testSimpleWebBeanWithSerializableImplementationClassOK()
+ {
+ createSimpleBean(Jyvaskyla.class);
+ }
+
+ @Test @SpecAssertion(section="8.4")
+ public void testInjectionOfDependentSerializableProductIntoNormalBean()
+ {
+ deployBeans(Generator.class, NumberConsumer.class);
+ manager.getInstanceByType(NumberConsumer.class).ping();
+ }
+
+ @Test @SpecAssertion(section="8.4")
+ public void testInjectionOfDependentPrimitiveProductIntoNormalBean()
+ {
+ deployBeans(Generator.class, FooConsumer.class);
+ manager.getInstanceByType(FooConsumer.class).ping();
+ }
+
+ /**
+ * the Web Bean declares a passivating scope type, and context passivation
+ * occurs, or
+ *
+ * @throws IOException
+ * @throws ClassNotFoundException
+ */
+ @Test(groups = { "contexts", "passivation", "stub" })
+ @SpecAssertion(section = "8.4")
+ public void testSimpleWebBeanDeclaringPassivatingScopeIsSerializedWhenContextIsPassivated() throws IOException, ClassNotFoundException
+ {
+ assert false;
+ }
+
+ @SuppressWarnings("unchecked")
+ private <T> boolean testSerialize(Bean<T> bean) throws IOException, ClassNotFoundException
+ {
+ manager.addBean(bean);
+ T instance = manager.getInstance(bean);
+ byte[] data = serialize(instance);
+ T resurrected = (T) deserialize(data);
+ return resurrected.toString().equals(instance.toString());
+ }
+
+ /**
+ * the Web Bean is an EJB stateful session bean, and it is passivated by the
+ * EJB container.
+ *
+ * @throws ClassNotFoundException
+ * @throws IOException
+ */
+ // TODO requires an EJB instance
+ @Test(groups = { "contexts", "passivation", "broken", "stub" })
+ @SpecAssertion(section = "8.4")
+ public void testStatefulEJBIsSerializedWhenPassivatedByEJBContainer() throws IOException, ClassNotFoundException
+ {
+ assert false;
+ }
+
+ /**
+ * On the other hand, dependent objects (including interceptors and
+ * decorators with scope @Dependent) of a stateful session bean or of a Web
+ * Bean with a passivating scope must be serialized and deserialized along
+ * with their owner
+ */
+ @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
+ @SpecAssertion(section = "8.4")
+ public void testDependentInterceptorsOfStatefulEnterpriseBeanMustBeSerializable()
+ {
+ deployBeans(Kaarina_Broken.class);
+ }
+
+ /**
+ * On the other hand, dependent objects (including interceptors and
+ * decorators with scope @Dependent) of a stateful session bean or of a Web
+ * Bean with a passivating scope must be serialized and deserialized along
+ * with their owner
+ */
+ @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
+ @SpecAssertion(section = "8.4")
+ public void testDependentDecoratorsOfStatefulEnterpriseBeanMustBeSerializable()
+ {
+ deployBeans(Porvoo_Broken.class);
+ }
+
+ /**
+ * On the other hand, dependent objects (including interceptors and
+ * decorators with scope @Dependent) of a stateful session bean or of a Web
+ * Bean with a passivating scope must be serialized and deserialized along
+ * with their owner
+ */
+ @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
+ @SpecAssertion(section = "8.4")
+ public void testDependentInterceptorsOfWebBeanWithPassivatingScopeMustBeSerializable()
+ {
+ deployBeans(Kotka_Broken.class);
+ }
+
+ /**
+ * On the other hand, dependent objects (including interceptors and
+ * decorators with scope @Dependent) of a stateful session bean or of a Web
+ * Bean with a passivating scope must be serialized and deserialized along
+ * with their owner
+ */
+ @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
+ @SpecAssertion(section = "8.4")
+ public void testDependentDecoratorsOfWebBeansWithPassivatingScopeMustBeSerializable()
+ {
+ deployBeans(Raisio_Broken.class);
+ }
+
+ /**
+ * EJB local objects are serializable. Therefore, any reference to an
+ * enterprise Web Bean of scope @Dependent is serializable.
+ *
+ * @throws ClassNotFoundException
+ * @throws IOException
+ */
+ @Test(groups = { "contexts", "passivation" })
+ @SpecAssertion(section = "8.4")
+ public void testDependentEJBsAreSerializable() throws IOException, ClassNotFoundException
+ {
+ deployBeans(Vaasa.class, Helsinki.class);
+ Set<Bean<Vaasa>> vaasaBeans = manager.resolveByType(Vaasa.class);
+ assert vaasaBeans.size() == 1;
+ assert testSerialize(vaasaBeans.iterator().next());
+ }
+
+ /**
+ * If a simple Web Bean of scope @Dependent and a non-serializable
+ * implementation class is injected into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * UnserializableDependencyException must be thrown by the Web Bean manager
+ * at initialization time.
+ */
+ @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
+ @SpecAssertion(section = "8.4")
+ public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoStatefulSessionBeanFails()
+ {
+ deployBeans(Violation.class, Espoo_Broken.class);
+ manager.getInstanceByType(Espoo_Broken.class);
+ }
+
+ /**
+ * If a simple Web Bean of scope @Dependent and a non-serializable
+ * implementation class is injected into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * UnserializableDependencyException must be thrown by the Web Bean manager
+ * at initialization time.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
+ @SpecAssertion(section = "8.4")
+ public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoNonTransientFieldOfWebBeanWithPassivatingScopeFails()
+ {
+ deployBeans(Vantaa_Broken.class, Violation.class);
+ }
+
+ /**
+ * If a simple Web Bean of scope @Dependent and a non-serializable
+ * implementation class is injected into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * UnserializableDependencyException must be thrown by the Web Bean manager
+ * at initialization time.
+ */
+ @Test(groups = { "contexts", "passivation" })
+ @SpecAssertion(section = "8.4")
+ public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoTransientFieldOK()
+ {
+ createSimpleBean(Joensuu.class);
+ }
+
+ /**
+ * If a simple Web Bean of scope @Dependent and a non-serializable
+ * implementation class is injected into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * UnserializableDependencyException must be thrown by the Web Bean manager
+ * at initialization time.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
+ @SpecAssertion(section = "8.4")
+ public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoConstructorParameterOfWebBeanWithPassivatingScopeFails()
+ {
+ deployBeans(Loviisa_Broken.class, Violation.class);
+ }
+
+ /**
+ * If a simple Web Bean of scope @Dependent and a non-serializable
+ * implementation class is injected into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * UnserializableDependencyException must be thrown by the Web Bean manager
+ * at initialization time.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
+ @SpecAssertion(section = "8.4")
+ public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoInitializerParameterOfWebBeanWithPassivatingScopeFails()
+ {
+ deployBeans(Forssa_Broken.class, Violation.class);
+ }
+
+ /**
+ * If a simple Web Bean of scope @Dependent and a non-serializable
+ * implementation class is injected into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * UnserializableDependencyException must be thrown by the Web Bean manager
+ * at initialization time.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
+ @SpecAssertion(section = "8.4")
+ public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoProducerMethodParameterWithPassivatingScopeFails()
+ {
+ deployBeans(Peraseinajoki.class, Violation.class, Violation2.class);
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ *
+ * @throws NoSuchMethodException
+ * @throws SecurityException
+ */
+ @Test(groups = { "contexts", "passivation", "integration", "broken" }, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "8.4")
+ public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoStatefulSessionBeanFails() throws SecurityException, NoSuchMethodException
+ {
+ deployBeans(CityProducer2.class, Maarianhamina_Broken.class);
+ manager.getInstanceByType(Maarianhamina_Broken.class);
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "8.4")
+ public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoNonTransientFieldOfWebBeanWithPassivatingScopeFails()
+ {
+ deployBeans(CityProducer2.class, Nokia_Broken.class);
+ manager.getInstanceByType(Nokia_Broken.class).ping();
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ */
+ @Test(groups = { "contexts", "passivation" })
+ @SpecAssertion(section = "8.4")
+ public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoTransientFieldOfWebBeanWithPassivatingScopeOK()
+ {
+ createSimpleBean(CityProducer2.class);
+ createSimpleBean(Hyvinkaa.class);
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "8.4")
+ public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoConstructorParameterOfWebBeanWithPassivatingScopeFails()
+ {
+ deployBeans(CityProducer2.class, Loviisa_Broken.class);
+ manager.getInstanceByType(Loviisa_Broken.class).ping();
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "8.4")
+ public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoInitializerParameterOfWebBeanWithPassivatingScopeFails()
+ {
+ deployBeans(CityProducer2.class, Kuopio_Broken.class);
+ manager.getInstanceByType(Kuopio_Broken.class).ping();
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "8.4")
+ public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoProducerMethodParameterWithPassivatingScopeFails()
+ {
+ deployBeans(CityProducer2.class, Jamsa_Broken.class);
+ manager.getInstanceByType(Jamsa_Broken.class).ping();
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ *
+ */
+ @Test(groups = { "contexts", "passivation", "stub" }, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "8.4")
+ public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoStatefulSessionBeanFails() throws Exception
+ {
+ // TODO This doesn't test injction in a SFSB, but into a Enterprise bean
+ // deployBeans(CityProducer.class, Pietarsaari_Broken.class);
+ // manager.getInstanceByType(Pietarsaari_Broken.class);
+ assert false;
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "8.4")
+ public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoNonTransientFieldOfWebBeanWithPassivatingScopeFails()
+ {
+ deployBeans(CityProducer.class, Uusikaupunki_Broken.class);
+ manager.getInstanceByType(Uusikaupunki_Broken.class).ping();
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ */
+ @Test(groups = { "contexts", "passivation" })
+ @SpecAssertion(section = "8.4")
+ public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoTransientFieldOfWebBeanWithPassivatingScopeOK()
+ {
+ deployBeans(CityProducer.class, Salo_Broken.class);
+ manager.getInstanceByType(Salo_Broken.class).ping();
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "8.4")
+ public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoConstructorParameterOfWebBeanWithPassivatingScopeFails()
+ {
+ deployBeans(CityProducer.class, Loviisa_Broken.class);
+ manager.getInstanceByType(Loviisa_Broken.class).ping();
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "8.4")
+ public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoInitializerParameterOfWebBeanWithPassivatingScopeFails()
+ {
+ deployBeans(CityProducer.class, Mikkeli_Broken.class);
+ manager.getInstanceByType(Mikkeli_Broken.class).ping();
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "8.4")
+ public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoProducerMethodParameterWithPassivatingScopeFails()
+ {
+ // TODO Not quite sure what this test is doing
+ deployBeans(CityProducer.class, Jamsa_Broken.class);
+ manager.getInstanceByType(Jamsa_Broken.class).ping();
+ }
+}
Copied: tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/SerializableFoo.java (from rev 1287, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/SerializableFoo.java)
===================================================================
--- tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/SerializableFoo.java (rev 0)
+++ tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/SerializableFoo.java 2009-01-29 18:09:07 UTC (rev 1344)
@@ -0,0 +1,8 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import java.io.Serializable;
+
+public class SerializableFoo implements Serializable
+{
+
+}
Deleted: tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/event/BindingTypeCBinding.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/BindingTypeCBinding.java 2009-01-29 14:40:51 UTC (rev 1284)
+++ tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/event/BindingTypeCBinding.java 2009-01-29 18:09:07 UTC (rev 1344)
@@ -1,20 +0,0 @@
-package org.jboss.webbeans.tck.unit.event;
-
-import javax.inject.AnnotationLiteral;
-
-public class BindingTypeCBinding extends AnnotationLiteral<BindingTypeC> implements BindingTypeC
-{
-
- private String stringValue;
-
- public BindingTypeCBinding(String value)
- {
- this.stringValue = value;
- }
-
- @Override
- public String value()
- {
- return this.stringValue;
- }
-}
Copied: tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/event/BindingTypeCBinding.java (from rev 1286, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/BindingTypeCBinding.java)
===================================================================
--- tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/event/BindingTypeCBinding.java (rev 0)
+++ tck/tags/1.0.0.ALPHA1/impl/src/main/java/org/jboss/webbeans/tck/unit/event/BindingTypeCBinding.java 2009-01-29 18:09:07 UTC (rev 1344)
@@ -0,0 +1,19 @@
+package org.jboss.webbeans.tck.unit.event;
+
+import javax.inject.AnnotationLiteral;
+
+public class BindingTypeCBinding extends AnnotationLiteral<BindingTypeC> implements BindingTypeC
+{
+
+ private String stringValue;
+
+ public BindingTypeCBinding(String value)
+ {
+ this.stringValue = value;
+ }
+
+ public String value()
+ {
+ return this.stringValue;
+ }
+}
Deleted: tck/tags/1.0.0.ALPHA1/pom.xml
===================================================================
--- tck/trunk/pom.xml 2009-01-29 14:40:51 UTC (rev 1284)
+++ tck/tags/1.0.0.ALPHA1/pom.xml 2009-01-29 18:09:07 UTC (rev 1344)
@@ -1,254 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.webbeans.tck</groupId>
- <artifactId>parent</artifactId>
- <packaging>pom</packaging>
- <version>1.0.0-SNAPSHOT</version>
- <name>Web Beans</name>
- <url>http://www.seamframework.org/WebBeans</url>
-
- <description>
- The TCK of JSR 299: Web Beans
- </description>
-
- <developers>
- <developer>
- <name>Pete Muir</name>
- <email>pete.muir(a)jboss.org</email>
- <organization>JBoss, a division of Red Hat</organization>
- <url>http://in.relation.to/Bloggers/Pete</url>
- </developer>
-
- <developer>
- <name>Shane Bryzak</name>
- <organization>JBoss, a division of Red Hat</organization>
- </developer>
-
- <developer>
- <name>David Allen</name>
- </developer>
-
- <developer>
- <name>Nicklas Karlsson</name>
- </developer>
- </developers>
-
- <repositories>
- <repository>
- <id>repository.jboss.org</id>
- <name>JBoss Repository</name>
- <url>http://repository.jboss.org/maven2</url>
- </repository>
- <repository>
- <id>snapshots.jboss.org</id>
- <name>JBoss Repository</name>
- <url>http://snapshots.jboss.org/maven2</url>
- </repository>
- </repositories>
-
- <pluginRepositories>
- <pluginRepository>
- <id>repository.jboss.org</id>
- <name>JBoss Repository</name>
- <url>http://repository.jboss.org/maven2</url>
- </pluginRepository>
- </pluginRepositories>
-
- <modules>
- <module>api</module>
- <module>impl</module>
- </modules>
-
- <dependencyManagement>
- <dependencies>
-
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <version>5.8</version>
- <classifier>jdk15</classifier>
- </dependency>
-
- <dependency>
- <groupId>javax.annotation</groupId>
- <artifactId>jsr250-api</artifactId>
- <version>1.0</version>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.5</version>
- </dependency>
- <dependency>
- <groupId>javax.transaction</groupId>
- <artifactId>jta</artifactId>
- <version>1.0.1B</version>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.14</version>
- </dependency>
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- <version>1.2</version>
- </dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <version>1.2_10</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.webbeans</groupId>
- <artifactId>webbeans-api</artifactId>
- <version>${webbeans.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.webbeans.tck</groupId>
- <artifactId>webbeans-tck-api</artifactId>
- <version>${webbeans.tck.version}</version>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>tck-utils</artifactId>
- <version>0.9-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-api</artifactId>
- <version>3.1.0-Alpha1</version>
- <exclusions>
- <exclusion>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>javax.persistence</groupId>
- <artifactId>persistence-api</artifactId>
- <version>1.0</version>
- </dependency>
-
-
- </dependencies>
- </dependencyManagement>
-
- <build>
- <extensions>
- <extension>
- <groupId>org.apache.maven.wagon</groupId>
- <artifactId>wagon-webdav</artifactId>
- <version>1.0-beta-2</version>
- </extension>
- </extensions>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-sources</id>
- <phase>verify</phase>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>apt-maven-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>test-process</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <testOutputDirectory>${project.build.directory}/site</testOutputDirectory>
- </configuration>
- </plugin>
- </plugins>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.0.2</version>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifest>
- <addDefaultImplementationEntries>
- true
- </addDefaultImplementationEntries>
- <addDefaultSpecificationEntries>
- true
- </addDefaultSpecificationEntries>
- </manifest>
- </archive>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
-
- <ciManagement>
- <system>Hudson</system>
- <url></url>
- </ciManagement>
-
- <issueManagement>
- <system>JIRA</system>
- <url>http://jira.jboss.org/browse/WBTCK</url>
- </issueManagement>
-
- <inceptionYear>2008</inceptionYear>
-
- <licenses>
- <license>
- <name>Apache License, Version 2.0</name>
- <url>http://www.apache.org/licenses/LICENSE-2.0</url>
- </license>
- </licenses>
-
- <scm>
- <connection>http://anonsvn.jboss.org/repos/webbeans</connection>
- <developerConnection>
- https://svn.jboss.org/repos/webbeans
- </developerConnection>
- <url>http://fisheye.jboss.org/browse/WebBeans</url>
- </scm>
-
- <distributionManagement>
- <repository>
- <!-- Copy the dist to the local checkout of the JBoss maven2 repo ${maven.repository.root} -->
- <!-- It is anticipated that ${maven.repository.root} be set in user's settings.xml -->
- <!-- todo : replace this with direct svn access once the svnkit providers are available -->
- <id>repository.jboss.org</id>
- <url>file://${maven.repository.root}</url>
- </repository>
- <snapshotRepository>
- <id>snapshots.jboss.org</id>
- <name>JBoss Snapshot Repository</name>
- <url>dav:https://snapshots.jboss.org/maven2</url>
- </snapshotRepository>
- </distributionManagement>
-
- <properties>
- <webbeans.version>1.0.0-SNAPSHOT</webbeans.version>
- <webbeans.tck.version>1.0.0-SNAPSHOT</webbeans.tck.version>
- </properties>
-
-</project>
Copied: tck/tags/1.0.0.ALPHA1/pom.xml (from rev 1342, tck/trunk/pom.xml)
===================================================================
--- tck/tags/1.0.0.ALPHA1/pom.xml (rev 0)
+++ tck/tags/1.0.0.ALPHA1/pom.xml 2009-01-29 18:09:07 UTC (rev 1344)
@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.webbeans.tck</groupId>
+ <artifactId>parent</artifactId>
+ <packaging>pom</packaging>
+ <version>1.0.0.ALPHA1</version>
+ <name>Web Beans</name>
+ <url>http://www.seamframework.org/WebBeans</url>
+
+ <description>
+ The TCK of JSR 299: Web Beans
+ </description>
+
+ <developers>
+ <developer>
+ <name>Pete Muir</name>
+ <email>pete.muir(a)jboss.org</email>
+ <organization>JBoss, a division of Red Hat</organization>
+ <url>http://in.relation.to/Bloggers/Pete</url>
+ </developer>
+
+ <developer>
+ <name>Shane Bryzak</name>
+ <organization>JBoss, a division of Red Hat</organization>
+ </developer>
+
+ <developer>
+ <name>David Allen</name>
+ </developer>
+
+ <developer>
+ <name>Nicklas Karlsson</name>
+ </developer>
+ </developers>
+
+ <repositories>
+ <repository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <url>http://repository.jboss.org/maven2</url>
+ </repository>
+ <repository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Repository</name>
+ <url>http://snapshots.jboss.org/maven2</url>
+ </repository>
+ </repositories>
+
+ <pluginRepositories>
+ <pluginRepository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <url>http://repository.jboss.org/maven2</url>
+ </pluginRepository>
+ </pluginRepositories>
+
+ <modules>
+ <module>api</module>
+<!-- <module>impl</module>-->
+ </modules>
+
+ <dependencyManagement>
+ <dependencies>
+
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>5.8</version>
+ <classifier>jdk15</classifier>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.annotation</groupId>
+ <artifactId>jsr250-api</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ <version>1.0.1B</version>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>1.2_10</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.webbeans</groupId>
+ <artifactId>webbeans-api</artifactId>
+ <version>${webbeans.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.webbeans.tck</groupId>
+ <artifactId>webbeans-tck-api</artifactId>
+ <version>${webbeans.tck.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>tck-utils</artifactId>
+ <version>0.9-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.ejb3</groupId>
+ <artifactId>jboss-ejb3-api</artifactId>
+ <version>3.1.0-Alpha1</version>
+ <exclusions>
+ <exclusion>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>javax.persistence</groupId>
+ <artifactId>persistence-api</artifactId>
+ <version>1.0</version>
+ </dependency>
+
+
+ </dependencies>
+ </dependencyManagement>
+
+ <build>
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-webdav</artifactId>
+ <version>1.0-beta-2</version>
+ </extension>
+ </extensions>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>apt-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test-process</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <testOutputDirectory>${project.build.directory}/site</testOutputDirectory>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.0-beta-8</version>
+ <configuration>
+ <tagBase>https://svn.jboss.org/repos/webbeans/tck/tags</tagBase>
+ <autoVersionSubmodules>true</autoVersionSubmodules>
+ </configuration>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addDefaultImplementationEntries>
+ true
+ </addDefaultImplementationEntries>
+ <addDefaultSpecificationEntries>
+ true
+ </addDefaultSpecificationEntries>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <ciManagement>
+ <system>Hudson</system>
+ <url />
+ </ciManagement>
+
+ <issueManagement>
+ <system>JIRA</system>
+ <url>http://jira.jboss.org/browse/WBTCK</url>
+ </issueManagement>
+
+ <inceptionYear>2008</inceptionYear>
+
+ <licenses>
+ <license>
+ <name>Apache License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0</url>
+ </license>
+ </licenses>
+
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/webbeans/1.0.0.ALPHA1</connection>
+ <developerConnection>
+ scm:svn:https://svn.jboss.org/repos/webbeans/tck/tags/1.0.0.ALPHA1
+ </developerConnection>
+ <url>http://fisheye.jboss.org/browse/WebBeans/1.0.0.ALPHA1</url>
+ </scm>
+
+ <distributionManagement>
+ <repository>
+ <!-- Copy the dist to the local checkout of the JBoss maven2 repo ${maven.repository.root} -->
+ <!-- It is anticipated that ${maven.repository.root} be set in user's settings.xml -->
+ <!-- todo : replace this with direct svn access once the svnkit providers are available -->
+ <id>repository.jboss.org</id>
+ <url>file://${maven.repository.root}</url>
+ </repository>
+ <snapshotRepository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshot Repository</name>
+ <url>dav:https://snapshots.jboss.org/maven2</url>
+ </snapshotRepository>
+ </distributionManagement>
+
+ <properties>
+ <webbeans.version>1.0.0.ALPHA2</webbeans.version>
+ <webbeans.tck.version>1.0.0.ALPHA1</webbeans.tck.version>
+ </properties>
+
+</project>
15 years, 11 months