Exforsys.com
 

Sponsored Links

 

SCBCD Tutorials

 
Home Certification SCBCD
 

SCBCD Study Notes : Chapter 4 : Session Bean Life Cycle

 

SCBCD Study Notes : Chapter 4 : Session Bean Life Cycle - Page 3

Page 3 of 3



Stateless Session Bean


Table 4.2. Operations allowed in the methods of a stateless session bean.


 



 


 


 


Bean method

 



 


 


 


Bean method can perform the following operations

 



 


 


 


Container-managed transaction demarcation

 



 


 


 


Bean-managed transaction demarcation

 



 


 


 


constructor

 



 


 


 


-

 



 


 


 


-

 



 


 


 


 



 


 


 


methods: , .

 



 


 


 


JNDI access to

 



 


 


 


methods: , .

 



 


 


 


JNDI access to

 



 


 


 


 



 


 


 


 



 


 


 


methods: , , , .

 



 


 


 


JNDI access to

 



 


 


 


methods: , , , , .

 



 


 


 


JNDI access to

 



 


 


 


Business method from component interface

 



 


 


 


methods: , , , , , , .

 



 


 


 


JNDI access to

 



 


 


 


Resource manager access

 



 


 


 


Enterprise bean access

 



 


 


 


methods: , , , , , .

 



 


 


 


methods

 



 


 


 


JNDI access to

 



 


 


 


Resource manager access

 



 


 


 


Enterprise bean access

 



 


 


 



Given a list of scenarios, identify which will result in an ejbRemove method not being called on a bean instance.


The Bean Provider CANNOT assume that the Container will always invoke the ejbRemove() method on a session bean instance. The following scenarios result in ejbRemove() not being called on an instance:


 


  • A crash of the EJB Container.
    .
  • A SYSTEM (java.lang.RuntimeException (or subclass), javax.ejb.EJBException, java.rmi.RemoteException, failure to obtain a database connection, JNDI exceptions) exception thrown from the instance’s method to the Container.
    .
  • A TIMEOUT of client inactivity while the instance is in the passive state. The timeout is specified by the Deployer in an EJB Container implementation specific way.

If the session bean instance allocates resources in the ejbCreate< METHOD >(...) method and/or in the business methods, and normally releases the resources in the ejbRemove() method, these resources WILL NOT be automatically released in the above scenarios. The application using the session bean should provide some clean up mechanism to periodically clean up the unreleased resources.


__________________
Author: Mikalai Zaikin. Please Click Here to visit Authors site for any updates and changes to the study notes.




First Page: SCBCD Study Notes : Chapter 4 : Session Bean Life Cycle


Read Next: SCBCD Study Notes : Chapter 5 : Client View of an Entity (Part 1)



 

 

Comments



Post Your Comment:

Members Please Login
Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe    

Sponsored Links

 

Subscribe via RSS


Get Daily Updates via Subscribe to Exforsys Free Training via email


Get Latest Free Training Updates delivered directly to your Inbox...

Enter your email address:


 

Subscribe to Exforsys Free Training via RSS
 

 
Partners -  Privacy and Legal Policy -  Site News -  Contact   Sitemap  

Copyright © 2000 - 2009 exforsys.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape