問題
1. コネクションプール内のアクティビティを把握するのに役立つ、コネクションプール周りのロギングを増やすにはどうすればよいですか?
2. c3p0の代わりに使用できる他のコンテナ管理型データベース接続プールは何ですか?
環境
- Liferay DXP 6.2
解決策
1. コネクションプール内のアクティビティを把握するために、コネクションプール周りのロギングを増やすにはどうすればよいですか?
回答:以下の手順で接続プールのログを増やすことができます。
a) Control > Configuration > Server Administration
b) Server Administrationの下にあるLog Levelに移動します。
c) "com.liferay.portal.dao.jdbc.pool" を検索します。 ビジネス要件に応じて、接続プールのログレベルを上げてください。
2. c3p0の代わりに使用できる他のコンテナ管理型データベース接続プールは何ですか?
回答:c3po、dbcp、tomcatが使用できますが、デフォルトではc3p0が使用されます。 portal-ext.propertiesの以下のプロパティを使用することで、他のプロバイダを使用することができます。
# Liferay can use C3PO, DBCP, or Tomcat for connection pooling. See
# com.liferay.portal.dao.jdbc.util.DataSourceFactoryBean for the actual
# implementation. It is important to understand the strengths and weaknesses
# of each provider so that you can choose the best one that fits your
# deployment scenario. Provider specific properties can also be passed along
# directly to the provider. For example, the property
# "jdbc.default.acquireIncrement" is read by C3PO, and the property
# "jdbc.default.maxActive" is read by DBCP.
#
# The default provider is C3PO.
#
jdbc.default.liferay.pool.provider=c3po
#jdbc.default.liferay.pool.provider=dbcp
#jdbc.default.liferay.pool.provider=tomcat