日期:2014-05-18  浏览次数:20825 次

hibernate\c3p0\hibernate.cfg.xml配置问题。
hibernate的c3p0连接池如何配置?
不知道为什么我的一加上连接池就联不上数据库


-----------------------------
.
.
.
<property   name= "hibernate.cglib.use_reflection_optimizer "> true </property>
                <property   name= "hibernate.connection.driver_class "> oracle.jdbc.driver.OracleDriver </property>
                <property   name= "hibernate.connection.username "> RVIMS </property>
                <property   name= "hibernate.connection.password "> RVIMS </property>
                <property   name= "hibernate.connection.url "> jdbc:oracle:thin:@localhost:1521:myweb </property>
                <property   name= "hibernate.dialect "> org.hibernate.dialect.OracleDialect </property>
<property   name= "hibernate.connection.provider_class "> org.hibernate.connection.C3P0ConnectionProvider </property>
<property   name= "hibernate.c3p0.max_size "> 15 </property>
<property   name= "hibernate.c3p0.min_size "> 1 </property>
<property   name= "hibernate.c3p0.timeout "> 1800 </property>
<property   name= "hibernate.c3p0.max_statements "> 1000 </property>
<property   name= "hibernate.c3p0.idle_test_period "> 30000 </property>
<property   name= "hibernate.c3p0.acquire_increment "> 1 </property>
<property   name= "hibernate.c3p0.validate "> false </property>
  <property   name= "show_sql "> true </property>
                <mapping   resource= "com/htits/rvims/pojo/CodeUnit.hbm.xml "   />
                <mapping   resource= "com/htits/rvims/pojo/SysLog.hbm.xml "   />
                <mapping   resource= "com/htits/rvims/pojo/CodeGate.hbm.xml "   />
.
.
.

------解决方案--------------------
对应的jar放进去了吗?
------解决方案--------------------
有没有错误信息?
打出来看看。
------解决方案--------------------
这么多分啊
真是奢侈
不过你写的不明不白,的确很难拿到这分啊
------解决方案--------------------
mark~!
up~!