4.2. JDBC 接続プールの設定
Tomcat は JDBC データソースのデフォルトの接続プールメカニズムを提供します。
手順
-
デプロイメントの
/META-INF/context.xml
ファイルを開いて編集します。 以下の例のように、アプリケーションで使用できる JDBC 接続プールを変更します。
<Context> <Resource name="jdbc/DsWebAppDB" auth="Container" type="javax.sql.DataSource" username="sa" password="" driverClassName="org.h2.Driver" url="jdbc:h2:mem:target/test/db/h2/hibernate" maxActive="8" maxIdle="4"/> </Context>