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
How do I become a java developer?
What is the use of method save()?
What is java technology stack?
I Want build and release interview questions
What is a java application client?
What is application assembler?
What is difference between java and core?
What is mean by j2ee?
What are the components of awt in java?
What should a junior java developer know?
What is a j2ee component?
What is Document Object Model?
How is java development environment setup?
What is B2B?
How many types of component events are in java?