Sail E0 Webinar

MCQs

Total Questions : 25 | Page 1 of 3 pages
Question 1. Choose different kinds of enterprise beans in EJB from following
  1.    Session beans
  2.    Entity beans
  3.    Message-driven beans
  4.    All of the above
 Discuss Question
Answer: Option D. -> All of the above




Question 2. remove() method of the Entity bean?
  1.    Remove the row of table from the database
  2.    Remove the instance from pool
  3.    Delete the TABLE from the database
  4.    None of the above
 Discuss Question
Answer: Option B. -> Remove the instance from pool




Question 3. At what point, precisely, in the life-cycle is a container-managed entity bean considered created?
  1.    Immediately prior to the execution of its ejbCreate() method
  2.    Immediately after the execution of its ejbCreate() method
  3.    After the CMP bean's data has been committed to the underlying persistent datastore
  4.    During the execution of its ejbPostCreate() method
 Discuss Question
Answer: Option B. -> Immediately after the execution of its ejbCreate() method




Question 4. Which middleware services are provided by EJB?
  1.    Security
  2.    Transaction Management
  3.    Both A & B
  4.    None of the above
 Discuss Question
Answer: Option C. -> Both A & B




Question 5. For remote objects Java passes objects:
  1.    By reference
  2.    By object copy
  3.    By producing a serialized copy
  4.    B and C are correct
 Discuss Question
Answer: Option D. -> B and C are correct




Question 6. Which of the following annotation is used to specify or inject a dependency as ejb instance into another ejb?
  1.    javax.ejb.Stateless
  2.    javax.ejb.Stateful
  3.    javax.ejb.MessageDrivenBean
  4.    javax.ejb.EJB
 Discuss Question
Answer: Option D. -> javax.ejb.EJB




Question 7. The EJB specification architecture does NOT define
  1.    transactional components
  2.    client side security and encryption
  3.    distributed object components
  4.    server-side components
 Discuss Question
Answer: Option B. -> client side security and encryption




Question 8. Which statement about session beans is true?
  1.    In both stateless and statefull session classes, the bean provider must write the method public void remove()
  2.    The method > in the component interface can be accessed only by the remote clients
  3.    The bean's handle must be provided by the client, in order to ask the EJBHome for removing a session bean
  4.    None of the above
 Discuss Question
Answer: Option C. -> The bean's handle must be provided by the client, in order to ask the EJBHome for removing a session bean




Question 9. Which of the following is true?
  1.    Preserving of any state across method calls does not performed by Stateless session beans
  2.    Multiple users can access Stateful session beans at the same time
  3.    Both are correct
  4.    None
 Discuss Question
Answer: Option A. -> Preserving of any state across method calls does not performed by Stateless session beans




Question 10. Which EJB container must provide an implementation of Java Naming and Directory Interface (JNDI) API to provide naming services for EJB clients and components?
  1.    Transaction support
  2.    Persistence support
  3.    Naming support
  4.    All mentioned above
 Discuss Question
Answer: Option C. -> Naming support




Latest Videos

Latest Test Papers