5.2. JDBC 接続プールの設定
Apache Tomcat は JDBC データソースのデフォルトの接続プールメカニズムを提供します。JBoss Web Server デプロイメントの /META-INF/context.xml ファイルの設定を更新することで、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>