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.

Questions and Answers

Answer : D

Explaination

Session bean stores data of a particular user for a single session. It can be stateful or stateless. It is less resource intensive as compared to entity beans.

Answer : B

Explaination

A remote session bean is used in EJB if ejb client is in different environment where ejb session bean is to be deployed.

Answer : A

Explaination

name attribute in @javax.ejb.MessageDrivenBean annotation is used to specify name of the message driven bean.

Answer : D

Explaination

description attribute in @javax.ejb.MessageDrivenBean annotation is used to provide description of the message driven bean.

Answer : D

Explaination

@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.

Answer : A

Explaination

@PreUpdate - method is invoked before an entity is to be updated in the database.

Answer : B

Explaination

Default interceptor is invoked for every bean within deployment.

Answer : C

Explaination

A transaction is a single unit of work items which follows the ACID properties.

Answer : C

Explaination

Failed - Identify failure scenario when a transaction is to be rollback.

Answer : A

Explaination

JNDI stands for Java Naming and Directory Interface.

ejb_questions_answers.htm
Advertisements