Online Test

  • Facebook
  • Google
  • LinkedIn
  • Twitter
Question: 1
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: 2
Which element of hibernate mapping file (hbm.xml) automatically generate the primary key values?
id
primaryKey
generator
None of the above.

Question: 3
What is the default value of lazy in hibernate?
lazy=false;
lazy=true;
lazy=yes;
lazy=no;

Question: 4
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: 5
Is it correct configuration?

<class name="com.javatutsworld.bean.Student" table="STUDENT">
Correct
Not Correct
Exception will come
None of the above

Question: 6
Which property are used to configure diver class in hibernate?
hibernate.connection.driver_class
hibernate.connection.driver.class
hibernate.connection_datasource
hibernate.connection.datasource

Question: 7
What is the root level element in the hibernate mapping file?
<hibernate>
<session-factory>
<hibernate-configuration>
None of the above

Question: 8
How can a whole class be mapped as immutable?
By using the mutable="false" attribute in the class mapping
By using the ismutable="false" attribute in the class mapping
By using the mutable="true" attribute in the class mapping
None of the above

Question: 9
Which fetching strategy tuned query automatically?
session.createQuery();
session.createCriteria();
session.createSQLQuery();
None of the above

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

      Advertisements