1,weblogic的jndi的名字如果是webso,则配置如下:
<hibernate-configuration>
    <session-factory>
        <property name="hibernate.connection.datasource">webso</property>
        <property name="hibernate.connection.provider_class">net.sf.hibernate.connection.DatasourceConnectionProvider</property>
        <property name="hibernate.jndi.class">weblogic.jndi.WLInitialContextFactory</property>
        <property name="show_sql">false</property>
        <property name="hibernate.jdbc.fetch_size">100</property>
        <property name="hibernate.jdbc.batch_size">50</property>
        <property name="dialect">net.sf.hibernate.dialect.SQLServerDialect</property>
2:看看源码就知道了:
public Configuration configure() throws HibernateException {
configure("/hibernate.cfg.xml");
return this;
}
它默认读hibernate.cfg.xml这个文件,它在你的class的根下。

解决方案 »

  1.   

    第一个问题我还是没有搞清楚,加上下面这句
    <property name="hibernate.session_factory_name">HibernateSessionFactory</property>是不是意味着hibernate自己给我绑定HibernateSessionFactory这个jndi了,以后进入程序还需要自己bind吗
      

  2.   

    default_schema参数什么意思,具体和oracle什么参数相关啊,干什么用的
      

  3.   

    HibernateSessionFactory应该不是通过jndi的,而是hibernate自己确定的