Why we use singleton class in hibernate sessionfactory?

Hello,

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

Thanks...

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..









Related Tutorials/Questions & Answers:
Advertisements