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

EJB stands for Enterprise Java Beans. EJB is an essential part of a J2EE platform. J2EE platform have component based architecture to provide multi-tiered, distributed and highly transactional features to enterprise level applications. EJB provides an architecture to develop and deploy component based enterprise applications considering robustness, high scalability and high performance.

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.

Answer : C

Explaination

activationConfig attribute in @javax.ejb.MessageDrivenBean annotation is used to specify the configuration details of the message-driven bean in operational environment 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 - Which of the following annotation is used to specify callback method of ejb lifecycle?

A - @javax.ejb.PostActivate

B - @javax.ejb.Local

C - @javax.ejb.Remote

D - @javax.ejb.EJB

Answer : A

Explaination

@javax.ejb.PostActivate annotation is used to specify callback method of ejb lifecycle.

Answer : B

Explaination

@PreDestroy - method is invoked when a bean is removed from the bean pool or is destroyed.

Answer : C

Explaination

Timer Service is a mechanism using which scheduled application can be build. This service is provided by Ejb container which helps to create timer and to schedule callback when timer expires.

Answer : D

Explaination

NOT_SUPPORTED - Indicates that business method should not be executed as part of transaction.

ejb_questions_answers.htm
Advertisements