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 sessioncontext and entitycontext?

What is difference between Java Bean and Enterprise Java Bean?

Question: What is an output comment in JSP?

Explain the Polymorphism principle.

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

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

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

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

Interview Question: What is difference between EJB 1.1 and EJB 2.0?

Interview Question: Is Decorator an EJB design pattern?

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

Explain the user defined Exceptions?

How to define an Interface?

Question: Explain the life-cycle methods in JSP?

Getting started with Interview

Latest Articles (in Interview)