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

Explaination

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

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

A - @javax.ejb.Stateless

B - @javax.ejb.Stateful

C - @javax.ejb.MessageDrivenBean

D - @javax.ejb.EJB

Answer : B

Explaination

@javax.ejb.Stateful annotation specifies that a given ejb class is a stateful session 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 : 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.

Q 8 - Which of the following types of java classes can be mapped using @Lob annotation?

A - byte[]

B - String

C - Serializable Object

D - All of the above.

Answer : D

Explaination

All of the above classes can be mapped using @Lob annotation.

Answer : C

Explaination

Failed - Identify failure scenario when a transaction is to be rollback.

ejb_questions_answers.htm
Advertisements