如果模拟这种情况?eg.   
     DriverManager.setLoginTimeout(1);//set timeout我就是想试验下这种情况  ^_^

解决方案 »

  1.   

    跟 Postgresql 貌似没有关系吧!?
      

  2.   

    mysql> show variables like "%timeout%";
    +----------------------------+-------+
    | Variable_name              | Value |
    +----------------------------+-------+
    | connect_timeout            | 10    |
    | delayed_insert_timeout     | 300   |
    | innodb_lock_wait_timeout   | 50    |
    | innodb_rollback_on_timeout | OFF   |
    | interactive_timeout        | 28800 |
    | net_read_timeout           | 30    |
    | net_write_timeout          | 60    |
    | slave_net_timeout          | 3600  |
    | table_lock_wait_timeout    | 50    |
    | wait_timeout               | 28800 |
    +----------------------------+-------+
    10 rows in set (0.00 sec)
    意思是链接数据库 不做任何操作 10分钟后超时?