File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes create & EJBcreate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "create & EJBcreate" Watch "create & EJBcreate" New topic
Author

create & EJBcreate

tilak kumar
Greenhorn

Joined: Feb 16, 2005
Posts: 15
whether create and EJBcreate are userdefined or predefined.
if they r predefined to which they belong to.
Valentin Tanase
Ranch Hand

Joined: Feb 17, 2005
Posts: 704
The clients invoke create() method on the home interface. The container will delegate the call to its correspondent ejbCreate() method on the bean instance. Therefore one must implement as many ejbCreate methods on the bean class as create methods you have defined in the home interface; they also must have the same number and types of input parameters.
Regards.


I think, therefore I exist -- Rene Descartes
tilak kumar
Greenhorn

Joined: Feb 16, 2005
Posts: 15
is create method is user defined or it is specified in any class.
if it is userdefined why cann't we can have other name
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Originally posted by tilak kumar:
is create method is user defined or it is specified in any class.
if it is userdefined why cann't we can have other name


As such, the create method is not declared in any of the interfaces that we are required to implement. That is because, there can be any number of overloaded create methods that a bean developer can provide.

But, that doesnt mean that the createXXX() is user-defined, because, we are not allowed to have any name as we like.

So, what is createXXX() and why do we have to name it createXXX()?
It is because, it is ejb spec rule that mandates the bean developer with the responsibility to code a createXXX method. This also means that, it basically should not be a compile time error... rather, it is a deploy time error.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: create & EJBcreate
 
Similar Threads
Timed MIDlet
ejbCreate in remote interface?
setRollbackOnly() is ejbCreate()
public int ejbCreate() throws javax.ejb.CreateException
confusion on ejbCreate