Showing posts with label hibernate interview questions. Show all posts
Showing posts with label hibernate interview questions. Show all posts

Saturday, 12 March 2016

10 Hibernate Interview Questions and Answers for Java J2EE Programmers

Hibernate Interview Questions are asked on Java J2EE Interviews, mostly for web based enterprise application development role. Success and acceptability of Hibernate framework on Java world have made it one of the most popular Object Relational Mapping (ORM) solution in Java technology stack. Hibernate frees you from database-specific coding and allows you to focus more on utilizing powerful object oriented design principle to implement core business logic. By using Hibernate you can switch between database rather easily and also take advantage of out of box caching facilities provided by Hibernate, in terms of second-level cache and query cache. It also frees Java developer from writing JDBC code as Hibernate takes care of that. In short, provides a complete solution to implement DAO layer of your Java or JEE application. 
Read more »

Thursday, 14 January 2016

Why JPA Entity or Hibernate Persistence Class Should Not be Final?

One of the interesting hibernate interview questions is, why you should not make a Hibernate persistent class final? I'll try to answer this question in this short blog post. Use of proxies is the core feature of Hibernate (one of the most popular ORM framework for Java Projects) for implementing key performance features e.g. lazy loading and lazy associations fetching. In order to use a proxy in place of real class, your hibernate persistence class must be either non-final or the implementation of an interface that declares all of the public methods. Why? because you cannot extend a final class in Java, and to stand up as a proxy, proxy class must satisfy the IS-A relation, which comes either by extending a class using "extends", or implementing an interface using "implements".
Read more »