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

return type for ejbCreate method

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anyone tell me what would be the return type for my own custom created ejbCreate(x,x,x) method? Do i need to write even ejbPostCreate method for the ejbCreate method i created?
Thanks in advance
Chandoo
 
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Chandrasekhar Vidhyadharani:
Can anyone tell me what would be the return type for my own custom created ejbCreate(x,x,x) method? Do i need to write even ejbPostCreate method for the ejbCreate method i created?
Thanks in advance
Chandoo


Hi,
because u're asking about ejbPostCreate I'll assume you're talking about entity beans only.
the return type for the method signature must be the PK class or type(depends on having a compound pk or not), inside the method you must return null.
About ejbPostCreate, yes, it's mandatory to have one ejbCreateXXXX ejbPostCreateXXX(returns void) for each createXXX method you have at the home interface, notice that the create method is not mandatory for entity beans only for session beans.
 
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ejbCreate returns the primary key value (possibly null if it is CMP). And yes, you need to have a corresponding ejbPostCreate to go along with it. You can also put a method create(...) in your home interface that the client actually invokes -- whose signature indicates a regular value of the local component interface type.
 
Chandrasekhar Vidhyadharani
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Marcos Maia ,Nathaniel Stodard for your replies. I figured it out now.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic