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

Answer : A

Explaination

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

Answer : D

Explaination

mappedName attribute in @javax.ejb.EJB annotation is used to specify the JNDI name of the referenced bean.

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

A - true

B - false

Answer : A

Explaination

@javax.ejb.Local annotation is used to specify Local 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 : A

Explaination

MANDATORY - Indicates that business method will execute as part of transaction otherwise exception will be thrown.

Answer : C

Explaination

When System Exception occurs, ejb container intercepts the exception, rollbacks the transaction and start the clean up tasks. It wraps the exception into RemoteException and throws it to the client.

ejb_questions_answers.htm
Advertisements