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 ear file?
What is caller principal?
How will you explain load() and get() methods?
What is japplet in java?
Which software is used for java?
What is the latest technology used in java?
How does event listener work in java?
How can I be good in java?
What is multi tier architecture in j2ee?
What is full form of j2ee?
Why primitive data types in java are not objects?
Is java is fully object oriented?
Which of the following are subclasses of java awt component?
What is the mvc on struts?
What is jaxr client?