Programming Tutorials

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

By: Ash in Interview Tutorials on 2008-08-13  

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.

 

 

 

 





Add Comment

* Required information
1000

Comments

No comments yet. Be the first!

Most Viewed Articles (in Interview )

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

What do you understand by a J2EE module?

Interview Question: What is Deployment descriptor?

What is similarities/difference between an Abstract class and Interface?

Question: What is the directory structure of a web application?

Interview Question: What is lazy loading?

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

What is JAXP?

Interview Question: Is Decorator an EJB design pattern?

Interview Question: What is the difference between sessioncontext and entitycontext?

Interview Question: What are the optional clauses in EJB QL?

What is the difference between Session Bean and Entity Bean?

Interview Question: Can I invoke Runtime.gc() in an EJB?

What is Collection API?

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

Latest Articles (in Interview)