
- EJB Tutorial
- EJB - Home
- EJB - Overview
- EJB - Environment Setup
- EJB - Create Application
- EJB - Stateless Bean
- EJB - Stateful Bean
- EJB - Persistence
- EJB - Message Driven Beans
- EJB - Annotations
- EJB - Callbacks
- EJB - Timer Service
- EJB - Dependency Injection
- EJB - Interceptors
- EJB - Embeddable Objects
- EJB - Blobs/Clobs
- EJB - Transactions
- EJB - Security
- EJB - JNDI Bindings
- EJB - Entity Relationships
- EJB - Access Database
- EJB - Query Language
- EJB - Exception Handling
- EJB - Web Services
- EJB - Packaging Applications
- EJB Useful Resources
- EJB - Quick Guide
- EJB - Useful Resources
- EJB - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
EJB Online Quiz
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?
A - This type of bean stores data of a particular user for a single session.
Answer : C
Explaination
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 bean stores data of a particular user for a single session?
Answer : A
Explaination
Session bean stores data of a particular user for a single session.
Q 3 - Which of the following is correct about name attribute in @javax.ejb.MessageDrivenBean annotation?
A - It is used to specify name of the message driven bean.
B - it is used to specify message listener interface for the message driven bean.
D - It is used to specify the JNDI name of the message driven bean.
Answer : A
Explaination
name attribute in @javax.ejb.MessageDrivenBean annotation is used to specify name of the message driven bean.
Q 4 - Which of the following annotation is used to specify that a given ejb class is a stateless session bean?
Answer : A
Explaination
@javax.ejb.Stateless annotation specifies that a given ejb class is a stateless session bean.
Q 5 - Which of the following annotation is used to specify Local interface(s) of a session bean?
Answer : C
Explaination
@javax.ejb.Local annotation is used to specify Local interface(s) of a session bean.
Q 6 - Which of the following is correct about @PostRemove annotation for a entity bean?
A - Method is invoked when an entity is created in database.
B - Method is invoked after an entity is created in database.
C - Method is invoked when an entity is deleted from the database.
D - Method is invoked after an entity is deleted from the database.
Answer : D
Explaination
@PostRemove - method is invoked after an entity is deleted from the database.
Q 7 - Which of the following is correct about EJB interceptors?
B - An interceptor method is called by ejbContainer before business method call it is intercepting.
Answer : C
Explaination
EJB 3.0 provides specification to intercept business methods calls using methods annotated with @AroundInvoke annotation. An interceptor method is called by ejbContainer before business method call it is intercepting.
Q 8 - Which of the following is correct about a transaction in EJB?
A - A transaction is a single unit of work items.
Answer : C
Explaination
A transaction is a single unit of work items which follows the ACID properties.
Q 9 - Which of the following is correct about a REQUIRES_NEW attrribute of Container Managed Transactions in EJB?
B - Indicates that a new transaction is to be started for the business method.
C - Indicates that business method will execute as part of transaction.
D - Indicates that business method should not be executed as part of transaction.
Answer : B
Explaination
REQUIRES_NEW - Indicates that a new transaction is to be started for the business method.
Q 10 - Which of the following is correct about a DenyAll attrribute of Container Managed Transactions in EJB?
A - Indicates that class will accept those declared roles. Annotations are applied at class level.
Answer : D
Explaination
DenyAll - Indicates that business method is not accessible to any of user specified at class or at method level.