Hi,
I would like to know the usage and implementation details of the ejbPostCreate() method.
Thanks,
MK
-
use of ejbPostCreate() method in Entity Beans (3 messages)
- Posted by: Manoj Kasibhatla
- Posted on: July 22 2004 12:17 EDT
Threaded Messages (3)
- use of ejbPostCreate() method in Entity Beans by Senthil Chinnaiyan on July 22 2004 13:26 EDT
- use of ejbPostCreate() method in Entity Beans by suhas shahapurkar on July 22 2004 13:27 EDT
- thanks!! by Manoj Kasibhatla on July 22 2004 14:02 EDT
-
use of ejbPostCreate() method in Entity Beans[ Go to top ]
- Posted by: Senthil Chinnaiyan
- Posted on: July 22 2004 13:26 EDT
- in response to Manoj Kasibhatla
For each ejbCreate() method, you need to provide a ejbPostCreate() method with same signature but with void as return type. The usage is, when the ejbCreate() method is executing, the bean instance is not associated with EJBObject, i.e. the bean instance doesn't have identity. So if you want to pass your EJBObject's reference to another bean you can not do it from ejbCreate. Thats why we have ejbPostCreate().
Hope this help,
Senthil. -
use of ejbPostCreate() method in Entity Beans[ Go to top ]
- Posted by: suhas shahapurkar
- Posted on: July 22 2004 13:27 EDT
- in response to Manoj Kasibhatla
The container calls the ejbPostCeate() method when it has already associated the bean instance with an EJB object. This is helpfull if we need to perform some test or throw some exceptions. Like while inserting the data in to the table we may get the exception as DuplicateKeyException.
Since we have the EJBObject in this ejbPostCreate method we can reset some transaction related parameters.
Regards
Suhas -
thanks!![ Go to top ]
- Posted by: Manoj Kasibhatla
- Posted on: July 22 2004 14:02 EDT
- in response to Manoj Kasibhatla
thanks......that helps!!
:MK