开发者

How to access SessionFactory of Hibernate using JNDI in WEBLOGIC 9.2 server?

We are using Weblogoic9.2.3 & DB is Oracle10.2.0.3. How can we access Hib开发者_JS百科ernate SessionFactory using JNDI?


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>
...
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜