管理コンソールから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

6 minutes
Uncategorized

Conf42 IoT 2024: At the Edge of Robotic Applications

At the latest Conf42 Internet of Things (IoT) 2024 conference, our Payarans deliver a keynote, titled “At the Edge […]

5 minutes
Uncategorized

10 Reasons Why Java is the Future of Enterprise App Development in 2025

Java has been a core element of enterprise application development for decades, and its relevance will continue to grow […]

5 minutes
Uncategorized

Keen To Slash Software Development Costs? Here’s What To Look For In A Middleware Solution

For technology companies, cost effectiveness in software and application development isn’t just about saving money. It is about delivering […]