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

By: Ash Printer Friendly Format    


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.

 

 

 

 

Ask a Question



Most Viewed Articles (in Interview )

What are all the different scope values for the tag?

Interview Question: Is there a particularly good IDE to use with Struts ?

Interview Question: How many EJB Objects are created for a Bean?

Interview Question: What is deployment descriptor?

Interview Question: What is Message Driven Bean?

What is transient variable?

Is Iterator a Class or Interface? What is its use?

How to define an Abstract class?

What is the difference between jsp:include page and @ include file?

What are implicit Objects available to the JSP Page?

Interview Question: What is Struts?

Interview Question: How is the MVC design pattern used in Struts framework?

Interview Question: What is Struts Validator Framework?

Interview Question: What is Remote client view?

Interview Question: Why does EJB needs two interfaces(Home and Remote Interface)?

Latest Articles (in Interview)

Comment on this tutorial