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

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.

Answer : A

Explaination

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

Answer : D

Explaination

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

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

A - @javax.ejb.Stateless

B - @javax.ejb.Stateful

C - @javax.ejb.MessageDrivenBean

D - @javax.ejb.EJB

Answer : C

Explaination

@javax.ejb.MessageDrivenBean annotation specifies that a given ejb class is a message driven bean.

Q 5 - Which of the following annotation is used to specify properties required for a message driven bean?

A - @javax.ejb.ActivationConfigProperty

B - @javax.ejb.Local

C - @javax.ejb.Remote

D - @javax.ejb.EJB

Answer : A

Explaination

@javax.ejb.ActivationConfigProperty annotation is used to specify properties required for a message driven bean.

Answer : B

Explaination

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

Answer : B

Explaination

Default interceptor is invoked for every bean within deployment.

Answer : A

Explaination

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

Answer : D

Explaination

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

ejb_questions_answers.htm
Advertisements