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

A message driven bean is a type of enterprise bean which is invoked by EJB container when it receives a message from queue or topic. Message driven bean is a stateless bean and is used to do task asynchronously.

Answer : D

Explaination

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

Answer : D

Explaination

description attribute in @javax.ejb.EJB annotation is used to provide description of the referenced bean.

Answer : D

Explaination

@javax.ejb.Local annotation is used to specify Local interface(s) of a session bean. This local interface states the business methods of the session bean (which can be stateless or stateful). This interface is used to expose the business methods to local clients which are running in same deployment/application as EJB.

Answer : D

Explaination

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

Answer : B

Explaination

Default interceptor is invoked for every bean within deployment.

Answer : A

Explaination

Start - When to start a transaction in a business method.

Answer : B

Explaination

RolesAllowed - Indicates that a method can be accessed by user of role specified. Can be applied at class level resulting which all methods of class can be accessed buy user of role specified.


ejb_questions_answers.htm

Advertisements