what is the purpose and activity of SessionFactory in
hibernate?

Answer Posted / yograj pandey

SessionFactory is Hibernate's concept of a single datastore
and is threadsafe so that many threads can access it
concurrently and request for sessions and immutable cache of
compiled mappings for a single database. A SessionFactory is
usually only built once at startup. SessionFactory should be
wrapped in some kind of singleton so that it can be easily
accessed in an application code.

SessionFactory sessionFactory = new
Configuration().configure().buildSessionfactory();

Is This Answer Correct ?    28 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is containers in java?

450


What is a j2ee container?

583


How to create object without using the keyword “new” in java?

525


Is java safe to download?

493


Explain connector architecture.

544






Is java is fully object oriented?

516


What is the best java compiler?

476


What is element?

544


Describe the file types *.ear, * .jar and *.war?

511


What is enterprise information system?

550


What is java j2ee developer?

469


What is java advanced?

505


What is home handle?

529


to update a batch in a table in jdbc which method of statement object is used

1669


What do you understand by connector? Explain connector architecture.

497