How Well Do You Know Ejb (Enterprise Java Beans)?

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Perlita Yamit
P
Perlita Yamit
Community Contributor
Quizzes Created: 20 | Total Attempts: 18,921
Questions: 10 | Attempts: 313

SettingsSettingsSettings
How Well Do You Know Ejb (Enterprise Java Beans)? - Quiz

Try our EJB quiz and test your knowledge about the one of the best server-side software component. The quiz is made up of ten multiple choice questions that will test your understanding of how EJB and its components work.


Questions and Answers
  • 1. 

    What EJB Category Stores A Specific User’s Data For a Single Session?

    • A.

      Entity Bean

    • B.

      Message Driven Bean

    • C.

      Session Bean

    • D.

      None of the Above

    Correct Answer
    C. Session Bean
    Explanation
    Session Beans are used to store and manage data for a specific user's session. They are responsible for maintaining the state of a particular user's interaction with the application during a session. This makes them the appropriate choice for storing a specific user's data for a single session. Entity Beans are used to represent persistent data, while Message Driven Beans are used for asynchronous processing. Therefore, neither of these options would be suitable for storing a specific user's data for a single session.

    Rate this question:

  • 2. 

    What Type of EJB Is Often Used To Run Independent Operations?

    • A.

      Message Driven Beans

    • B.

      Session Bean

    • C.

      Stateless EJB

    • D.

      Stateful EJB

    Correct Answer
    C. Stateless EJB
    Explanation
    Stateless EJB is often used to run independent operations because it does not maintain any conversational state between method invocations. This means that each method invocation is independent and does not rely on any previous method invocations. Stateless EJBs are lightweight and can handle multiple client requests concurrently, making them suitable for running independent operations.

    Rate this question:

  • 3. 

    Which of the Following is a Major Requirement When Running EJB?

    • A.

      JDK

    • B.

      Linux

    • C.

      Mac

    • D.

      Windows

    Correct Answer
    A. JDK
    Explanation
    When running EJB (Enterprise Java Beans), a major requirement is the JDK (Java Development Kit). The JDK is necessary because it provides the tools and libraries needed to develop and run Java applications, including EJBs. Without the JDK, it would not be possible to compile and execute the EJB code. Therefore, having the JDK installed is crucial for running EJB successfully.

    Rate this question:

  • 4. 

    What EJB Category Acts as a Permanent Data Storage?

    • A.

      Entity Bean

    • B.

      Message Driven Bean

    • C.

      Session Bean

    • D.

      None of the Above

    Correct Answer
    A. Entity Bean
    Explanation
    Entity Beans in EJB act as a permanent data storage. They are used to represent persistent data in a database and provide a way to interact with the database through object-oriented programming. Entity Beans have a state that can be stored and retrieved from a database, making them suitable for long-term storage of data. The other options, Message Driven Bean and Session Bean, do not provide permanent storage capabilities and are used for different purposes in EJB.

    Rate this question:

  • 5. 

    Which of the Following is Used by Java Based Applications for Directory Services and Naming?

    • A.

      EJB

    • B.

      J2EE

    • C.

      JAR

    • D.

      JNDI

    Correct Answer
    D. JNDI
    Explanation
    JNDI (Java Naming and Directory Interface) is used by Java-based applications for directory services and naming. It provides a way for applications to access and manipulate naming and directory services, such as LDAP (Lightweight Directory Access Protocol) or DNS (Domain Name System). JNDI allows Java applications to look up and bind to objects in a distributed environment, making it easier to locate and access resources like databases, messaging systems, and other services. It acts as a bridge between the application and the directory service, allowing for seamless integration and interoperability.

    Rate this question:

  • 6. 

    Which of the Following is Not One of the ACID Properties?

    • A.

      Atomic

    • B.

      Conditional

    • C.

      Isolated

    • D.

      Durable

    Correct Answer
    B. Conditional
    Explanation
    The ACID properties in database management systems stand for Atomicity, Consistency, Isolation, and Durability. These properties ensure that database transactions are reliable and maintain data integrity. Atomicity guarantees that a transaction is treated as a single unit of work, either all of its operations are executed or none. Consistency ensures that a transaction brings the database from one valid state to another. Isolation ensures that concurrent transactions do not interfere with each other. Durability guarantees that once a transaction is committed, its changes are permanent. Therefore, the correct answer is "Conditional" as it is not one of the ACID properties.

    Rate this question:

  • 7. 

    What is the EJB Mechanism that Can Build a Scheduled Application?

    • A.

      Callback

    • B.

      Dependency Injection

    • C.

      Interceptor

    • D.

      Timer Service

    Correct Answer
    D. Timer Service
    Explanation
    The Timer Service in EJB is the mechanism that can be used to build a scheduled application. The Timer Service allows developers to schedule tasks to be executed at specific times or intervals. It provides a simple and reliable way to automate recurring tasks in an enterprise application. With the Timer Service, developers can create timers that trigger method invocations on EJB components, allowing them to perform scheduled operations such as sending notifications, generating reports, or updating data.

    Rate this question:

  • 8. 

    Which of the Following Can be Used in EJB to Create Custom Queries Easily Without Worrying About Specific Details of the Database?

    • A.

      DAO

    • B.

      EJBQL

    • C.

      HQL

    • D.

      SQL

    Correct Answer
    B. EJBQL
    Explanation
    EJBQL can be used in EJB to create custom queries easily without worrying about specific details of the database. EJBQL is a query language specifically designed for EJB applications. It allows developers to write queries using object-oriented concepts and entity relationships, rather than directly dealing with the underlying database structure. This abstraction layer provided by EJBQL simplifies the process of creating queries and makes it easier to maintain and update the code in case of any changes in the database schema.

    Rate this question:

  • 9. 

    What EJB Transaction Attribute Signify that the Business Method Will Run as Part of Transaction?

    • A.

      MANDATORY

    • B.

      NEVER

    • C.

      REQUIRED

    • D.

      SUPPORTS

    Correct Answer
    D. SUPPORTS
    Explanation
    The EJB Transaction Attribute "SUPPORTS" signifies that the business method may run as part of a transaction, but it is not mandatory. It means that if a transaction is already in progress, the method will participate in that transaction. However, if no transaction exists, the method will still be executed outside of any transaction.

    Rate this question:

  • 10. 

    In EJB, What Do You Call Exceptions that are Not Caused by Business Code or Business Logic?

    • A.

      Application Exception

    • B.

      Non-Business Exception

    • C.

      System Exception

    • D.

      None of the Above

    Correct Answer
    C. System Exception
    Explanation
    In EJB, exceptions that are not caused by business code or business logic are called System Exceptions. These exceptions are typically caused by system failures, such as network errors or database failures, and are not directly related to the business logic of the application. Application Exceptions, on the other hand, are exceptions that are caused by business logic and are explicitly declared in the application code. Non-Business Exception is not a recognized term in EJB.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 21, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Feb 27, 2018
    Quiz Created by
    Perlita Yamit
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.