1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

IBM Integration & WebSphereAdvent Calendar 2024

Day 17

Liberty REST APIでのJMS接続の検証手順

Posted at

下記の環境で検証します。
[Liberty で JMSを試す #mq - Qiita]
( https://qiita.com/keniooi/items/f72a7a6d6d2e7c2871dd )
server.xmlは以下です。
https://github.com/pdprof/jms/blob/d629b98a460b4f2eebaa9da10436242a50226f61/jms-docker/config/server.xml.jms-mq#L21

1.下記ページに記載の設定をします(DB接続のテストの記事です。JMS接続のテストも同様の設定になります。)
[Testing database connections in Open Liberty apps with REST APIs - OpenLiberty.io]
( https://openliberty.io/blog/2019/09/13/testing-database-connections-REST-APIs.html )

元のserver.xmlに以下を追加します。
$ vi /opt/ibm/wlp/usr/servers/defaultServer/server.xml

  <featureManager>
    <feature>appSecurity-2.0</feature>
    <feature>restConnector-2.0</feature>
  </featureManager>

  <keyStore id="defaultKeyStore" password="Liberty"/>
  <quickStartSecurity userName="blogAdmin" userPassword="blogAdminPassword"/>

2.JMSのQueueConnectionFactory。
認証別名を指定してアクセスします。
https://hostname:9443/ibm/api/validation/jmsQueueConnectionFactory?auth=container&authAlias=appAuth

結果:

[
   {
      "uid": "jmsQueueConnectionFactory[default-0]",
      "jndiName": "QCF",
      "successful": true,
      "info": {
         "jmsProviderName": "IBM MQ JMS Provider",
         "jmsProviderVersion": "8.0.0.0",
         "jmsProviderSpecVersion": "2.0"
      }
   }
]

3.JMSのConnectionFactory
検証のためserver.xmlにConnectionFactoryを構成します。QCFと同様に構成して、認証別名を指定してアクセスします。
https://hostname:9443/ibm/api/validation/jmsConnectionFactory?auth=container&authAlias=appAuth

[
   {
      "uid": "jmsConnectionFactory[default-0]",
      "jndiName": "CF",
      "successful": true,
      "info": {
         "jmsProviderName": "IBM MQ JMS Provider",
         "jmsProviderVersion": "8.0.0.0",
         "jmsProviderSpecVersion": "2.0"
      }
   }
]
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?