what is the purpose and activity of SessionFactory in
hibernate?
Answer Posted / yograj pandey
SessionFactory is Hibernate's concept of a single datastore
and is threadsafe so that many threads can access it
concurrently and request for sessions and immutable cache of
compiled mappings for a single database. A SessionFactory is
usually only built once at startup. SessionFactory should be
wrapped in some kind of singleton so that it can be easily
accessed in an application code.
SessionFactory sessionFactory = new
Configuration().configure().buildSessionfactory();
| Is This Answer Correct ? | 28 Yes | 6 No |
Post New Answer View All Answers
Difference between save and saveorupdate?
What is java netbeans?
Why is java more secure?
What is actionerrors?
What is B2B?
What is the best java compiler?
What is document root?
What does java ee stand for?
What is actionform?
What is home handle?
Is java more difficult than c++?
How does j2ee application work?
How java is used in web applications?
What is wildfly java?
What is j2ee application?