org.jboss.webbeans.tck.unit.implementation.enterprise
Class EnterpriseBeanLifecycleTest

java.lang.Object
  extended by org.jboss.webbeans.tck.AbstractTest
      extended by org.jboss.webbeans.tck.unit.implementation.enterprise.EnterpriseBeanLifecycleTest

public class EnterpriseBeanLifecycleTest
extends AbstractTest

Sections 6.5. Lifecycle of stateful session beans 6.6. Lifecycle of stateless session and singleton beans 6.11. Lifecycle of EJBs Mostly overlapping with other tests...

Author:
Nicklas Karlsson Spec version: PRD2

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jboss.webbeans.tck.AbstractTest
AbstractTest.RunInDependentContext
 
Field Summary
 
Fields inherited from class org.jboss.webbeans.tck.AbstractTest
BUILT_IN_BEANS, manager, visited
 
Constructor Summary
EnterpriseBeanLifecycleTest()
           
 
Method Summary
 void testDecoratorStackIsBuilt()
          Finally, the Web Bean manager builds the interceptor and decorator stacks for the instance
 void testDependentObjectsDestroyed()
          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
 void testFieldInjections()
          For each remove method parameter, the Web Bean manager passes the object returned by Manager.getInstanceByType()
 void testFieldInjectionsOnRemoveMethods()
          The Web Bean manager initializes the values of all injected fields.
 void testInitializerMethodsCalledWithCurrentParameterValues()
          Next, the Web Bean manager calls all initializer methods.
 void testInitXMLDefinedValuesOnWebWeanEnterpriseBeans()
          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,
 void testInterceptorStackIsBuilt()
          Finally, the Web Bean manager builds the interceptor and decorator stacks for the instance
 void testNoRemoveMethodsCalledIfEnterpriseBeanAlreadyRemoved()
          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
 void testProxyAndLocalObjectReferencesDiscardedForStatelessEnterpriseBeans()
          When the destroy() method is called, the Web Bean manager simply discards the proxy and all EJB local object references.
 void testProxyCreated()
          When the create() method is called, the Web Bean manager creates and returns an enterprise bean proxy
 void testRemoveMethodCalled()
          When the destroy() method is called, the Web Bean manager calls the Web Bean remove method upon the proxy
 
Methods inherited from class org.jboss.webbeans.tck.AbstractTest
activateDependentContext, after, before, createEnterpriseBean, createProducerFieldBean, createProducerMethodBean, createSimpleBean, deactivateDependentContext, deployBeans, deserialize, getEnabledDeploymentTypes, getStandardDeploymentTypes, mockCreationalContext, serialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnterpriseBeanLifecycleTest

public EnterpriseBeanLifecycleTest()
Method Detail

testProxyCreated

@SpecAssertion(section="6.5")
public void testProxyCreated()
When the create() method is called, the Web Bean manager creates and returns an enterprise bean proxy


testRemoveMethodCalled

@SpecAssertion(section="6.5")
public void testRemoveMethodCalled()
                            throws java.lang.Exception
When the destroy() method is called, the Web Bean manager calls the Web Bean remove method upon the proxy

Throws:
java.lang.Exception

testFieldInjections

@SpecAssertion(section="6.5")
public void testFieldInjections()
For each remove method parameter, the Web Bean manager passes the object returned by Manager.getInstanceByType()


testNoRemoveMethodsCalledIfEnterpriseBeanAlreadyRemoved

@SpecAssertion(section="6.5")
public void testNoRemoveMethodsCalledIfEnterpriseBeanAlreadyRemoved()
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


testProxyAndLocalObjectReferencesDiscardedForStatelessEnterpriseBeans

@SpecAssertion(section="6.6")
public void testProxyAndLocalObjectReferencesDiscardedForStatelessEnterpriseBeans()
When the destroy() method is called, the Web Bean manager simply discards the proxy and all EJB local object references.


testFieldInjectionsOnRemoveMethods

@SpecAssertion(section="6.11")
public void testFieldInjectionsOnRemoveMethods()
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().


testInitXMLDefinedValuesOnWebWeanEnterpriseBeans

@SpecAssertion(section="6.11")
public void testInitXMLDefinedValuesOnWebWeanEnterpriseBeans()
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,


testInitializerMethodsCalledWithCurrentParameterValues

@SpecAssertion(section="6.11")
public void testInitializerMethodsCalledWithCurrentParameterValues()
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().


testInterceptorStackIsBuilt

@SpecAssertion(section="6.11")
public void testInterceptorStackIsBuilt()
Finally, the Web Bean manager builds the interceptor and decorator stacks for the instance


testDecoratorStackIsBuilt

@SpecAssertion(section="6.11")
public void testDecoratorStackIsBuilt()
Finally, the Web Bean manager builds the interceptor and decorator stacks for the instance


testDependentObjectsDestroyed

@SpecAssertion(section="6.11")
public void testDependentObjectsDestroyed()
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



Copyright © 2008-2009. All Rights Reserved.