Popular Posts

Thursday, May 10, 2012

Hibernate advance level/difficult interview questions & answers

Some are common, but some are very core technical, senior level questions:

1) What's difference / comparison between hibernate and Ibatis? & JPA?
2) Whats lazy-loading in hibernate?
3) How to implement query in hibernate.
4) How to configure cache in hibernate.
5) Difference between load and get method
6) What are the configuration files; Can we have more than one configuration files, How application is aware of them.
7) How to define relationship of Objects in hibernate
8) Caching in Hibernate.
9) What is Hibernate SessionFactory
10) How to define mapping in Hibernate.

11) what are 3 states of object in Hibernate
12) How to reattach the detached object in Hibernate.
Ans) Session.merge(obj)

13) Integration of spring with hibernate?
14) what is lazy initialization?
15) what is n+1 problem in hibernate

16) Life cycle / stages of hibernate entities / objects.
Ans) Transient, Persistent, Removed & detached.

17) How can we create session in hibernate
18) How many configuration file in hibernate
19) How will you configure Hibernate in you app?
20) Collections supported by Hibernate

21) Inheritance in Hibernate.
22). Optimistic locking in Hibernate.

23) Design Patterns in Hibernate.
Ans - hibernate uses / based upon Data Mapper.

Answers to follow.