• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

create & EJBcreate

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
whether create and EJBcreate are userdefined or predefined.
if they r predefined to which they belong to.
 
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
tilak kumar
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
mooooooo ..... tiny ad ....
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic