GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  J2EE  >  EJB
Go To First  |  Previous Question  |  Next Question 
 EJB  |  Question 7 of 175    Print  
What is the life cycle of Stateless session bean

  
Total Answers and Comments: 2 Last Update: July 24, 2005   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
May 03, 2005 19:01:35   #1  
Kiran        

RE: What is the life cycle of Stateless session bean
stateless session bean has only two states: Does Not Exists and Method Ready Pool. 
 
A bean has not yet instantiated (so it is not an instance in memory) when it is in the Does Not Exists state. 
 
When the EJB container needs one or more beans, it creates and set them in the Method Ready Pool state. This happens through the creation of a new instance (Class.newInstance()), then it is set its context (setSessionContext()) and finally calls the ejbCreate() method. 
 
The ejbRemove() method is called to move a bean from the Method Ready Pool back to Does Not Exists state.

 
Is this answer useful? Yes | No
July 24, 2005 03:07:12   #2  
pradeep        

RE: What is the life cycle of Stateless session bean
1. dose not exsist 
2. exsist 
 
to start the session 
set the sessionContext() 
call create() 
 
to end session 
call remove

 
Is this answer useful? Yes | No

 Related Questions

Answer posted by Mohan on 2005-05-20 08:44:39: SessionBeans typically are used to represent a client they are of two typse  Stateful Session Beans : they maintain conversational state between 
Latest Answer : Session bean is encapsulates the business logic. and carry out the task for behalf of the client. It have two types.one is stateful session bean. this is maintain the convesional state.another one is stateless session bean. donot maintain the conversional.state. ...

Answer posted by Mohan on 2005-05-20 08:45:36: Stateful session beans have the passivated and Active state which the Stateless bean does not have. 
Latest Answer : Stateful session beans follow the instance passivation techniqueStateless session beans follow the instance pooling technique.ejbActivate() and ejbPassivate() methods are not called in Stateless session beansI ...

Latest Answer : 1. doesnot exsist 2. exsists 3. passivate  invoke ejbcreate() set the sessioncontext() call create()  if the session idle call ejbPassivate() to get back to session call ejbActivate()  to end the ...

Latest Answer : 1. dose not exsist 2. exsist  to start the session set the sessionContext() call create()  to end session call remove ...

Answered by Jey on 2005-05-08 19:41:22: Session bean callback methods differ whether it is Stateless or stateful Session bean. Here they are.  Stateless Session Bean 1. setSessionContext() 2. 
Latest Answer : Please note down that ejbCreate() is not a method of Session Bean, for reference see the link http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/ejb/SessionBean . html ...

Latest Answer : I'll  take a best exmaple to explain.Statefull sessionbean : ATM operationStateless Session Bean : Credit card Once we log into the ATM by entering PIN number. We can do multiple transacations like Balance enquiry, Withdrawl, ministatement..etc... ...

Answered by Jey on 2005-05-08 12:47:06: Entity bean represents the real data which is stored in the persistent storage like Database or file system. For example, There is a table in Database called Credit_card. 
Latest Answer : entity bean are used to represent state of unique entity.for example. each employee have unique ID . ...

Answered by Jey on 2005-05-08 11:32:16: CMP means Container Managed Persistence. When we write CMP bean , we dont need to write any JDBC code to connect to Database. The container will take care of connection 
Latest Answer : CMP means Container Managed Persistence. In case of CMP bean , developers dont need to write any JDBC code to connect to Database. The container will take care of connection our enitty beans fields with database. The Container manages the persistence ...

Latest Answer : The following steps describe the life cycle of an entity bean instance  An entity bean instances life starts when the container creates the instance using newInstance and then initialises it using setEntityContext.  The instance enters ...

Answered by Jey Ramasamy on 2005-05-08 19:51:04: 1. setEntityContext() 2. ejbCreate() 3. ejbPostCreate() 4. ejbActivate() 5. ejbPassivate() 6. ejbRemove() 7. unsetEntityContext() 
Latest Answer :  setEntityContext(EntityContext) unsetEntityContext() ejbLoad() ejbStore() ejbActivate() ejbPassivate() ejbRemove() ...


 Sponsored Links

 
Related Articles

What is Systems Development Life Cycle

Introduction Developers worldwide will agree that building software takes more than just writing complex codes and implementing them in an environment. Developers usually start out their career in programming by developing programs or software according to their own plan and hope that someone will
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

What is Software Development Life Cycle?

What is Software Development Life Cycle? In this chapter we’ll be looking on SDLC as a tool for development, what are the factors for its proper implementation and special section on software security from the point of view of SDLC. These topics will guide us in knowing the important of S
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

Importance of Proper English during Job Interview

Importance of Proper English during Job Interview Your job interview is crucially important and it will determine whether or not you will get the job Depending on the type of job you re going for it is very important for you to use proper English In most cases jobs which offer higher salaries will h
 

Why Improving Your Vocabulary Can Enhance Your Life

Why Improving Your Vocabulary Can Enhance Your Life There are a number of reasons why you will want to improve your vocabulary You will feel good about yourself because you will have a larger command of your language It has also been shown that improving your vocabulary can greatly increase your IQ
 

JSP Implicit and Session Objects

JSP Implicit and Session Objects In this JPS tutorial you will learn how to program using JSP JSP expressions and Implicit Objects JSP Session Object methods of session object getAttribute String name getAttributeNames and isNew mosgoogle JSP expressions If a programmer wants to insert data into an
 

HR Interview - HR Interview Mistakes You Will Want To Avoid

HR Interview Mistakes You Will Want To Avoid The job interview can be a stressful process This is especially true for those who are going after a competitive position Your nonverbal communication combined with the answers you give during the interview will determine if you are hired mosgoogle While
 

HR Interview - Behavioral HR Interviews

Behavioral HR Interviews As the name implies a behavioral interview is an interview that is held by a human resources department to determine if an applicant has the behaviors that are appropriate for a job The company must know how an applicant will behave in a certain situations mosgoogle The logi
 

HR Interview - How To Prepare For Your HR Interview

How To Prepare For Your HR Interview Before you begin thinking about how you are going to dress for the interview it is important to do your research first You should learn everything you can about the company you wish to work for When you have detailed information about your employer you will conve
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape