Online Test

  • Facebook
  • Google
  • LinkedIn
  • Twitter
Question: 1
Which element of hibernate mapping file (hbm.xml) automatically generate the primary key values?
id
primaryKey
generator
None of the above.

Question: 2
Which design pattern should be there While creating SessionFactory in hibernate. ?
Singleton
Prototype
Factory
None of the above

Question: 3
How one hbm.xml file include to other hbm.xml file?
<mapping resource="account.hbm.xml"/>
<include resource="account.hbm.xml"/>
<add resource="account.hbm.xml"/>
None of the above

Question: 4
Which is true about hibernate?
Hibernate manipulates Complex associations of objects of your database.
Hibernate minimize database access with smart fetching strategies.
Hibernate does not require an application server to operate.
All of the above.

Question: 5
Which is true about configuration component of Hibernate?
The Configuration object represents a configuration or properties file required by the Hibernate.
The Configuration object is usually created only once during application initialization.
The Configuration object is the first Hibernate object you create in any Hibernate application.
All of the above.

Question: 6
HQL is used in with session like?
session.createQuery();
session.createCriteria();
session.createSQLQuery();
session.got();

Question: 7
Which property is used to enable auto commit for JDBC pooled connections?
hibernate.hbm2ddl.auto
hibernate.connection.autocommit
hibernate.hbm2ddl_auto
hibernate.connection_autocommit

Question: 8
What is dirty checking in hibernate?
object state changes in order to synchronize the updated state with database.
remove the dirty data from database
check the data when insert into database
None of the above

Question: 9
Is Student object available to access after below line of code?

 Student stu  session.load(Student.class);
 session.close();
Yes
No
Exception will come
None of the above

Question: 10
Which connection pool is best for hibernate?
c3p0
p3c0
c2p0
p0c2

      Advertisements