• 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
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

ejbCreate method and return value

 
Ranch Hand
Posts: 390
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On the ejb specification page 171, it stated that the reason why the ejbCreate() return value is null for BMP "is to allow the creation of an entity bean with bean-managed persistence by subclassing an entity bean with container-managed persistence". The question now is why is the ejbCreate() return value for CMP null?
 
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Anselm,
In fact, it's just the contrary: ejbCreateXXX() methods for CMP entity beans must return null in order to "allow the creation of an entity bean with bean-managed persistence by subclassing an entity bean with container-managed persistence.".
Regards,
Phil.
[ March 21, 2004: Message edited by: Philippe Maquet ]
 
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

The question now is why is the ejbCreate() return value for CMP null?


The Container does not use the return value, but you should return null because the EJB spec tells you to do so.
It is actually BMP beans which must return the primary key.
 
Anselm Paulinus
Ranch Hand
Posts: 390
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Vish Kumar
 
A magnificient life is loaded with tough challenges. En garde tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic