EJB interview questions

  1. What are the different kinds of enterprise beans? - Different kind of enterrise beans are Stateless session bean, Stateful session bean, Entity bean, Message-driven bean.
  2. What is Session Bean? - A session bean is a non-persistent object that implements some business logic running on the server. One way to think of a session object.
  3. What is Entity Bean? - The entity bean is used to represent data in the database. It provides an object-oriented interface to ____.
  4. What are the methods of Entity Bean? - An entity bean consists of 4 groups of methods, create methods.
  5. What is the difference between Container-Managed Persistent (CMP) bean and Bean-Managed Persistent(BMP) ? - Container-managed persistence (CMP) and bean-managed persistence (BMP). With CMP, the container manages the persistence of the entity bean.
  6. What are the callback methods in Entity beans? - Callback methods allows the container to notify the bean of events in its life cycle. The callback methods are defined in the javax.ejb.EntityBean interface.
  7. What is software architecture of EJB? - Session and Entity EJBs consist of 4 and 5 parts respectively, a remote interface.
  8. Can Entity Beans have no create() methods? - Yes. In some cases the data is inserted NOT using Java application,.
  9. What is bean managed transaction? - If a developer doesn’t want a Container to manage transactions, it’s possible to implement all database operations manually.
  10. What are transaction attributes? - The transaction attribute specifies how the Container must manage transactions for a method when a client invokes the method via the enterprise bean’s home or.
  11. What are transaction isolation levels in EJB? - Transaction_read_uncommitted, Transaction_read_committed, Transaction_repeatable_read.
This entry was posted in Java. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

9 Comments on EJB interview questions

  1. Posted 7/14/2005 at 11:52 pm | Permalink

    hi,
    i need more indepth knowledge about the EJBs and also provide some questions to me, and send some thing to me

  2. Narendhar Reddy
    Posted 7/18/2005 at 9:56 pm | Permalink

    The correct answe for 4th question is:
    There are 4 types of methods in EJB. 1)Create Methods 2)Finder Methods 3)Remove Methods 4)Home Methods

  3. Narendhar Reddy
    Posted 7/18/2005 at 10:04 pm | Permalink

    Example for question 6:
    public void setEntityContext();
    public void unsetEntityContext();
    public void ejbLoad();
    public void ejbStore();
    public void ejbActivate();
    public void ejbPassivate();
    public void ejbRemove();

  4. Lance Chen
    Posted 9/21/2005 at 10:48 pm | Permalink

    Transaction Attributes are:
    NotSupported, Supports, Required, RequiresNew, Mandatory and Never.

  5. Lance Chen
    Posted 9/21/2005 at 10:51 pm | Permalink

    Transaction isolation levels in EJB are:
    dirty reads, repeatable reads and phantom reads.

  6. salai
    Posted 9/24/2005 at 12:06 pm | Permalink

    Transaction isolation levels in EJB are:
    READ_UNCOMMITED, READ_COMMITED, REPEATABLE_READ and SERIALIZABLE

  7. M.PalaniSaami
    Posted 1/20/2006 at 4:38 am | Permalink

    a).Is it possible for any type of client other than Java, has the previlege to access the EJBs?.
    b).How can we update an record in an EJB?

  8. riyas
    Posted 1/10/2007 at 1:20 am | Permalink

    Can any one explain me in what purpose we can use public void ejbLoad();
    public void ejbStore();
    public void ejbActivate();
    public void ejbPassivate();
    public void ejbRemove();

  9. Siva
    Posted 2/24/2007 at 11:35 am | Permalink

    hai riyas
    ejbLoad()- is used to retrive the state of passivated beans.it is called by the container after ejbActivate() is called.
    ejbStore()- used to store the values in the database, called before ejbPassivate().
    ejbPassivate()- When container feels that there is more number of beans instances in the pool or it is used least , the bean can be passivated. before that the values are stored by using ejbStore(). This is controlled by ejb ainer only. Least Recently Used (LRU) algorithm is used by the container to passivate the bean
    ejbActivate()- When the original client invoke the beans , the bean is activated and the values are loaded by using ejbLoad().

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*