锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产·精品毛片,国产黄在线播放,久久激情婷婷http://www.aygfsteel.com/chencao/archive/2007/08/08/135131.html闄堟搷闄堟搷Wed, 08 Aug 2007 00:27:00 GMThttp://www.aygfsteel.com/chencao/archive/2007/08/08/135131.htmlhttp://www.aygfsteel.com/chencao/comments/135131.htmlhttp://www.aygfsteel.com/chencao/archive/2007/08/08/135131.html#Feedback0http://www.aygfsteel.com/chencao/comments/commentRss/135131.htmlhttp://www.aygfsteel.com/chencao/services/trackbacks/135131.htmljava 浠g爜
  1. org.hibernate.exception.JDBCConnectionException: could not execute query   
  2.     at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74)   
  3.     at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)   
  4.     .......   
  5. Caused by: com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: No operations allowed after connection closed.Connection was implicitly closed due to underlying exception/error:   
  6.   
  7.   
  8. ** BEGIN NESTED EXCEPTION **    
  9.   
  10. com.mysql.jdbc.CommunicationsException   
  11. MESSAGE: Communications link failure due to underlying exception:    
  12.   
  13. ** BEGIN NESTED EXCEPTION **    
  14.   
  15. java.net.SocketException   
  16. MESSAGE: Broken pipe   
  17.   
  18. STACKTRACE:   
  19.   
  20. java.net.SocketException: Broken pipe   
  21.     at java.net.SocketOutputStream.socketWrite0(Native Method)   
  22.     ......   
  23. ** END NESTED EXCEPTION **   

鏌ョ湅浜哅ysql鐨勬枃妗o紝浠ュ強Connector/J鐨勬枃妗d互鍙婂湪綰胯鏄庡彂鐜幫紝鍑虹幇榪欑寮傚父鐨勫師鍥犳槸錛?/p>

   Mysql鏈嶅姟鍣ㄩ粯璁ょ殑“wait_timeout”鏄?灝忔椂錛屼篃灝辨槸璇翠竴涓猚onnection絀洪棽瓚呰繃8涓皬鏃訛紝Mysql灝嗚嚜鍔ㄦ柇寮璇onnection銆傝繖灝辨槸闂鐨勬墍鍦紝鍦–3P0 pools涓殑connections濡傛灉絀洪棽瓚呰繃8灝忔椂錛孧ysql灝嗗叾鏂紑錛岃孋3P0騫朵笉鐭ラ亾璇onnection宸茬粡澶辨晥錛屽鏋滆繖鏃舵湁Client璇鋒眰connection錛孋3P0灝嗚澶辨晥鐨凜onnection鎻愪緵緇機lient錛屽皢浼氶犳垚涓婇潰鐨勫紓甯搞?/p>

瑙e喅鐨勬柟娉曟湁3縐嶏細

  1. 澧炲姞wait_timeout鐨勬椂闂淬?
  2. 鍑忓皯Connection pools涓璫onnection鐨刲ifetime銆?
  3. 嫻嬭瘯Connection pools涓璫onnection鐨勬湁鏁堟с?

褰撶劧鏈濂界殑鍔炴硶鏄悓鏃剁患鍚堜嬌鐢ㄤ笂榪?縐嶆柟娉曪紝涓嬮潰灝盌BCP鍜孋3P0鍒嗗埆鍋氫竴璇存槑錛屽亣璁緒ait_timeout涓洪粯璁ょ殑8灝忔椂

DBCP澧炲姞浠ヤ笅閰嶇疆淇℃伅:

  1. //set to 'SELECT 1'   
  2. validationQuery = "SELECT 1"  
  3. //set to 'true'   
  4. testWhileIdle = "true"    
  5. //some positive integer   
  6. timeBetweenEvictionRunsMillis = 3600000  
  7. //set to something smaller than 'wait_timeout'   
  8. minEvictableIdleTimeMillis = 18000000  
  9. //if you don't mind a hit for every getConnection(), set to "true"   
  10. testOnBorrow = "true"  

C3P0澧炲姞浠ヤ笅閰嶇疆淇℃伅:

  1. //set to 'SELECT 1'      
  2. preferredTestQuery = 'SELECT 1'    
  3.  //set to something much less than wait_timeout, prevents connections from going stale   
  4. idleConnectionTestPeriod = 18000     
  5. //set to something slightly less than wait_timeout, preventing 'stale' connections from being handed out   
  6. maxIdleTime = 25000    
  7. //if you can take the performance 'hit', set to "true"   
  8. testConnectionOnCheckout = true    

鏇村鐨勯厤緗俊鎭ぇ瀹跺彲浠ユ煡鐪婥3P0鏂囨。錛孋onnector/J鏂囨。錛屼互鍙奃BCP鐨勬枃妗c?/p>

闄堟搷 2007-08-08 08:27 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 巴马| 化州市| 华坪县| 墨脱县| 基隆市| 揭西县| 富锦市| 万载县| 黔东| 永安市| 洛隆县| 沙田区| 锦州市| 望城县| 疏勒县| 杭锦旗| 专栏| 平凉市| 平利县| 塔城市| 绵阳市| 罗江县| 长垣县| 资兴市| 东海县| 丰原市| 富宁县| 阜阳市| 巴马| 上栗县| 通渭县| 磐石市| 永仁县| 黄骅市| 基隆市| 宝清县| 亳州市| 庆云县| 南充市| 九寨沟县| 岳普湖县|