What should sessionfactory be placed so that it can be easily accessed?



What should sessionfactory be placed so that it can be easily accessed?..

Answer / Tarun Agarwal

SessionFactory should be placed in a central location, such as a utility or singleton class, so that it can be easily accessed by all parts of the application needing access to the database.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Hibernate Interview Questions

Which method is used to remove a persistent instance from the datastore?

1 Answers  


How do you invoke stored procedures?

1 Answers  


What is mapping in hibernate?

1 Answers  


What are the disadvantages of hibernate?

1 Answers  


How to use limit in hibernate query?

1 Answers  


Why do we use jpa instead of hibernate?

1 Answers  


What is the difference between one to one and one to many relationship?

1 Answers  


Why we use hibernate?

1 Answers  


What is the difference between update and upgrade?

1 Answers  


What is a hibernate transaction?

1 Answers  


Why do we need orm tools like hibernate?

1 Answers  


What are different types of associations in hibernate?

1 Answers  


Categories