tag:blogger.com,1999:blog-8712770457197348465.post3501702410646885561..comments2024-03-28T01:04:16.249-07:00Comments on Javarevisited: Top 10 Hibernate Interview Questions and Answers for 3 to 5 Years Experienced Java Developersjavin paulhttp://www.blogger.com/profile/15028902221295732276noreply@blogger.comBlogger19125tag:blogger.com,1999:blog-8712770457197348465.post-88841259781324423502018-02-28T15:12:23.130-08:002018-02-28T15:12:23.130-08:00J2EE name has been changed new name is JakartaEE.
...J2EE name has been changed new name is JakartaEE.<br /> Anonymoushttps://www.blogger.com/profile/01247482229824877216noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-57815273163585200122016-08-03T22:47:48.758-07:002016-08-03T22:47:48.758-07:00Hi All,please clear my confusion,
If object is th...Hi All,please clear my confusion, <br />If object is thread-safe it means multiple thread can access the object or not?<br />As i know thread-safe means only one thread can access the object at a time.kavi...rajhttps://www.blogger.com/profile/01808794832551870018noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-65337618564266237162016-02-16T01:14:56.210-08:002016-02-16T01:14:56.210-08:00You can also see this list of Hibernate interview ...You can also see this list of Hibernate interview questions which is latest and up to date until 2016. You will most likely be asked about N+1 problem in Hibernate. Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-3914853845295077802015-02-01T23:27:25.771-08:002015-02-01T23:27:25.771-08:00There is another question difference between updat...There is another question difference between update and merge.<br />Ans: Use update() if you are certain that the session does not contain an already persistent instance with the same identifier. Use merge() if you want to merge your modifications at any time without consideration of the state of the session.<br /><br />How object state changes from persistent to transient?<br />Ans: delete() Here U Gohttps://www.blogger.com/profile/12616314953920673514noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-11624832312921135632014-12-18T05:18:33.814-08:002014-12-18T05:18:33.814-08:00Hi Javin,
I found this Q&A "What does Ses...Hi Javin,<br />I found this Q&A "What does Session lock() method do in Hibernate?" not so clear. Can you please explain on this matter little more?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-79557615097199397492014-04-21T17:54:47.188-07:002014-04-21T17:54:47.188-07:00What design pattern does session factory uses? Ans...What design pattern does session factory uses? Answer is singleton. One object per application per database connection. Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-49060087349568939882014-04-20T03:12:28.851-07:002014-04-20T03:12:28.851-07:00Difference b/w sessionFactory.getCurrentSession() ...Difference b/w sessionFactory.getCurrentSession() and sessionFactory.openSession():<br />openSession() creates a new normal Session, that needs to be explicitly closed once the required operations are complete.<br /><br />getCurrentSession() - introduced in Hibernate 3.0 - returns a Contextual Session, which is nothing but one Session per Transaction. The Session is automatically closed once the Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-38983403221301255022014-02-25T21:12:05.218-08:002014-02-25T21:12:05.218-08:00what about hibernate Polymorphism?what about hibernate Polymorphism?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-30859788964990266692013-11-08T08:55:12.130-08:002013-11-08T08:55:12.130-08:00when we use criterian in hibernate ?when we use criterian in hibernate ?karuphttps://www.blogger.com/profile/14154461575348719411noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-66208821723810056252013-09-17T09:55:22.616-07:002013-09-17T09:55:22.616-07:00What is difference b/w session.getCurrentSession()...What is difference b/w session.getCurrentSession() and session.openSession()?? please answer it in brief.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-3864381989265036682013-05-21T04:52:41.887-07:002013-05-21T04:52:41.887-07:00Seriously - if presented with these questions and ...Seriously - if presented with these questions and a huge domain model, using Hibernate as persistence, think twice before applying for the job ... Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-9478941247386021142013-05-21T04:14:48.439-07:002013-05-21T04:14:48.439-07:00Save, saveorupdate, persist for me the only correc...Save, saveorupdate, persist for me the only correct answer is: broken by design Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-27490404236193487492013-05-21T03:31:12.643-07:002013-05-21T03:31:12.643-07:00It's JavaEE and for such a job interview I wou...It's JavaEE and for such a job interview I would assume questions about JPA and not the proprietary Hibernate APIAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-39891537042797187092013-05-09T19:31:31.069-07:002013-05-09T19:31:31.069-07:00In Hibernate how can we change the database only b...In Hibernate how can we change the database only by just changing the hibernate.cfg.xml,if so how can we handle migration issues.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-55960721232710522432013-05-09T01:04:43.100-07:002013-05-09T01:04:43.100-07:00Hello, Can you please upload PDF version or let me...Hello, Can you please upload PDF version or let me know if there is any way to download these Hibernate interview Questions as PDF? ThanksAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-34199236691904049932013-05-08T05:28:07.011-07:002013-05-08T05:28:07.011-07:00@Surajtamang, Apart from re-attaching a transient ...@Surajtamang, Apart from re-attaching a transient object to session, Session.lock(Object object,LockMode lockMode) is also used to perform version check, they do this by acquiring an appropriate LockLevel e.g. LockLevel.READ for version check. Different lock modes are provided to prevent entity from being read and modified simultaneously from multiple source. By the way both overloaded version ofJavin @ producer consumer solution BlockingQueuehttp://javarevisited.blogspot.com/2012/02/producer-consumer-design-pattern-with.htmlnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-11286206125750497922013-05-08T05:17:19.175-07:002013-05-08T05:17:19.175-07:00@inj rav, Those are really good question, I have a...@inj rav, Those are really good question, I have also seen lazy initialization exception couple of times, will definitely include those.Javin @ abstract class interface interview questionshttp://javarevisited.blogspot.com/2013/04/10-abstract-class-and-interface-interview-question-java-answers.htmlnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-7519627990439083722013-05-07T08:24:18.340-07:002013-05-07T08:24:18.340-07:00one more: what is N+1 problem and strategies to av...one more: what is N+1 problem and strategies to avoid thisinj ravhttps://www.blogger.com/profile/02004482725808152755noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-12841857795830114182013-05-07T08:17:11.495-07:002013-05-07T08:17:11.495-07:00I believe we need to include What is lazy initiali...I believe we need to include What is lazy initialization exception.. Which was asked thrice to me in interview.inj ravhttps://www.blogger.com/profile/02004482725808152755noreply@blogger.com