This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

lookup of entity bean in session bean

 
Stephen Lee
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In session facade, the session bean is responsible for looking up of the entity bean. However, I found that there are 4 differences in placing the lookup code in the session bean:
1) the code of the lookup is placed in the ejbCreate( ) method
2) the code of the lookup is placed in the ejbCreate( ) method and ejbActivate( ) method
3) the code of the lookup is placed in the setSessionContext( ) method
4) the code of the lookup is placed in the method which is not corresponding to the session bean
What is the difference between those cases? When should I use them? How about the performance?
Thank you very much!
Stephen Lee
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic