| Author |
The ejbPostCreate Method
|
Maria George
Greenhorn
Joined: Dec 25, 2006
Posts: 3
|
|
I am going through the sun J2EE tutorials...I have some doubts on entity bean example: http://java.sun.com/j2ee/1.4/docs/tutorial/doc/ It says: For each ejbCreate method, you must write an ejbPostCreate method in the entity bean class. The EJB container invokes ejbPostCreate immediately after it calls ejbCreate. My question is can we allow a client to invoke this method (indirectly ofcourse) by defining postCreate method in the home interface.. [ December 25, 2006: Message edited by: Maria George ]
|
 |
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Joined: Aug 26, 2006
Posts: 4967
|
|
|
Nope.
|
Author of Hibernate Made Easy, What is WebSphere???, JSF 2.0 Made Easy and the SCJA Certification Guides
|
 |
Deepak Bala
Bartender
Joined: Feb 24, 2006
Posts: 6588
|
|
|
No that is not allowed. You have a postCreate() to tell the bean that an EJBObject is now available for use. You create the primary key in ejbCreate() and by the time its postCreate() the bean has full beaness and can even enter into a transaction.
|
SCJP 6 articles - SCJP 5/6 mock exams - SCJP Mocks - SCJP 5 Mock exam (Word document ) - SCJP 5 Mock exam in Java.Inquisition format
|
 |
 |
|
|
subject: The ejbPostCreate Method
|
|
|