Following quiz provides Multiple Choice Questions (MCQs) related to EJB Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.
Q 1 - Which of the following is true about entity bean?
Entity beans represents persistent data storage. User data can be saved to database via entity beans and later on can be retrived from the database in the entity bean.
Q 2 - Which of the following is correct about Entity in EJB persistence API?
Entity is a persistent object representing the data-store record. It is good to be serializable.
Q 3 - Which of the following is correct about mappedName attribute in @javax.ejb.Stateless annotation?
mappedName attribute in @javax.ejb.Stateless annotation is used to specify the JNDI name of the session bean.
Q 4 - Which of the following is correct about name attribute in @javax.ejb.EJB annotation?
name attribute in @javax.ejb.EJB annotation is used to specify name which will be used to locate the referenced bean in environment.
Q 5 - Which of the following is true about @javax.ejb.Local annotation?
@javax.ejb.Local annotation is used to specify Local interface(s) of a session bean. This local interface states the business methods of the session bean (which can be stateless or stateful). This interface is used to expose the business methods to local clients which are running in same deployment/application as EJB.
Q 6 - Which of the following is correct about @PostRemove annotation for a entity bean?
@PostRemove - method is invoked after an entity is deleted from the database.
Q 7 - Which of the following is correct about timer service in EJB?
Timer Service is a mechanism using which scheduled application can be build. This service is provided by Ejb container which helps to create timer and to schedule callback when timer expires.
Q 8 - What ACID stands for?
ACID stands for Atomic, Consistent,Isolated and Durable.
Q 9 - Which of the following is correct about a SUPPORTS attrribute of Container Managed Transactions in EJB?
SUPPORTS - Indicates that business method will execute as part of transaction.
Q 10 - Which of the following is true about Application level exception in EJB?
If business rule is voilated or exception occurs while executing the business logic will be treated as application level exception.