EJB Online Quiz


Advertisements


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

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.

Answer : C

Explaination

EJB Container creates a separate stateful session bean to process client's each request. As soon as request scope is over, statelful session bean is destroyed.

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.

Q 5 - Which of the following annotation is used to specify Remote interface(s) of a session bean?

A - @javax.ejb.Stateless

B - @javax.ejb.Stateful

C - @javax.ejb.Remote

D - @javax.ejb.EJB

Answer : C

Explaination

@javax.ejb.Remote annotation is used to specify Remote interface(s) of a session bean.

Answer : A

Explaination

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

Answer : B

Explaination

@PostLoad - is invoked when a record is fetched from database and loaded into the entity.

Answer : A

Explaination

Atomic - If any of work item fails, the complete unit is considered failed. Success meant all items executes successfully.

Answer : B

Explaination

NEVER - Indicates if business method executes as part of transaction then an exception will be thrown.


ejb_questions_answers.htm

Advertisements