Advanced Java Programming (3160707) MCQs

MCQs of Hibernate 4.0

Showing 11 to 20 out of 40 Questions
11.
In Hibernate, which object is thread safe and used by all the threads of an application.
(a) Session factory
(b) Configuration
(c) Session
(d) Criteria
Answer:

Option (a)

12.
Which object is used to create a SessionFactory object?
(a) Session factory
(b) Configuration
(c) Session
(d) Criteria
Answer:

Option (b)

13.
You would need one _____ object per database using a separate configuration file.
(a) Session factory
(b) Query
(c) Session
(d) Criteria
Answer:

Option (a)

14.
if you are using multiple databases, then you would have to create multiple _____ objects.
(a) Session factory
(b) Configuration
(c) Session
(d) Criteria
Answer:

Option (a)

15.
The ______ object is lightweight and designed to be instantiated each time an interaction is needed with the database.
(a) Session factory
(b) Configuration
(c) Session
(d) Criteria
Answer:

Option (c)

16.
he ______objects should not be kept open for a long time because they are not usually thread safe and they should be created and destroyed as needed.
(a) Session factory
(b) Configuration
(c) Session
(d) Criteria
Answer:

Option (c)

17.
In hibernate, JTA handles?
(a) Transaction
(b) Execution
(c) Compilation
(d) Data extraction
Answer:

Option (a)

18.
______object use SQL or Hibernate Query Language (HQL) string to retrieve data from the database and create objects.
(a) Session factory
(b) Query
(c) Session
(d) Criteria
Answer:

Option (b)

19.
______objects are used to create and execute object oriented criteria queries to retrieve objects.
(a) Session factory
(b) Query
(c) Session
(d) Criteria
Answer:

Option (d)

20.
In hibernate architecture,______ cache is a mandatory cache through which all requests must pass through.
(a) First-level Cache
(b) Second-level Cache
(c) Both A & B
(d) None of these
Answer:

Option (a)

Showing 11 to 20 out of 40 Questions