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
What is core java and j2ee?
What is the difference between load() and get()?
What is actionform?
What is layout in java?
What software is needed for java programming?
What is non primitive data type in java?
What are struts?
What is commit?
Who generates bytecode in java?
What is a java application server?
What is a component in java?
Explain j2ee architecture.
What is filter chain?
What is meant by j2ee?
What is a j2ee container?