[webbeans-commits] Webbeans SVN: r1043 - ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/valid and 4 other directories.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Sat Jan 17 14:01:48 EST 2009
Author: pete.muir at jboss.org
Date: 2009-01-17 14:01:47 -0500 (Sat, 17 Jan 2009)
New Revision: 1043
Added:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/AbstractEjbEmbeddableTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Armant_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Beagle_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Boxer_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Bullmastiff_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Dachshund_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanDeclarationTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanLifecycleTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanRemoveMethodTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanSpecializationTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Giraffe.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GoldenRetriever.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GoodDoggie.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GreatDane.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GreaterDane.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Greyhound_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Hound.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/HoundOfBaskerville.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Husky_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/IrishTerrier_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/JackRussellTerrier.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Koirus.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Labrador.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Laika.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Leopard.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/LocalGoodDoggie.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pekingese_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pitbull.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pug_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pumi_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Rottweiler.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/RussellTerrier.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Saluki.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Spitz.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Tame.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Toller.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/WelshCorgie.java
Removed:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanDeclarationTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanLifecycleTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanRemoveMethodTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanSpecializationTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/valid/GoodDoggie.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/valid/Pitbull.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/valid/Toller.java
Modified:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/tck/BeansImpl.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/tck/ContextsImpl.java
tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Contexts.java
Log:
port ejb tests
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanDeclarationTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanDeclarationTest.java 2009-01-17 18:55:42 UTC (rev 1042)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanDeclarationTest.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -1,400 +0,0 @@
-package org.jboss.webbeans.test.ejb;
-
-import javax.webbeans.DefinitionException;
-import javax.webbeans.DeploymentException;
-
-import org.jboss.webbeans.bean.EnterpriseBean;
-import org.jboss.webbeans.test.AbstractTest;
-import org.jboss.webbeans.test.SpecAssertion;
-import org.jboss.webbeans.test.SpecVersion;
-import org.jboss.webbeans.test.beans.Giraffe;
-import org.jboss.webbeans.test.beans.Leopard;
-import org.jboss.webbeans.test.ejb.invalid.Beagle;
-import org.jboss.webbeans.test.ejb.invalid.Boxer;
-import org.jboss.webbeans.test.ejb.invalid.Bullmastiff;
-import org.jboss.webbeans.test.ejb.invalid.Dachshund;
-import org.jboss.webbeans.test.ejb.invalid.Greyhound;
-import org.jboss.webbeans.test.ejb.invalid.Husky;
-import org.jboss.webbeans.test.ejb.invalid.IrishTerrier;
-import org.jboss.webbeans.test.ejb.invalid.Pekingese;
-import org.jboss.webbeans.test.ejb.invalid.Pug;
-import org.jboss.webbeans.test.ejb.invalid.Saluki;
-import org.jboss.webbeans.test.ejb.valid.Labrador;
-import org.jboss.webbeans.test.ejb.valid.Laika;
-import org.jboss.webbeans.test.ejb.valid.Pitbull;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-/**
- * Sections
- *
- * 3.3. Enterprise Web Beans
- * 3.3.1. Which EJBs are enterprise Web Beans?
- * 3.3.2. API types of an enterprise Web Bean
- * 3.3.3. Declaring an enterprise Web Bean using annotations
- * 3.3.4. Declaring an enterprise Web Bean using XML
- *
- * @author Nicklas Karlsson
- */
- at SpecVersion("20081206")
- at SuppressWarnings("unused")
-public class EnterpriseBeanDeclarationTest extends AbstractTest
-{
-
- @BeforeMethod
- public void setupEjbDescriptors()
- {
- addToEjbCache(Pug.class);
- addToEjbCache(Giraffe.class);
- addToEjbCache(Husky.class);
- addToEjbCache(Pitbull.class);
- addToEjbCache(IrishTerrier.class);
- addToEjbCache(Laika.class);
- addToEjbCache(Leopard.class);
- addToEjbCache(Labrador.class);
- addToEjbCache(Greyhound.class);
- addToEjbCache(Dachshund.class);
- addToEjbCache(Bullmastiff.class);
- addToEjbCache(Pekingese.class);
- addToEjbCache(Boxer.class);
- addToEjbCache(Beagle.class);
- addToEjbCache(Saluki.class);
- }
-
- /**
- * An EJB stateless session bean must belong to the @Dependent pseudo-scope.
- * If an enterprise Web Bean specifies an illegal scope, a
- * DefinitionException is thrown by the Web Bean manager at initialization
- * time
- */
- @Test(groups = { "enterpriseBeans" })
- @SpecAssertion(section = "3.3")
- public void testStatelessWithDependentScopeOK()
- {
- EnterpriseBean<Giraffe> giraffe = EnterpriseBean.of(Giraffe.class, manager);
- }
-
- /**
- * An EJB stateless session bean must belong to the @Dependent pseudo-scope.
- * If an enterprise Web Bean specifies an illegal scope, a
- * DefinitionException is thrown by the Web Bean manager at initialization
- * time
- */
- @Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3")
- public void testStatelessWithRequestScopeFails()
- {
- EnterpriseBean<Beagle> beagle = EnterpriseBean.of(Beagle.class, manager);
- }
-
- /**
- * An EJB stateless session bean must belong to the @Dependent pseudo-scope.
- * If an enterprise Web Bean specifies an illegal scope, a
- * DefinitionException is thrown by the Web Bean manager at initialization
- * time
- */
-
- @Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3")
- public void testStatelessWithConversationScopeFails()
- {
- EnterpriseBean<Boxer> boxer = EnterpriseBean.of(Boxer.class, manager);
- }
-
- /**
- * An EJB stateless session bean must belong to the @Dependent pseudo-scope.
- * If an enterprise Web Bean specifies an illegal scope, a
- * DefinitionException is thrown by the Web Bean manager at initialization
- * time
- */
- @Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3")
- public void testStatelessWithSessionScopeFails()
- {
- EnterpriseBean<Bullmastiff> boxer = EnterpriseBean.of(Bullmastiff.class, manager);
- }
-
- /**
- * An EJB stateless session bean must belong to the @Dependent pseudo-scope.
- * If an enterprise Web Bean specifies an illegal scope, a
- * DefinitionException is thrown by the Web Bean manager at initialization
- * time
- */
- @Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3")
- public void testStatelessWithApplicationScopeFails()
- {
- EnterpriseBean<Dachshund> dachshund = EnterpriseBean.of(Dachshund.class, manager);
- }
-
- /**
- * An EJB singleton bean must belong to either the @ApplicationScoped scope
- * or to the @Dependent pseudo-scope. If an enterprise Web Bean specifies an
- * illegal scope, a DefinitionException is thrown by the Web Bean manager at
- * initialization time
- */
- @Test(groups = { "enterpriseBeans" })
- @SpecAssertion(section = "3.3")
- public void testSingletonWithDependentScopeOK()
- {
- EnterpriseBean.of(Labrador.class, manager);
- }
-
- /**
- * An EJB singleton bean must belong to either the @ApplicationScoped scope
- * or to the @Dependent pseudo-scope. If an enterprise Web Bean specifies an
- * illegal scope, a DefinitionException is thrown by the Web Bean manager at
- * initialization time
- */
- @Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3")
- public void testSingletonWithRequestScopeFails()
- {
- EnterpriseBean<Greyhound> greyhound = EnterpriseBean.of(Greyhound.class, manager);
- }
-
- /**
- * An EJB singleton bean must belong to either the @ApplicationScoped scope
- * or to the @Dependent pseudo-scope. If an enterprise Web Bean specifies an
- * illegal scope, a DefinitionException is thrown by the Web Bean manager at
- * initialization time
- */
- @Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3")
- public void testSingletonWithConversationScopeFails()
- {
- EnterpriseBean<Husky> husky = EnterpriseBean.of(Husky.class, manager);
- }
-
- /**
- * An EJB singleton bean must belong to either the @ApplicationScoped scope
- * or to the @Dependent pseudo-scope. If an enterprise Web Bean specifies an
- * illegal scope, a DefinitionException is thrown by the Web Bean manager at
- * initialization time
- */
- @Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3")
- public void testSingletonWithSessionScopeFails()
- {
- EnterpriseBean<IrishTerrier> irishTerrier = EnterpriseBean.of(IrishTerrier.class, manager);
- }
-
- /**
- * An EJB singleton bean must belong to either the @ApplicationScoped scope
- * or to the @Dependent pseudo-scope. If an enterprise Web Bean specifies an
- * illegal scope, a DefinitionException is thrown by the Web Bean manager at
- * initialization time
- */
- @Test(groups = { "enterpriseBeans" })
- @SpecAssertion(section = "3.3")
- public void testSingletonWithApplicationScopeOK()
- {
- EnterpriseBean<Laika> laika = EnterpriseBean.of(Laika.class, manager);
- }
-
- /**
- * However, in any deployment, there may be at most one most specialized
- * enabled enterprise Web Bean for any particular EJB enterprise bean.
- * Therefore, for each distinct EJB name in a module, there is at most one
- * Web Bean that may be called at runtime. If there is more than one most
- * specialized enabled enterprise Web Bean for a particular EJB enterprise
- * bean, a DeploymentException is thrown by the Web Bean manager at
- * initialization time.
- */
- @Test(groups = { "enterpriseBeans", "stub" }, expectedExceptions = DeploymentException.class)
- @SpecAssertion(section = "3.3")
- public void testOnlyOneEnabledSpecializedEnterpriseBeanForImplmentation()
- {
- assert false;
- }
-
- /**
- * If the implementation class of an enterprise Web Bean is annotated @Interceptor
- * or @Decorator, a DefinitionException is thrown by the Web Bean manager at
- * initialization time.
- */
- @Test(expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3")
- public void testEnterpriseBeanInterceptorFails()
- {
- EnterpriseBean<Pug> pug = EnterpriseBean.of(Pug.class, manager);
- }
-
- /**
- * If the implementation class of an enterprise Web Bean is annotated @Interceptor
- * or @Decorator, a DefinitionException is thrown by the Web Bean manager at
- * initialization time.
- */
- @Test(expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3")
- public void testEnterpriseBeanDecoratorFails()
- {
- EnterpriseBean<Pekingese> pekingese = EnterpriseBean.of(Pekingese.class, manager);
- }
-
- /**
- * Only one Web Bean per implementation class may be defined using
- * annotations.
- */
- @Test(expectedExceptions = DefinitionException.class, groups = { "enterpriseBeans", "stub" })
- @SpecAssertion(section = "3.3")
- public void testMultipleAnnotationDefinedEnterpriseBeansWithSameImplementationClassFails()
- {
- // TODO: testable?
- assert false;
- }
-
- /**
- * Note that multiple enterprise Web Beans may share the same implementation
- * class. This occurs when Web Beans are defined using XML
- */
- @Test(groups = { "webbeansxml", "enterpriseBeans", "stub" })
- @SpecAssertion(section = "3.3")
- public void testMultipleXMLDefinedEnterpriseBeansWithSameImplementationClassOK()
- {
- assert false;
- }
-
- /**
- * All session beans exposing an EJB 3.x client view and declared via an EJB
- * component defining annotation on the EJB bean class are Web Beans, and
- * thus no special declaration is required.
- */
- @Test(groups = { "enterpriseBeans", "stub" })
- @SpecAssertion(section = "3.3.1")
- public void testAnnotatedEnterpriseBean()
- {
- // TODO: dupe?
- assert false;
- }
-
- /**
- * Additional enterprise Web Beans for these EJBs may be defined using XML,
- * by specifying the bean class in web-beans.xml.
- */
- @Test(groups = { "enterpriseBeans", "webbeansxml", "stub" })
- @SpecAssertion(section = "3.3.1")
- public void testAnnotatedEnterpriseBeanComplementedWithXML()
- {
- // TODO dupe?
- assert false;
- }
-
- /**
- * All session beans exposing an EJB 3.x client view and declared in
- * ejb-jar.xml are also Web Beans.
- */
- @Test(groups = { "enterpriseBeans", "ejbjarxml", "stub" })
- @SpecAssertion(section = "3.3.1")
- public void testEJBJARDefinedEnterpriseBean()
- {
- // TODO dupe?
- assert false;
- }
-
- /**
- * Additional enterprise Web Beans for these EJBs may be defined using XML,
- * by specifying the bean class and EJB name in web-beans.xml
- */
- @Test(groups = { "enterpriseBeans", "ejbjarxml", "webbeansxml", "stub" })
- @SpecAssertion(section = "3.3.1")
- public void testEJBJARDefinedEnterpriseBeanComplementedWithXML()
- {
- // TODO dupe?
- assert false;
- }
-
- /**
- * The set of API types for an enterprise Web Bean contains all local
- * interfaces of the bean that do not have wildcard type parameters or type
- * variables and their superinterfaces
- */
- @Test(groups = { "enterpriseBeans", "stub" })
- @SpecAssertion(section = "3.3.2")
- public void testAPITypesAreLocalInterfacesWithoutWildcardTypesOrTypeVariablesWithSuperInterfaces()
- {
- assert false;
- }
-
- /**
- * If the EJB bean has a bean class local view and the bean class is not a
- * parameterized type, the set of API types contains the bean class and all
- * superclasses
- */
- @Test(groups = { "enterpriseBeans", "stub" })
- @SpecAssertion(section = "3.3.2")
- public void testEnterpriseBeanWithLocalViewAndParameterizedTypeIncludesBeanClassAndSuperclassesInAPITypes()
- {
- assert false;
- }
-
- /**
- * In addition, java.lang.Object is an API type of every enterprise Web Bean.
- */
- @Test(groups = "enterpriseBeans")
- @SpecAssertion(section = "3.3.2")
- public void testObjectIsInAPITypes()
- {
- EnterpriseBean<Laika> laika = EnterpriseBean.of(Laika.class, manager);
- assert laika.getTypes().contains(Object.class);
- }
-
- /**
- * Remote interfaces are not included in the set of API types.
- */
- @Test(groups = { "enterpriseBeans", "stub" })
- @SpecAssertion(section = "3.3.2")
- public void testRemoteInterfacesAreNotInAPITypes()
- {
- assert false;
- }
-
- /**
- * Enterprise Web Beans may be declared in web-beans.xml using the bean class
- * name (for EJBs defined using a component- defining annotation) or bean
- * class and EJB name (for EJBs defined in ejb-jar.xml). The ejbName
- * attribute declares the EJB name of an EJB defined in ejb-jar.xml
- */
- @Test(groups = { "enterpriseBeans", "webbeansxml", "ejbjarxml", "stub" })
- @SpecAssertion(section = "3.3")
- public void testXMLFilesEJBNameUsage()
- {
- assert false;
- }
-
- /**
- * Enterprise Web Beans may not be message-driven beans. If an enterprise Web
- * Bean declared in XML is a message-driven bean, a DefinitionException is
- * thrown by the Web Bean manager at initialization time.
- */
- @Test(expectedExceptions = DefinitionException.class, groups = {"enterpriseBeans", "broken"})
- @SpecAssertion(section = "3.3")
- public void testMessageDrivenBeansNotOK()
- {
- EnterpriseBean<Leopard> Leopard = EnterpriseBean.of(Leopard.class, manager);
- }
-
- /**
- * The default name for an enterprise Web Bean is the unqualified class name
- * of the Web Bean implementation class, after converting the first character
- * to lower case.
- */
- @Test(groups = "enterpriseBeans")
- @SpecAssertion(section = "3.3.7")
- public void testDefaultName()
- {
- EnterpriseBean<Pitbull> pitbull = EnterpriseBean.of(Pitbull.class, manager);
- assert pitbull.getName().equals("pitbull");
- }
-
- /**
- * An enterprise bean proxy implements all local interfaces of the EJB.
- */
- @Test(groups = { "specialization", "enterpriseBeans", "clientProxy", "stub" })
- @SpecAssertion(section = "3.3.8")
- public void testEnterpriseBeanProxyImplementsAllLocalInterfaces()
- {
- assert false;
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanLifecycleTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanLifecycleTest.java 2009-01-17 18:55:42 UTC (rev 1042)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanLifecycleTest.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -1,182 +0,0 @@
-package org.jboss.webbeans.test.ejb;
-
-import javax.webbeans.UnremovedException;
-
-import org.jboss.webbeans.bean.EnterpriseBean;
-import org.jboss.webbeans.test.AbstractEjbEmbeddableTest;
-import org.jboss.webbeans.test.SpecAssertion;
-import org.jboss.webbeans.test.SpecVersion;
-import org.jboss.webbeans.test.ejb.valid.GoodDoggie;
-import org.jboss.webbeans.test.ejb.valid.LocalGoodDoggie;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-/**
- * Sections
- *
- * 6.4. Lifecycle of stateful session enterprise Web beans
- * 6.5. Lifecycle of stateless session and singleton enterprise Web Beans
- * 6.9. Lifecycle of EJB beans
- *
- * Mostly overlapping with other tests...
- *
- * @author Nicklas Karlsson
- */
-
- at SpecVersion("20081206")
-public class EnterpriseBeanLifecycleTest extends AbstractEjbEmbeddableTest
-{
- /**
- * Initializes the EJB descriptors for the EJBs about to be used
- */
- @BeforeMethod
- public void setupEjbDescriptors()
- {
- addToEjbCache(GoodDoggie.class);
- addToEjbCache(LocalGoodDoggie.class);
- }
-
- /**
- * When the create() method is called, the Web Bean manager creates and
- * returns an enterprise bean proxy
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "stub" })
- @SpecAssertion(section = "6.4")
- public void testProxyCreated()
- {
- assert false;
- }
-
- /**
- * When the destroy() method is called, the Web Bean manager calls the Web
- * Bean remove method upon the proxy
- */
- @Test(groups = { "enterpriseBeans", "clientProxy", "lifecycle", "stub"})
- @SpecAssertion(section = "6.4")
- public void testRemoveMethodCalled()
- {
- visited = false;
- activateDependentContext();
- EnterpriseBean<GoodDoggie> bean = EnterpriseBean.of(GoodDoggie.class, manager);
- manager.addBean(bean);
- GoodDoggie doggie = manager.getInstance(bean);
- bean.destroy(doggie);
- assert visited = true;
- }
-
- /**
- * For each remove method parameter, the Web Bean manager passes the object
- * returned by Manager.getInstanceByType()
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "removeMethod", "stub" })
- @SpecAssertion(section = "6.4")
- public void testFieldInjections()
- {
- assert false;
- }
-
- /**
- * If the enterprise Web Bean has no Web Bean remove method, the Web Bean
- * manager throws an UnremovedException.
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "removeMethod", "stub" }, expectedExceptions = UnremovedException.class)
- @SpecAssertion(section = "6.4")
- public void testNoRemoveMethodFails()
- {
- assert false;
- }
-
- /**
- * If the underlying EJB was already destroyed by direct invocation of a
- * remove method by the application, the Web Bean manager ignores the
- * instance, and is not required to call any remove method
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "removeMethod", "stub" })
- @SpecAssertion(section = "6.4")
- public void testNoRemoveMethodsCalledIfEnterpriseBeanAlreadyRemoved()
- {
- assert false;
- }
-
- /**
- * When the destroy() method is called, the Web Bean manager simply discards
- * the proxy and all EJB local object references.
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "removeMethod", "stub" })
- @SpecAssertion(section = "6.5")
- public void testProxyAndLocalObjectReferencesDiscardedForStatelessEnterpriseBeans()
- {
- assert false;
- }
-
- /**
- * The Web Bean manager initializes the values of all injected fields. For
- * each injected field, the Web Bean manager sets the value to the object
- * returned by Manager.getInstanceByType().
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "stub" })
- @SpecAssertion(section = "6.9")
- public void testFieldInjectionsOnRemoveMethods()
- {
- assert false;
- }
-
- /**
- * Next, if the EJB bean instance is an instance of a Web Bean, the Web Bean
- * manager initializes the values of any fields with initial values specified
- * in XML,
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "stub" })
- @SpecAssertion(section = "6.9")
- public void testInitXMLDefinedValuesOnWebWeanEnterpriseBeans()
- {
- assert false;
- }
-
- /**
- * Next, the Web Bean manager calls all initializer methods. For each
- * initializer method parameter, the Web Bean manager passes the object
- * returned by Manager.getInstanceByType().
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "stub" })
- @SpecAssertion(section = "6.9")
- public void testInitializerMethodsCalledWithCurrentParameterValues()
- {
- assert false;
- }
-
- /**
- * Finally, the Web Bean manager builds the interceptor and decorator stacks
- * for the instance
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "interceptors", "stub" })
- @SpecAssertion(section = "6.9")
- public void testInterceptorStackIsBuilt()
- {
- assert false;
- }
-
- /**
- * Finally, the Web Bean manager builds the interceptor and decorator stacks
- * for the instance
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "decorators", "stub" })
- @SpecAssertion(section = "6.9")
- public void testDecoratorStackIsBuilt()
- {
- assert false;
- }
-
- /**
- * When the EJB container destroys an instance of an EJB bean, the Web Bean
- * manager intercepts the @PreDestroy callback and destroys all dependent
- * objects, after the callback returns from the bean instance
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "stub" })
- @SpecAssertion(section = "6.9")
- public void testDependentObjectsDestroyed()
- {
- assert false;
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanRemoveMethodTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanRemoveMethodTest.java 2009-01-17 18:55:42 UTC (rev 1042)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanRemoveMethodTest.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -1,373 +0,0 @@
-package org.jboss.webbeans.test.ejb;
-
-import javax.webbeans.DefinitionException;
-import javax.webbeans.RequestScoped;
-import javax.webbeans.UnremovedException;
-
-import org.jboss.webbeans.bean.EnterpriseBean;
-import org.jboss.webbeans.context.RequestContext;
-import org.jboss.webbeans.test.AbstractTest;
-import org.jboss.webbeans.test.SpecAssertion;
-import org.jboss.webbeans.test.SpecVersion;
-import org.jboss.webbeans.test.ejb.invalid.Armant;
-import org.jboss.webbeans.test.ejb.invalid.GoldenRetriever;
-import org.jboss.webbeans.test.ejb.invalid.JackRussellTerrier;
-import org.jboss.webbeans.test.ejb.invalid.Pumi;
-import org.jboss.webbeans.test.ejb.invalid.Rottweiler;
-import org.jboss.webbeans.test.ejb.invalid.RussellTerrier;
-import org.jboss.webbeans.test.ejb.invalid.Saluki;
-import org.jboss.webbeans.test.ejb.invalid.Spitz;
-import org.jboss.webbeans.test.ejb.valid.GoodDoggie;
-import org.jboss.webbeans.test.ejb.valid.Koirus;
-import org.jboss.webbeans.test.ejb.valid.Toller;
-import org.jboss.webbeans.test.ejb.valid.WelshCorgie;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-/**
- * Sections
- *
- * 3.3.5. Web Bean remove methods 3.3.5.1. Declaring a Web Bean remove method
- * using annotations. 3.3.5.2. Declaring a Web Bean remove method using XML
- * 3.3.5.3. Remove method parameters
- *
- * @author Nicklas Karlsson
- */
- at SpecVersion("20081206")
- at SuppressWarnings("unused")
-public class EnterpriseBeanRemoveMethodTest extends AbstractTest
-{
-
- /**
- * Initializes the EJB descriptors for the EJBs about to be used
- */
- @BeforeMethod
- public void setupEjbDescriptors()
- {
- addToEjbCache(JackRussellTerrier.class);
- addToEjbCache(Pumi.class);
- addToEjbCache(RussellTerrier.class);
- addToEjbCache(Rottweiler.class);
- addToEjbCache(GoldenRetriever.class);
- addToEjbCache(Armant.class);
- addToEjbCache(Spitz.class);
- addToEjbCache(Toller.class);
- addToEjbCache(WelshCorgie.class);
- addToEjbCache(Koirus.class);
- addToEjbCache(GoodDoggie.class);
- }
-
- /**
- * EJB spec
- */
- @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3.5")
- public void testStatelessEnterpriseBeansWithRemoveMethodsFails()
- {
- EnterpriseBean<Armant> bean = EnterpriseBean.of(Armant.class, manager);
- }
-
- /**
- * When the Web Bean manager destroys an enterprise Web Bean instance that is
- * an EJB stateful session bean, it calls the Web Bean remove method
- */
- @Test(groups = { "enterpriseBeans", "removeMethod", "lifecycle", "stub" })
- @SpecAssertion(section = "3.3.5")
- public void testStatefulEnterpriseBeanRemoveMethodCalledWhenDestroyedByManager()
- {
- EnterpriseBeanRemoveMethodTest.visited = false;
- EnterpriseBean<Toller> bena = EnterpriseBean.of(Toller.class, manager);
- RequestContext context = (RequestContext) manager.getContext(RequestScoped.class);
- Toller instance = context.get(bena, true);
- context.destroy();
- assert EnterpriseBeanRemoveMethodTest.visited;
- }
-
- /**
- * The Web Bean remove method is a remove method of the EJB stateful session
- * bean.
- */
- @Test(groups = { "enterpriseBeans", "removeMethod", "lifecycle", "stub" })
- @SpecAssertion(section = "3.3.5")
- public void testWebBeanRemoveMethodIsEJBRemoveMethod()
- {
- assert false;
- }
-
- /**
- * If an enterprise Web Bean that is a stateful session bean and does not
- * have a Web Bean remove method declares any scope other than @Dependent, a
- * DefinitionException is thrown by the Web Bean manager at initialization
- * time
- */
- @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3.5")
- public void testStatefulEnterpriseBeanWithoutRemoveMethodMustBeDependentScoped()
- {
- EnterpriseBean<Pumi> bean = EnterpriseBean.of(Pumi.class, manager);
- }
-
- /**
- * If an enterprise Web Bean that is a stateful session bean and does not
- * have a Web Bean remove method declares any scope other than @Dependent, a
- * DefinitionException is thrown by the Web Bean manager at initialization
- * time
- */
- @Test(groups = { "enterpriseBeans", "removeMethod" })
- @SpecAssertion(section = "3.3.5")
- public void testStatefulEnterpriseBeanWithoutRemoveMethodMustBeDependentScoped2()
- {
- EnterpriseBean<WelshCorgie> bean = EnterpriseBean.of(WelshCorgie.class, manager);
- }
-
- /**
- * If an instance of an enterprise Web Bean that is a stateful session bean
- * and does not have a Web Bean remove method is not explicitly destroyed by
- * the application before the Web Bean manager attempts to destroy the
- * instance, an UnremovedException is thrown by the Web Bean manager
- */
- @Test(groups = { "enterpriseBeans", "removeMethod", "stub" }, expectedExceptions = UnremovedException.class)
- @SpecAssertion(section = "3.3.5")
- public void testStatefulEnterpriseBeanWithoutRemoveMethodMustBeRemovedByApplicationBeforeManager()
- {
- EnterpriseBean<Toller> bean = EnterpriseBean.of(Toller.class, manager);
- Toller instance = manager.getInstance(bean);
- RequestContext context = (RequestContext) manager.getContext(RequestScoped.class);
- context.destroy();
- }
-
- /**
- * If the scope is @Dependent, the application may call any EJB remove method
- * of an instance of the enterprise Web Bean, but then no parameters will be
- * passed to the method by the Web Bean manager
- */
- @Test(groups = { "enterpriseBeans", "removeMethod", "lifecycle", "stub" })
- @SpecAssertion(section = "3.3.5")
- public void applicationMayCallRemoveMethodOnDependentScopedSessionEnterpriseBeansButNoParametersArePassed()
- {
- assert false;
- }
-
- /**
- * If the application directly calls an EJB remove method of an instance of
- * an enterprise Web Bean that is a stateful session bean and declares any
- * scope other than @Dependent, an UnsupportedOperationException is thrown.
- */
- @Test(groups = { "enterpriseBeans", "removeMethod", "lifecycle", "stub" }, expectedExceptions = UnsupportedOperationException.class)
- @SpecAssertion(section = "3.3.5")
- public void applicationCannotCallRemoveMethodOnNonDependentScopedSessionEnterpriseBean()
- {
- assert false;
- }
-
- /**
- * If the application directly calls an EJB remove method of an instance of
- * an enterprise Web Bean that is a stateful session bean and has scope
- * @Dependent, the Web Bean manager ignores the instance when instead of
- * destroying it
- */
- @Test(groups = { "enterpriseBeans", "removeMethod", "lifecycle", "stub" })
- @SpecAssertion(section = "3.3.5")
- public void applicationMayCallRemoveMethodOnDependentScopedSessionEnterpriseBeansButInstanceIsNotDestroyed()
- {
- assert false;
- }
-
- @Test(groups = { "enterpriseBeans", "removeMethod", "lifecycle", "stub" })
- @SpecAssertion(section = "3.3.5")
- public void testApplicationRemoveMethodCallRemovesInstanceFromContext()
- {
- EnterpriseBean<Toller> bean = EnterpriseBean.of(Toller.class, manager);
- RequestContext context = (RequestContext) manager.getContext(RequestScoped.class);
- Toller instance = context.get(bean, true);
- instance.bye();
- instance = context.get(bean, false);
- assert instance == null;
- }
-
- /**
- * If an enterprise Web Bean defined using annotations does not explicitly
- * declare a Web Bean remove method using @Destructor, and exactly one remove
- * method that accepts no parameters exists, then that remove method is the
- * Web Bean remove method.
- */
- @Test(groups = { "enterpriseBeans", "removeMethod" })
- @SpecAssertion(section = { "3.3.5.1" })
- public void testEnterpriseBeanWithoutDestructorUsesNoArgsRemoveAnnotatedMethodAsWebBeansRemoveMethod()
- {
- EnterpriseBean<Toller> bean = EnterpriseBean.of(Toller.class, manager);
- assert "bye".equals(bean.getRemoveMethod().getName());
- }
-
- /**
- * Otherwise, if no remove method that accepts no parameters exists, or if
- * multiple remove methods that accept no parameters exist, the enterprise
- * Web Bean has no Web Bean remove method.
- */
- @Test(groups = { "enterpriseBeans", "removeMethod" })
- @SpecAssertion(section = { "3.3.5.1" })
- public void testEnterpriseBeanWithoutDestructorAndNoOrMultipleNoArgsRemoveMethodsHasNoWebBeansRemoveMethod()
- {
- EnterpriseBean<Koirus> bean = EnterpriseBean.of(Koirus.class, manager);
- assert bean.getRemoveMethod() == null;
- }
-
- /**
- * If an enterprise Web Bean defined using annotations has more than one
- * method annotated @Destructor, a DefinitionException is thrown by the Web
- * Bean manager at initialization time.
- */
- @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = { "3.3.5.1" })
- public void testMultipleDestructorAnnotatedMethodsFails()
- {
- EnterpriseBean<Rottweiler> bean = EnterpriseBean.of(Rottweiler.class, manager);
- }
-
- /**
- * If an enterprise Web Bean defined using annotations has a method annotated
- *
- * @Destructor, and that method is not an EJB remove method, a
- * DefinitionException is thrown by the Web Bean manager at
- * initialization time.
- */
- @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = { "3.3.5.1" })
- public void testDestructorAnnotatedMethodNotRemoveAnnotatedFails()
- {
- EnterpriseBean<RussellTerrier> bean = EnterpriseBean.of(RussellTerrier.class, manager);
- }
-
- @Test(groups = { "enterpriseBeans", "removeMethod" })
- @SpecAssertion(section = { "3.3.5.1" })
- public void testDestructorAnnotatedSingleRemoveMethod()
- {
- EnterpriseBean<GoodDoggie> bean = EnterpriseBean.of(GoodDoggie.class, manager);
- }
-
- /**
- * If a Web Bean remove method is annotated @Initializer or @Produces, has a
- * parameter annotated @Disposes, or has a parameter annotated @Observes, a
- * DefinitionException is thrown by the Web Bean manager at initialization
- * time.
- */
- @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = { "3.3.5.1" })
- public void testRemoveMethodIsInitializerFails()
- {
- EnterpriseBean<Saluki> bean = EnterpriseBean.of(Saluki.class, manager);
- }
-
- /**
- * If a Web Bean remove method is annotated @Initializer or @Produces, has a
- * parameter annotated @Disposes, or has a parameter annotated @Observes, a
- * DefinitionException is thrown by the Web Bean manager at initialization
- * time.
- */
- @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = { "3.3.5.1" })
- public void testRemoveMethodIsProducerFails()
- {
- EnterpriseBean<Spitz> bean = EnterpriseBean.of(Spitz.class, manager);
- }
-
- /**
- * If a Web Bean remove method is annotated @Initializer or @Produces, has a
- * parameter annotated @Disposes, or has a parameter annotated @Observes, a
- * DefinitionException is thrown by the Web Bean manager at initialization
- * time.
- */
- @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = { "3.3.5.1" })
- public void testRemoveMethodWithDisposesParameterFails()
- {
- EnterpriseBean<GoldenRetriever> bean = EnterpriseBean.of(GoldenRetriever.class, manager);
- }
-
- /**
- * If a Web Bean remove method is annotated @Initializer or @Produces, has a
- * parameter annotated @Disposes, or has a parameter annotated @Observes, a
- * DefinitionException is thrown by the Web Bean manager at initialization
- * time.
- */
- @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = { "3.3.5.1" })
- public void testRemoveMethodWithObservesParameterFails()
- {
- EnterpriseBean<JackRussellTerrier> bean = EnterpriseBean.of(JackRussellTerrier.class, manager);
- }
-
- /**
- * If an enterprise Web Bean defined using XML does not explicitly declare a
- * Web Bean remove method using XML, and exactly one remove method that
- * accepts no parameters exists, then that remove method is the Web Bean
- * remove method
- */
- @Test(groups = { "enterpriseBeans", "webbeansxml", "removeMethod", "stub" })
- @SpecAssertion(section = { "3.3.5.1", "3.3.5.2" })
- public void testXMLDefinedEnterpriseBeanWithoutDestructorUsesNoArgsRemoveAnnotatedMethodAsWebBeansRemoveMethod()
- {
- assert false;
- }
-
- /**
- * Otherwise, if no remove method that accepts no parameters exists, or if
- * multiple remove methods that accept no parameters exist, the enterprise
- * Web Bean has no Web Bean remove method.
- */
- @Test(groups = { "enterpriseBeans", "webbeansxml", "removeMethod", "stub" })
- @SpecAssertion(section = { "3.3.5.1", "3.3.5.2" })
- public void testXMLDefinedEnterpriseBeanWithoutDestructorAndNoOrMultipleNoArgsRemoveMethodsHasNoWebBeansRemoveMethod()
- {
- assert false;
- }
-
- /**
- * If the implementation class of an enterprise Web Bean declared in XML does
- * not have an EJB remove method with the name and parameter types declared
- * in XML, a NonexistentMethodException is thrown by the Web Bean manager at
- * initialization time
- */
- @Test(groups = { "enterpriseBeans", "webbeansxml", "removeMethod", "stub" })
- @SpecAssertion(section = "3.3.5.2")
- public void testXMLDefinedEnterpriseBeanWithoutMatchingRemoveMethodFails()
- {
- assert false;
- }
-
- /**
- * If an enterprise Web Bean defined using XML declares more than one Web
- * Bean remove method in XML, a DefinitionException is thrown by the Web Bean
- * manager at initialization time.
- */
- @Test(groups = { "enterpriseBeans", "webbeansxml", "removeMethod", "stub" })
- @SpecAssertion(section = "3.3.5.2")
- public void testXMLDefinedEnterpriseBeanWithMultipleRemoveMethodsFails()
- {
- assert false;
- }
-
- /**
- * When a Web Bean remove method is declared in XML, the Web Bean manager
- * ignores binding annotations applied to the Java method parameters
- */
- @Test(groups = { "enterpriseBeans", "webbeansxml", "removeMethod", "stub" })
- @SpecAssertion(section = "3.3.5.2")
- public void testXMLDefinedEnterpriseBeanIgnoresBindingAnnotationOnParameters()
- {
- assert false;
- }
-
- /**
- * If the Web Bean remove method has parameters, the Web Bean manager calls
- * Manager.getInstanceByType() to determine a value for each parameter and
- * calls the method with these parameter values.
- */
- @Test(groups = { "enterpriseBeans", "removeMethod", "stub" })
- @SpecAssertion(section = "3.3.5.3")
- public void testRemoveMethodParameterResolving()
- {
- assert false;
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanSpecializationTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanSpecializationTest.java 2009-01-17 18:55:42 UTC (rev 1042)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanSpecializationTest.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -1,154 +0,0 @@
-package org.jboss.webbeans.test.ejb;
-
-import javax.webbeans.DefinitionException;
-import javax.webbeans.DeploymentException;
-
-import org.jboss.webbeans.bean.EnterpriseBean;
-import org.jboss.webbeans.test.AbstractTest;
-import org.jboss.webbeans.test.SpecAssertion;
-import org.jboss.webbeans.test.SpecVersion;
-import org.jboss.webbeans.test.ejb.invalid.GreaterDane;
-import org.jboss.webbeans.test.ejb.valid.Hound;
-import org.jboss.webbeans.test.ejb.valid.HoundOfBaskerville;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-/**
- * Sections
- *
- * 3.3.6. Specializing an enterprise Web Bean
- *
- * @author Nicklas Karlsson
- */
- at SpecVersion("20081206")
-public class EnterpriseBeanSpecializationTest extends AbstractTest
-{
-
- @BeforeMethod
- public void setupEjbDescriptors()
- {
- addToEjbCache(HoundOfBaskerville.class);
- addToEjbCache(Hound.class);
- addToEjbCache(GreaterDane.class);
- }
-
- /**
- * If an implementation class of an enterprise Web Bean X defined using
- * annotations is annotated @Specializes, then the implementation class of X
- * must directly extend the implementation class of another enterprise Web
- * Bean Y defined using annotations. If the implementation class of X does
- * not directly extend the implementation class of another enterprise Web
- * Bean, a DefinitionException is thrown by the Web Bean manager at
- * initialization time
- */
- @Test(groups = { "specialization", "enterpriseBeans", "stub" })
- @SpecAssertion(section = "3.3.6")
- public void testAnnotationDefinedSpecializingEnterpriseBeanMustDirectlyExtendAnotherAnnotationDefinedEnterpriseBean()
- {
- assert false;
- }
-
- /**
- * X inherits all binding types of Y
- */
- @Test(groups = { "specialization", "enterpriseBeans" })
- @SpecAssertion(section = "3.3.6")
- public void testSpecializingBeanInheritsBindingTypes()
- {
- EnterpriseBean<Hound> hound = EnterpriseBean.of(Hound.class, manager);
- EnterpriseBean<HoundOfBaskerville> houndOfBaskerville = EnterpriseBean.of(HoundOfBaskerville.class, manager);
- assert compareBindingTypesOK(hound, houndOfBaskerville);
- }
-
- private boolean compareBindingTypesOK(EnterpriseBean<Hound> hound, EnterpriseBean<HoundOfBaskerville> houndOfBaskerville)
- {
- if (hound.getBindings().size() != houndOfBaskerville.getBindings().size())
- {
- return false;
- }
- if (!hound.getBindings().containsAll(houndOfBaskerville.getBindings()))
- {
- return false;
- }
- if (!houndOfBaskerville.getBindings().containsAll(hound.getBindings()))
- {
- return false;
- }
- return true;
- }
-
- /**
- * if Y has a name, X has the same name as Y.
- */
- @Test(groups = { "specialization", "enterpriseBeans" })
- @SpecAssertion(section = "3.3.6")
- public void testSpecializingBeanInheritsNameIfAny()
- {
- EnterpriseBean<HoundOfBaskerville> houndOfBaskerville = EnterpriseBean.of(HoundOfBaskerville.class, manager);
- assert houndOfBaskerville.getName().equals("Pongo");
- }
-
- /**
- * X must support all local interfaces supported by Y. Otherwise, a
- * DefinitionException is thrown by the Web Bean manager at initialization
- * time.
- */
- @Test(expectedExceptions = DefinitionException.class, groups = { "stub", "specialization", "enterpriseBeans" })
- @SpecAssertion(section = "3.3.6")
- public void testSpecializingNotSupportingLocalInterfacesOfSpecializedFails()
- {
- assert false;
- }
-
- /**
- * if Y supports a bean-class local view, X must also support a bean-class
- * local view. Otherwise, a DefinitionException is thrown by the Web Bean
- * manager at initialization time.
- */
- @Test(expectedExceptions = DefinitionException.class, groups = { "stub", "specialization", "enterpriseBeans" })
- @SpecAssertion(section = "3.3.6")
- public void testSpecializingNotSupportingLocalViewOfSpecializedFails()
- {
- assert false;
- }
-
- /**
- * We say that X directly specializes Y, and we can be certain that Y will
- * never be instantiated or called by the Web Bean manager if X is enabled.
- */
- @Test(expectedExceptions = DefinitionException.class, groups = { "stub", "specialization", "enterpriseBeans" })
- @SpecAssertion(section = "3.3.6")
- public void testEnabledSpecializationOverridesSpecialized()
- {
- assert false;
- }
-
- @Test(groups = { "stub", "specialization", "enterpriseBeans" })
- @SpecAssertion(section = "3.3.6")
- public void testXMLDefinedSpecializationOnAnnotationDefinedBean()
- {
- assert false;
- }
-
- @Test(expectedExceptions = DeploymentException.class, groups = { "stub", "enterpriseBeans", "specialization" })
- @SpecAssertion(section = "3.3")
- public void testMultipleEnabledSpecializedEnterpriseBeanFails()
- {
- assert false;
- }
-
- @Test(expectedExceptions = DefinitionException.class, groups = { "specialization", "enterpriseBeans" })
- @SpecAssertion(section = "3.3.6")
- public void testAnnotationDefinedSpecializingEnterpriseBeanNotDirectlyExtendingAnnotationDefinedEnterpriseBeanFails()
- {
- EnterpriseBean.of(GreaterDane.class, manager);
- }
-
- @Test(expectedExceptions = DefinitionException.class, groups = { "stub", "specialization", "enterpriseBeans" })
- @SpecAssertion(section = "3.3.6")
- public void testXMLDefinedSpecializingEnterpriseBeanNotImplementingAnnotationDefinedEnterpriseBeanFails()
- {
- assert false;
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/valid/GoodDoggie.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/valid/GoodDoggie.java 2009-01-17 18:55:42 UTC (rev 1042)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/valid/GoodDoggie.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -1,17 +0,0 @@
-package org.jboss.webbeans.test.ejb.valid;
-
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
-import javax.webbeans.Destructor;
-
-import org.jboss.webbeans.test.ejb.EnterpriseBeanRemoveMethodTest;
-
- at Stateful
-public class GoodDoggie implements LocalGoodDoggie
-{
- @Destructor @Remove
- public void bye() {
- EnterpriseBeanRemoveMethodTest.visited = true;
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/valid/Pitbull.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/valid/Pitbull.java 2009-01-17 18:55:42 UTC (rev 1042)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/valid/Pitbull.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -1,21 +0,0 @@
-package org.jboss.webbeans.test.ejb.valid;
-
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
-import javax.webbeans.ApplicationScoped;
-import javax.webbeans.Destructor;
-import javax.webbeans.Named;
-
-import org.jboss.webbeans.test.ejb.EnterpriseBeanRemoveMethodTest;
-
- at Stateful
- at ApplicationScoped
- at Named
-public class Pitbull
-{
-
- @Remove @Destructor
- public void bye() {
- EnterpriseBeanRemoveMethodTest.visited = true;
- }
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/valid/Toller.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/valid/Toller.java 2009-01-17 18:55:42 UTC (rev 1042)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/valid/Toller.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -1,17 +0,0 @@
-package org.jboss.webbeans.test.ejb.valid;
-
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
-import javax.webbeans.RequestScoped;
-
-import org.jboss.webbeans.test.ejb.EnterpriseBeanRemoveMethodTest;
-
- at Stateful
- at RequestScoped
-public class Toller
-{
- @Remove
- public void bye() {
- EnterpriseBeanRemoveMethodTest.visited = true;
- }
-}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/tck/BeansImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/tck/BeansImpl.java 2009-01-17 18:55:42 UTC (rev 1042)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/tck/BeansImpl.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -13,6 +13,7 @@
import org.jboss.webbeans.bean.SimpleBean;
import org.jboss.webbeans.ejb.spi.EjbDescriptor;
import org.jboss.webbeans.tck.api.Beans;
+import org.jboss.webbeans.test.mock.MockEjbDescriptor;
import org.jboss.webbeans.util.Reflections;
/**
@@ -57,6 +58,7 @@
public <T> Bean<T> createEnterpriseBean(Class<T> clazz)
{
+ CurrentManager.rootManager().getEjbDescriptorCache().add(MockEjbDescriptor.of(clazz));
return EnterpriseBean.of(clazz, CurrentManager.rootManager());
}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/tck/ContextsImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/tck/ContextsImpl.java 2009-01-17 18:55:42 UTC (rev 1042)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/tck/ContextsImpl.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -1,5 +1,6 @@
package org.jboss.webbeans.test.tck;
+import org.jboss.webbeans.context.AbstractBeanMapContext;
import org.jboss.webbeans.context.AbstractContext;
import org.jboss.webbeans.context.DependentContext;
import org.jboss.webbeans.context.RequestContext;
@@ -28,6 +29,16 @@
return DependentContext.INSTANCE;
}
+ public void destroyContext(AbstractContext context)
+ {
+ if (context instanceof AbstractBeanMapContext)
+ {
+ ((AbstractBeanMapContext) context).destroy();
+ }
+ else
+ {
+ throw new UnsupportedOperationException();
+ }
+ }
-
}
Modified: tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Contexts.java
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Contexts.java 2009-01-17 18:55:42 UTC (rev 1042)
+++ tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Contexts.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -19,26 +19,35 @@
*
* @param context The context to set active
*/
- void setActive(T context);
+ public void setActive(T context);
/**
* Sets the specified context as inactive
*
* @param context The context to set inactive
*/
- void setInactive(T context);
+ public void setInactive(T context);
/**
* Creates a new request context
*
* @return The new request context
*/
- T getRequestContext();
+ public T getRequestContext();
/**
* Returns the default dependent context
*
* @return the dependent context
*/
- T getDependentContext();
+ public T getDependentContext();
+
+ /**
+ * Destroy the context. This operation is not well defined by the Web Beans
+ * specification and is implementation dependent.
+ *
+ * @param context
+ */
+ public void destroyContext(T context);
+
}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/AbstractEjbEmbeddableTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/AbstractEjbEmbeddableTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/AbstractEjbEmbeddableTest.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.tck.tests;
+
+public class AbstractEjbEmbeddableTest extends AbstractTest
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/AbstractEjbEmbeddableTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Armant_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Armant_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Armant_Broken.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,14 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateless;
+import javax.webbeans.Destructor;
+
+ at Stateless
+public class Armant_Broken
+{
+ @Destructor @Remove
+ public void bye() {
+
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Armant_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Beagle_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Beagle_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Beagle_Broken.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Stateless;
+import javax.webbeans.RequestScoped;
+
+ at Stateless
+ at RequestScoped
+class Beagle_Broken
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Beagle_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Boxer_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Boxer_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Boxer_Broken.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Stateless;
+import javax.webbeans.ConversationScoped;
+
+ at Stateless
+ at ConversationScoped
+class Boxer_Broken
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Boxer_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Bullmastiff_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Bullmastiff_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Bullmastiff_Broken.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Stateless;
+import javax.webbeans.SessionScoped;
+
+ at Stateless
+ at SessionScoped
+class Bullmastiff_Broken
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Bullmastiff_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Dachshund_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Dachshund_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Dachshund_Broken.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Stateless;
+import javax.webbeans.ApplicationScoped;
+
+ at Stateless
+ at ApplicationScoped
+class Dachshund_Broken
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Dachshund_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanDeclarationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanDeclarationTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanDeclarationTest.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,363 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.webbeans.DefinitionException;
+import javax.webbeans.DeploymentException;
+
+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;
+
+/**
+ * Sections
+ *
+ * 3.3. Enterprise Web Beans
+ * 3.3.1. Which EJBs are enterprise Web Beans?
+ * 3.3.2. API types of an enterprise Web Bean
+ * 3.3.3. Declaring an enterprise Web Bean using annotations
+ * 3.3.4. Declaring an enterprise Web Bean using XML
+ *
+ * @author Nicklas Karlsson
+ */
+ at SpecVersion("20081206")
+public class EnterpriseBeanDeclarationTest extends AbstractTest
+{
+
+ /**
+ * An EJB stateless session bean must belong to the @Dependent pseudo-scope.
+ * If an enterprise Web Bean specifies an illegal scope, a
+ * DefinitionException is thrown by the Web Bean manager at initialization
+ * time
+ */
+ @Test(groups = { "enterpriseBeans" })
+ @SpecAssertion(section = "3.3")
+ public void testStatelessWithDependentScopeOK()
+ {
+ deployBeans(Giraffe.class);
+ }
+
+ /**
+ * An EJB stateless session bean must belong to the @Dependent pseudo-scope.
+ * If an enterprise Web Bean specifies an illegal scope, a
+ * DefinitionException is thrown by the Web Bean manager at initialization
+ * time
+ */
+ @Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = "3.3")
+ public void testStatelessWithRequestScopeFails()
+ {
+ deployBeans(Beagle_Broken.class);
+ }
+
+ /**
+ * An EJB stateless session bean must belong to the @Dependent pseudo-scope.
+ * If an enterprise Web Bean specifies an illegal scope, a
+ * DefinitionException is thrown by the Web Bean manager at initialization
+ * time
+ */
+
+ @Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = "3.3")
+ public void testStatelessWithConversationScopeFails()
+ {
+ deployBeans(Boxer_Broken.class);
+ }
+
+ /**
+ * An EJB stateless session bean must belong to the @Dependent pseudo-scope.
+ * If an enterprise Web Bean specifies an illegal scope, a
+ * DefinitionException is thrown by the Web Bean manager at initialization
+ * time
+ */
+ @Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = "3.3")
+ public void testStatelessWithSessionScopeFails()
+ {
+ deployBeans(Bullmastiff_Broken.class);
+ }
+
+ /**
+ * An EJB stateless session bean must belong to the @Dependent pseudo-scope.
+ * If an enterprise Web Bean specifies an illegal scope, a
+ * DefinitionException is thrown by the Web Bean manager at initialization
+ * time
+ */
+ @Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = "3.3")
+ public void testStatelessWithApplicationScopeFails()
+ {
+ deployBeans(Dachshund_Broken.class);
+ }
+
+ /**
+ * An EJB singleton bean must belong to either the @ApplicationScoped scope
+ * or to the @Dependent pseudo-scope. If an enterprise Web Bean specifies an
+ * illegal scope, a DefinitionException is thrown by the Web Bean manager at
+ * initialization time
+ */
+ @Test(groups = { "enterpriseBeans" ,"broken"})
+ @SpecAssertion(section = "3.3")
+ public void testSingletonWithDependentScopeOK()
+ {
+ deployBeans(Labrador.class);
+ assert false;
+ }
+
+ /**
+ * An EJB singleton bean must belong to either the @ApplicationScoped scope
+ * or to the @Dependent pseudo-scope. If an enterprise Web Bean specifies an
+ * illegal scope, a DefinitionException is thrown by the Web Bean manager at
+ * initialization time
+ */
+ @Test(groups = { "enterpriseBeans" , "broken"}, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = "3.3")
+ public void testSingletonWithRequestScopeFails()
+ {
+ deployBeans(Greyhound_Broken.class);
+ assert false;
+ }
+
+ /**
+ * An EJB singleton bean must belong to either the @ApplicationScoped scope
+ * or to the @Dependent pseudo-scope. If an enterprise Web Bean specifies an
+ * illegal scope, a DefinitionException is thrown by the Web Bean manager at
+ * initialization time
+ */
+ @Test(groups = { "enterpriseBeans", "broken" }, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = "3.3")
+ public void testSingletonWithConversationScopeFails()
+ {
+ deployBeans(Husky_Broken.class);
+ assert false;
+ }
+
+ /**
+ * An EJB singleton bean must belong to either the @ApplicationScoped scope
+ * or to the @Dependent pseudo-scope. If an enterprise Web Bean specifies an
+ * illegal scope, a DefinitionException is thrown by the Web Bean manager at
+ * initialization time
+ */
+ @Test(groups = { "enterpriseBeans" , "broken"}, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = "3.3")
+ public void testSingletonWithSessionScopeFails()
+ {
+ deployBeans(IrishTerrier_Broken.class);
+ }
+
+ /**
+ * An EJB singleton bean must belong to either the @ApplicationScoped scope
+ * or to the @Dependent pseudo-scope. If an enterprise Web Bean specifies an
+ * illegal scope, a DefinitionException is thrown by the Web Bean manager at
+ * initialization time
+ */
+ @Test(groups = { "enterpriseBeans" , "broken" })
+ @SpecAssertion(section = "3.3")
+ public void testSingletonWithApplicationScopeOK()
+ {
+ deployBeans(Laika.class);
+ }
+
+ /**
+ * However, in any deployment, there may be at most one most specialized
+ * enabled enterprise Web Bean for any particular EJB enterprise bean.
+ * Therefore, for each distinct EJB name in a module, there is at most one
+ * Web Bean that may be called at runtime. If there is more than one most
+ * specialized enabled enterprise Web Bean for a particular EJB enterprise
+ * bean, a DeploymentException is thrown by the Web Bean manager at
+ * initialization time.
+ */
+ @Test(groups = { "enterpriseBeans", "stub" }, expectedExceptions = DeploymentException.class)
+ @SpecAssertion(section = "3.3")
+ public void testOnlyOneEnabledSpecializedEnterpriseBeanForImplmentation()
+ {
+ assert false;
+ }
+
+ /**
+ * If the implementation class of an enterprise Web Bean is annotated @Interceptor
+ * or @Decorator, a DefinitionException is thrown by the Web Bean manager at
+ * initialization time.
+ */
+ @Test(expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = "3.3")
+ public void testEnterpriseBeanInterceptorFails()
+ {
+ deployBeans(Pug_Broken.class);
+ }
+
+ /**
+ * If the implementation class of an enterprise Web Bean is annotated @Interceptor
+ * or @Decorator, a DefinitionException is thrown by the Web Bean manager at
+ * initialization time.
+ */
+ @Test(expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = "3.3")
+ public void testEnterpriseBeanDecoratorFails()
+ {
+ deployBeans(Pekingese_Broken.class);
+ }
+
+ /**
+ * Only one Web Bean per implementation class may be defined using
+ * annotations.
+ */
+ @Test(expectedExceptions = DefinitionException.class, groups = { "enterpriseBeans", "stub" })
+ @SpecAssertion(section = "3.3")
+ public void testMultipleAnnotationDefinedEnterpriseBeansWithSameImplementationClassFails()
+ {
+ // TODO: testable?
+ assert false;
+ }
+
+ /**
+ * Note that multiple enterprise Web Beans may share the same implementation
+ * class. This occurs when Web Beans are defined using XML
+ */
+ @Test(groups = { "webbeansxml", "enterpriseBeans", "stub" })
+ @SpecAssertion(section = "3.3")
+ public void testMultipleXMLDefinedEnterpriseBeansWithSameImplementationClassOK()
+ {
+ assert false;
+ }
+
+ /**
+ * All session beans exposing an EJB 3.x client view and declared via an EJB
+ * component defining annotation on the EJB bean class are Web Beans, and
+ * thus no special declaration is required.
+ */
+ @Test(groups = { "enterpriseBeans", "stub" })
+ @SpecAssertion(section = "3.3.1")
+ public void testAnnotatedEnterpriseBean()
+ {
+ // TODO: dupe?
+ assert false;
+ }
+
+ /**
+ * Additional enterprise Web Beans for these EJBs may be defined using XML,
+ * by specifying the bean class in web-beans.xml.
+ */
+ @Test(groups = { "enterpriseBeans", "webbeansxml", "stub" })
+ @SpecAssertion(section = "3.3.1")
+ public void testAnnotatedEnterpriseBeanComplementedWithXML()
+ {
+ // TODO dupe?
+ assert false;
+ }
+
+ /**
+ * All session beans exposing an EJB 3.x client view and declared in
+ * ejb-jar.xml are also Web Beans.
+ */
+ @Test(groups = { "enterpriseBeans", "ejbjarxml", "stub" })
+ @SpecAssertion(section = "3.3.1")
+ public void testEJBJARDefinedEnterpriseBean()
+ {
+ // TODO dupe?
+ assert false;
+ }
+
+ /**
+ * Additional enterprise Web Beans for these EJBs may be defined using XML,
+ * by specifying the bean class and EJB name in web-beans.xml
+ */
+ @Test(groups = { "enterpriseBeans", "ejbjarxml", "webbeansxml", "stub" })
+ @SpecAssertion(section = "3.3.1")
+ public void testEJBJARDefinedEnterpriseBeanComplementedWithXML()
+ {
+ // TODO dupe?
+ assert false;
+ }
+
+ /**
+ * The set of API types for an enterprise Web Bean contains all local
+ * interfaces of the bean that do not have wildcard type parameters or type
+ * variables and their superinterfaces
+ */
+ @Test(groups = { "enterpriseBeans", "stub" })
+ @SpecAssertion(section = "3.3.2")
+ public void testAPITypesAreLocalInterfacesWithoutWildcardTypesOrTypeVariablesWithSuperInterfaces()
+ {
+ assert false;
+ }
+
+ /**
+ * If the EJB bean has a bean class local view and the bean class is not a
+ * parameterized type, the set of API types contains the bean class and all
+ * superclasses
+ */
+ @Test(groups = { "enterpriseBeans", "stub" })
+ @SpecAssertion(section = "3.3.2")
+ public void testEnterpriseBeanWithLocalViewAndParameterizedTypeIncludesBeanClassAndSuperclassesInAPITypes()
+ {
+ assert false;
+ }
+
+ /**
+ * In addition, java.lang.Object is an API type of every enterprise Web Bean.
+ */
+ @Test(groups = "enterpriseBeans")
+ @SpecAssertion(section = "3.3.2")
+ public void testObjectIsInAPITypes()
+ {
+ assert createEnterpriseBean(Laika.class).getTypes().contains(Object.class);
+ }
+
+ /**
+ * Remote interfaces are not included in the set of API types.
+ */
+ @Test(groups = { "enterpriseBeans", "stub" })
+ @SpecAssertion(section = "3.3.2")
+ public void testRemoteInterfacesAreNotInAPITypes()
+ {
+ assert false;
+ }
+
+ /**
+ * Enterprise Web Beans may be declared in web-beans.xml using the bean class
+ * name (for EJBs defined using a component- defining annotation) or bean
+ * class and EJB name (for EJBs defined in ejb-jar.xml). The ejbName
+ * attribute declares the EJB name of an EJB defined in ejb-jar.xml
+ */
+ @Test(groups = { "enterpriseBeans", "webbeansxml", "ejbjarxml", "stub" })
+ @SpecAssertion(section = "3.3")
+ public void testXMLFilesEJBNameUsage()
+ {
+ assert false;
+ }
+
+ /**
+ * Enterprise Web Beans may not be message-driven beans. If an enterprise Web
+ * Bean declared in XML is a message-driven bean, a DefinitionException is
+ * thrown by the Web Bean manager at initialization time.
+ */
+ @Test(expectedExceptions = DefinitionException.class, groups = {"enterpriseBeans", "broken"})
+ @SpecAssertion(section = "3.3")
+ public void testMessageDrivenBeansNotOK()
+ {
+ deployBeans(Leopard.class);
+ }
+
+ /**
+ * The default name for an enterprise Web Bean is the unqualified class name
+ * of the Web Bean implementation class, after converting the first character
+ * to lower case.
+ */
+ @Test(groups = "enterpriseBeans")
+ @SpecAssertion(section = "3.3.7")
+ public void testDefaultName()
+ {
+ assert createEnterpriseBean(Pitbull.class).getName().equals("pitbull");
+ }
+
+ /**
+ * An enterprise bean proxy implements all local interfaces of the EJB.
+ */
+ @Test(groups = { "specialization", "enterpriseBeans", "clientProxy", "stub" })
+ @SpecAssertion(section = "3.3.8")
+ public void testEnterpriseBeanProxyImplementsAllLocalInterfaces()
+ {
+ assert false;
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanDeclarationTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanLifecycleTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanLifecycleTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanLifecycleTest.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,181 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import java.util.Set;
+
+import javax.webbeans.UnremovedException;
+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.AbstractEjbEmbeddableTest;
+import org.testng.annotations.Test;
+
+/**
+ * Sections
+ *
+ * 6.4. Lifecycle of stateful session enterprise Web beans
+ * 6.5. Lifecycle of stateless session and singleton enterprise Web Beans
+ * 6.9. Lifecycle of EJB beans
+ *
+ * Mostly overlapping with other tests...
+ *
+ * @author Nicklas Karlsson
+ */
+
+ at SpecVersion("20081206")
+public class EnterpriseBeanLifecycleTest extends AbstractEjbEmbeddableTest
+{
+
+ /**
+ * When the create() method is called, the Web Bean manager creates and
+ * returns an enterprise bean proxy
+ */
+ @Test(groups = { "enterpriseBeans", "lifecycle", "stub" })
+ @SpecAssertion(section = "6.4")
+ public void testProxyCreated()
+ {
+ assert false;
+ }
+
+ /**
+ * When the destroy() method is called, the Web Bean manager calls the Web
+ * Bean remove method upon the proxy
+ */
+ @Test(groups = { "enterpriseBeans", "clientProxy", "lifecycle", "stub"})
+ @SpecAssertion(section = "6.4")
+ public void testRemoveMethodCalled() throws Exception
+ {
+ GoodDoggie.destructorCalled = false;
+ deployBeans(GoodDoggie.class);
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ Set<Bean<LocalGoodDoggie>> goodDoggieBeans = manager.resolveByType(LocalGoodDoggie.class);
+ assert goodDoggieBeans.size() == 1;
+ Bean<LocalGoodDoggie> bean = goodDoggieBeans.iterator().next();
+ LocalGoodDoggie doggie = manager.getInstance(bean);
+ bean.destroy(doggie);
+ }
+
+ }.run();
+ }
+
+ /**
+ * For each remove method parameter, the Web Bean manager passes the object
+ * returned by Manager.getInstanceByType()
+ */
+ @Test(groups = { "enterpriseBeans", "lifecycle", "removeMethod", "stub" })
+ @SpecAssertion(section = "6.4")
+ public void testFieldInjections()
+ {
+ assert false;
+ }
+
+ /**
+ * If the enterprise Web Bean has no Web Bean remove method, the Web Bean
+ * manager throws an UnremovedException.
+ */
+ @Test(groups = { "enterpriseBeans", "lifecycle", "removeMethod", "stub" }, expectedExceptions = UnremovedException.class)
+ @SpecAssertion(section = "6.4")
+ public void testNoRemoveMethodFails()
+ {
+ assert false;
+ }
+
+ /**
+ * If the underlying EJB was already destroyed by direct invocation of a
+ * remove method by the application, the Web Bean manager ignores the
+ * instance, and is not required to call any remove method
+ */
+ @Test(groups = { "enterpriseBeans", "lifecycle", "removeMethod", "stub" })
+ @SpecAssertion(section = "6.4")
+ public void testNoRemoveMethodsCalledIfEnterpriseBeanAlreadyRemoved()
+ {
+ assert false;
+ }
+
+ /**
+ * When the destroy() method is called, the Web Bean manager simply discards
+ * the proxy and all EJB local object references.
+ */
+ @Test(groups = { "enterpriseBeans", "lifecycle", "removeMethod", "stub" })
+ @SpecAssertion(section = "6.5")
+ public void testProxyAndLocalObjectReferencesDiscardedForStatelessEnterpriseBeans()
+ {
+ assert false;
+ }
+
+ /**
+ * The Web Bean manager initializes the values of all injected fields. For
+ * each injected field, the Web Bean manager sets the value to the object
+ * returned by Manager.getInstanceByType().
+ */
+ @Test(groups = { "enterpriseBeans", "lifecycle", "stub" })
+ @SpecAssertion(section = "6.9")
+ public void testFieldInjectionsOnRemoveMethods()
+ {
+ assert false;
+ }
+
+ /**
+ * Next, if the EJB bean instance is an instance of a Web Bean, the Web Bean
+ * manager initializes the values of any fields with initial values specified
+ * in XML,
+ */
+ @Test(groups = { "enterpriseBeans", "lifecycle", "stub" })
+ @SpecAssertion(section = "6.9")
+ public void testInitXMLDefinedValuesOnWebWeanEnterpriseBeans()
+ {
+ assert false;
+ }
+
+ /**
+ * Next, the Web Bean manager calls all initializer methods. For each
+ * initializer method parameter, the Web Bean manager passes the object
+ * returned by Manager.getInstanceByType().
+ */
+ @Test(groups = { "enterpriseBeans", "lifecycle", "stub" })
+ @SpecAssertion(section = "6.9")
+ public void testInitializerMethodsCalledWithCurrentParameterValues()
+ {
+ assert false;
+ }
+
+ /**
+ * Finally, the Web Bean manager builds the interceptor and decorator stacks
+ * for the instance
+ */
+ @Test(groups = { "enterpriseBeans", "lifecycle", "interceptors", "stub" })
+ @SpecAssertion(section = "6.9")
+ public void testInterceptorStackIsBuilt()
+ {
+ assert false;
+ }
+
+ /**
+ * Finally, the Web Bean manager builds the interceptor and decorator stacks
+ * for the instance
+ */
+ @Test(groups = { "enterpriseBeans", "lifecycle", "decorators", "stub" })
+ @SpecAssertion(section = "6.9")
+ public void testDecoratorStackIsBuilt()
+ {
+ assert false;
+ }
+
+ /**
+ * When the EJB container destroys an instance of an EJB bean, the Web Bean
+ * manager intercepts the @PreDestroy callback and destroys all dependent
+ * objects, after the callback returns from the bean instance
+ */
+ @Test(groups = { "enterpriseBeans", "lifecycle", "stub" })
+ @SpecAssertion(section = "6.9")
+ public void testDependentObjectsDestroyed()
+ {
+ assert false;
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanLifecycleTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanRemoveMethodTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanRemoveMethodTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanRemoveMethodTest.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,346 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import static org.jboss.webbeans.tck.impl.WebBeansTCKImpl.configuration;
+
+import javax.webbeans.DefinitionException;
+import javax.webbeans.UnremovedException;
+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;
+
+/**
+ * Sections
+ *
+ * 3.3.5. Web Bean remove methods 3.3.5.1. Declaring a Web Bean remove method
+ * using annotations. 3.3.5.2. Declaring a Web Bean remove method using XML
+ * 3.3.5.3. Remove method parameters
+ *
+ * @author Nicklas Karlsson
+ */
+ at SpecVersion("20081206")
+public class EnterpriseBeanRemoveMethodTest extends AbstractTest
+{
+
+ /**
+ * EJB spec
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = "3.3.5")
+ public void testStatelessEnterpriseBeansWithRemoveMethodsFails()
+ {
+ deployBeans(Armant_Broken.class);
+ }
+
+ /**
+ * When the Web Bean manager destroys an enterprise Web Bean instance that is
+ * an EJB stateful session bean, it calls the Web Bean remove method
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod", "lifecycle", "stub" })
+ @SpecAssertion(section = "3.3.5")
+ public void testStatefulEnterpriseBeanRemoveMethodCalledWhenDestroyedByManager()
+ {
+ Toller.removeCalled = false;
+ Bean<Toller> bean = createEnterpriseBean(Toller.class);
+ Context context = configuration().getContexts().getRequestContext();
+ context.get(bean, true);
+ configuration().getContexts().destroyContext(context);
+ assert Toller.removeCalled;
+ }
+
+ /**
+ * The Web Bean remove method is a remove method of the EJB stateful session
+ * bean.
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod", "lifecycle", "stub" })
+ @SpecAssertion(section = "3.3.5")
+ public void testWebBeanRemoveMethodIsEJBRemoveMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * If an enterprise Web Bean that is a stateful session bean and does not
+ * have a Web Bean remove method declares any scope other than @Dependent, a
+ * DefinitionException is thrown by the Web Bean manager at initialization
+ * time
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = "3.3.5")
+ public void testStatefulEnterpriseBeanWithoutRemoveMethodMustBeDependentScoped()
+ {
+ deployBeans(Pumi_Broken.class);
+ }
+
+ /**
+ * If an enterprise Web Bean that is a stateful session bean and does not
+ * have a Web Bean remove method declares any scope other than @Dependent, a
+ * DefinitionException is thrown by the Web Bean manager at initialization
+ * time
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod" })
+ @SpecAssertion(section = "3.3.5")
+ public void testStatefulEnterpriseBeanWithoutRemoveMethodMustBeDependentScoped2()
+ {
+ createEnterpriseBean(WelshCorgie.class);
+ }
+
+ /**
+ * If an instance of an enterprise Web Bean that is a stateful session bean
+ * and does not have a Web Bean remove method is not explicitly destroyed by
+ * the application before the Web Bean manager attempts to destroy the
+ * instance, an UnremovedException is thrown by the Web Bean manager
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod", "stub" }, expectedExceptions = UnremovedException.class)
+ @SpecAssertion(section = "3.3.5")
+ public void testStatefulEnterpriseBeanWithoutRemoveMethodMustBeRemovedByApplicationBeforeManager()
+ {
+ Bean<Toller> bean = createEnterpriseBean(Toller.class);
+ manager.getInstance(bean);
+ configuration().getContexts().destroyContext(configuration().getContexts().getRequestContext());
+ }
+
+ /**
+ * If the scope is @Dependent, the application may call any EJB remove method
+ * of an instance of the enterprise Web Bean, but then no parameters will be
+ * passed to the method by the Web Bean manager
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod", "lifecycle", "stub" })
+ @SpecAssertion(section = "3.3.5")
+ public void applicationMayCallRemoveMethodOnDependentScopedSessionEnterpriseBeansButNoParametersArePassed()
+ {
+ assert false;
+ }
+
+ /**
+ * If the application directly calls an EJB remove method of an instance of
+ * an enterprise Web Bean that is a stateful session bean and declares any
+ * scope other than @Dependent, an UnsupportedOperationException is thrown.
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod", "lifecycle", "stub" }, expectedExceptions = UnsupportedOperationException.class)
+ @SpecAssertion(section = "3.3.5")
+ public void applicationCannotCallRemoveMethodOnNonDependentScopedSessionEnterpriseBean()
+ {
+ assert false;
+ }
+
+ /**
+ * If the application directly calls an EJB remove method of an instance of
+ * an enterprise Web Bean that is a stateful session bean and has scope
+ * @Dependent, the Web Bean manager ignores the instance when instead of
+ * destroying it
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod", "lifecycle", "stub" })
+ @SpecAssertion(section = "3.3.5")
+ public void applicationMayCallRemoveMethodOnDependentScopedSessionEnterpriseBeansButInstanceIsNotDestroyed()
+ {
+ assert false;
+ }
+
+ @Test(groups = { "enterpriseBeans", "removeMethod", "lifecycle", "stub" })
+ @SpecAssertion(section = "3.3.5")
+ public void testApplicationRemoveMethodCallRemovesInstanceFromContext()
+ {
+ Bean<Toller> bean = createEnterpriseBean(Toller.class);
+ Context context = configuration().getContexts().getRequestContext();
+ Toller instance = context.get(bean, true);
+ instance.bye();
+ instance = context.get(bean, false);
+ assert instance == null;
+ }
+
+ /**
+ * If an enterprise Web Bean defined using annotations does not explicitly
+ * declare a Web Bean remove method using @Destructor, and exactly one remove
+ * method that accepts no parameters exists, then that remove method is the
+ * Web Bean remove method.
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod" })
+ @SpecAssertion(section = { "3.3.5.1" })
+ public void testEnterpriseBeanWithoutDestructorUsesNoArgsRemoveAnnotatedMethodAsWebBeansRemoveMethod()
+ {
+ Toller.removeCalled = true;
+ Bean<Toller> bean = createEnterpriseBean(Toller.class);
+ bean.create();
+ configuration().getContexts().destroyContext(configuration().getContexts().getRequestContext());
+ assert Toller.removeCalled;
+ }
+
+ /**
+ * Otherwise, if no remove method that accepts no parameters exists, or if
+ * multiple remove methods that accept no parameters exist, the enterprise
+ * Web Bean has no Web Bean remove method.
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod", "broken" })
+ @SpecAssertion(section = { "3.3.5.1" })
+ public void testEnterpriseBeanWithoutDestructorAndNoOrMultipleNoArgsRemoveMethodsHasNoWebBeansRemoveMethod()
+ {
+ Koirus.removeCalled = false;
+ Bean<Koirus> bean = createEnterpriseBean(Koirus.class);
+ bean.create();
+ configuration().getContexts().destroyContext(configuration().getContexts().getDependentContext());
+ assert Koirus.removeCalled;
+ }
+
+ /**
+ * If an enterprise Web Bean defined using annotations has more than one
+ * method annotated @Destructor, a DefinitionException is thrown by the Web
+ * Bean manager at initialization time.
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = { "3.3.5.1" })
+ public void testMultipleDestructorAnnotatedMethodsFails()
+ {
+ createEnterpriseBean(Rottweiler.class);
+ }
+
+ /**
+ * If an enterprise Web Bean defined using annotations has a method annotated
+ *
+ * @Destructor, and that method is not an EJB remove method, a
+ * DefinitionException is thrown by the Web Bean manager at
+ * initialization time.
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = { "3.3.5.1" })
+ public void testDestructorAnnotatedMethodNotRemoveAnnotatedFails()
+ {
+ createEnterpriseBean(RussellTerrier.class);
+ }
+
+ @Test(groups = { "enterpriseBeans", "removeMethod" })
+ @SpecAssertion(section = { "3.3.5.1" })
+ public void testDestructorAnnotatedSingleRemoveMethod()
+ {
+ createEnterpriseBean(GoodDoggie.class);
+ }
+
+ /**
+ * If a Web Bean remove method is annotated @Initializer or @Produces, has a
+ * parameter annotated @Disposes, or has a parameter annotated @Observes, a
+ * DefinitionException is thrown by the Web Bean manager at initialization
+ * time.
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = { "3.3.5.1" })
+ public void testRemoveMethodIsInitializerFails()
+ {
+ createEnterpriseBean(Saluki.class);
+ }
+
+ /**
+ * If a Web Bean remove method is annotated @Initializer or @Produces, has a
+ * parameter annotated @Disposes, or has a parameter annotated @Observes, a
+ * DefinitionException is thrown by the Web Bean manager at initialization
+ * time.
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = { "3.3.5.1" })
+ public void testRemoveMethodIsProducerFails()
+ {
+ createEnterpriseBean(Spitz.class);
+ }
+
+ /**
+ * If a Web Bean remove method is annotated @Initializer or @Produces, has a
+ * parameter annotated @Disposes, or has a parameter annotated @Observes, a
+ * DefinitionException is thrown by the Web Bean manager at initialization
+ * time.
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = { "3.3.5.1" })
+ public void testRemoveMethodWithDisposesParameterFails()
+ {
+ createEnterpriseBean(GoldenRetriever.class);
+ }
+
+ /**
+ * If a Web Bean remove method is annotated @Initializer or @Produces, has a
+ * parameter annotated @Disposes, or has a parameter annotated @Observes, a
+ * DefinitionException is thrown by the Web Bean manager at initialization
+ * time.
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = { "3.3.5.1" })
+ public void testRemoveMethodWithObservesParameterFails()
+ {
+ createEnterpriseBean(JackRussellTerrier.class);
+ }
+
+ /**
+ * If an enterprise Web Bean defined using XML does not explicitly declare a
+ * Web Bean remove method using XML, and exactly one remove method that
+ * accepts no parameters exists, then that remove method is the Web Bean
+ * remove method
+ */
+ @Test(groups = { "enterpriseBeans", "webbeansxml", "removeMethod", "stub" })
+ @SpecAssertion(section = { "3.3.5.1", "3.3.5.2" })
+ public void testXMLDefinedEnterpriseBeanWithoutDestructorUsesNoArgsRemoveAnnotatedMethodAsWebBeansRemoveMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * Otherwise, if no remove method that accepts no parameters exists, or if
+ * multiple remove methods that accept no parameters exist, the enterprise
+ * Web Bean has no Web Bean remove method.
+ */
+ @Test(groups = { "enterpriseBeans", "webbeansxml", "removeMethod", "stub" })
+ @SpecAssertion(section = { "3.3.5.1", "3.3.5.2" })
+ public void testXMLDefinedEnterpriseBeanWithoutDestructorAndNoOrMultipleNoArgsRemoveMethodsHasNoWebBeansRemoveMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * If the implementation class of an enterprise Web Bean declared in XML does
+ * not have an EJB remove method with the name and parameter types declared
+ * in XML, a NonexistentMethodException is thrown by the Web Bean manager at
+ * initialization time
+ */
+ @Test(groups = { "enterpriseBeans", "webbeansxml", "removeMethod", "stub" })
+ @SpecAssertion(section = "3.3.5.2")
+ public void testXMLDefinedEnterpriseBeanWithoutMatchingRemoveMethodFails()
+ {
+ assert false;
+ }
+
+ /**
+ * If an enterprise Web Bean defined using XML declares more than one Web
+ * Bean remove method in XML, a DefinitionException is thrown by the Web Bean
+ * manager at initialization time.
+ */
+ @Test(groups = { "enterpriseBeans", "webbeansxml", "removeMethod", "stub" })
+ @SpecAssertion(section = "3.3.5.2")
+ public void testXMLDefinedEnterpriseBeanWithMultipleRemoveMethodsFails()
+ {
+ assert false;
+ }
+
+ /**
+ * When a Web Bean remove method is declared in XML, the Web Bean manager
+ * ignores binding annotations applied to the Java method parameters
+ */
+ @Test(groups = { "enterpriseBeans", "webbeansxml", "removeMethod", "stub" })
+ @SpecAssertion(section = "3.3.5.2")
+ public void testXMLDefinedEnterpriseBeanIgnoresBindingAnnotationOnParameters()
+ {
+ assert false;
+ }
+
+ /**
+ * If the Web Bean remove method has parameters, the Web Bean manager calls
+ * Manager.getInstanceByType() to determine a value for each parameter and
+ * calls the method with these parameter values.
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod", "stub" })
+ @SpecAssertion(section = "3.3.5.3")
+ public void testRemoveMethodParameterResolving()
+ {
+ assert false;
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanRemoveMethodTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanSpecializationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanSpecializationTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanSpecializationTest.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,144 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.webbeans.DefinitionException;
+import javax.webbeans.DeploymentException;
+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;
+
+/**
+ * Sections
+ *
+ * 3.3.6. Specializing an enterprise Web Bean
+ *
+ * @author Nicklas Karlsson
+ */
+ at SpecVersion("20081206")
+public class EnterpriseBeanSpecializationTest extends AbstractTest
+{
+
+ /**
+ * If an implementation class of an enterprise Web Bean X defined using
+ * annotations is annotated @Specializes, then the implementation class of X
+ * must directly extend the implementation class of another enterprise Web
+ * Bean Y defined using annotations. If the implementation class of X does
+ * not directly extend the implementation class of another enterprise Web
+ * Bean, a DefinitionException is thrown by the Web Bean manager at
+ * initialization time
+ */
+ @Test(groups = { "specialization", "enterpriseBeans", "stub" })
+ @SpecAssertion(section = "3.3.6")
+ public void testAnnotationDefinedSpecializingEnterpriseBeanMustDirectlyExtendAnotherAnnotationDefinedEnterpriseBean()
+ {
+ assert false;
+ }
+
+ /**
+ * X inherits all binding types of Y
+ */
+ @Test(groups = { "specialization", "enterpriseBeans" })
+ @SpecAssertion(section = "3.3.6")
+ public void testSpecializingBeanInheritsBindingTypes()
+ {
+ Bean<Hound> hound = createEnterpriseBean(Hound.class);
+ Bean<HoundOfBaskerville> houndOfBaskerville = createEnterpriseBean(HoundOfBaskerville.class);
+ assert compareBindingTypesOK(hound, houndOfBaskerville);
+ }
+
+ private boolean compareBindingTypesOK(Bean<Hound> hound, Bean<HoundOfBaskerville> houndOfBaskerville)
+ {
+ if (hound.getBindings().size() != houndOfBaskerville.getBindings().size())
+ {
+ return false;
+ }
+ if (!hound.getBindings().containsAll(houndOfBaskerville.getBindings()))
+ {
+ return false;
+ }
+ if (!houndOfBaskerville.getBindings().containsAll(hound.getBindings()))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * if Y has a name, X has the same name as Y.
+ */
+ @Test(groups = { "specialization", "enterpriseBeans" })
+ @SpecAssertion(section = "3.3.6")
+ public void testSpecializingBeanInheritsNameIfAny()
+ {
+ // Create the specialized class
+ createEnterpriseBean(Hound.class);
+ Bean<HoundOfBaskerville> houndOfBaskerville = createEnterpriseBean(HoundOfBaskerville.class);
+ assert houndOfBaskerville.getName().equals("Pongo");
+ }
+
+ /**
+ * X must support all local interfaces supported by Y. Otherwise, a
+ * DefinitionException is thrown by the Web Bean manager at initialization
+ * time.
+ */
+ @Test(expectedExceptions = DefinitionException.class, groups = { "stub", "specialization", "enterpriseBeans" })
+ @SpecAssertion(section = "3.3.6")
+ public void testSpecializingNotSupportingLocalInterfacesOfSpecializedFails()
+ {
+ assert false;
+ }
+
+ /**
+ * if Y supports a bean-class local view, X must also support a bean-class
+ * local view. Otherwise, a DefinitionException is thrown by the Web Bean
+ * manager at initialization time.
+ */
+ @Test(expectedExceptions = DefinitionException.class, groups = { "stub", "specialization", "enterpriseBeans" })
+ @SpecAssertion(section = "3.3.6")
+ public void testSpecializingNotSupportingLocalViewOfSpecializedFails()
+ {
+ assert false;
+ }
+
+ /**
+ * We say that X directly specializes Y, and we can be certain that Y will
+ * never be instantiated or called by the Web Bean manager if X is enabled.
+ */
+ @Test(expectedExceptions = DefinitionException.class, groups = { "stub", "specialization", "enterpriseBeans" })
+ @SpecAssertion(section = "3.3.6")
+ public void testEnabledSpecializationOverridesSpecialized()
+ {
+ assert false;
+ }
+
+ @Test(groups = { "stub", "specialization", "enterpriseBeans" })
+ @SpecAssertion(section = "3.3.6")
+ public void testXMLDefinedSpecializationOnAnnotationDefinedBean()
+ {
+ assert false;
+ }
+
+ @Test(expectedExceptions = DeploymentException.class, groups = { "stub", "enterpriseBeans", "specialization" })
+ @SpecAssertion(section = "3.3")
+ public void testMultipleEnabledSpecializedEnterpriseBeanFails()
+ {
+ assert false;
+ }
+
+ @Test(expectedExceptions = DefinitionException.class, groups = { "specialization", "enterpriseBeans" })
+ @SpecAssertion(section = "3.3.6")
+ public void testAnnotationDefinedSpecializingEnterpriseBeanNotDirectlyExtendingAnnotationDefinedEnterpriseBeanFails()
+ {
+ createEnterpriseBean(GreaterDane.class);
+ }
+
+ @Test(expectedExceptions = DefinitionException.class, groups = { "stub", "specialization", "enterpriseBeans" })
+ @SpecAssertion(section = "3.3.6")
+ public void testXMLDefinedSpecializingEnterpriseBeanNotImplementingAnnotationDefinedEnterpriseBeanFails()
+ {
+ assert false;
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanSpecializationTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Giraffe.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Giraffe.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Giraffe.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Stateless;
+
+ at Stateless
+class Giraffe
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Giraffe.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GoldenRetriever.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GoldenRetriever.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GoldenRetriever.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,18 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.Destructor;
+import javax.webbeans.Disposes;
+import javax.webbeans.RequestScoped;
+
+ at Stateful
+ at RequestScoped
+class GoldenRetriever
+{
+ @Remove @Destructor
+ public void bye(@Disposes Object something) {
+
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GoldenRetriever.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GoodDoggie.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GoodDoggie.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GoodDoggie.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,18 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.Destructor;
+
+ at Stateful
+class GoodDoggie implements LocalGoodDoggie
+{
+
+ public static boolean destructorCalled = false;
+
+ @Destructor @Remove
+ public void bye() {
+ destructorCalled = true;
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GoodDoggie.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GreatDane.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GreatDane.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GreatDane.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,7 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+
+class GreatDane
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GreatDane.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GreaterDane.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GreaterDane.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GreaterDane.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Stateless;
+import javax.webbeans.Specializes;
+
+ at Specializes
+ at Stateless
+class GreaterDane extends GreatDane
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GreaterDane.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Greyhound_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Greyhound_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Greyhound_Broken.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,10 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.webbeans.RequestScoped;
+
+//@Singleton
+ at RequestScoped
+class Greyhound_Broken
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Greyhound_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Hound.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Hound.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Hound.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,16 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.Named;
+
+ at Stateful
+ at Tame
+ at Named("Pongo")
+class Hound
+{
+ @Remove
+ public void bye() {
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Hound.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/HoundOfBaskerville.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/HoundOfBaskerville.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/HoundOfBaskerville.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Stateful;
+import javax.webbeans.Specializes;
+
+ at Specializes
+ at Stateful
+class HoundOfBaskerville extends Hound
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/HoundOfBaskerville.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Husky_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Husky_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Husky_Broken.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.webbeans.ConversationScoped;
+
+
+//@Singleton
+ at ConversationScoped
+class Husky_Broken
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Husky_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/IrishTerrier_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/IrishTerrier_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/IrishTerrier_Broken.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,10 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.webbeans.SessionScoped;
+
+//@Singleton
+ at SessionScoped
+class IrishTerrier_Broken
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/IrishTerrier_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/JackRussellTerrier.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/JackRussellTerrier.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/JackRussellTerrier.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,18 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.Destructor;
+import javax.webbeans.Observes;
+import javax.webbeans.RequestScoped;
+
+ at Stateful
+ at RequestScoped
+class JackRussellTerrier
+{
+ @Remove @Destructor
+ public void bye(@Observes Object something) {
+
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/JackRussellTerrier.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Koirus.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Koirus.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Koirus.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,19 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.Dependent;
+
+ at Stateful
+ at Dependent
+class Koirus
+{
+
+ public static boolean removeCalled = false;
+
+ @Remove
+ public void bye(Object param)
+ {
+ removeCalled = true;
+ }
+}
\ No newline at end of file
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Koirus.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Labrador.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Labrador.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Labrador.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,10 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.webbeans.Dependent;
+
+//@Singleton
+ at Dependent
+class Labrador
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Labrador.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Laika.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Laika.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Laika.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,17 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Remove;
+import javax.webbeans.ApplicationScoped;
+
+//@Singleton
+ at ApplicationScoped
+class Laika
+{
+
+ @Remove
+ public void remove()
+ {
+
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Laika.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Leopard.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Leopard.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Leopard.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,16 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.webbeans.Production;
+
+ at Production
+//@MessageDriven
+class Leopard /*implements javax.jms.MessageListener*/
+{
+
+ public void onMessage(/*Message message*/)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Leopard.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/LocalGoodDoggie.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/LocalGoodDoggie.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/LocalGoodDoggie.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Local;
+import javax.ejb.Remove;
+
+ at Local
+public interface LocalGoodDoggie
+{
+ @Remove
+ public void bye();
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/LocalGoodDoggie.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pekingese_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pekingese_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pekingese_Broken.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Stateless;
+import javax.webbeans.Decorator;
+
+ at Stateless
+ at Decorator
+class Pekingese_Broken
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pekingese_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pitbull.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pitbull.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pitbull.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,22 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.ApplicationScoped;
+import javax.webbeans.Destructor;
+import javax.webbeans.Named;
+
+ at Stateful
+ at ApplicationScoped
+ at Named
+class Pitbull
+{
+
+ public static boolean destructorCalled = false;
+
+ @Remove @Destructor
+ public void bye()
+ {
+ destructorCalled = true;
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pitbull.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pug_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pug_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pug_Broken.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Stateless;
+import javax.webbeans.Interceptor;
+
+ at Stateless
+ at Interceptor
+class Pug_Broken
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pug_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pumi_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pumi_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pumi_Broken.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Stateful;
+import javax.webbeans.RequestScoped;
+
+ at Stateful
+ at RequestScoped
+class Pumi_Broken
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pumi_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Rottweiler.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Rottweiler.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Rottweiler.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,21 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Stateful;
+import javax.webbeans.Destructor;
+import javax.webbeans.RequestScoped;
+
+ at Stateful
+ at RequestScoped
+class Rottweiler
+{
+ @Destructor
+ public void bye() {
+
+ }
+
+ @Destructor
+ public void bye2() {
+
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Rottweiler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/RussellTerrier.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/RussellTerrier.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/RussellTerrier.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,16 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Stateful;
+import javax.webbeans.Destructor;
+import javax.webbeans.RequestScoped;
+
+ at Stateful
+ at RequestScoped
+class RussellTerrier
+{
+ @Destructor
+ public void bye() {
+
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/RussellTerrier.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Saluki.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Saluki.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Saluki.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,17 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.Initializer;
+import javax.webbeans.RequestScoped;
+
+ at Stateful
+ at RequestScoped
+class Saluki
+{
+ @Remove @Initializer
+ public void bye() {
+
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Saluki.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Spitz.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Spitz.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Spitz.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,17 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.Produces;
+import javax.webbeans.RequestScoped;
+
+ at Stateful
+ at RequestScoped
+class Spitz
+{
+ @Remove @Produces
+ public void bye() {
+
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Spitz.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Tame.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Tame.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Tame.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,22 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.webbeans.BindingType;
+
+ at Target( { TYPE, METHOD, PARAMETER, FIELD })
+ at Retention(RUNTIME)
+ at Documented
+ at BindingType
+ at interface Tame
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Tame.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Toller.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Toller.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Toller.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,19 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.RequestScoped;
+
+ at Stateful
+ at RequestScoped
+class Toller
+{
+
+ public static boolean removeCalled = false;
+
+ @Remove
+ public void bye()
+ {
+ removeCalled = true;
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Toller.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/WelshCorgie.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/WelshCorgie.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/WelshCorgie.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Stateful;
+import javax.webbeans.Dependent;
+
+ at Stateful
+ at Dependent
+class WelshCorgie
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/WelshCorgie.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
More information about the weld-commits
mailing list