Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Hibernate Why we use singleton class in hibernate sessionfactory?

Have Programming Question? Ask it here!
 
 
 


Java Coder
Why we use singleton class in hibernate sessionfactory?
1 Answer(s)      7 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..



Related Tutorials/Questions & Answers:
Advertisements
 

 

 

DMCA.com