Win a copy of High Performance Python for Data Analytics this week in the Python 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 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

return type ejbCreate CMP

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello I have this doubt


In the page 331 of HFEJB shows a little sample about the method ejbCreate of a CMP bean. I know that every ejbCreateXX method should return the type of its �rimary key (in this sample String). but why the return tupe is a null. I think it must be a the primary key generated???

Thanks a lot
 
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Carlos Llona:
Hello I have this doubt


In the page 331 of HFEJB shows a little sample about the method ejbCreate of a CMP bean. I know that every ejbCreateXX method should return the type of its �rimary key (in this sample String). but why the return tupe is a null. I think it must be a the primary key generated???

Thanks a lot



For a CMP entity, the bean provider specifies the primary key field (recollect that primary key field is also a managed field) and primary key class in the deployment descriptor. The container has enough information about the primary key when the bean is being created and need not have to depend on the value returned from the ejbCreate().

However for a BMP entity, it is required that each ejbCreate() method returns the primary key value.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic