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.

Answer : C

Explaination

A stateless session bean is a type of enterprise bean which is normally used to do independent operations. A stateless session bean as per its name does not have any associated client state, but it may preserve its instance state.

Answer : B

Explaination

messageListenerInterface attribute in @javax.ejb.MessageDrivenBean annotation is used to specify message listener interface for the message driven bean.

Answer : D

Explaination

description attribute in @javax.ejb.MessageDrivenBean annotation is used to provide description of the message driven 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.

Q 7 - Which annoatation is used to inject SessionContext into an ejb?

A - @EJB

B - @Resource

C - Both of the above.

D - None of the above.

Answer : B

Explaination

@Resource annotation is used to inject SessionContext into an ejb.

Q 8 - EJB 3.0 provides support for Blob and Clob types using @Lob annotation.

A - true

B - false

Answer : A

Explaination

EJB 3.0 provides support for Blob and Clob types using @Lob annotation.


ejb_questions_answers.htm

Advertisements