What is Configuration class in hibernate?Ĭonfiguration class is used to load required hibernate configuration. SessionFactory object is shared by multiple sessions. SessionFactory is heavy weight object and it should be created one per database. Explain brief about SessionFactory object used in hibernate? Every thread should have their own session object and close it once it is done with the work. Session objects are not thread safe and need to be used in single thread. It allows you to create query objects to retrieve persistent objects.It wraps JDBC connection Factory for Transaction.It holds a mandatory (first-level) cache of persistent objects, used when navigating the object graph or looking up objects by identifier. Session is light weight,short lived objects which are inexpensive to create and destroy. Session interface is primarily used by hibernate application. Explain brief about Session interface used in hibernate? What are some core interfaces of hibernate?Ħ. Hibernate is like a bridge between java code and relation database and provide object oriented API to deal with JDBC tasks. The main goal of hibernate to avoid old JDBC code and focus more on business logic. Hibernate is pure ORM tool which is used to save old java objects to database tables. It is programming paradigm which is used to persist java objects to database tables. ORM stands for Object Relational mapping. Please list down the changes you need to make? Given a Customer class, you need to persist customer data in the database with customer ID as primary key. What are the design patterns used in Hibernate? Can you list down important annotations used for Hibernate mapping? What is cascading in Hiberante and can you list types of cascading? What are benefits of Criteria API in Hibernate? Can you share some of the databases supported by Hibernate? What types of joins can you use in Hibernate? What do you understand by Hibernate tuning? What is autamatic dirty checking in Hibernate? How to make an class immutable in Hibernate? What are inheritance mapping strategies are available in Hibernate? How can you log sql queries executed by Hibernate? What are different collection types available in hibernate? What is LazyInitializationException in Hibernate? Why do you get it? What are differences between sorted and ordered collection in hibernate? What are two types of Collections in hibernate? What are differences between save and saveOrUpdate method of session object? Does entity class in hibernate require no arg constructor? Differentiate between first level cache and second level cache? Can you declare Entity class as final in hibernate? What are differences between get and load methods in hibernate? What are differences between openSession and getCurrentSession in hibernate? Explain brief about Query interface in Hibernate? Explain brief about Criteria API in Hibernate? What is Configuration class in hibernate? What are some core interfaces of hibernate?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |