Java Coder
Why we use singleton class in hibernate sessionfactory?
1 Answer(s)      a year and 4 months ago
Posted in : Hibernate

Hello,

Please tell me why we use singleton class in hibernate sessionfactory? hibernate sessionfactory singleton example would be very helpful.

Thanks...

Advertisement
View Answers

January 28, 2014 at 5:09 PM


Hello,

A singleton is an class that can be instantiated once, and only once. Implementation of Singleton is simple, block off access to all constructors, provide a static method for getting an instance of the singleton, and prevent cloning..

For detailed explanation go through the following link:

Thanks..