• 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
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

why we are using ejbPostCreate()

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,



can any body give the answer why exactly in a Entity Bean we are using ejbPostCreate() method.

what is the exact differnece between ecjCreate() method and ejbPostCreate() method.
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ejbPostCreate gives you a chance to set cmr-fields. It is not possible in ejbCreate as the entity does not exist yet.
 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To elaborate further. Relationship tables require the primary key information of the parent table of the relationship. Some times primary key generation is deferred to the database(e.g. trigger based PK generation). In such cases PKs are generated on completion of the ejbCreate method invocation. Hence an ejbPostCreate method is provided to retrieve the PK and assign it to the relationship tables.
reply
    Bookmark Topic Watch Topic
  • New Topic