+ -
当前位置:首页 → 问答吧 → 使用c3p0就不能获取集合了

使用c3p0就不能获取集合了

时间:2011-12-23

来源:互联网

//hibernate的配置如下
<property name="hibernate.connection.driver_class">com.microsoft.jdbc.sqlserver.SQLServerDriver</property>
  <property name="hibernate.connection.url">jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=skynet</property>
  <property name="hibernate.connection.username">sa</property>
  <property name="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</property>
  <property name="hibernate.c3p0.max_size">100</property>  
<property name="hibernate.c3p0.min_size">5</property>  
<property name="hibernate.c3p0.timeout">3000</property>  
<property name="hibernate.c3p0.max_statements">100</property>  
<property name="hibernate.c3p0.idle_test_period">3000</property>  
<property name="hibernate.c3p0.acquire_increment">2</property>  
<property name="hibernate.c3p0.maxIdleTime">1800</property >  
<property name="hibernate.c3p0.validate">true</property> 
  <property name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
  <!-- <property name="hibernate.show_sql">true</property> -->
  <mapping resource="com/xml/repair.hbm.xml"/>

可以增加··可以获取对象,就是不能获取集合,没加c3p0之前,一切都好

作者: love521_jiao   发布时间: 2011-12-23

c3p0-0.9.1.2.jar只导了着一个包,是还需要什么包,还是哪里有问题··

作者: love521_jiao   发布时间: 2011-12-23

最新消息,有的集合能获取,有的不能获取,应该不是代码的错,去了c3p0就都能获取了,是因为数据大的原因?

作者: love521_jiao   发布时间: 2011-12-23

也能执行sql语句,把语句用在sql上也能查到值,就是query.list的时候获取不到值~~

作者: love521_jiao   发布时间: 2011-12-23