Hibernate - What is a SessionFactory?

What is a SessionFactory?

- The SessionFactory is the concept that is a single data store and thread safe. Because of this feature, many threads can access this concurrently and the sessions are requested, and also the cache that is immutable of compiled mappings for a specific database. A SessionFactory will be built only at the time of its startup. In order to access it in the application code, it should be wrapped in singleton. This wrapping makes the easy accessibility to it in an application code.

What is a SessionFactory?

- SessionFactory is an interface and extends Referenceable, Serializable

- Creates Sessions. Usually an application has a single SessionFactory. Threads servicing client requests obtain Sessions from the factory.

- Implementors must be threadsafe.

- SessionFactorys are immutable. The behaviour of a SessionFactory is controlled by properties supplied at configuration time. These properties are defined on Environment.
Hibernate - Role of SessionFactory interface plays
Role of SessionFactory interface plays - The SessionFactory is used to create Sessions...
Hibernate - Difference between load() and get() in Hibernate.
Difference between load() and get() in Hibernate - The load() method throws an exception,when the unique id could not found in the database...
Hibernate - What is the difference between merge and update?
What is the difference between merge and update? - update () : When the session does not contain an persistent instance with the same identifier...
Post your comment
Discussion Board
improve containt and specification
In your block have good answer but also need sample code or example
which is required for well understood
pratik shah 07-22-2014