Java 如何在WEBLOGIC 9.2服务器中使用JNDI访问Hibernate的SessionFactory?

Java 如何在WEBLOGIC 9.2服务器中使用JNDI访问Hibernate的SessionFactory?,java,hibernate,orm,weblogic,Java,Hibernate,Orm,Weblogic,我们使用的是Weblogoic9.2.3&DB是Oracle10.2.0.3。 我们如何使用JNDI访问Hibernate SessionFactory?我强烈建议您阅读文档中的章节。但是使用Weblogic 9.x和Oracle 10g,您最终会得到类似的结果(部分但经过测试的设置): 。。。 hibernate.SessionFactory t3://localhost:port weblogic.jndi.WLInitialContextFactory 假的 org.hibernate.d

我们使用的是Weblogoic9.2.3&DB是Oracle10.2.0.3。
我们如何使用JNDI访问Hibernate SessionFactory?

我强烈建议您阅读文档中的章节。但是使用Weblogic 9.x和Oracle 10g,您最终会得到类似的结果(部分但经过测试的设置):

。。。
hibernate.SessionFactory
t3://localhost:port
weblogic.jndi.WLInitialContextFactory
假的
org.hibernate.dialen.oracle10galent
...
...
<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>
...