没有用过
不过你看看参考文档吧我们用Spring框架提供的DBCP直接连接

解决方案 »

  1.   

    我在hibernate.properties文件中这样写的:hibernate.connection.datasource myjndi
    hibernate.dialect hibernate.dialect net.sf.hibernate.dialect.Oracle9Dialect
    hibernate.connection.provider_class net.sf.hibernate.connection.DatasourceConnectionProvider
    hibernate.jndi.class weblogic.jndi.WLInitialContextFactory                      
    hibernate.jndi.url t3://localhost:7001/其中myjndi是我在weblogic上配置的jndi的名字.我已经把weblogic.jar引入了.但是运行后产生下面的错误:
    net.sf.hibernate.HibernateException: Could not find datasource
    Caused by: java.lang.ClassNotFoundException: weblogic/jndi/WLInitialContextFactory