Interview Question: What is the difference between ejbCreate() and ejbPostCreate?

By: Ash  

Question:What is the difference between ejbCreate() and ejbPostCreate?

Answer: The purpose of ejbPostCreate() is to perform clean-up database operations after SQL INSERTs (which occur when ejbCreate() is called) when working with CMP entity beans. ejbCreate() is called before database INSERT operations. You need to use ejbPostCreate() to define operations, like set a flag, after INSERT completes successfully.

 

 

 

 


Archived Comments

1. CharlesTig
View Tutorial          By: CharlesTig at 2017-06-09 11:58:30

2. Julius
View Tutorial          By: payday loans at 2012-06-26 15:57:49


Most Viewed Articles (in Interview )

Latest Articles (in Interview)

Comment on this tutorial