Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release-6' into v6-master
Browse files Browse the repository at this point in the history
  • Loading branch information
tisuchida committed Dec 22, 2023
2 parents e1338b0 + ec045be commit 1741cd7
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 54 deletions.
1 change: 1 addition & 0 deletions .mvn/jvm.config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--add-opens java.base/java.lang=ALL-UNNAMED
87 changes: 46 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ MOM同期応答メッセージングの送信側のExampleと組み合わせて

### 1.動作環境
実行環境に以下のソフトウェアがインストールされている事を前提とします。
* Java Version : 8
* Maven 3.0.5以降
* Java Version : 17
* Maven 3.9.0以降

補足:
MOMとRDBMSはExampleに組み込まれたものを使用します。
Expand Down Expand Up @@ -42,6 +42,8 @@ Gitを使用しない場合、最新のタグからzipをダウンロードし
$cd ../nablarch-example-mom-sync-receive
$mvn clean generate-resources

※gspプラグインをJava 17で実行するためにはJVMオプションの指定が必要ですが、そのオプションは`.mvn/jvm.config`で指定しています。

#### 3.3. アプリケーションのビルド
次に、nablarch-example-mom-sync-receiveをビルドします。以下のコマンドを実行してください。

Expand All @@ -67,57 +69,60 @@ Gitを使用しない場合、最新のタグからzipをダウンロードし

起動に成功すると以下のようなログがコンソールに出力され、MOM同期応答メッセージングの送信側からのメッセージの受信待ちの状態になります。

2016-06-07 16:57:51.415 -INFO- ROO [null] load environment config file. file = classpath:env.config
INFO | Using Persistence Adapter: MemoryPersistenceAdapter
INFO | Apache ActiveMQ 5.13.0 (localhost, ID:S1306C00419-T1-42773-1465286271571-0:1) is starting
INFO | Listening for connections at: tcp://127.0.0.1:61616
INFO | Connector tcp://127.0.0.1:61616 started
INFO | Apache ActiveMQ 5.13.0 (localhost, ID:S1306C00419-T1-42773-1465286271571-0:1) started
INFO | For help or more information please see: http://activemq.apache.org
WARN | Memory Usage for the Broker (1024 mb) is more than the maximum available for the JVM: 247 mb - resetting to 70% of maximum available: 173 mb
WARN | Temporary Store limit is 51200 mb (current store usage is 0 mb). The data directory: C:\Users\TIS303995\git\nablarch-example\nablarch-example-mom-sync-receive only has 7035 mb of usable space - resetting to maximum available disk space: 7035 mb
2016-06-07 16:57:52.527 -INFO- ROO [null] @@@@ APPLICATION SETTINGS @@@@
system settings = {
}
business date = [20140123]
```log
2023-02-15 13:28:17.362 -INFO- nablarch.fw.launcher.Main [null] boot_proc = [] proc_sys = [mom-sync-receive] req_id
= [null] usr_id = [null] @@@@ APPLICATION SETTINGS @@@@
system settings = {
}
business date = [20140123]
```

MOM同期応答メッセージングの送信側を起動すると、MOM同期応答メッセージングの受信側のコンソールに以下のように、メッセージを受信したことと、メッセージを返信したことを示すログが出力されます。
(コンソール中の文字が化けるのは仕様です。)

2016-06-07 17:18:34.123 -INFO- ROO [201606071717526770006] @@@@ RECEIVED MESSAGE @@@@
thread_name = [pool-1-thread-1]
message_id = [ID:S1306C00419-T1-58114-1465287513655-1:1:1:1:1]
destination = [TEST.REQUEST]
correlation_id = [null]
reply_to = [TEST.RESPONSE]
message_body = [ProjectInsertMessage0
????????,??§?? ̄????????????
development
```log
2023-02-15 13:30:09.178 -INFO- MESSAGING [202302151328173640001] boot_proc = [] proc_sys = [mom-sync-receive] req_id
= [RECEIVEAPP] usr_id = [batch_user] @@@@ RECEIVED MESSAGE @@@@
thread_name = [pool-1-thread-1]
message_id = [ID:6e02d455-ace9-11ed-bf95-9c7befbbf589]
destination = [TEST.REQUEST]
correlation_id = [null]
reply_to = [TEST.RESPONSE]
message_body = [ProjectInsertMessage0
?v???W?F?N?g?O?O?P
development
s
20100918201504091 ????
????
100 ???l??
s
20100918201504091
??´??¨
??????
100 ???????¬?
10000 1000 2000 3000
]
INFO | HV000001: Hibernate Validator 5.2.4.Final
2016-06-07 17:18:35.545 -INFO- ROO [201606071718343110007] @@@@ SENT MESSAGE @@@@
thread_name = [pool-1-thread-1]
message_id = [ID:S1306C00419-T1-42773-1465286271571-4:1:1:1:1]
destination = [TEST.RESPONSE]
correlation_id = [ID:S1306C00419-T1-58114-1465287513655-1:1:1:1:1]
reply_to = [null]
time_to_live = [0]
message_body = [ProjectInsertMessage0success
10000
1000 2000 3000
]
(中略)
2023-02-15 13:30:09.602 -INFO- MESSAGING [202302151330092260002] boot_proc = [] proc_sys = [mom-sync-receive] req_id
= [ProjectInsertMessage] usr_id = [batch_user] @@@@ SENT MESSAGE @@@@
thread_name = [pool-1-thread-1]
message_id = [ID:6e481b72-ace9-11ed-8a28-9c7befbbf589]
destination = [TEST.RESPONSE]
correlation_id = [ID:6e02d455-ace9-11ed-bf95-9c7befbbf589]
reply_to = [null]
time_to_live = [0]
message_body = [ProjectInsertMessage0
success
]
```

]

自動的に終了はしないため、ctrl + c等で終了させてください。

Expand Down
45 changes: 32 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@

<groupId>com.nablarch.example</groupId>
<artifactId>nablarch-example-mom-sync-receive</artifactId>
<version>5u23</version>
<version>6</version>
<packaging>jar</packaging>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<db.adminUser>SAMPLE</db.adminUser>
<db.user>SAMPLE</db.user>

<activemq.version>2.28.0</activemq.version>
</properties>

<profiles>
Expand All @@ -35,7 +37,7 @@
<dependency>
<groupId>com.nablarch.profile</groupId>
<artifactId>nablarch-bom</artifactId>
<version>5u23</version>
<version>6</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -46,6 +48,13 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-bom</artifactId>
<version>10.0.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

Expand All @@ -54,7 +63,7 @@
<dependency>
<groupId>com.nablarch.example</groupId>
<artifactId>nablarch-example-mom-testing-common</artifactId>
<version>5u23</version>
<version>6</version>
<scope>runtime</scope>
</dependency>

Expand Down Expand Up @@ -103,15 +112,15 @@

<!-- BeanValidation用 -->
<dependency>
<groupId>org.hibernate</groupId>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>5.3.6.Final</version>
<version>8.0.0.Final</version>
</dependency>

<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>el-impl</artifactId>
<version>2.2</version>
<groupId>org.glassfish.expressly</groupId>
<artifactId>expressly</artifactId>
<version>5.0.0</version>
</dependency>

<!-- MOMメッセージング用に追加したライブラリここから============================= -->
Expand All @@ -133,11 +142,21 @@
<!-- WebSphere MQ用ライブラリ -->
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-all</artifactId>
<version>5.13.0</version>
<artifactId>artemis-server</artifactId>
<version>${activemq.version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-jakarta-server</artifactId>
<version>${activemq.version}</version>
</dependency>
<!-- MOMメッセージング用に追加したライブラリここまで============================= -->

<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</dependency>

<dependency>
<groupId>com.nablarch.framework</groupId>
<artifactId>nablarch-fw-messaging-http</artifactId>
Expand All @@ -162,7 +181,7 @@
<plugin>
<groupId>jp.co.tis.gsp</groupId>
<artifactId>gsp-dba-maven-plugin</artifactId>
<version>4.6.0</version>
<version>5.0.0</version>
<configuration>
<adminUser>${db.adminUser}</adminUser>
<adminPassword>${db.adminUser}</adminPassword>
Expand Down

0 comments on commit 1741cd7

Please sign in to comment.