EJB/Advanced EJB MCQ QUESTION AND ANSWER Sample Test,Sample questions

Question:
Filters were officially introduced in the Servlet ___________ specification.

1.2.1

2. 2.3

3.2.2

4. 2.4


Question:
Java servlets are an efficient and powerful solution for
creating ………….. for the web.

1.Dynamic content

2.Static content

3.Hardware

4.Both a and b


Question:
What is the default transaction attribute of a Session Bean in EJB?

1.Required

2.Mandatory

3.NotSupported

4.Supports


Question:
What is the key benefit of using EJBs for developing enterprise applications?

1.Code reusability

2.Platform independence

3.Faster development time

4.Improved performance


Question:
What is the main purpose of Enterprise JavaBeans (EJB) technology?

1. To create web services

2. To implement user interfaces

3.To develop enterprise applications

4.To manage databases


Question:
What is the purpose of the JNDI (Java Naming and Directory Interface) in EJB?

1. To provide transaction management

2. To handle asynchronous messaging

3.To manage database operations

4.To lookup and locate EJB components


Question:
What is the purpose of the “activation-config” element in the deployment descriptor of a Message-Driven Bean (MDB)?

1.To specify the security settings for the MDB

2.To define the interface of the MDB

3. To configure the MDB container

4.To specify the activation settings for the MDB


Question:
What is the purpose of the “ejb-jar.xml” deployment descriptor in EJB?

1. To specify the EJB’s business logic

2.To configure the EJB container

3. To define the EJB’s interface

4. To configure the EJB’s deployment settings


Question:
What is the purpose of the “transaction-type” element in the EJB deployment descriptor?

1.To specify the transaction management strategy

2.To define the EJB’s interface

3.To configure the EJB container

4.To specify the EJB’s security settings


Question:
What is the role of Entity Beans in EJB?

1.Represent business logic

2.Process client requests

3.Manage database operations

4.Handle messaging


Question:
Which design pattern is used to define a family of algorithms and make them interchangeable?

1.Command Pattern

2. Strategy Pattern

3. Interpreter Pattern

4.Chain of Responsibility Pattern


Question:
Which design pattern is used to encapsulate the creation of an object and allows only one instance to be created?

1.Singleton Pattern

2.Factory Method Pattern

3.Prototype Pattern

4.Builder Pattern


Question:
Which design pattern is used to provide a way to access the elements of an object without exposing its internal representation?

1.Facade Pattern

2.Proxy Pattern

3.Iterator Pattern

4.Adapter Pattern


Question:
Which design pattern is used to provide a way to add new behavior to an object without changing its class?

1.Observer Pattern

2.Decorator Pattern

3.Strategy Pattern

4.Visitor Pattern


Question:
Which design pattern is used to provide a way to communicate between objects without them having direct dependencies on each other?

1.Mediator Pattern

2.Observer Pattern

3.Chain of Responsibility Pattern

4.Visitor Pattern


Question:
Which design pattern is used to provide a way to decouple an abstraction from its implementation so that the two can vary independently?

1.Bridge Pattern

2.Adapter Pattern

3.Decorator Pattern

4.Composite Pattern


Question:
Which design pattern is used to provide a way to define the skeleton of an algorithm and allow its subclasses to redefine certain steps?

1.Template Method Pattern

2.Strategy Pattern

3.State Pattern

4.Visitor Pattern


Question:
Which design pattern is used to provide a way to encapsulate a request as an object and allows the request to be queued, logged, and undone?

1.Observer Pattern

2.Command Pattern

3.Mediator Pattern

4.Chain of Responsibility Pattern


Question:
Which design pattern is used to provide a way to encapsulate complex logic and data structures and present a simplified interface to the user?

1.Facade Pattern

2.Adapter Pattern

3.Decorator Pattern

4.Composite Pattern


Question:
Which design pattern is used to provide a way to encapsulate the creation of objects without specifying their concrete classes?

1.Abstract Factory Pattern

2.Factory Method Pattern

3. Prototype Pattern

4.Builder Pattern


Question:
Which design pattern is used to provide a way to ensure that a group of operations are performed as a single transaction?

1.Facade Pattern

2. Proxy Pattern

3.Command Pattern

4.Composite Pattern


Question:
Which design pattern is used to provide a way to group related objects into a single object?

1.Composite Pattern

2.Chain of Responsibility Pattern

3. Command Pattern

4.Interpreter Pattern


Question:
Which design pattern is used to provide a way to handle requests by passing them through a chain of objects until one of them handles the request?

1.Chain of Responsibility Pattern

2.Proxy Pattern

3. Decorator Pattern

4.Adapter Pattern


Question:
Which design pattern is used to provide a way to manage a group of related objects as a single object?

1.Flyweight Pattern

2.Proxy Pattern

3. Composite Pattern

4.Bridge Pattern


Question:
Which design pattern is used to provide a way to modify the behavior of an object dynamically?

1.Observer Pattern

2.Visitor Pattern

3.Decorator Pattern

4.Adapter Pattern


Question:
Which design pattern is used to provide a way to reduce the number of objects created by sharing objects that are the same?

1.Flyweight Pattern

2.Proxy Pattern

3.Adapter Pattern

4. Bridge Pattern


Question:
Which design pattern is used to provide a way to represent an object as a surrogate for another object?

1. Decorator Pattern

2.Adapter Pattern

3.Proxy Pattern

4.Visitor Pattern


Question:
Which design pattern is used to provide a way to respond to events and changes in state?

1. Observer Pattern

2.Mediator Pattern

3.Template Method Pattern

4.State Pattern


Question:
Which design pattern is used to provide a way to separate the construction of a complex object from its representation?

1.Prototype Pattern

2. Builder Pattern

3. Abstract Factory Pattern

4.Factory Method Pattern


Question:
Which design pattern is used to separate the interface from the implementation and allows them to vary independently?

1.Adapter Pattern

2.Decorator Pattern

3.Bridge Pattern

4.Facade Pattern


Question:
Which EJB type is best suited for high-performance, concurrent operations?

1. Stateless Session Bean

2.Stateful Session Bean

3.Singleton Bean

4.Message-Driven Bean


Question:
Which EJB type is used for managing application-wide, shared resources and services?

1.Stateless Session Bean

2. Stateful Session Bean

3.Singleton Bean

4.Entity Bean


Question:
Which EJB type is used for performing asynchronous processing in EJB applications?

1.Stateless Session Bean

2.Stateful Session Bean

3.Singleton Bean

4.Message-Driven Bean


Question:
Which EJB type is used for representing data entities and their relationships in an enterprise application?

1.Entity Bean

2. Session Bean

3.Message-Driven Bean

4. Singleton Bean


Question:
Which type of EJB can be invoked by other EJBs and clients?

1.Local Bean

2.Remote Bean

3.Distributed Bean

4.Accessible Bean


Question:
Which type of EJB can be used to encapsulate business logic that needs to be executed at regular intervals?

1.Entity Bean

2.Session Bean

3.Message-Driven Bean

4. Timer Bean


Question:
Which type of EJB can maintain conversational state with a client?

1.Stateless Session Bean

2. Stateful Session Bean

3.Singleton Bean

4.Entity Bean


Question:
Which type of EJB is used for remote access by clients in a distributed environment?

1.Local Bean

2.Remote Bean

3. Distributed Bean

4.Remote-Interface Bean


Question:
Which type of EJB is used to ensure that only one instance of a bean exists in the entire application?

1.Entity Bean

2. Session Bean

3.Message-Driven Bean

4. Singleton Bean


Question:
Which type of EJB is used to handle asynchronous messaging in an enterprise application?

1.Entity Bean

2.Session Bean

3.Message-Driven Bean

4.Singleton Bean


Question:
Which type of EJB is used to represent business logic in an enterprise application?

1.Entity Bean

2.Session Bean

3.Message-Driven Bean

4.Singleton Bean


Question:
Which type of Session Bean maintains conversational state with the client?

1. Stateless Session Bean

2.Stateful Session Bean

3.Singleton Session Bean

4.Message-Driven Bean


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
Olete Team
Online Exam TestTop Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on Online Exam Testwebsite 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!