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

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.

Q 2 - Which of the following bean stores data of a particular user for a single session?

A - session bean.

B - entity bean.

C - message driven bean.

D - None of the above.

Answer : A

Explaination

Session bean stores data of a particular user for a single session.

Q 4 - Which of the following annotation is used to specify that a given ejb class is a stateful session bean?

A - @javax.ejb.Stateless

B - @javax.ejb.Stateful

C - @javax.ejb.MessageDrivenBean

D - @javax.ejb.EJB

Answer : B

Explaination

@javax.ejb.Stateful annotation specifies that a given ejb class is a stateful session bean.

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

A - false

B - true

Answer : B

Explaination

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

Answer : D

Explaination

@PrePassivate - method is invoked when a bean is put back to bean pool.

Answer : C

Explaination

Method level interceptor is invoked for a particular method of the bean.

Answer : A

Explaination

A java POJO to be embedded must be annotated as @Embeddable.

Answer : B

Explaination

Success - Identify success scenario when a transaction is to be committed.


ejb_questions_answers.htm

Advertisements
E-Books Store