Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference b/w create() and ejbcreate()

 
Shanthi Priya
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am novice to ejb. I am confused with the difference b/w what create() and ejbcreate() does??? please help me.

Thanks in advance..
 
Sujatha Kumar
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
create is defined in EJBHome interface,whose implementation is provided by the container

where as the ejbCreate is the one defined in your bean class.

The client access ejbCreate through create method of EJBHome, as client
cannot directly access the Bean Class.

Hope it helps.
 
Dan T
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The client access ejbCreate through create method of EJBHome, as client
cannot directly access the Bean Class.



This applies only for stateful session beans and entity beans. Stateless session beans ejbCreate() and the home interface create() have no relationship at all. When the client invokes the create() method on home, it only creates the EJB Object. The ejbCreate is invoked by the container, when it wants to add more beans to the pool.
[ August 05, 2004: Message edited by: Ryan Wong ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic