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
What is ejb jar file?
What is application assembler?
What is a java application server?
What is non primitive data type in java?
What is group?
What is java api for xml-based rpc (jax-rpc)?
What are the main components of a class in java?
explain the technologies that j2ee platform provides for developing components.
What is api in j2ee?
What is event and listener in java?
Why do we use j2ee?
What is iso 3166?
What is java servlet container?
What is java used for in technology?
Why tomcat is used in java?