服务器应该都能配置自身的内存吧,你试着配置一下tomcat可以配置容器内存的,我觉得resin应该也能,但是我没有用过resin只能帮你这点忙了!呵呵
加油啊

解决方案 »

  1.   

    OnlyFor_love(『清水出芙蓉,天然去雕饰』) ,谢谢你
    问题可能找到了,这几个平台都只是有一个servlet,我在初始化的时候把数据库连上。当程序中用的时候会判断连接是否可以用,若不可用便会自己建立一个连接。
    我现在想resin服务器和数据库服务器的网络连接肯定有问题,肯定是断掉之后一直去连数据库结果导致页面显示不了。
    不过现在只是猜测,不知道是不是这样。若是这样的话那我的程序也没办法改了 -_-烦啊,刚才又给瘫了。
      

  2.   

    俺现在把连库的代码贴出来,各位给看一下,是不是俺写的不对啊。/**
     * 得到数据库连接,程序中进行数据库操作的时候会通过这个方法取到连接
     * 
     * @return 当前Context对象中的数据库连接
     */
    public Connection getDBConnection() {
    try {
    if (connection == null || connection.isClosed()) {
    connection = DBMgr.getConnectionWithoutPool();
    connection.setAutoCommit(false);
    log.debug("数据库连接已断开,重新取到一个数据库连接");
    }
    } catch (SQLException e) {
    log.error("取不到数据库连接", e);
    }
    return connection;
    }
    DBMgr中的getConnectionWithoutPool方法,俺是这样写的
    /**
     * 这个方法主要的目的是在从metadata中得到数据库表数据时 有的数据库会出现访问异常,所以提供直接连接数据库的方法
     * 用于的到数据库表的meta信息。
     * 
     * @return 数据库连接
     */
    public static Connection getConnectionWithoutPool() {
        if (jdbcUrl == null) {
            throw new IllegalStateException(
                    "Configuration property \"db.url\" not found");
        }
         if (jdbcUserName == null) {
            throw new IllegalStateException(
                    "Configuration property \"jdbcUserName\" not found");
        }
        if (jdbcPassword == null) {
            throw new IllegalStateException(
                    "Configuration property \"jdbcPassword\" not found");
        }
         try {
            //log.debug("开始直接连接数据库!没有创建数据库连接池!");
            // Register basic JDBC driver
            Class driverClass = Class.forName(jdbcDriver);
            Driver basicDriver = (Driver) driverClass.newInstance();
             return DriverManager.getConnection(jdbcUrl, jdbcUserName,
                 jdbcPassword);
         } catch (Exception e) {
            log.warn("在没有创建数据库连接池的情况下,连接数据库发生异常", e);
            return null;
         }
    }
      

  3.   

    程序没有毛病啊,不知道你在具体操作数据库的时候,得到的connection连接在操作完后之后有没有关闭连接呢?
      

  4.   

    问题找到了,谢谢OnlyFor_love(『清水出芙蓉,天然去雕饰』) 
    是resin记了好多日志有11G大把磁盘空间都占满了,我狂晕。