Hibernate interview questions
- Difference between session.save() , session.saveOrUpdate() and session.persist()? view answer
- Q.What is the difference between hibernate and jdbc ? view answer
- Q. What is lazy fetching in Hibernate? With Example . view answer
- Q.what is the advantage of Hibernate over jdbc? view answer
- How to Integrate Struts Spring Hibernate ? view answer
- How to prevent concurrent update in Hibernate? view answer
- How to perevent slate object updatation in Hibernate ? view answer
- What is version checking in Hibernate ? view answer
- How to handle user think time using hibernate ? view answer
- Q.Transaction with plain JDBC in Hibernate ? view answer
- Q.What are the general considerations or best practices for defining your Hibernate persistent classes?
view answer
- Q.Difference between session.update() and session.lock() in Hibernate ? view answer
- Q.Difference between getCurrentSession() and openSession() in Hibernate ? view answer
- Difference between session.saveOrUpdate() and session.merge()? view answer
- Filter in Hibernate with Example? view answer
- Q.How does Value replacement in Message Resource Bundle work? view answer
- Difference between list() and iterate() i9n Hibernate? view answer
- Difference between session.load() and session.get() ? view answer
- Deleting persistent objects view answer
- SQL statements execution order. view answer
- Difference between session.saveOrUpdate() and session.merge(); view answer
- Modifying persistent objects? view answer
- SQL Queries In Hibernate.. view answer
- Filter in Hibernate view answer
- Criteria Query Two Condition view answer
- Equal and Not Equal criteria query. view answer
- Cascade Save or Update in Hibernate ? view answer
- One To Many Bi-directional Relation in Hibernate? view answer
- One To Many Mapping Using List ? view answer
- Many To Many Relation In Hibernate ? view answer
- What does session.refresh() do ? view answer
- Difference between session.load() and session.get()?
view answer
- Hibernate setup using .cfg.xml file ? view answer
- How to add .hbm.xml file in sessionFactory? view answer
- How to get Hibernate statistics ? view answer
- How to set 2nd level cache in hibernate with EHCache? view answer
- How to get JDBC connections in hibernate? view answer
- How will you configure Hibernate? view answer
- How to create Session and SessionFactory in Hibernate? view answer
- What are the Instance states in Hibernate? view answer
- What are the core components in Hibernate ? view answer
- What is a Hibernate Session? Can you share a session object between different theads?
view answer
- addScalar() method in hibernate... view answer
- Hibernate session.close does _not_ call session.flush ? view answer
- What is the main difference between Entity Beans and Hibernate ? view answer
- Difference between session.save() and session.saveOrUpdate()? view answer
- How are joins handled using Hinernate. view answer
- What is Hibernate proxy? view answer
- What is the main advantage of using the hibernate than using the sql ? view answer
- how to create primary key using hibernate? view answer
- what is the advantage of Hibernate over jdbc? view answer
- How to Execute Stored procedure in Hibernate ? view answer
- what is lazy fetching in hibernate? view answer
|
!!! Hibernate interview questions !!!
What are the core components in Hibernate ?
SessionFactory (org.hibernate.SessionFactory)
A threadsafe (immutable) cache of compiled mappings for a single database. A factory for Session and a
client of ConnectionProvider. Might hold an optional (second-level) cache of data that is reusable
between transactions, at a process- or cluster-level.
Session (org.hibernate.Session)
A single-threaded, short-lived object representing a conversation between the application and the persistent
store. Wraps a JDBC connection. Factory for Transaction. Holds a mandatory (first-level) cache of persistent
objects, used when navigating the object graph or looking up objects by identifier.
Persistent objects and collections
Short-lived, single threaded objects containing persistent state and business function. These might be ordinary
JavaBeans/POJOs, the only special thing about them is that they are currently associated with (exactly
one) Session. As soon as the Session is closed, they will be detached and free to use in any application
layer (e.g. directly as data transfer objects to and from presentation).
Transient and detached objects and collections
Instances of persistent classes that are not currently associated with a Session. They may have been instantiated
by the application and not (yet) persisted or they may have been instantiated by a closed Session.
Transaction (org.hibernate.Transaction)
(Optional) A single-threaded, short-lived object used by the application to specify atomic units of work.
Abstracts application from underlying JDBC, JTA or CORBA transaction. A Session might span several
Transactions in some cases. However, transaction demarcation, either using the underlying API or Transaction,
is never optional!
Architecture
Hibernate 3.0.2 9
ConnectionProvider (org.hibernate.connection.ConnectionProvider)
(Optional) A factory for (and pool of) JDBC connections. Abstracts application from underlying Datasource
or DriverManager. Not exposed to application, but can be extended/implemented by the developer.
TransactionFactory (org.hibernate.TransactionFactory)
(Optional) A factory for Transaction instances. Not exposed to the application, but can be extended/
implemented by the developer.
Extension Interfaces
Hibernate offers many optional extension interfaces you can implement to customize the behavior of your
persistence layer. See the API documentation for details.
|
Suggested Jobs More Jobs >>
|