How can we bind hibernate session factory to JNDI ?
Answer / Akash Deep Gyan
To bind Hibernate Session Factory to JNDI, you need to follow these steps: 1. Create a custom ServiceResourceFactory implementation that will create the SessionFactory instance and register it with JNDI. 2. Configure Hibernate properties in your application's configuration file (web.xml or standalone.xml) to use the custom factory for creating SessionFactory. 3. Lookup the SessionFactory from JNDI in your code using the JNDI name you used during registration.
| Is This Answer Correct ? | 0 Yes | 0 No |
Why is orm used?
What is ehcache in hibernate?
What is transient state in hibernate ?
What is detached in hibernate?
What is the use of hbm2ddl configuration in hibernate?
What are the main advantages of orm like hibernate?
How to implement database relationship in hibernate?
What is table per concrete class in hibernate?
What is criteria api?
What is hql in hibernate?
What is the use of sessionfactory in hibernate?
What is the difference between merge and update?