what is the purpose and activity of SessionFactory in
hibernate?
Answer Posted / ankur
Configuration object is used to create a SessionFactory object which inturn configures Hibernate for the application using the supplied configuration file and allows for a Session object to be instantiated. The SessionFactory is a thread safe object and used by all the threads of an application.
The SessionFactory is is heavyweight object so usually it is created during application start up and kept for later use. You would need one SessionFactory object per database using a separate configuration file. So if you are using multiple databases then you would have to create multiple SessionFactory objects.
Is This Answer Correct ? | 2 Yes | 5 No |
Post New Answer View All Answers
What is mean by connection pooling?
What are types of j2ee clients?
What is application component provider?
How do I become an expert in java?
What is source file in java?
What is jlayeredpane java?
What is java ee server?
Which java technology is in demand?
What is the best java compiler?
What is javaserver pages (jsp)?
What is javafx java?
What is urn?
What is main method in java?
What is j2ee component?
What are the components and containers in java?