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 javabeans component?
What is actionform?
What is a java application client?
What is commit?
What is java web technologies?
Since we can create managed bean by two ways as, we can define the bean name in faces-config.xml file so that page can use that OR we can write annotation on bean class so that it is automatically assign to page but I want to know which one is good programming practice ? And also mention disadvantage of other which should not prefer ... Thanking you...
Why java is oop language?
What is form-based authentication?
Describe orm?
What is front end technology in java?
What is j2ee server?
Is c++ more secure than java?
What is mean by connection pooling?
What is element?
Why is java important for internet?