This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills: The software developer's life manual and have John Sonmez on-line!
See this thread for details.
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

when it will get executed?

 
Suhas Madap
Ranch Hand
Posts: 52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
May I know, when the ejbCreate() method will get executed? Can we pass arguments to the ejbCreate()? If so for which session bean, we should do that? please explain this some pratical scenario.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33667
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Suhas Madap:
Hi,
May I know, when the ejbCreate() method will get executed?

ejbCreate() is called behind the scenes when the client calls create() on your EJB's home interface.

Can we pass arguments to the ejbCreate()?

Yes. You can write your own ejbCreate methods and then those signatures are valid.

If so for which session bean, we should do that? please explain this some pratical scenario.

This is more frequently done for entity beans than session beans. You could use it for stateless session beans though - if you wanted to pass some initialization information.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic