• 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
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

'ejbCreate' methods should be coded to return a null value. is it true?

 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is a statement made in the EJB 2.0 specification; page no 171

The statement made is related to ENTITY BEANS.

STATEMENT :The implementation of the Bean Provider�s ejbCreate<METHOD>(...) methods should be coded to return a null.

does it mean even though we know the value of the primary key field do we need to return a null value from the 'ejbCreate' method.

please clarify me wheather i should always return a 'null' value (or) i can return the primary key field value if i known, from the ejbCreate method?
 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Return null. It is the container's job to provide you with the primary key back and not a bean developers.
 
Farmers know to never drive a tractor near a honey locust tree. But a tiny ad is okay:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic