2012-05-04 5 views
1

接続プーリング用にc3Po設定を構成します。以下のプロパティは何を意味しますか?春/休止状態のアプリケーションでC3p0プロパティの効果がありますか?

preferredTestQuery : query to test the connection 
testConnectionOnCheckin : above query is executed when connection is returned back to pool 
testConnectionOnCheckout : above query is executed when connection is taken from pool 
idleConnectionTestPeriod : 

は間違いありませんか?

ありがとうございます!

答えて

1

これらの設定は、C3P0が接続のタイムアウトをテストする方法を制御します。私は通常 "SELECT 1;"を使用します。たとえば、MySQL接続をテストするためのものです。接続をテストするには他にもいくつかの選択肢がありますので、ここで入手可能なドキュメントを読むことをお勧めします:http://www.mchange.com/projects/c3p0/index.html#configuring_connection_testing