• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB Home Interface

 
Milind V. Kulkarni
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
We are all aware that Home Interface is generally used by the container for creating and destroying EJB objects. Container does this management by itself and programmer does not have to perform any coding explicitly.
I have seen that in most of the tutorials, examples show that Home interface implement just the create method but the other methods are not implemented at all.
My query is that if the if EJBHome interface also implement a method to destroy the EJB object why don't we implement it.
Thanks in Advance,
Milind
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because the code that your container genreates implements it -- think about this -- you don't have to implement the findByPrimaryKey() method either, so why would you have to implement the remove() method? This is what the container does for you...
Kyle
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!