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.
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.