This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes CONSTRUCTOR IN ENTITY BEANS Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply Bookmark "CONSTRUCTOR IN ENTITY BEANS" Watch "CONSTRUCTOR IN ENTITY BEANS" New topic
Author

CONSTRUCTOR IN ENTITY BEANS

AvatarKrishna Allada
Greenhorn

Joined: Oct 03, 2002
Posts: 1
Hi, Can any one explain me why there is No "CONSTRUCTOR IN ENTITY BEANS"
James Hobson
Ranch Hand

Joined: Aug 28, 2001
Posts: 140
You should not be using Entity Beans directly, use the Home interface create method, which will use ejbCreate.
Constructing an EJB with a public constructor would completely break the EJB model.
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
There are constructors but they are of the default kind. Remember if you don't specify a constructor then the compiler will supply a default (no args) constructor for you. It is this constructor that is used by the EJB Container to create an instance of your Bean's implementation class. You could explicitly define this default constructor if it makes you feel better.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: CONSTRUCTOR IN ENTITY BEANS
 
Similar Threads
CMP vs BMP
Why bean managed transaction is not allowed with entity beans
Entity Beans
need ejbpostcreate method for each create method in the bean
Writing test case without database operations