• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

When is ejbCreate() called?

 
Palak Shah
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For stateful session beans, container makes the EJB object and SessionContext. Then container creates the bean instance. Container calls setSessionContext() link the bean to its context.

Also the container links the bean to its EJB object by calling ejbCreate(). Is this correct? if not when is ejbCreate() called?

For stateless session beans, when exactly is ejbCreate() method called?
I ask this question because, in HFEJB it is mentioned that bean can get a reference to its EJBObject from ejbCreate() method for a stateless bean. How is that possible? can anyone please clarify?

Thanks in advance.
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some of your questions are answered here.
http://www.coderanch.com/t/160770/java-EJB-SCBCD/certification/Access-EJBObject-within-ebjCreate-stateless
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic