We are using Weblogoic9.2.3 & DB is Oracle10.2.0.3. How can we access Hibernate SessionFactory using JNDI?
views:
456answers:
1
+1
A:
I'd warmly suggest to read the chapter 3.8. J2EE Application Server integration of the documentation. But With Weblogic 9.x and Oracle 10g, you'll end up with something like this (partial but tested setup):
...
<property name="hibernate.session_factory_name">hibernate.SessionFactory</property> <!-- JNDI bound Session Factory Name -->
<property name="hibernate.jndi.url">t3://localhost:port</property>
<property name="hibernate.jndi.class">weblogic.jndi.WLInitialContextFactory</property>
<property name="hibernate.jndi.weblogic.jndi.replicateBindings">false</property> <!-- because SessionFactory is not clusterable -->
<property name="dialect">org.hibernate.dialect.Oracle10gDialect</property>
...
Pascal Thivent
2009-11-03 04:09:22