Win a copy of Fixing your Scrum this week in the Agile forum!
  • 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
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

create methods

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,
Can we have overloaded create() methods like
create(String s) and create(int i). I think this is possible. But in one mocke exams( ) they are saying we can have only one create(any argument) methods. All other methods should be like createXXXX(). can somebody please clarify this for me.
Thanks,
Prashanth.
 
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Prashanth,
You can have overloaded create methods. In fact, amazingly, the EJB 2.1 doesn't even container the word "overload", so there is no explicit restriction. Nifty, huh?
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Stateless session should have only one no argument create() method
 
Desperado
Posts: 3226
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am assuming that Prashanth is referring only to stateful session beans since, as Victor says, stateless session beans can have only one create() method and no with argument at that.
No argument there Ha!
From HFEJB page 232: "Stateful beans must have one or more create() methods and are NOT required to have a no-arg create(). The create() methods must start with the string "create" and can be overloaded". (Emphasis mine.)
 
Don't MAKE me come back there with this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic