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 )

Explain garbage collection?

Question: Difference between forward and sendRedirect in JSP?

What is Collection API?

Differentiate between .ear, .jar and .war files.

Interview Question: What is re-entrant. Is session beans reentrant. Is entity beans reentrant?

What is the difference between interface and abstract class?

Interview Question: Write code of any Action Class?

Interview Question: What is the difference between Message Driven Beans and Stateless Session beans?

Interview Question: What is Deployment descriptor?

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

Interview Question: Do ActionForms have to be true JavaBeans?

What is the difference between Session Bean and Entity Bean?

Interview Question: What are the call back methods in Entity bean?

Question: How would you go about analyzing performance of an application?

Interview Question: What is Message Driven Bean?

Latest Articles (in Interview)