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 use of final keyword in java?
What is meant by applet in java?
What is repaint in java?
Is advanced java and j2ee same?
What is main method in java?
What is cmp in j2ee?
What is j2ee called now?
How to create object without using the keyword “new” in java?
What is j2ee tutorial?
What is java developer job description?
How does event listener work in java?
What is java advanced?
What is a java application server?
What is a jpanel in java?
What are j2ee concepts?