EJB/EJB MCQ - Java Technologies Sample Test,Sample questions

Question:
 An different programming language like C ,C++ etc.

1.1,2

2.1

3.2

4.None of the above

Posted Date:-2022-09-17 10:52:13


Question:
 At what point, precisely, in the life-cycle is a container-managed entity bean considered created?

1.Immediately prior to the execution of its ejbCreate() method

2.Immediately after the execution of its ejbCreate() method

3.After the CMP bean's data has been committed to the underlying persistent datastore

4.During the execution of its ejbPostCreate() method

Posted Date:-2022-09-17 11:22:08


Question:
 Choose different kinds of enterprise beans in EJB from following

1.Session beans

2. Entity beans

3.Message-driven beans

4. All of the above

Posted Date:-2022-09-17 11:21:09


Question:
 From the following APIs, which API does NOT guarantees to be supported by EJB 2.0 containers?

1. JAXP

2.JNDI

3. JXTA

4.JDBC

Posted Date:-2022-09-17 11:14:03


Question:
 How can a EJB pass it's reference to another EJB ? Which of the following is correct syntax for an Abstract class?

1.abstract double area() { }

2.abstract double area()

3.abstract double area();

4.abstract double area(); { }

Posted Date:-2022-09-17 11:17:49


Question:
 In ___________, one message is delivered to one receiver only.

1.CTP Model

2.ATP Model

3. ZTP Model

4.PTP Model

Posted Date:-2022-09-17 10:32:39


Question:
 Session beans don't have

1. ejbCreate() method

2.ejbStore() method

3.ejbRemove() method

4.None

Posted Date:-2022-09-17 10:56:58


Question:
 The EJB specification architecture does NOT define

1. transactional components

2.client side security and encryption

3. distributed object components

4. server-side components

Posted Date:-2022-09-17 10:42:19


Question:
 To expose a service through RMI, you have to create the service interface that extends

1. java.rmi.Remote

2.. java.rmi.RemoteException

3. All of the mentioned

4.None of the above

Posted Date:-2022-09-17 11:04:47


Question:
 What executes EJB components?

1. A web server

2. An application server

3. An EJB container

4.A database server

Posted Date:-2022-09-17 11:16:31


Question:
 Which case of a session bean obtains the UserTransaction object via the EJBContext using the getUserTransaction() method in EJB transaction management?

1. Bean-managed transactions

2. Container-managed transactions

3.Both A & B

4.None of the above

Posted Date:-2022-09-17 10:47:46


Question:
 Which middleware services are provided by EJB?

1.Security

2.Transaction Management

3.Both A & B

4.None of the above

Posted Date:-2022-09-17 11:23:03


Question:
 Which of the following annotation is used to specify or inject a dependency as ejb instance into another ejb?

1.javax.ejb.Stateless

2.javax.ejb.Stateful

3.javax.ejb.MessageDrivenBean

4.javax.ejb.EJB

Posted Date:-2022-09-17 10:41:14


Question:
 Which of the following is true?

1. Preserving of any state across method calls does not performed by Stateless session beans

2.Multiple users can access Stateful session beans at the same time

3.Both are correct

4.None

Posted Date:-2022-09-17 10:43:52


Question:
 Which server-side component is required to be deployed on the server?

1. EJB

2.RMI

3.Both A & B

4.None of the above

Posted Date:-2022-09-17 11:03:35


Question:
. What happens when you pass a serialized object as an argument or return value that doesn't exist either in the Client or the Server?

1.Nothing will happpen

2.An error will occur

3.A run time exception is produced

4.None of these

Posted Date:-2022-09-17 10:50:40


Question:
. Which EJB container must provide an implementation of Java Naming and Directory Interface (JNDI) API to provide naming services for EJB clients and components?

1.Transaction support

2. Persistence support

3.Naming support

4.All mentioned above

Posted Date:-2022-09-17 10:45:11


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

1.Serializable and Externalizable

2.Serializable or Externalizable

3.Event and Listener

4.Persistence

Posted Date:-2022-09-17 13:17:10


Question:
A Stateless session bean is a business object that doesn't maintain the conversational state with the client.

1.TRUE

2.FALSE

3.Can be true or false

4.Can not say

Posted Date:-2022-09-17 10:27:21


Question:
Abbreviate the term JMS?

1.Java Message Service

2.Java Monitor Service

3.Java Message Session

4.Java Monitor Session

Posted Date:-2022-09-17 10:53:38


Question:
An entity bean's local interface MUST extend the ________ interface.

1. javax.ejb.EJBLocalObject

2. javax.ejb.EJBObject

3.javax.ejb.RemoteObject

4.None of the above

Posted Date:-2022-09-17 10:58:18


Question:
Do clients of EJB instantiate beans directly?

1.Yes.

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

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

4.Yes, and they act immediately.

Posted Date:-2022-09-17 13:19:59


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

1.IEEE

2.J2EE

3.OSHA

4.SERI

Posted Date:-2022-09-17 11:31:42


Question:
EJB is a framework for _____

1.Java

2.C++

3.sap

4.windows

Posted Date:-2022-09-17 11:52:37


Question:
For remote objects Java passes objects:

1.By reference

2.By object copy

3.By producing a serialized copy

4. B and C are correct

Posted Date:-2022-09-17 11:24:06


Question:
How many types of enterprise bean in java?

1.2

2.3

3.4

4.None of the above

Posted Date:-2022-09-17 10:25:11


Question:
How many types of session bean?

1.1

2.2

3.3

4.4

Posted Date:-2022-09-17 10:26:33


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

1.ejk.xml

2.erb-jub.xml

3.erp.txt

4. ejb-jar.xml

Posted Date:-2022-09-17 11:54:10


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

1.ejbLoad()

2.ejbNew()

3.ejbActivate()

4. ejbCreate()

Posted Date:-2022-09-17 12:08:46


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

1.ejbLoad()

2.ejbNew()

3.ejbActivate()

4.ejbCreate()

Posted Date:-2022-09-17 12:12:53


Question:
In which model, one message is delivered to all subscribers?

1. Publisher model

2. Subscriber model

3.Both A and B

4.None of the above

Posted Date:-2022-09-17 10:36:47


Question:
Message Driven Bean (MDB) encapsulates business logic. It is invoked by passing the message. It is like JMS receiver.

1.RUE

2.FALSE

3. Can be true or false

4.Can not say

Posted Date:-2022-09-17 10:37:55


Question:
OpenEJB 3.1.1 supports

1.EJB 2.x components

2.EJB 3.0 and EJB 3.1 components

3.All of the mentioned

4.None of the mentioned

Posted Date:-2022-09-17 11:11:41


Question:
remove() method of the Entity bean?

1.Remove the row of table from the database

2.Remove the instance from pool

3.Delete the TABLE from the database

4.None of the above

Posted Date:-2022-09-17 11:25:53


Question:
The Spring support classes facilitate building session beans

1.stateful session beans (SFSBs)

2. stateless session beans (SLSBs)

3.message-driven beans (MDBs)

4.All of the mentioned

Posted Date:-2022-09-17 10:49:03


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

1.Application archive

2.Bean JAR✖

3.Deployment Descriptor

4.XML Property

Posted Date:-2022-09-17 10:04:51


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

1.Application archive

2.Bean JAR

3.Deployment Descriptor

4.XML Property

Posted Date:-2022-09-17 11:30:06


Question:
The _______ is the most common exception class.

1.EJBException

2.BeanException

3.NullPointerException

4.RuntimeException

Posted Date:-2022-09-17 09:57:29


Question:
The _______ is the most common exception class.

1.EJBException

2.BeanException

3.NullPointerException

4.RuntimeException

Posted Date:-2022-09-17 09:59:27


Question:
What are ACID transactions responsible for?

1.Reliable database transactions.

2.Mobile-to-website interfacing.

3.Customer relations.

4.Data to processor interfacing.

Posted Date:-2022-09-17 12:31:47


Question:
What are the advantages of JMS?

1.Asynchronous

2.Reliable

3.Both A and B

4. None of the above

Posted Date:-2022-09-17 10:31:13


Question:
What bean represents real-world objects?

1.Entity bean.

2.Sessionless Bean.

3.Stateful Bean.

4.Singleton Session Bean.

Posted Date:-2022-09-17 13:15:45


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

1.They have many clients.

2.They have no clients.

3. They have only two clients.

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

Posted Date:-2022-09-17 12:38:05


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

1.txt

2.HTML

3.PDF

4.XML

Posted Date:-2022-09-17 11:38:23


Question:
What format is the deployment descriptor document in?

1.XML

2.doc

3.html

4.PDF

Posted Date:-2022-09-17 11:35:41


Question:
What is another name for a deployment descriptor?

1.Caching between transactions.

2.Processing dual beans.

3.Processing dual-state beans.

4. Caching entire programs.

Posted Date:-2022-09-17 11:56:53


Question:
What is CMC?

1.Container-managed concurrency.

2.Currently Managed Content

3.Counter-managed contingency.

4.Concurrent-managed content.

Posted Date:-2022-09-17 12:07:34


Question:
What is concurrency control?

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

2.The control of single operations in different ways.

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

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

Posted Date:-2022-09-17 11:58:21


Question:
What is concurrency control?

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

2.The control of single operations in different ways.

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

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

Posted Date:-2022-09-17 12:05:23


Question:
What is returned by the method ejbCreate() CMP bean?

1.Null

2. Primary Key class

3. Home Object

4.Remote Object

Posted Date:-2022-09-17 11:15:27


Question:
What is RMI-IIOP?

1.The Java Remote Operation Schedule.

2.Java Remote Method Invocation interface.

3.The Java Open Access Module.

4.The Java Express Services Daemon.

Posted Date:-2022-09-17 11:34:01


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

1.Nothing is available

2.Bean interface.

3.Java interface.

4.Java Naming and Directory Interface

Posted Date:-2022-09-17 12:36:38


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

1.Within the javax.ejb package.

2.Within the javax.ejb package.

3.Within the Javascript package.

4.Within the rava.xml package.

Posted Date:-2022-09-17 09:55:30


Question:
Which component does the Entity bean represent the persistent data stored in the database?

1. Server-side component

2.Client-side component

3. Server and client side component

4.None of the above

Posted Date:-2022-09-17 10:59:47


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

1.Component client.

2.EJB client.

3.EJB Server

4.Java client.

Posted Date:-2022-09-17 12:29:05


Question:
Which of the following statements is not correct for an Enterprise Java Bean?

1.Entity beans model business data

2.Session beans model business processes

3.Message beans send synchronous messages

4.None of the above <br>

Posted Date:-2022-09-17 09:53:11


Question:
Which statement about session beans is true?

1.In both stateless and statefull session classes, the bean provider must write the method public void remove()

2.The method << remove >> in the component interface can be accessed only by the remote clients

3. The bean's handle must be provided by the client, in order to ask the EJBHome for removing a session bean

4.None of the above

Posted Date:-2022-09-17 10:46:29


Question:
______ is a messaging service to create, send and receive messages asynchronously.

1. RMS

2.JMS

3.GDS

4.KAD

Posted Date:-2022-09-17 10:30:18


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

1. <byte>

2.<int>

3.<double>

4.<object>

Posted Date:-2022-09-17 10:06:37


Question:
________ encapsulates business logic.

1.Message Driven Bean

2.Entity Bean

3. Object Bean

4. Session Bean

Posted Date:-2022-09-17 10:26:04


More MCQS

  1. EJB Core Java Mcq Questions
  2. EJB MCQ - Java Technologies
  3. EJB MCQ QUESTIONS AND ANSWER
  4. Advanced EJB MCQ QUESTION AND ANSWER
  5. EJB MCQ QUESTIONS AND ANSWER
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!