• 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
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

ejbCreate method and return value

 
Ranch Hand
Posts: 390
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Vish Kumar
 
Do you pee on your compost? Does this tiny ad?
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic