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

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

Explaination

EJB Container normally creates a pool of few stateless bean's objects and use these objects to process client's request. Because of pool, instance variable values are not guaranteed to be same across lookups/method calls.

Answer : C

Explaination

description attribute in @javax.ejb.Stateless annotation is used to provide description of the session bean.

Answer : D

Explaination

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

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

A - true

B - false

Answer : A

Explaination

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

Answer : A

Explaination

@PreUpdate - method is invoked before an entity is to be updated in the database.

Q 7 - Which annotation is used to inject an ejb into another ejb?

A - @EJB

B - @Resource

C - Both of the above.

D - None of the above.

Answer : A

Explaination

@EJB annotation is used to inject other EJB reference.

Answer : A

Explaination

ACID stands for Atomic, Consistent,Isolated and Durable.

Answer : A

Explaination

REQUIRED - Indicates that business method has to be executed within transaction otherwise a new transaction will be started for that 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