Why we use singleton class in hibernate sessionfactory?

Ads
 

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

Ads









Related Tutorials/Questions & Answers:
Why we use singleton class in hibernate sessionfactory?
why we use abstract class in java?
Advertisements
singleton class
Why to use Session interface in Hibernate?
Why do we use ORM?
why we use constructors instead of methods in java?
arrays,why we cannot use this statement
arrays,why we cannot use this statement
why we use design patterns in java?Example?
why we use struts framework instead of springs
why we use ^ operator in sql, and what is the meaning of that operator?
Why we need reload application after class change?
for writting java program why we are taking more than one class
Why we should use string args[] in main method in java?
how to use sequence as a generator class in hibernate for ms sql
can we use class in jsp which implements interface
where exactly we use interface and where abstract class?
why crieterias are importent in hibernate?
Why Abstract Class?
Why Abstract Class?
why and where we use setter and getter methods in java, please give me one example program.....
can we use scanner class,class , object and methods to get output without using constructor ????
Singleton class
Why to use Spring Framework?
What is the use of Hibernate is used?
hibernate
Why we need data science?
Why Use Docker for Development?
Hibernate 5 annotationconfiguration
Use of delete() method in hibernate.
Why not use Double or Float to represent currency?

Ads