File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes create ( ) in Home Interface 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 » Architect Certification (SCEA/OCMJEA)
Bookmark "create ( ) in Home Interface" Watch "create ( ) in Home Interface" New topic
Author

create ( ) in Home Interface

jay roy
Ranch Hand

Joined: Nov 16, 2006
Posts: 145
hi guys

We write create() in the home interface which extends EJBHome.But suprisingly, the create() doesnt exist in the EJBHome API, meaning the create() is defined by bean developer. So can i change the name of create() to createMyBean(). If yes, where else will i have to make changes?


thanks
jtc
Muhammad Asif
Ranch Hand

Joined: Jul 13, 2001
Posts: 202
It depends on the type of the bean that you are developing.
All the create methods need to have a matching ejbCreate in the bean class.

I think for stateless session beans you need to have only one no-argument create method.


SCJP, SCBCD, SCWCD 1.4, IBM-OOAD, SCEA, TCP, TCSS, TCIS, ATCP
jay roy
Ranch Hand

Joined: Nov 16, 2006
Posts: 145
thanks for reply asif

so if i change from create() to createMyMethod() in home interface, do i change ejbCreate() to ejbcreateMyMethod() for stateless session beans.

thanks
J
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: create ( ) in Home Interface
 
Similar Threads
can I throw any exception I want in creat
ejb home interface and websphere studio 3.5
what methods do you put in EJB remote interface?
ClassCastException while invoking PortableRemoteObject.narrow
Overloading of create methods for stateful session bean home interface