• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

create methods  RSS feed

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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.)
 
Story like this gets better after being told a few times. Or maybe it's just a tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!