[webbeans-commits] Webbeans SVN: r1039 - ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit and 8 other directories.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Sat Jan 17 11:54:33 EST 2009
Author: pete.muir at jboss.org
Date: 2009-01-17 11:54:32 -0500 (Sat, 17 Jan 2009)
New Revision: 1039
Added:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/PassivatingContextTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/application/
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/application/ApplicationContextTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/conversation/
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/conversation/ConversationContextTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/Animal.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/AnotherDeploymentType.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/DeadlyAnimal.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/DeadlySpider.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/DependentContextTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/Fox.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/FoxRun.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/Spider.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/SpiderProducer.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/Tarantula.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/City.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/CityBinding.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/CityInterface.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/CityProducer.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/CityProducer2.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/CityProducer3.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Espoo_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Forssa_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Hamina_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Helsinki.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Hyvinkaa.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Jamsa_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Joensuu.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Jyvaskyla.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Kaarina_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Kotka_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Kuopio_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Loviisa_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Maarianhamina_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Mikkeli_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Nokia_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/PassivatingContextTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Peraseinajoki.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Pietarsaari_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Porvoo_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Raisio_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Salo_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Turku.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Uusikaupunki_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Vaasa.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Vantaa_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Violation.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Violation2.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/request/
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/request/RequestContextTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/session/
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/session/SessionContextTest.java
Removed:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/contexts/PassivatingContextTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Animal.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/AnotherDeploymentType.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/DeadlyAnimal.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/DeadlySpider.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/DependentContextTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Fox.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/FoxRun.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Spider.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/SpiderProducer.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Tarantula.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/AbstractTest.java
Log:
port passivation tests, some disabled due to weirdness of tests
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/contexts/PassivatingContextTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/contexts/PassivatingContextTest.java 2009-01-17 14:58:44 UTC (rev 1038)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/contexts/PassivatingContextTest.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -1,608 +0,0 @@
-package org.jboss.webbeans.test.contexts;
-
-import java.io.IOException;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-
-import javax.webbeans.ApplicationScoped;
-import javax.webbeans.ConversationScoped;
-import javax.webbeans.DefinitionException;
-import javax.webbeans.IllegalProductException;
-import javax.webbeans.RequestScoped;
-import javax.webbeans.SessionScoped;
-import javax.webbeans.UnserializableDependencyException;
-import javax.webbeans.manager.Bean;
-
-import org.jboss.webbeans.CurrentManager;
-import org.jboss.webbeans.MetaDataCache;
-import org.jboss.webbeans.bean.AbstractProducerBean;
-import org.jboss.webbeans.bean.EnterpriseBean;
-import org.jboss.webbeans.bean.ProducerFieldBean;
-import org.jboss.webbeans.bean.ProducerMethodBean;
-import org.jboss.webbeans.bean.SimpleBean;
-import org.jboss.webbeans.test.AbstractTest;
-import org.jboss.webbeans.test.SpecAssertion;
-import org.jboss.webbeans.test.SpecVersion;
-import org.jboss.webbeans.test.contexts.invalid.CityProducer;
-import org.jboss.webbeans.test.contexts.invalid.CityProducer2;
-import org.jboss.webbeans.test.contexts.invalid.CityProducer3;
-import org.jboss.webbeans.test.contexts.invalid.Espoo;
-import org.jboss.webbeans.test.contexts.invalid.Forssa;
-import org.jboss.webbeans.test.contexts.invalid.Hamina;
-import org.jboss.webbeans.test.contexts.invalid.Jamsa;
-import org.jboss.webbeans.test.contexts.invalid.Kaarina;
-import org.jboss.webbeans.test.contexts.invalid.Kotka;
-import org.jboss.webbeans.test.contexts.invalid.Kuopio;
-import org.jboss.webbeans.test.contexts.invalid.Loviisa;
-import org.jboss.webbeans.test.contexts.invalid.Maarianhamina;
-import org.jboss.webbeans.test.contexts.invalid.Mikkeli;
-import org.jboss.webbeans.test.contexts.invalid.Nokia;
-import org.jboss.webbeans.test.contexts.invalid.Peraseinajoki;
-import org.jboss.webbeans.test.contexts.invalid.Pietarsaari;
-import org.jboss.webbeans.test.contexts.invalid.Porvoo;
-import org.jboss.webbeans.test.contexts.invalid.Raisio;
-import org.jboss.webbeans.test.contexts.invalid.Salo;
-import org.jboss.webbeans.test.contexts.invalid.Uusikaupunki;
-import org.jboss.webbeans.test.contexts.invalid.Vantaa;
-import org.jboss.webbeans.test.contexts.invalid.Violation;
-import org.jboss.webbeans.test.contexts.invalid.Violation2;
-import org.jboss.webbeans.test.contexts.valid.Helsinki;
-import org.jboss.webbeans.test.contexts.valid.Hyvinkaa;
-import org.jboss.webbeans.test.contexts.valid.Joensuu;
-import org.jboss.webbeans.test.contexts.valid.Jyvaskyla;
-import org.jboss.webbeans.test.contexts.valid.Turku;
-import org.jboss.webbeans.test.contexts.valid.Vaasa;
-import org.jboss.webbeans.util.BeanValidation;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-/**
- *
- * @author Nicklas Karlsson
- *
- */
- at SpecVersion("20081206")
- at SuppressWarnings("unused")
-public class PassivatingContextTest extends AbstractTest
-{
- @BeforeMethod
- public void initContext()
- {
- addToEjbCache(Turku.class);
- addToEjbCache(Kaarina.class);
- addToEjbCache(Espoo.class);
- addToEjbCache(Maarianhamina.class);
- addToEjbCache(Porvoo.class);
- addToEjbCache(Pietarsaari.class);
- }
-
- /**
- * EJB local objects are serializable. Therefore, an enterprise Web Bean may
- * declare any passivating scope.
- */
- @Test(groups = { "contexts", "passivation", "enterpriseBean" })
- @SpecAssertion(section = "9.5")
- public void testEJBWebBeanCanDeclarePassivatingScope()
- {
- EnterpriseBean<Turku> bean = EnterpriseBean.of(Turku.class, manager);
- assert true;
- }
-
- /**
- * 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 = "9.5")
- public void testSimpleWebBeanWithNonSerializableImplementationClassFails()
- {
- registerBeans(new Class<?>[] { Hamina.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 = "9.5")
- public void testSimpleWebBeanWithSerializableImplementationClassOK()
- {
- SimpleBean<Jyvaskyla> bean = SimpleBean.of(Jyvaskyla.class, manager);
- assert true;
- }
-
- /**
- * The built-in session and conversation scopes are passivating. No other
- * built-in scope is passivating.
- */
- @Test(groups = { "contexts", "passivation" })
- @SpecAssertion(section = "9.5")
- public void testIsSessionScopePassivating()
- {
- assert MetaDataCache.instance().getScopeModel(SessionScoped.class).isPassivating();
- }
-
- /**
- * The built-in session and conversation scopes are passivating. No other
- * built-in scope is passivating.
- */
- @Test(groups = { "contexts", "passivation" })
- @SpecAssertion(section = "9.5")
- public void testIsConversationScopePassivating()
- {
- assert MetaDataCache.instance().getScopeModel(ConversationScoped.class).isPassivating();
- }
-
- /**
- * The built-in session and conversation scopes are passivating. No other
- * built-in scope is passivating.
- */
- @Test(groups = { "contexts", "passivation" })
- @SpecAssertion(section = "9.5")
- public void testIsApplicationScopeNonPassivating()
- {
- assert !MetaDataCache.instance().getScopeModel(ApplicationScoped.class).isPassivating();
- }
-
- /**
- * The built-in session and conversation scopes are passivating. No other
- * built-in scope is passivating.
- */
- @Test(groups = { "contexts", "passivation" })
- @SpecAssertion(section = "9.5")
- public void testIsRequestScopeNonPassivating()
- {
- assert !MetaDataCache.instance().getScopeModel(RequestScoped.class).isPassivating();
- }
-
- /**
- * the Web Bean declares a passivating scope type, and context passivation
- * occurs, or
- *
- * @throws IOException
- * @throws ClassNotFoundException
- */
- @Test(groups = { "contexts", "passivation" })
- @SpecAssertion(section = "9.5")
- public void testSimpleWebBeanDeclaringPassivatingScopeIsSerializedWhenContextIsPassivated() throws IOException, ClassNotFoundException
- {
- SimpleBean<Jyvaskyla> bean = SimpleBean.of(Jyvaskyla.class, manager);
- //assert testSerialize(bean);
- }
-
- @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" })
- @SpecAssertion(section = "9.5")
- public void testStatefulEJBIsSerializedWhenPassivatedByEJBContainer() throws IOException, ClassNotFoundException
- {
- EnterpriseBean<Turku> bean = EnterpriseBean.of(Turku.class, manager);
- assert testSerialize(bean);
- }
-
- /**
- * 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 = "9.5")
- public void testDependentInterceptorsOfStatefulEnterpriseBeanMustBeSerializable()
- {
- EnterpriseBean<Kaarina> bean = EnterpriseBean.of(Kaarina.class, manager);
- }
-
- /**
- * 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 = "9.5")
- public void testDependentDecoratorsOfStatefulEnterpriseBeanMustBeSerializable()
- {
- EnterpriseBean<Porvoo> bean = EnterpriseBean.of(Porvoo.class, manager);
- }
-
- /**
- * 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 = "9.5")
- public void testDependentInterceptorsOfWebBeanWithPassivatingScopeMustBeSerializable()
- {
- SimpleBean<Kotka> bean = SimpleBean.of(Kotka.class, manager);
- }
-
- /**
- * 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 = "9.5")
- public void testDependentDecoratorsOfWebBeansWithPassivatingScopeMustBeSerializable()
- {
- SimpleBean<Raisio> bean = SimpleBean.of(Raisio.class, manager);
- }
-
- /**
- * 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 = "9.5")
- public void testDependentEJBsAreSerializable() throws IOException, ClassNotFoundException
- {
- SimpleBean<Vaasa> bean = SimpleBean.of(Vaasa.class, manager);
- manager.addBean(SimpleBean.of(Helsinki.class, manager));
- assert testSerialize(bean);
- }
-
- /**
- * 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 = "9.5")
- public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoStatefulSessionBeanFails()
- {
- manager.addBean(SimpleBean.of(Violation.class, manager));
- EnterpriseBean<Espoo> bean = EnterpriseBean.of(Espoo.class, manager);
- bean.postConstruct(null);
- }
-
- /**
- * 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 = "9.5")
- public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoNonTransientFieldOfWebBeanWithPassivatingScopeFails()
- {
- registerBeans(new Class<?>[] { Violation.class, Vantaa.class });
- BeanValidation.validate(manager.getBeans());
- }
-
- /**
- * 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 = "9.5")
- public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoTransientFieldOK()
- {
- SimpleBean<Joensuu> bean = SimpleBean.of(Joensuu.class, manager);
- }
-
- /**
- * 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 = "9.5")
- public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoConstructorParameterOfWebBeanWithPassivatingScopeFails()
- {
- registerBeans(new Class<?>[] { Violation.class, Loviisa.class} );
- BeanValidation.validate(manager.getBeans());
- }
-
- /**
- * 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 = "9.5")
- public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoInitializerParameterOfWebBeanWithPassivatingScopeFails()
- {
- registerBeans(new Class<?>[] { Violation.class, Forssa.class });
- BeanValidation.validate(manager.getBeans());
- }
-
- /**
- * 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 = "9.5")
- public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoProducerMethodParameterWithPassivatingScopeFails()
- {
- manager.addBean(SimpleBean.of(Violation.class, manager));
- Bean<?> producerBean = registerProducerBean(Peraseinajoki.class, "create", Violation2.class);
- BeanValidation.validate(manager.getBeans());
- }
-
- /**
- * 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" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "9.5")
- public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoStatefulEnterpriseBeanFails() throws SecurityException, NoSuchMethodException
- {
- registerProducerBean(CityProducer2.class, "create", Violation.class);
- EnterpriseBean<Maarianhamina> ejb = EnterpriseBean.of(Maarianhamina.class, manager);
- ejb.postConstruct(null);
- }
-
- /**
- * 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 = "9.5")
- public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoNonTransientFieldOfWebBeanWithPassivatingScopeFails()
- {
- registerProducerBean(CityProducer2.class, "create", Violation.class);
- getInstance(Nokia.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 = "9.5")
- public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoTransientFieldOfWebBeanWithPassivatingScopeOK()
- {
- SimpleBean<CityProducer2> bean = SimpleBean.of(CityProducer2.class, manager);
- SimpleBean<Hyvinkaa> ejb = SimpleBean.of(Hyvinkaa.class, manager);
- }
-
- /**
- * 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 = "9.5")
- public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoConstructorParameterOfWebBeanWithPassivatingScopeFails()
- {
- registerProducerBean(CityProducer2.class, "create", Violation.class);
- getInstance(Loviisa.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 = "9.5")
- public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoInitializerParameterOfWebBeanWithPassivatingScopeFails()
- {
- registerProducerBean(CityProducer2.class, "create", Violation.class);
- getInstance(Kuopio.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 = "9.5")
- public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoProducerMethodParameterWithPassivatingScopeFails()
- {
- registerProducerBean(CityProducer3.class, "create", Violation.class);
- Bean<?> producerBean = registerProducerBean(Jamsa.class, "create", Violation.class);
- Jamsa producerInstance = (Jamsa)producerBean.create();
- producerInstance.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.
- *
- * @throws NoSuchFieldException
- * @throws SecurityException
- */
- @Test(groups = { "contexts", "passivation"}, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "9.5")
- public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoStatefulSessionBeanFails() throws SecurityException, NoSuchFieldException
- {
- registerProducerBean(CityProducer.class, "reference", Violation.class);
- EnterpriseBean<Pietarsaari> bean = EnterpriseBean.of(Pietarsaari.class, manager);
- // TODO: hack
- BeanValidation.validate(manager.getBeans());
- bean.postConstruct(null);
- assert true;
- }
-
- /**
- * 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 = "9.5")
- public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoNonTransientFieldOfWebBeanWithPassivatingScopeFails()
- {
- registerProducerBean(CityProducer.class, "reference", Violation.class);
- getInstance(Uusikaupunki.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 = "9.5")
- public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoTransientFieldOfWebBeanWithPassivatingScopeOK()
- {
- registerProducerBean(CityProducer.class, "reference", Violation.class);
- getInstance(Salo.class).ping();
- assert true;
- }
-
- /**
- * 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 = "9.5")
- public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoConstructorParameterOfWebBeanWithPassivatingScopeFails()
- {
- registerProducerBean(CityProducer.class, "reference", Violation.class);
- getInstance(Loviisa.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 = "9.5")
- public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoInitializerParameterOfWebBeanWithPassivatingScopeFails()
- {
- registerProducerBean(CityProducer.class, "reference", Violation.class);
- getInstance(Mikkeli.class).ping();
- }
-
- private <T> T getInstance(Class<T> clazz)
- {
- Bean<T> bean = null;
- if (CurrentManager.rootManager().getEjbDescriptorCache().containsKey(clazz))
- {
- bean = EnterpriseBean.of(clazz, manager);
- }
- else
- {
- bean = SimpleBean.of(clazz, manager);
- }
- manager.addBean(bean);
- return manager.getInstance(bean);
- }
-
- /**
- * 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 = "9.5")
- public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoProducerMethodParameterWithPassivatingScopeFails()
- {
- registerProducerBean(CityProducer.class, "reference", Violation.class);
- Bean<?> producerBean = registerProducerBean(Jamsa.class, "create", Violation.class);
- Jamsa producerInstance = (Jamsa)producerBean.create();
- producerInstance.ping();
-
- }
-
- /**
- * The Web Bean manager must guarantee that JMS endpoint proxy objects are
- * serializable.
- */
- @Test(groups = { "stub", "contexts", "passivation", "jms" })
- @SpecAssertion(section = "9.5")
- public void testJMSEndpointProxyIsSerializable()
- {
- assert false;
- }
-}
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/PassivatingContextTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/PassivatingContextTest.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/PassivatingContextTest.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,54 @@
+package org.jboss.webbeans.test.unit;
+
+import javax.webbeans.ApplicationScoped;
+import javax.webbeans.ConversationScoped;
+import javax.webbeans.RequestScoped;
+import javax.webbeans.SessionScoped;
+
+import org.jboss.webbeans.MetaDataCache;
+import org.testng.annotations.Test;
+
+public class PassivatingContextTest extends org.jboss.webbeans.test.AbstractTest
+{
+
+ /**
+ * The built-in session and conversation scopes are passivating. No other
+ * built-in scope is passivating.
+ */
+ @Test(groups = { "contexts", "passivation" })
+ public void testIsSessionScopePassivating()
+ {
+ assert MetaDataCache.instance().getScopeModel(SessionScoped.class).isPassivating();
+ }
+
+ /**
+ * The built-in session and conversation scopes are passivating. No other
+ * built-in scope is passivating.
+ */
+ @Test(groups = { "contexts", "passivation" })
+ public void testIsConversationScopePassivating()
+ {
+ assert MetaDataCache.instance().getScopeModel(ConversationScoped.class).isPassivating();
+ }
+
+ /**
+ * The built-in session and conversation scopes are passivating. No other
+ * built-in scope is passivating.
+ */
+ @Test(groups = { "contexts", "passivation" })
+ public void testIsApplicationScopeNonPassivating()
+ {
+ assert !MetaDataCache.instance().getScopeModel(ApplicationScoped.class).isPassivating();
+ }
+
+ /**
+ * The built-in session and conversation scopes are passivating. No other
+ * built-in scope is passivating.
+ */
+ @Test(groups = { "contexts", "passivation" })
+ public void testIsRequestScopeNonPassivating()
+ {
+ assert !MetaDataCache.instance().getScopeModel(RequestScoped.class).isPassivating();
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/PassivatingContextTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/AbstractTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/AbstractTest.java 2009-01-17 14:58:44 UTC (rev 1038)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/AbstractTest.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -83,6 +83,11 @@
return configuration().getBeans().createSimpleBean(beanClass);
}
+ public <T> Bean<T> createEnterpriseBean(Class<T> beanClass)
+ {
+ return configuration().getBeans().createEnterpriseBean(beanClass);
+ }
+
public <T> Bean<T> createProducerMethodBean(Method method, Bean<?> producerBean)
{
return configuration().getBeans().createProducerMethodBean(method, producerBean);
Deleted: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Animal.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Animal.java 2009-01-17 14:58:44 UTC (rev 1038)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Animal.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -1,6 +0,0 @@
-package org.jboss.webbeans.tck.tests.context;
-
-interface Animal
-{
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/AnotherDeploymentType.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/AnotherDeploymentType.java 2009-01-17 14:58:44 UTC (rev 1038)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/AnotherDeploymentType.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -1,20 +0,0 @@
-package org.jboss.webbeans.tck.tests.context;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.webbeans.DeploymentType;
-
- at Target( { TYPE, METHOD })
- at Retention(RUNTIME)
- at Documented
- at DeploymentType
- at interface AnotherDeploymentType
-{
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/DeadlyAnimal.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/DeadlyAnimal.java 2009-01-17 14:58:44 UTC (rev 1038)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/DeadlyAnimal.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -1,6 +0,0 @@
-package org.jboss.webbeans.tck.tests.context;
-
-interface DeadlyAnimal
-{
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/DeadlySpider.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/DeadlySpider.java 2009-01-17 14:58:44 UTC (rev 1038)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/DeadlySpider.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -1,6 +0,0 @@
-package org.jboss.webbeans.tck.tests.context;
-
-interface DeadlySpider extends DeadlyAnimal
-{
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/DependentContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/DependentContextTest.java 2009-01-17 14:58:44 UTC (rev 1038)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/DependentContextTest.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -1,601 +0,0 @@
-package org.jboss.webbeans.tck.tests.context;
-
-import java.lang.reflect.Method;
-import java.util.Set;
-
-import javax.webbeans.ContextNotActiveException;
-import javax.webbeans.Dependent;
-import javax.webbeans.manager.Bean;
-import javax.webbeans.manager.Context;
-
-import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
-import org.jboss.webbeans.tck.tests.AbstractTest;
-import org.testng.annotations.Test;
-
- at SpecVersion("20081206")
-public class DependentContextTest extends AbstractTest
-{
-
- /**
- * No injected instance of the Web Bean is ever shared between multiple
- * injection points.
- */
- @Test(groups = { "contexts", "injection" })
- @SpecAssertion(section = "9.4")
- 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();
- assert !foxRun.fox.equals(foxRun.anotherFox);
- }
-
- /**
- * Any instance of the Web Bean that is used to evaluate a Unified EL
- * expression exists to service that evaluation only.
- */
- @Test(groups = { "stub", "contexts", "el" })
- @SpecAssertion(section = "9.4")
- public void testInstanceUsedForElEvalutionNotShared()
- {
- assert false;
- }
-
- /**
- * Any instance of the 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", "broken" })
- @SpecAssertion(section = "9.4")
- 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();
- Tarantula tarantula2 = tarantulaBean.create();
- assert tarantula != null;
- assert tarantula2 != null;
- assert tarantula != tarantula2;
- }
-
- /**
- * Any instance of the 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", "stub" })
- @SpecAssertion(section = "9.4")
- public void testInstanceUsedForProducerFieldNotShared() throws Exception
- {
- assert false;
- }
-
- /**
- * Any instance of the 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 = "9.4")
- public void testInstanceUsedForDisposalMethodNotShared()
- {
- assert false;
- }
-
- /**
- * Any instance of the 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 = "9.4")
- 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 = "9.4")
- 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, true) != null;
- assert context.get(foxBean, true) 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 = "9.4")
- 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, false) == null;
- }
-
- }.run();
-
-
- }
-
- /**
- * The @Dependent scope is inactive except:
- */
- @Test(groups = {"contexts"}, expectedExceptions = ContextNotActiveException.class)
- @SpecAssertion(section = "9.4")
- public void testContextIsInactive()
- {
- 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 = "9.4")
- 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 = "9.4")
- public void testContextIsActiveWhenInvokingProducerField()
- {
- 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", "disposalMethod" })
- @SpecAssertion(section = "9.4")
- 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 = "9.4")
- public void testContextIsActiveWhenInvokingObserverMethod()
- {
- assert false;
- }
-
- /**
- * while a Unified EL expression is evaluated, or
- */
- @Test(groups = { "stub", "contexts", "el" })
- @SpecAssertion(section = "9.4")
- 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 = "9.4")
- 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();
- 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 = "9.4")
- 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 = "9.4")
- public void testContextIsActiveDuringInjection()
- {
- Bean<FoxRun> foxRunBean = createSimpleBean(FoxRun.class);
- Bean<Fox> foxBean = createSimpleBean(Fox.class);
- manager.addBean(foxBean);
- FoxRun foxRun = foxRunBean.create();
- 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 = "9.4")
- 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 = "9.4")
- 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 = "9.4")
- 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 = "9.4")
- 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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4")
- public void testDependentsDestroyedWhenObserverMethodEvaluationCompletes()
- {
- assert false;
- }
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Fox.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Fox.java 2009-01-17 14:58:44 UTC (rev 1038)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Fox.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -1,14 +0,0 @@
-package org.jboss.webbeans.tck.tests.context;
-
-import javax.webbeans.Dependent;
-
- at Dependent
-class Fox
-{
-
- public String getName()
- {
- return "gavin";
- }
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/FoxRun.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/FoxRun.java 2009-01-17 14:58:44 UTC (rev 1038)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/FoxRun.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -1,14 +0,0 @@
-package org.jboss.webbeans.tck.tests.context;
-
-import javax.webbeans.Current;
-
-class FoxRun
-{
-
- @Current
- public Fox fox;
-
- @Current
- public Fox anotherFox;
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Spider.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Spider.java 2009-01-17 14:58:44 UTC (rev 1038)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Spider.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -1,12 +0,0 @@
-package org.jboss.webbeans.tck.tests.context;
-
-
-class Spider implements Animal
-{
-
- public final void layEggs()
- {
-
- }
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/SpiderProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/SpiderProducer.java 2009-01-17 14:58:44 UTC (rev 1038)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/SpiderProducer.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -1,14 +0,0 @@
-package org.jboss.webbeans.tck.tests.context;
-
-import javax.webbeans.Produces;
-
- at AnotherDeploymentType
-class SpiderProducer
-{
-
- @Produces public Tarantula produceTarantula()
- {
- return new Tarantula();
- }
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Tarantula.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Tarantula.java 2009-01-17 14:58:44 UTC (rev 1038)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Tarantula.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -1,6 +0,0 @@
-package org.jboss.webbeans.tck.tests.context;
-
-class Tarantula extends Spider implements DeadlySpider
-{
-
-}
Copied: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/application/ApplicationContextTest.java (from rev 1037, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/ApplicationContextTest.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/application/ApplicationContextTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/application/ApplicationContextTest.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,92 @@
+package org.jboss.webbeans.tck.tests.context.application;
+
+import org.jboss.webbeans.tck.impl.SpecAssertion;
+import org.jboss.webbeans.tck.impl.SpecVersion;
+import org.jboss.webbeans.tck.tests.AbstractTest;
+import org.testng.annotations.Test;
+
+ at SpecVersion("20081206")
+public class ApplicationContextTest extends AbstractTest
+{
+
+ /**
+ * The application scope is active during the service() method of any servlet
+ * in the web application.
+ */
+ @Test(groups = { "stub", "contexts", "servlet" })
+ @SpecAssertion(section = "9.6.3")
+ public void testApplicationScopeActiveDuringServiceMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * The application scope is active during any Java EE web service invocation.
+ */
+ @Test(groups = { "stub", "contexts", "webservice" })
+ @SpecAssertion(section = "9.6.3")
+ public void testApplicationScopeActiveDuringWebSericeInvocation()
+ {
+ assert false;
+ }
+
+ /**
+ * The application scope is also active during any remote method invocation
+ * of any EJB bean, during any call to an EJB timeout method and during
+ * message delivery to any EJB message driven bean.
+ */
+ @Test(groups = { "stub", "contexts", "ejb3" })
+ @SpecAssertion(section = "9.6.3")
+ public void testApplicationScopeActiveDuringRemoteMethodInvocationOfEjb()
+ {
+ assert false;
+ }
+
+ /**
+ * The application scope is also active during any remote method invocation
+ * of any EJB bean, during any call to an EJB timeout method and during
+ * message delivery to any EJB message driven bean.
+ */
+ @Test(groups = { "stub", "contexts", "ejb3" })
+ @SpecAssertion(section = "9.6.3")
+ public void testApplicationScopeActiveDuringCallToEjbTimeoutMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * The application scope is also active during any remote method invocation
+ * of any EJB bean, during any call to an EJB timeout method and during
+ * message delivery to any EJB message driven bean.
+ */
+ @Test(groups = { "stub", "contexts", "ejb3" })
+ @SpecAssertion(section = "9.6.3")
+ public void testApplicationScopeActiveDuringEjbMessageDelivery()
+ {
+ assert false;
+ }
+
+ /**
+ * The application context is shared between all servlet requests, web
+ * service invocations, EJB remote method invocations, EJB timeouts and
+ * message deliveries to message driven beans that execute within the same
+ * application
+ */
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "9.6.3")
+ public void testApplicationContextSharedBetweenInvokationsInApplication()
+ {
+ assert false;
+ }
+
+ /**
+ * The application context is destroyed when the application is undeployed.
+ */
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "9.6.3")
+ public void testApplicationScopeDestroyedWhenApplicationIsUndeployed()
+ {
+ assert false;
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/application/ApplicationContextTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/conversation/ConversationContextTest.java (from rev 1037, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/ConversationContextTest.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/conversation/ConversationContextTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/conversation/ConversationContextTest.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,231 @@
+package org.jboss.webbeans.tck.tests.context.conversation;
+
+import org.jboss.webbeans.tck.impl.SpecAssertion;
+import org.jboss.webbeans.tck.impl.SpecVersion;
+import org.jboss.webbeans.tck.tests.AbstractTest;
+import org.testng.annotations.Test;
+
+/**
+ *
+ * @author Nicklas Karlsson
+ *
+ */
+ at SpecVersion("20081206")
+public class ConversationContextTest extends AbstractTest
+{
+ /**
+ * For a JSF faces request, the context is active from the beginning of the
+ * apply request values phase, until the response is complete.
+ */
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "9.6.4")
+ public void testContextActiveFromBeginningOfApplyRequestValuesPhasetoResponseCompleteForJsfRequest()
+ {
+ assert false;
+ }
+
+ /**
+ * For a JSF non-faces request, the context is active during the render
+ * response phase
+ */
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "9.6.4")
+ public void testContextActiveDuringRenderResponsePhaseForNonFacesJsfRequest()
+ {
+ assert false;
+ }
+
+ /**
+ * Any JSF request has exactly one associated conversation
+ */
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "9.6.4")
+ public void testJsfRequestHasExactlyOneAssociatedConversation()
+ {
+ assert false;
+ }
+
+ /**
+ * The conversation associated with a JSF request is determined at the end of
+ * the restore view phase and does not change during the request
+ */
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "9.6.4")
+ public void testAssociatedConversationOfJsfRequestIsDeterminedAtEndOfRestoreViewPhase()
+ {
+ assert false;
+ }
+
+ /**
+ * The conversation associated with a JSF request is determined at the end of
+ * the restore view phase and does not change during the request
+ */
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "9.6.4")
+ public void testAssociatedConversationOfJsfRequestDoesNotChangeDuringRequest()
+ {
+ assert false;
+ }
+
+ /**
+ * By default, a conversation is transient
+ */
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "9.6.4")
+ public void testDefaultConversationIsTransient()
+ {
+ assert false;
+ }
+
+ /**
+ * All long-running conversations have a string-valued unique identifier
+ */
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "9.6.4")
+ public void testConversationsHaveUniqueStringIdentifiers()
+ {
+ assert false;
+ }
+
+ /**
+ * If the conversation associated with the current JSF request is in the
+ * transient state at the end of a JSF request, it is destroyed, and the
+ * conversation context is also destroyed.
+ */
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "9.6.4")
+ public void testTransientConversationIsDestroyedAtEndOfJsfRequest()
+ {
+ assert false;
+ }
+
+ /**
+ * If the conversation associated with the current JSF request is in the
+ * transient state at the end of a JSF request, it is destroyed, and the
+ * conversation context is also destroyed.
+ */
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "9.6.4")
+ public void testTransientConversationContextIsDestroyedAtEndOfJsfRequest()
+ {
+ assert false;
+ }
+
+ /**
+ * If the conversation associated with the current JSF request is in the
+ * long-running state at the end of a JSF request, it is not destroyed
+ */
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "9.6.4")
+ public void testLongRunningConversationNotDestroyedAtEndOfJsfRequest()
+ {
+ assert false;
+ }
+
+ /**
+ * The long-running conversation context associated with a request that
+ * renders a JSF view is automatically propagated to any faces request (JSF
+ * form submission) that originates from that rendered page.
+ */
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "9.6.4")
+ public void testLongRunningConversationOfJsfRenderingRequestIsPropagatedToRequestFromRenderedPage()
+ {
+ assert false;
+ }
+
+ /**
+ * The long-running conversation context associated with a request that
+ * results in a JSF redirect (via a navigation rule) is automatically
+ * propagated to the resulting non-faces request, and to any other subsequent
+ * request to the same URL. This is accomplished via use of a GET request
+ * parameter named cid containing the unique identifier of the conversation.
+ */
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "9.6.4")
+ public void testLongRunningConversationOfJsfRedirectIsPropagatedToNonFacesRequest()
+ {
+ assert false;
+ }
+
+ /**
+ * The long-running conversation associated with a request may be propagated
+ * to any non-faces request via use of a GET request parameter named cid
+ * containing the unique identifier of the conversation. In this case, the
+ * application must manage this request parameter
+ */
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "9.6.4")
+ public void testLongRunningConversationManuallyPropagatedToNonFacesRequest()
+ {
+ assert false;
+ }
+
+ /**
+ * When no conversation is propagated to a JSF request, the request is
+ * associated with a new transient conversation.
+ */
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "9.6.4")
+ public void testNewTransientRequestIsCreatedWhenNoConversationIsPropagated()
+ {
+ assert false;
+ }
+
+ /**
+ * All long-running conversations are scoped to a particular HTTP servlet
+ * session and may not cross session boundaries
+ */
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "9.6.4")
+ public void testLongRunningConversationsMayNotCrossHttpSessions()
+ {
+ assert false;
+ }
+
+ /**
+ * When the HTTP servlet session is invalidated, all long-running
+ * conversation contexts created during the current session are destroyed
+ */
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "9.6.4")
+ public void testAllLongRunningConversationContextsOfInvalidatedHttpSessionAreDestroyed()
+ {
+ assert false;
+ }
+
+ /**
+ * The Web Bean manager is permitted to arbitrarily destroy any long-running
+ * conversation that is associated with no current JSF request, in order to
+ * conserve resources
+ */
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "9.6.4")
+ public void testManagerCanDestroyOrphanedLongRunningConversations()
+ {
+ assert false;
+ }
+
+ /**
+ * If the propagated conversation cannot be restored, the request is
+ * associated with a new transient conversation
+ */
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "9.6.4")
+ public void testNewTransientConversationIsCreatedWhenConversationCannotBeRestored()
+ {
+ assert false;
+ }
+
+ /**
+ * The Web Bean manager ensures that a long-running conversation may be
+ * associated with at most one request at a time, by blocking or rejecting
+ * concurrent requests.
+ */
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "9.6.4")
+ public void testConcurrentRequestsToLongRunningConversationsAreHandled()
+ {
+ assert false;
+ }
+}
\ No newline at end of file
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/conversation/ConversationContextTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/Animal.java (from rev 1037, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Animal.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/Animal.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/Animal.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.tck.tests.context.dependent;
+
+interface Animal
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/Animal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/AnotherDeploymentType.java (from rev 1037, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/AnotherDeploymentType.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/AnotherDeploymentType.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/AnotherDeploymentType.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,20 @@
+package org.jboss.webbeans.tck.tests.context.dependent;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.webbeans.DeploymentType;
+
+ at Target( { TYPE, METHOD })
+ at Retention(RUNTIME)
+ at Documented
+ at DeploymentType
+ at interface AnotherDeploymentType
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/AnotherDeploymentType.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/DeadlyAnimal.java (from rev 1037, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/DeadlyAnimal.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/DeadlyAnimal.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/DeadlyAnimal.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.tck.tests.context.dependent;
+
+interface DeadlyAnimal
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/DeadlyAnimal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/DeadlySpider.java (from rev 1037, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/DeadlySpider.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/DeadlySpider.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/DeadlySpider.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.tck.tests.context.dependent;
+
+interface DeadlySpider extends DeadlyAnimal
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/DeadlySpider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/DependentContextTest.java (from rev 1037, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/DependentContextTest.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/DependentContextTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/DependentContextTest.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,601 @@
+package org.jboss.webbeans.tck.tests.context.dependent;
+
+import java.lang.reflect.Method;
+import java.util.Set;
+
+import javax.webbeans.ContextNotActiveException;
+import javax.webbeans.Dependent;
+import javax.webbeans.manager.Bean;
+import javax.webbeans.manager.Context;
+
+import org.jboss.webbeans.tck.impl.SpecAssertion;
+import org.jboss.webbeans.tck.impl.SpecVersion;
+import org.jboss.webbeans.tck.tests.AbstractTest;
+import org.testng.annotations.Test;
+
+ at SpecVersion("20081206")
+public class DependentContextTest extends AbstractTest
+{
+
+ /**
+ * No injected instance of the Web Bean is ever shared between multiple
+ * injection points.
+ */
+ @Test(groups = { "contexts", "injection" })
+ @SpecAssertion(section = "9.4")
+ 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();
+ assert !foxRun.fox.equals(foxRun.anotherFox);
+ }
+
+ /**
+ * Any instance of the Web Bean that is used to evaluate a Unified EL
+ * expression exists to service that evaluation only.
+ */
+ @Test(groups = { "stub", "contexts", "el" })
+ @SpecAssertion(section = "9.4")
+ public void testInstanceUsedForElEvalutionNotShared()
+ {
+ assert false;
+ }
+
+ /**
+ * Any instance of the 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", "broken" })
+ @SpecAssertion(section = "9.4")
+ 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();
+ Tarantula tarantula2 = tarantulaBean.create();
+ assert tarantula != null;
+ assert tarantula2 != null;
+ assert tarantula != tarantula2;
+ }
+
+ /**
+ * Any instance of the 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", "stub" })
+ @SpecAssertion(section = "9.4")
+ public void testInstanceUsedForProducerFieldNotShared() throws Exception
+ {
+ assert false;
+ }
+
+ /**
+ * Any instance of the 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 = "9.4")
+ public void testInstanceUsedForDisposalMethodNotShared()
+ {
+ assert false;
+ }
+
+ /**
+ * Any instance of the 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 = "9.4")
+ 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 = "9.4")
+ 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, true) != null;
+ assert context.get(foxBean, true) 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 = "9.4")
+ 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, false) == null;
+ }
+
+ }.run();
+
+
+ }
+
+ /**
+ * The @Dependent scope is inactive except:
+ */
+ @Test(groups = {"contexts"}, expectedExceptions = ContextNotActiveException.class)
+ @SpecAssertion(section = "9.4")
+ public void testContextIsInactive()
+ {
+ 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 = "9.4")
+ 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 = "9.4")
+ public void testContextIsActiveWhenInvokingProducerField()
+ {
+ 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", "disposalMethod" })
+ @SpecAssertion(section = "9.4")
+ 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 = "9.4")
+ public void testContextIsActiveWhenInvokingObserverMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * while a Unified EL expression is evaluated, or
+ */
+ @Test(groups = { "stub", "contexts", "el" })
+ @SpecAssertion(section = "9.4")
+ 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 = "9.4")
+ 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();
+ 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 = "9.4")
+ 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 = "9.4")
+ public void testContextIsActiveDuringInjection()
+ {
+ Bean<FoxRun> foxRunBean = createSimpleBean(FoxRun.class);
+ Bean<Fox> foxBean = createSimpleBean(Fox.class);
+ manager.addBean(foxBean);
+ FoxRun foxRun = foxRunBean.create();
+ 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 = "9.4")
+ 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 = "9.4")
+ 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 = "9.4")
+ 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 = "9.4")
+ 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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4.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 = "9.4")
+ public void testDependentsDestroyedWhenObserverMethodEvaluationCompletes()
+ {
+ assert false;
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/DependentContextTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/Fox.java (from rev 1037, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Fox.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/Fox.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/Fox.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,14 @@
+package org.jboss.webbeans.tck.tests.context.dependent;
+
+import javax.webbeans.Dependent;
+
+ at Dependent
+class Fox
+{
+
+ public String getName()
+ {
+ return "gavin";
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/Fox.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/FoxRun.java (from rev 1037, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/FoxRun.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/FoxRun.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/FoxRun.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,14 @@
+package org.jboss.webbeans.tck.tests.context.dependent;
+
+import javax.webbeans.Current;
+
+class FoxRun
+{
+
+ @Current
+ public Fox fox;
+
+ @Current
+ public Fox anotherFox;
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/FoxRun.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/Spider.java (from rev 1037, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Spider.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/Spider.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/Spider.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,13 @@
+package org.jboss.webbeans.tck.tests.context.dependent;
+
+
+
+class Spider implements Animal
+{
+
+ public final void layEggs()
+ {
+
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/Spider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/SpiderProducer.java (from rev 1037, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/SpiderProducer.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/SpiderProducer.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/SpiderProducer.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,15 @@
+package org.jboss.webbeans.tck.tests.context.dependent;
+
+import javax.webbeans.Produces;
+
+
+ at AnotherDeploymentType
+class SpiderProducer
+{
+
+ @Produces public Tarantula produceTarantula()
+ {
+ return new Tarantula();
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/SpiderProducer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/Tarantula.java (from rev 1037, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Tarantula.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/Tarantula.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/Tarantula.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,7 @@
+package org.jboss.webbeans.tck.tests.context.dependent;
+
+
+class Tarantula extends Spider implements DeadlySpider
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/dependent/Tarantula.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/City.java (from rev 1037, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/City.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/City.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/City.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,8 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+class City
+{
+ public void ping() {
+
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/City.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/CityBinding.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/CityBinding.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/CityBinding.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,20 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.webbeans.Dependent;
+import javax.webbeans.InterceptorBindingType;
+
+ at InterceptorBindingType
+ at Dependent
+ at Target({TYPE, METHOD})
+ at Retention(RUNTIME)
+public @interface CityBinding
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/CityBinding.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/CityInterface.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/CityInterface.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/CityInterface.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+interface CityInterface
+{
+ public void foo();
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/CityInterface.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/CityProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/CityProducer.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/CityProducer.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+import javax.webbeans.Dependent;
+import javax.webbeans.Produces;
+
+class CityProducer
+{
+ @Produces @Dependent public Violation reference = new Violation();
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/CityProducer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/CityProducer2.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/CityProducer2.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/CityProducer2.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,14 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+import javax.webbeans.Dependent;
+import javax.webbeans.Produces;
+
+class CityProducer2
+{
+ @Produces
+ @Dependent
+ public Violation create()
+ {
+ return new Violation();
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/CityProducer2.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/CityProducer3.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/CityProducer3.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/CityProducer3.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,17 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+import javax.webbeans.Current;
+import javax.webbeans.Dependent;
+import javax.webbeans.Produces;
+
+
+class CityProducer3
+{
+ @Produces
+ @Dependent
+ public Violation create(@Current Violation reference)
+ {
+ return new Violation();
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/CityProducer3.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Espoo_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Espoo_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Espoo_Broken.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,18 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.Current;
+import javax.webbeans.SessionScoped;
+
+ at Stateful
+ at SessionScoped
+public class Espoo_Broken
+{
+ @Current
+ Violation reference;
+
+ @Remove
+ public void bye() {
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Espoo_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Forssa_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Forssa_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Forssa_Broken.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,19 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+import java.io.Serializable;
+
+import javax.webbeans.Current;
+import javax.webbeans.Initializer;
+import javax.webbeans.SessionScoped;
+
+ at SessionScoped
+class Forssa_Broken implements Serializable
+{
+ public Forssa_Broken() {
+ }
+
+ @Initializer
+ public Forssa_Broken(@Current Violation reference) {
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Forssa_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Hamina_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Hamina_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Hamina_Broken.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+import javax.webbeans.SessionScoped;
+
+ at SessionScoped
+public class Hamina_Broken
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Hamina_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Helsinki.java (from rev 1037, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Helsinki.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Helsinki.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Helsinki.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+import javax.ejb.Stateful;
+import javax.webbeans.Dependent;
+
+ at Dependent
+ at Stateful
+class Helsinki
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Helsinki.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Hyvinkaa.java (from rev 1037, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Hyvinkaa.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Hyvinkaa.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Hyvinkaa.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,15 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+import java.io.Serializable;
+
+import javax.webbeans.Current;
+import javax.webbeans.SessionScoped;
+
+ at SuppressWarnings("serial")
+ at SessionScoped
+class Hyvinkaa implements Serializable
+{
+ @SuppressWarnings("unused")
+ @Current
+ private transient Violation reference;
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Hyvinkaa.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Jamsa_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Jamsa_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Jamsa_Broken.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,21 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+import java.io.Serializable;
+
+import javax.webbeans.Produces;
+import javax.webbeans.SessionScoped;
+
+ at SessionScoped
+class Jamsa_Broken extends City implements Serializable
+{
+ public Jamsa_Broken()
+ {
+ }
+
+ @Produces
+ @SessionScoped
+ public Violation create()
+ {
+ return new Violation();
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Jamsa_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Joensuu.java (from rev 1037, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Joensuu.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Joensuu.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Joensuu.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,16 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+import java.io.Serializable;
+
+import javax.webbeans.Current;
+import javax.webbeans.SessionScoped;
+
+ at SuppressWarnings("serial")
+ at SessionScoped
+class Joensuu implements Serializable
+{
+ @SuppressWarnings("unused")
+ @Current
+ private transient Violation reference;
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Joensuu.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Jyvaskyla.java (from rev 1037, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Jyvaskyla.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Jyvaskyla.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Jyvaskyla.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,12 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+import java.io.Serializable;
+
+import javax.webbeans.SessionScoped;
+
+ at SuppressWarnings("serial")
+ at SessionScoped
+class Jyvaskyla implements Serializable
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Jyvaskyla.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Kaarina_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Kaarina_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Kaarina_Broken.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,20 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.SessionScoped;
+
+ at Stateful
+ at SessionScoped
+class Kaarina_Broken
+{
+ @CityBinding
+ public void foo()
+ {
+ }
+
+ @Remove
+ public void bye()
+ {
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Kaarina_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Kotka_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Kotka_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Kotka_Broken.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,14 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+import java.io.Serializable;
+
+import javax.webbeans.SessionScoped;
+
+ at SessionScoped
+class Kotka_Broken implements Serializable
+{
+ @CityBinding
+ public void foo() {
+
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Kotka_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Kuopio_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Kuopio_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Kuopio_Broken.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,20 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+import java.io.Serializable;
+
+import javax.webbeans.Current;
+import javax.webbeans.Initializer;
+import javax.webbeans.SessionScoped;
+
+ at SessionScoped
+class Kuopio_Broken extends City implements Serializable
+{
+ public Kuopio_Broken() {
+
+ }
+
+ @Initializer
+ public void init(@Current Violation reference) {
+
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Kuopio_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Loviisa_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Loviisa_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Loviisa_Broken.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,19 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+import java.io.Serializable;
+
+import javax.webbeans.Current;
+import javax.webbeans.Initializer;
+import javax.webbeans.SessionScoped;
+
+ at SessionScoped
+class Loviisa_Broken extends City implements Serializable
+{
+ public Loviisa_Broken() {
+ }
+
+ @Initializer
+ public Loviisa_Broken(@Current Violation reference) {
+
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Loviisa_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Maarianhamina_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Maarianhamina_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Maarianhamina_Broken.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,18 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.Current;
+import javax.webbeans.SessionScoped;
+
+ at Stateful
+ at SessionScoped
+class Maarianhamina_Broken
+{
+ @Current
+ private Violation reference;
+
+ @Remove
+ public void bye() {
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Maarianhamina_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Mikkeli_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Mikkeli_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Mikkeli_Broken.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,21 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+import java.io.Serializable;
+
+import javax.webbeans.Current;
+import javax.webbeans.Initializer;
+import javax.webbeans.SessionScoped;
+
+ at SessionScoped
+class Mikkeli_Broken extends City implements Serializable
+{
+ public Mikkeli_Broken()
+ {
+ }
+
+ @Initializer
+ public Mikkeli_Broken(@Current Violation reference)
+ {
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Mikkeli_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Nokia_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Nokia_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Nokia_Broken.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,13 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+import java.io.Serializable;
+
+import javax.webbeans.Current;
+import javax.webbeans.SessionScoped;
+
+ at SessionScoped
+class Nokia_Broken extends City implements Serializable
+{
+ @Current
+ private Violation reference;
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Nokia_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/PassivatingContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/PassivatingContextTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/PassivatingContextTest.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,481 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+import java.io.IOException;
+import java.util.Set;
+
+import javax.webbeans.DefinitionException;
+import javax.webbeans.IllegalProductException;
+import javax.webbeans.UnserializableDependencyException;
+import javax.webbeans.manager.Bean;
+
+import org.jboss.webbeans.tck.impl.SpecAssertion;
+import org.jboss.webbeans.tck.impl.SpecVersion;
+import org.jboss.webbeans.tck.tests.AbstractTest;
+import org.testng.annotations.Test;
+
+/**
+ *
+ * @author Nicklas Karlsson
+ *
+ */
+ at SpecVersion("20081206")
+public class PassivatingContextTest extends AbstractTest
+{
+
+ /**
+ * EJB local objects are serializable. Therefore, an enterprise Web Bean may
+ * declare any passivating scope.
+ */
+ @Test(groups = { "contexts", "passivation", "enterpriseBean" })
+ @SpecAssertion(section = "9.5")
+ public void testEJBWebBeanCanDeclarePassivatingScope()
+ {
+ deployBeans(Turku.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" }, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = "9.5")
+ 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 = "9.5")
+ 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 = "9.5")
+ 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 = "9.5")
+ 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 = "9.5")
+ 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 = "9.5")
+ 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 = "9.5")
+ 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 = "9.5")
+ 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 = "9.5")
+ 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 = "9.5")
+ 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 = "9.5")
+ 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 = "9.5")
+ 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 = "9.5")
+ 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 = "9.5")
+ 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 = "9.5")
+ 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" , "broken" }, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "9.5")
+ public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoStatefulSessionBeanFails() throws SecurityException, NoSuchMethodException
+ {
+ // TODO This test isn't testing SFSB, but enterprise beans
+ //deployBeans(CityProducer2.class, Maarianhamina_Broken.class);
+ //manager.getInstanceByType(Maarianhamina_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 = "9.5")
+ 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 = "9.5")
+ 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 = "9.5")
+ 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 = "9.5")
+ 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" , "broken"}, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "9.5")
+ public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoProducerMethodParameterWithPassivatingScopeFails()
+ {
+ // TODO Not quite sure what this test is doing
+ //deployBeans(CityProducer3.class, Jamsa_Broken.class);
+ //manager.getInstanceByType(Jamsa_Broken.class).ping();
+ 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", "stub"}, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "9.5")
+ 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 = "9.5")
+ 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 = "9.5")
+ 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 = "9.5")
+ 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 = "9.5")
+ 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", "broken" }, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "9.5")
+ public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoProducerMethodParameterWithPassivatingScopeFails()
+ {
+ // TODO Not quite sure what this test is doing
+ //deployBeans(CityProducer.class, Jamsa_Broken.class);
+ //manager.getInstanceByType(Jamsa_Broken.class).ping();
+ assert false;
+ }
+
+ /**
+ * The Web Bean manager must guarantee that JMS endpoint proxy objects are
+ * serializable.
+ */
+ @Test(groups = { "stub", "contexts", "passivation", "jms" })
+ @SpecAssertion(section = "9.5")
+ public void testJMSEndpointProxyIsSerializable()
+ {
+ assert false;
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Peraseinajoki.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Peraseinajoki.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Peraseinajoki.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,16 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+import javax.webbeans.Current;
+import javax.webbeans.Produces;
+import javax.webbeans.SessionScoped;
+
+class Peraseinajoki extends City
+{
+
+ @Produces @SessionScoped
+ public Violation2 create(@Current Violation reference)
+ {
+ return new Violation2();
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Peraseinajoki.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Pietarsaari_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Pietarsaari_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Pietarsaari_Broken.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,22 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+import java.io.Serializable;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.Current;
+import javax.webbeans.SessionScoped;
+
+ at Stateful
+ at SessionScoped
+class Pietarsaari_Broken extends City implements Serializable
+{
+ @Current
+ private Violation reference;
+
+ @Remove
+ public void bye() {
+
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Pietarsaari_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Porvoo_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Porvoo_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Porvoo_Broken.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,19 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.SessionScoped;
+
+ at Stateful
+ at SessionScoped
+class Porvoo_Broken implements CityInterface
+{
+ public void foo()
+ {
+ }
+
+ @Remove
+ public void bye()
+ {
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Porvoo_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Raisio_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Raisio_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Raisio_Broken.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,13 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+import java.io.Serializable;
+
+import javax.webbeans.SessionScoped;
+
+ at SessionScoped
+class Raisio_Broken implements CityInterface, Serializable
+{
+ public void foo()
+ {
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Raisio_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Salo_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Salo_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Salo_Broken.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,14 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+import java.io.Serializable;
+
+import javax.webbeans.Current;
+import javax.webbeans.SessionScoped;
+
+ at SessionScoped
+class Salo_Broken extends City implements Serializable
+{
+ @Current
+ private transient Violation reference;
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Salo_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Turku.java (from rev 1037, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Turku.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Turku.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Turku.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,15 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.SessionScoped;
+
+ at Stateful
+ at SessionScoped
+class Turku
+{
+ @Remove
+ public void bye() {
+
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Turku.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Uusikaupunki_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Uusikaupunki_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Uusikaupunki_Broken.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,14 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+import java.io.Serializable;
+
+import javax.webbeans.Current;
+import javax.webbeans.SessionScoped;
+
+ at SessionScoped
+class Uusikaupunki_Broken extends City implements Serializable
+{
+ @Current
+ private Violation reference;
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Uusikaupunki_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Vaasa.java (from rev 1037, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Vaasa.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Vaasa.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Vaasa.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,14 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+import java.io.Serializable;
+
+import javax.webbeans.Current;
+import javax.webbeans.SessionScoped;
+
+ at SuppressWarnings("serial")
+ at SessionScoped
+class Vaasa implements Serializable
+{
+ @SuppressWarnings("unused")
+ @Current private Helsinki ejb;
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Vaasa.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Vantaa_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Vantaa_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Vantaa_Broken.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,28 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+import java.io.Serializable;
+
+import javax.webbeans.Current;
+import javax.webbeans.SessionScoped;
+
+ at SessionScoped
+class Vantaa_Broken implements Serializable
+{
+ @Current
+ private Violation reference;
+
+ public Violation getReference()
+ {
+ return reference;
+ }
+
+ public void setReference(Violation reference)
+ {
+ this.reference = reference;
+ }
+
+ public String test() {
+ return reference.toString();
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Vantaa_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Violation.java (from rev 1037, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Violation.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Violation.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Violation.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+import javax.webbeans.Dependent;
+
+ at Dependent
+class Violation
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Violation.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Violation2.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Violation2.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Violation2.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.tck.tests.context.passivating;
+
+import javax.webbeans.Dependent;
+
+ at Dependent
+class Violation2
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Violation2.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/request/RequestContextTest.java (from rev 1037, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/RequestContextTest.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/request/RequestContextTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/request/RequestContextTest.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,124 @@
+package org.jboss.webbeans.tck.tests.context.request;
+
+import org.jboss.webbeans.tck.impl.SpecAssertion;
+import org.jboss.webbeans.tck.impl.SpecVersion;
+import org.jboss.webbeans.tck.tests.AbstractTest;
+import org.testng.annotations.Test;
+
+ at SpecVersion("20081206")
+public class RequestContextTest extends AbstractTest
+{
+
+ /**
+ * The request scope is active during the service() method of any Servlet in
+ * the web application.
+ */
+ @Test(groups = { "stub", "contexts", "servlet" })
+ @SpecAssertion(section = "9.6.1")
+ public void testRequestScopeActiveDuringServiceMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * The request context is destroyed at the end of the servlet request, after
+ * the Servlet service() method returns.
+ */
+ @Test(groups = { "stub", "contexts", "servlet" })
+ @SpecAssertion(section = "9.6.1")
+ public void testRequestScopeIsDestroyedAfterServiceMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * The request scope is active during any Java EE web service invocation.
+ */
+ @Test(groups = { "stub", "contexts", "webservice" })
+ @SpecAssertion(section = "9.6.1")
+ public void testRequestScopeActiveDuringWebSericeInvocation()
+ {
+ assert false;
+ }
+
+ /**
+ * The request context is destroyed after the web service invocation
+ * completes
+ */
+ @Test(groups = { "stub", "contexts", "webservice" })
+ @SpecAssertion(section = "9.6.1")
+ public void testRequestScopeIsDestroyedAfterWebServiceInvocation()
+ {
+ assert false;
+ }
+
+ /**
+ * The request scope is active during any remote method invocation of any EJB
+ * bean, during any call to an EJB timeout method and during message delivery
+ * to any EJB message driven bean.
+ */
+ @Test(groups = { "stub", "contexts", "ejb3" })
+ @SpecAssertion(section = "9.6.1")
+ public void testRequestScopeActiveDuringRemoteMethodInvocationOfEjb()
+ {
+ assert false;
+ }
+
+ /**
+ * The request scope is active during any remote method invocation of any EJB
+ * bean, during any call to an EJB timeout method and during message delivery
+ * to any EJB message driven bean.
+ */
+ @Test(groups = { "stub", "contexts", "ejb3" })
+ @SpecAssertion(section = "9.6.1")
+ public void testRequestScopeActiveDuringCallToEjbTimeoutMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * The request scope is active during any remote method invocation of any EJB
+ * bean, during any call to an EJB timeout method and during message delivery
+ * to any EJB message driven bean.
+ */
+ @Test(groups = { "stub", "contexts", "ejb3" })
+ @SpecAssertion(section = "9.6.1")
+ public void testRequestScopeActiveDuringEjbMessageDelivery()
+ {
+ assert false;
+ }
+
+ /**
+ * The request context is destroyed after the remote method invocation,
+ * timeout or message delivery completes.
+ */
+ @Test(groups = { "stub", "contexts", "ejb3" })
+ @SpecAssertion(section = "9.6.1")
+ public void testRequestScopeDestroyedAfterRemoteMethodInvocationOfEjb()
+ {
+ assert false;
+ }
+
+ /**
+ * The request context is destroyed after the remote method invocation,
+ * timeout or message delivery completes.
+ */
+ @Test(groups = { "stub", "contexts", "ejb3" })
+ @SpecAssertion(section = "9.6.1")
+ public void testRequestScopeDestroyedAfterCallToEjbTimeoutMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * The request context is destroyed after the remote method invocation,
+ * timeout or message delivery completes.
+ */
+ @Test(groups = { "stub", "contexts", "ejb3" })
+ @SpecAssertion(section = "9.6.1")
+ public void testRequestScopeDestroyedAfterEjbMessageDelivery()
+ {
+ assert false;
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/request/RequestContextTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/session/SessionContextTest.java (from rev 1037, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/SessionContextTest.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/session/SessionContextTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/session/SessionContextTest.java 2009-01-17 16:54:32 UTC (rev 1039)
@@ -0,0 +1,45 @@
+package org.jboss.webbeans.tck.tests.context.session;
+
+import org.jboss.webbeans.tck.impl.SpecAssertion;
+import org.jboss.webbeans.tck.impl.SpecVersion;
+import org.jboss.webbeans.tck.tests.AbstractTest;
+import org.testng.annotations.Test;
+
+ at SpecVersion("2001206")
+public class SessionContextTest extends AbstractTest
+{
+
+ /**
+ * The session scope is active during the service() method of any servlet in
+ * the web application
+ */
+ @Test(groups = { "stub", "contexts", "servlet" })
+ @SpecAssertion(section = "9.6.2")
+ public void testSessionScopeActiveDuringServiceMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * The session context is shared between all servlet requests that occur in
+ * the same HTTP servlet session
+ */
+ @Test(groups = { "stub", "contexts", "servlet" })
+ @SpecAssertion(section = "9.6.2")
+ public void testSessionContextSharedBetweenServletRequestsInSameHttpSession()
+ {
+ assert false;
+ }
+
+ /**
+ * The session context is destroyed when the HTTPSession is invalidated or
+ * times out.
+ */
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "9.6.2")
+ public void testSessionContextDestroyedWhenHttpSessionInvalidatedOrTimesOut()
+ {
+ assert false;
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/session/SessionContextTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
More information about the weld-commits
mailing list