Solved

crete () - Home interface

Posted on 2006-11-25
4
159 Views
Last Modified: 2010-03-31
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
Comment
Question by:jaggernat
  • 2
4 Comments
 
LVL 23

Assisted Solution

by:Ajay-Singh
Ajay-Singh earned 150 total points
ID: 18012017
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
 
LVL 10

Author Comment

by:jaggernat
ID: 18012150
>>>>the name could be different as well.



so you mean i can have createMyBean() instead of create()?
0
 
LVL 23

Expert Comment

by:Ajay-Singh
ID: 18012164
yes
0
 
LVL 8

Accepted Solution

by:
reach2piyush earned 350 total points
ID: 18017235
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
JDeveloper 12c for 32 bit 4 84
how do i compare an object based on two fields 6 53
hibernate insert example 13 28
throw exception 21 43
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question