Interview Tutorials

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

By: Ash : 2008-08-13

Description: 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.


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

By: Ash : 2008-08-13

Description: The bulk of the changes in EJB 2.0 are found in the definition of a new CMP component model.


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

By: Ash : 2008-08-13

Description: Since EnterpriseBeans live in a managed container, the container is free to call your EJB components methods at its leisure. The container houses the information like current status of bean,security credentials of the user currently accessing the bean in one object is called EJBContext Object.


94. Interview Question: Is Decorator an EJB design pattern?

By: Ash : 2008-08-13

Description: No. Decorator design pattern, is the one which exhibits very low level runtime polymorphism, for the specific and single object (Instance of the class), but not for atleast for a class. It is the stuff to add specific functionality to a single & pointed object and leaves others like it unmodified.


95. Interview Question: Can i map more than one table in a CMP?

By: Ash : 2008-08-13

Description: No, you cannot map more than one table to a single CMP Entity Bean. CMP has been, in fact, designed to map a single table.


96. Interview Question: What is the difference between EAR, JAR and WAR file?

By: Ash : 2008-08-13

Description: What is the difference between EAR, JAR and WAR file? A JAR file encapsulates one or more Java classes, a manifest, and a descriptor. JAR files are the lowest level of archive. JAR files are used in J2EE for packaging EJBs and client-side Java Applications


97. Interview Question: What is lazy loading?

By: Ash : 2008-08-13

Description: This technique is most useful when you have large hierarchies of objects (such as a product catalog). You can lazy-load subordinate objects as you navigate down the hierarchy, and thereby only create objects when you need them


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

By: Ash : 2008-08-13

Description: If we define the entity bean as being reentrant, multiple clients can connect to the Entity bean & execute methods within the entity bean concurrently.


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

By: Ash : 2008-08-13

Description: For a Session bean - one EJB object for one bean instance


100. Interview Question: What is deployment descriptor?

By: Ash : 2008-08-13

Description: Deployment descriptor is a XML file. which is used to locate the web applicatio n by container.it includes the details of respective bean.