This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Difference b/w create() and ejbcreate() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Difference b/w create() and ejbcreate()" Watch "Difference b/w create() and ejbcreate()" New topic
Author

Difference b/w create() and ejbcreate()

Shanthi Priya
Greenhorn

Joined: Aug 05, 2004
Posts: 12
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

Joined: Jan 05, 2004
Posts: 134
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.


SCJP,SCWCD,SCBCD,SCEA Part I
Dan T
Ranch Hand

Joined: Jun 15, 2004
Posts: 66
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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Difference b/w create() and ejbcreate()
 
Similar Threads
P2P and Web Services
life cycle and access to beanness
RequestDispatcher
Difference b/w ValidatorForm and DynaValidatorForm
Static vs Non-static