你是不是在hibernate.cfg.xml中   直接配置 数据源???

解决方案 »

  1.   

    lvyequan (菜蟲蟲) :
       我现在出现了 和你一样的问题添加session.connection().setAutoCommit(true) ,
    如果多次操作就不好使了! 你解决了吗????
      

  2.   

    ResultSet rs = IOTool.GetSession().connection().createStatement().executeQuery(SQL);
    俺是这个会出现问题…
    信息: Not binding factory to JNDI, no JNDI name configured
    (SQLException)
    No operations allowed after statement closed.
    java.sql.SQLException: No operations allowed after statement closed.
           at com.mysql.jdbc.Statement.checkClosed(Statement.java:270)
      

  3.   

    具体原因不清楚...搜索了一下,除了Spring还有一个方法:在dataSource URL后面加上 SelectMethod=cursor在低端机器上测试取2000条数据,后者慢了10秒...