• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 167
  • Last Modified:

crete () - Home interface

We write create() in the home interface which extends EJBHome.But suprisingly, the create() doesnt exist in the EJBHome API, meaning the create() is defined by bean developer. So can i change the name of create() to createMyBean(). If yes, where else will i have to make changes?
(Excuse me if the question is silly,but i am trying to get into the depth of ejbs)

thanks
J
0
jaggernat
Asked:
jaggernat
  • 2
2 Solutions
 
Ajay-SinghCommented:
You have to define create method with appropriate signature, the name could be different as well.

checkout this example: http://openejb.codehaus.org/Hello+World
0
 
jaggernatAuthor Commented:
>>>>the name could be different as well.



so you mean i can have createMyBean() instead of create()?
0
 
Ajay-SinghCommented:
yes
0
 
reach2piyushCommented:
Can have 0 or more create methods defined in your home interface

Naming convention:
Method name should start with create like create<<AnyName>>
for every create you must have a corresponding
ejbCreate<<AnyName>> & ejbPostCreate<<AnyName>> defined in your bean.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now