• Post Reply Bookmark Topic Watch Topic
  • New Topic

Entity Beans

 
Reshma Reddy
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
what is difference bet ween ejbCreate() & ejbPostCreate() methods when we use ejbPostCreate()and what is use of this one by using in our application.

Thanks,
vishnu
 
Sumit Malik
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vishnu Vardhan,

The difference between ejbCreate() and ejbPostCreate() is as follows:

1. ejbCreate() method is used when we want to create a instance of bean in the memory of the container so we can lookup(or call any business methos) on this bean instance.
2, ejbPostCreate() is a life cycle method of bean. Suppose you want that as soon as this bean gets loaded(or created) into the memory of container then i need to invoke other services or want to invoke other bean instance which would be useful in business model...

I hope now would get the clue what is the difference between both of them..

Cheers !!!
Sumit Malik
 
Reshma Reddy
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi malik,
Thanks for your reply i got the point.

Thanks,
vishnu
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!