Show List

Quiz - JPA and Hibernate - 3

64%

Public Average Score
Select the right answer for below questions:

How does JPA handle transactions?
JPA handles transactions through the Hibernate Session API
JPA does not handle transactions
JPA handles transactions through the EntityManager API
None of the above
JPA handles transactions through the EntityManager API

What is the main difference between the Hibernate First-Level Cache and the JPA EntityManager Cache
The Hibernate First-Level Cache is specific to Hibernate, while the JPA EntityManager Cache is a standard API
The Hibernate First-Level Cache is more powerful than the JPA EntityManager Cache
The Hibernate First-Level Cache is easier to use than the JPA EntityManager Cache
All of the above
The Hibernate First-Level Cache is specific to Hibernate, while the JPA EntityManager Cache is a standard API

What is the main advantage of using Hibernate Query Language (HQL) over JPQL?
HQL is more powerful than JPQL
HQL is easier to use than JPQL
HQL is faster than JPQL
HQL is specific to Hibernate, while JPQL is a standard API
HQL is specific to Hibernate, while JPQL is a standard API

What is the main difference between Hibernate Second-Level Cache and the JPA Shared Cache?
The Hibernate Second-Level Cache is specific to Hibernate, while the JPA Shared Cache is a standard API
The Hibernate Second-Level Cache is more powerful than the JPA Shared Cache
The Hibernate Second-Level Cache is easier to use than the JPA Shared Cache
All of the above
The Hibernate Second-Level Cache is specific to Hibernate, while the JPA Shared Cache is a standard API

What is the main purpose of the JPA Shared Cache?
To provide a separate cache for each entity in a JPA application
To provide no cache for entities in a JPA application
To provide a shared cache for all entities in a JPA application
None of the above
To provide a shared cache for all entities in a JPA application

How does Hibernate manage relationships between entities?
Hibernate manages relationships between entities through annotations and configuration
Hibernate manages relationships between entities through only configuration
Hibernate manages relationships between entities through only annotations
None of the above
Hibernate manages relationships between entities through annotations and configuration

What is a managed entity in JPA?
An entity managed by Hibernate
An entity managed by the JPA EntityManager
An entity managed by the JPA Shared Cache
An entity managed by the Hibernate Session
An entity managed by the JPA EntityManager

What is a detached entity in JPA?
An entity that is no longer managed by Hibernate
An entity that is no longer managed by the JPA EntityManager
An entity that is no longer managed by the JPA Shared Cache
An entity that is no longer managed by the Hibernate Session
An entity that is no longer managed by the JPA EntityManager

What is a transaction in JPA and Hibernate?
A transaction is a group of operations that are executed together, either all or none
A transaction is a group of operations that are executed separately
A transaction is a single operation
None of the above
A transaction is a group of operations that are executed together, either all or none

What is the purpose of the JPA EntityManager.persist() method?
To retrieve an entity from the database
To update an entity in the database
To persist an entity in the database
To delete an entity from the database
To persist an entity in the database

Submit
Retry
{"qz1-316319":"JPA handles transactions through the EntityManager API","qz1-316320":"The Hibernate First-Level Cache is specific to Hibernate, while the JPA EntityManager Cache is a standard API","qz1-316321":"HQL is specific to Hibernate, while JPQL is a standard API","qz1-316322":"The Hibernate Second-Level Cache is specific to Hibernate, while the JPA Shared Cache is a standard API","qz1-316323":"To provide a shared cache for all entities in a JPA application","qz1-316324":"Hibernate manages relationships between entities through annotations and configuration","qz1-316325":"An entity managed by the JPA EntityManager","qz1-316326":"An entity that is no longer managed by the JPA EntityManager","qz1-316327":"A transaction is a group of operations that are executed together, either all or none","qz1-316328":"To persist an entity in the database"}

    Leave a Comment


  • captcha text