Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
LiferayをベースにしたWebアプリケーションを実装しています。データベースはJPA2.0とEntityManagerによって処理されます。
システムが長期間(たとえば8時間)アイドル状態になると、永続性コンテキストのセッションが失われ、データベースにアクセスできなくなります。この問題を解決できる構成はありますか?
たぶんあなたはこのプロパティを設定することができます:
<property name="minIdle" value="1"/>
データソースBeanを宣言するとき
更新:hibernateのpersistence.xmlを使用する場合は、次のプロパティを設定する必要があります。hibernate.c3p0.min_size:C3P0が常に準備できるJDBC接続の最小数
<property name="hibernate.c3p0.min_size" value="1"/>