• Post Reply Bookmark Topic Watch Topic
  • New Topic

ejbCreate method

 
Malli Raman
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

There is no ejbCreate() method in the session bean interface but bean developer has to implement the corresponding the ejbCreate() method in the stateful session bean or ejbCreate() in case of stateless session bean. Why this assumption is left to the bean developer.

By chance if the bean developer forget to define the ejbCreate() in a bean class or create() in home interface of a Stateless Session Bean. What will happen?

Thanks & Regards,
M.S.Raman
 
Sundara Rajan Varadan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lets play by rules !! For Stateless Session Bean, the "Bean Rule" states we MUST have a create() in the home interface and this should be matched with a corresponding/matching ejbCreate()method in the Bean Class.

A CreateException will be thrown back to the client if the Bean Provider forgets to declare the above methods

- Sundar, IBM India.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!