Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Doubt about ejbCreate() for stateless session bean  RSS feed

 
Taka Chan
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not understanding why in the ejbCreate() method of a stateless session bean, we are allowed to use the sessionContext object to get a reference to the EJBObject.

Since according to the diagrams in HFEJB on page 224-225, the flow for the creation of a stateless session bean is totally not related to client calling a method on the EJBObject. Therefore, why we can get a reference to EJBObject in ejbCreate()?

Anyone can explain so as to clear my doubt? Thank you very much.
 
Daniel Amadei
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you need to pass the 'this' reference to another object, you have to use the EJBObject.

[]s
Daniel
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!