What is a SessionFactory? Is it a thread-safe object?
The SessionFactory is heavyweight object so usually it is created during application start up and kept for later use.The SessionFactory is a thread safe object and used by all the threads of an application.
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.
Read More →