Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

return type for ejbCreate method

 
Chandrasekhar Vidhyadharani
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Marcos Maia
Ranch Hand
Posts: 977
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Marcos Maia ,Nathaniel Stodard for your replies. I figured it out now.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic