Enterprise Java Beans - EJB MCQs

Enterprise Java Beans - EJB MCQs

Our experts have gathered these Enterprise Java Beans - EJB MCQs through research, and we hope that you will be able to see how much knowledge base you have for the subject of Enterprise Java Beans - EJB by answering these 100+ multiple-choice questions.
Get started now by scrolling down!

1: Where are the EJB classes utilized by applications retained?

A.   Within the javax.ejb package.

B.   Within the Jxva package.

C.   Within the Javascript package.

D.   Within the rava.xml package.

2: The _______ is the most common exception class.

A.   EJBException

B.   BeanException

C.   NullPointerException

D.   RuntimeException

3: The _______ file is an XML file used to describe the properties of a bean.

A.   Application archive

B.   Bean JAR

C.   Deployment Descriptor

D.   XML Property

4: _______ is not a tag used in an XML bean archive to define a primitive type.

A.   <byte>

B.   <int>

C.   <double>

D.   <object>

5: True or False? Enterprise Java 2.0 specification introduces the concept of local beans.

A.   True

B.   False

6: EJB applications are deployed on a ____ compliant Application Server.

A.   IEEE

B.   J2EE

C.   OSHA

D.   SERI

7: What is RMI-IIOP?

A.   The Java Remote Operation Schedule.

B.   Java Remote Method Invocation interface.

C.   The Java Open Access Module.

D.   The Java Express Services Daemon.

8: What format is the deployment descriptor document in?

A.   XML

B.   doc

C.   html

D.   PDF

9: EJB stands for ________.

A.   Enterprise Java Beans

B.   Enhanced Java Beans

C.   Enhanced Java Binary

D.   Example Java Bit code

10: What file format are all of the descriptor files in?

A.   txt

B.   HTML

C.   PDF

D.   XML

11: EJB is a framework for _____.

A.   Java

B.   C++

C.   SAP

D.   Windows

12: If you wanted to control the WebLogic Server EJB’s configuration, what is one of the files you would use?

A.   ejk.xml

B.   erb-jub.xml

C.   erp.txt

D.   ejb-jar.xml

13: What is another name for a deployment descriptor?

A.   Directory.

B.   Containment file.

C.   Configuration file.

D.   Storage file.

14: Which of the following is one of WebLogic Server's caching abilities?

A.   Caching between transactions.

B.   Processing dual beans.

C.   Processing dual-state beans.

D.   Caching entire programs.

15: What is concurrency control?

A.   The control of a single operation in two different ways.

B.   The control of single operations in different ways.

C.   The control of a single operation in many different ways.

D.   The ensuring that two operations within EJB are generated correctly.

16: What is CMC?

A.   Container-managed concurrency.

B.   Currently Managed Content

C.   Counter-managed contingency.

D.   Concurrent-managed content.

17: In passivation, the opposite method from ejbPassivate() is _______.

A.   ejbLoad()

B.   ejbNew()

C.   ejbActivate()

D.   ejbCreate()

18: Does WebLogic server support multiple methods?

A.   Yes.

B.   No.

C.   It supports only two methods.

D.   Yes, but it is limited at five methods.

19: True or False? A session bean can only be stateless.

A.   False

B.   True

20: Which of the following contains the EJB container that provides the services for the EJB component?

A.   Component client.

B.   EJB client.

C.   EJB Server.

D.   Java client.

21: What is lock annotation used for?

A.   It is used to determine which bean will perform which process.

B.   It is used to decide whether a read lock or write lock is utilized in a method call.

C.   It is used to determine what a bean will do.

D.   It is used to determine whether a bean will have a state or not.

22: What are ACID transactions responsible for?

A.   Reliable database transactions.

B.   Mobile-to-website interfacing.

C.   Customer relations.

D.   Data to processor interfacing.

23: When injection is not available, what is the alternative?

A.   Nothing is available.

B.   Bean interface.

C.   Java interface.

D.   Java Naming and Directory Interface

24: What does it mean when business objects have a state?

A.   They have many clients.

B.   They have no clients.

C.   They have only two clients.

D.   They are limited to a single client at a time.

25: What bean represents real-world objects?

A.   Entity bean.

B.   Sessionless Bean.

C.   Stateful Bean.

D.   Singleton Session Bean.

26: A class is serializable if a class's inheritance hierarchy implements _________.

A.   Serializable and Externalizable

B.   Serializable or Externalizable

C.   Event and Listener

D.   Persistence

27: A bean _______ is the code responsible for managing beans and the various interfaces.

A.   object

B.   container

C.   method

D.   class

28: Do clients of EJB instantiate beans directly?

A.   Yes.

B.   No. They need a reference from the EJB container.

C.   No. They need a reference from the Java container.

D.   Yes, and they act immediately.

29: _____ bean stores data for a particular user for a single session.

A.   Session

B.   Java

C.   Message

D.   Entity

30: What is the EJB container responsible for assigning?

A.   Dynamic session beans.

B.   Static session beans.

C.   JNDI names for EJB session beans.

D.   Stateless session beans.

31: What is asynchronous pattern?

A.   Business services operating with other business services.

B.   The non synchronous operation of business services within EJB.

C.   The simultaneous operation of two programs.

D.   The operation of a single program in different ways.

32: True or False? EJB is a client-side model that encapsulates the business logic of an application.

A.   True

B.   False

33: Beans are distributed as ____ files.

A.   JSP

B.   JAR

C.   XML

D.   JAX

34: ______ beans represent persistent data storage.

A.   Entity

B.   Session

C.   Message Driven

D.   Entity and Session

35: How are stateless session beans different than stateful session beans?

A.   They are not thread-safe.

B.   They are operational.

C.   They are not operational.

D.   They are automatically thread-safe.

36: What is the javax.ejb.spi package used for?

A.   A user interface.

B.   A service provider interface.

C.   A container interface.

D.   A program interface for developers.

37: True or False? The properties of a bean affect its appearance or internal state.

A.   False

B.   True

38: True or False? A bean class can fire off any type of event except custom events.

A.   True

B.   False

39: A ____ tag is used to represent an instance of a class in an XML bean archive.

A.   <class>

B.   <byte>

C.   <object>

D.   <double>

40: _____ is NOT a method of the EntityBean Interface.

A.   setEntityContext()

B.   ejbNewBean()

C.   ejbLoad()

D.   ejbStore()

41: How are EJB's two interfaces referred to?

A.   Static and Dynamic.

B.   Long and Short.

C.   Home and Remote.

D.   Intrinsic and Extrinsic.

42: What has replaced the deployment descriptor in the newest version of EJB, 3.0?

A.   JavaScript annotations.

B.   Meta annotations.

C.   Java annotations.

D.   XML notations.

43: What kind of programming does Java Message Service provide for EJB?

A.   Event-driven programming.

B.   Results-driven programming.

C.   Information-driven programming.

D.   Data-driven programming.

44: What happens if two calling clients attempt to access a single bean?

A.   The request is channeled redundantly.

B.   The request is canceled and the operation performed again.

C.   EJB becomes corrupted.

D.   The requests are serialized by a container.

45: What is an example of a stateful session bean process?

A.   The idling of a website.

B.   The checkout process in a web store.

C.   The processing of java applets.

D.   A web counter counting hits.

46: Object _____ means converting an object into a data stream and writing it to storage.

A.   inheritance

B.   persistence

C.   serialization

D.   passivation

47: What three files are used to control WebLogic Server EJB?

A.   jar-jar.xml, weblogic-ejb-jar.xml, weblogic-cmp-jar.xml

B.   ejb-jar.xml, webjar.xml, weblogic-comp.xml

C.   ejb-jar.xml, weblogic-ejb-jar.xml, weblogic-cmp-jar.xml

D.   ejb-jar.xml, ebj-jar.xml, weblogic-cmp-jar.xml

48: _______ class does not support serialization.

A.   String

B.   Thread

C.   Component

D.   Vector

49: _______ provides a means for modifying the appearance and behavior of a bean within an application builder so it meets your specific needs.

A.   Persistence

B.   Customization

C.   Externalization

D.   Serialization

50: Which of the following is a JNDI scope?

A.   Mechanism.

B.   Module

C.   Mode.

D.   Modular.