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 )

What is Collection API?

Question: Difference between forward and sendRedirect in JSP?

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

Explain garbage collection?

The output of System.out.println(5>>2) in Java

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

What are Access Specifiers available in Java?

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

What are all the different scope values for the tag?

Interview Question: Write code of any Action Class?

What is the difference between interface and abstract class?

What are the contents of web module?

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

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

What is the difference between Session Bean and Entity Bean?

Latest Articles (in Interview)