管理コンソールからJDBC接続プールを作成する

Uncategorized

管理コンソールからJDBC接続プールを作成する手順について説明します。この例では、H2インメモリ・データベースを使用して “test” という名前の接続プールを作成します。

 

 

まず、左ペインのResources → JDBC → JDBC Connection Poolsをたどって、New JDBC Connection Pool画面を開きます。次に、 “New” をクリックして、以下の項目を入力し、 “Next” をクリックします。

  • Pool Name – test-pool
  • Resource Type – javax.sql.XADataSource
  • Driver Vendor – H2

 

Screen Shot 2019-06-25 at 12.16.59 PM

次の画面で、画面下部のプロパティ一覧に以下のプロパティを追加します。

url = jdbc:h2:mem:test

その他のプロパティについてはデフォルトのままとします。

 

Screen Shot 2019-06-25 at 12.18.07 PM

(注: 表示されるプロパティはDataSource実装から動的に検出されます。今回はH2を使用するため、 org.h2.jdbcx.JdbcDataSource から取得されます。)

 

すべてが終わったら “Finish” ボタンをクリックします。

 

接続をテストする

  1. 接続プール名 (test-pool) をクリックします。
  2. 画面上部の “Ping” ボタンをクリックします。

成功すると “Ping Succeeded” というメッセージが表示されます。

 

Screen Shot 2019-06-25 at 12.18.43 PM

 

 

Comments (0)

Post a comment

Your email address will not be published. Required fields are marked *

Payara needs the contact information you provide to us to contact you about our products and services. You may unsubscribe from these communications at any time. For information on how to unsubscribe, as well as our privacy practices and commitment to protecting your privacy, please review our Legal & Privacy Policy.

Related Posts

4 minutes
Uncategorized

Leading the Way: Payara Platform Community 7 Beta Now Fully Jakarta EE 11 Certified

We’re excited to announce that Payara Platform Community 7 Beta application server is now fully certified as Jakarta EE 11 […]

What Is a Java Application Server? A Short Guide 6 minutes
Jakarta EE

What Is a Java Application Server? A Short Guide

Enterprise Java applications power global commerce, healthcare, government and countless other industries. These systems must be scalable, secure and […]

10 minutes
Uncategorized

Java’s 30th Anniversary: A Celebration of Legacy, Evolution and Community

May 2025 marks a monumental milestone in software development: Java turns 30. The impact of this language on the […]