-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Have the code to explain XA and error store
- Loading branch information
Martijn Dirkse
committed
Sep 19, 2024
1 parent
cd3148f
commit 5837822
Showing
26 changed files
with
380 additions
and
0 deletions.
There are no files selected for viewing
Binary file modified
BIN
+0 Bytes
(100%)
docs/source/downloads/advancedDevelopmentIntegrationPatternsMessageId.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
docs/source/downloads/configurations/NewHorizonsDatabase.zip
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
docs/source/downloads/configurations/NewHorizonsOnlyTableBooking.zip
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
docs/source/downloads/configurations/NewHorizonsValidate.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
57 changes: 57 additions & 0 deletions
57
docs/source/snippets/Frank2Transactions/v510/async-config.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
```xml{5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19} | ||
<Configuration | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="../FrankConfig.xsd" | ||
> | ||
<Adapter name="writeDbAsync"> | ||
<Receiver checkForDuplicates="true" processResultCacheSize="0" transactionAttribute="RequiresNew"> | ||
<ApiListener uriPattern="/write" method="POST" /> | ||
<JdbcMessageLog slotId="write-db-req"/> | ||
</Receiver> | ||
<Pipeline> | ||
<SenderPipe name="enqueue"> | ||
<JmsSender name="enqueue" destinationName="myQueue" messageClass="TEXT" queueConnectionFactoryName="jms/qcf-artemis"></JmsSender> | ||
</SenderPipe> | ||
</Pipeline> | ||
</Adapter> | ||
<Adapter name="writeDb"> | ||
<Receiver transactionAttribute="RequiresNew" maxRetries="5"> | ||
<JmsListener name="dequeue" destinationName="myQueue" messageClass="TEXT" queueConnectionFactoryName="jms/qcf-artemis" /> | ||
<JdbcErrorStorage slotId="write-db"/> | ||
</Receiver> | ||
<Pipeline> | ||
<SenderPipe name="writeTableMessage"> | ||
<IbisLocalSender name="writeTableMessage" javaListener="writeTableMessage" /> | ||
</SenderPipe> | ||
<EchoPipe name="originalMessage" getInputFromSessionKey="originalMessage" /> | ||
<SenderPipe name="writeTableOtherMessage"> | ||
<IbisLocalSender name="writeTableOtherMessage" javaListener="writeTableOtherMessage" /> | ||
</SenderPipe> | ||
</Pipeline> | ||
</Adapter> | ||
<Adapter name="writeTableMessage"> | ||
<Receiver transactionAttribute="Mandatory"> | ||
<JavaListener name="writeTableMessage" serviceName="writeTableMessage" /> | ||
</Receiver> | ||
<Pipeline> | ||
<SenderPipe name="writeTableMessage"> | ||
<FixedQuerySender query="INSERT INTO "message"(message) VALUES(?)"> | ||
<Param name="message" type="string" defaultValueMethods="input" /> | ||
</FixedQuerySender> | ||
</SenderPipe> | ||
</Pipeline> | ||
</Adapter> | ||
<Adapter name="writeTableOtherMessage"> | ||
<Receiver transactionAttribute="Mandatory"> | ||
<JavaListener name="writeTableOtherMessage" serviceName="writeTableOtherMessage" /> | ||
</Receiver> | ||
<Pipeline> | ||
<SenderPipe name="writeTableOtherMessage"> | ||
<FixedQuerySender query="INSERT INTO "otherMessage"(message) VALUES(?)"> | ||
<Param name="message" type="string" defaultValueMethods="input" /> | ||
</FixedQuerySender> | ||
</SenderPipe> | ||
</Pipeline> | ||
</Adapter> | ||
</Configuration> | ||
``` |
58 changes: 58 additions & 0 deletions
58
docs/source/snippets/Frank2Transactions/v510/async-config.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
.. code-block:: xml | ||
:emphasize-lines: 5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 | ||
|
||
<Configuration | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="../FrankConfig.xsd" | ||
> | ||
<Adapter name="writeDbAsync"> | ||
<Receiver checkForDuplicates="true" processResultCacheSize="0" transactionAttribute="RequiresNew"> | ||
<ApiListener uriPattern="/write" method="POST" /> | ||
<JdbcMessageLog slotId="write-db-req"/> | ||
</Receiver> | ||
<Pipeline> | ||
<SenderPipe name="enqueue"> | ||
<JmsSender name="enqueue" destinationName="myQueue" messageClass="TEXT" queueConnectionFactoryName="jms/qcf-artemis"></JmsSender> | ||
</SenderPipe> | ||
</Pipeline> | ||
</Adapter> | ||
<Adapter name="writeDb"> | ||
<Receiver transactionAttribute="RequiresNew" maxRetries="5"> | ||
<JmsListener name="dequeue" destinationName="myQueue" messageClass="TEXT" queueConnectionFactoryName="jms/qcf-artemis" /> | ||
<JdbcErrorStorage slotId="write-db"/> | ||
</Receiver> | ||
<Pipeline> | ||
<SenderPipe name="writeTableMessage"> | ||
<IbisLocalSender name="writeTableMessage" javaListener="writeTableMessage" /> | ||
</SenderPipe> | ||
<EchoPipe name="originalMessage" getInputFromSessionKey="originalMessage" /> | ||
<SenderPipe name="writeTableOtherMessage"> | ||
<IbisLocalSender name="writeTableOtherMessage" javaListener="writeTableOtherMessage" /> | ||
</SenderPipe> | ||
</Pipeline> | ||
</Adapter> | ||
<Adapter name="writeTableMessage"> | ||
<Receiver transactionAttribute="Mandatory"> | ||
<JavaListener name="writeTableMessage" serviceName="writeTableMessage" /> | ||
</Receiver> | ||
<Pipeline> | ||
<SenderPipe name="writeTableMessage"> | ||
<FixedQuerySender query="INSERT INTO "message"(message) VALUES(?)"> | ||
<Param name="message" type="string" defaultValueMethods="input" /> | ||
</FixedQuerySender> | ||
</SenderPipe> | ||
</Pipeline> | ||
</Adapter> | ||
<Adapter name="writeTableOtherMessage"> | ||
<Receiver transactionAttribute="Mandatory"> | ||
<JavaListener name="writeTableOtherMessage" serviceName="writeTableOtherMessage" /> | ||
</Receiver> | ||
<Pipeline> | ||
<SenderPipe name="writeTableOtherMessage"> | ||
<FixedQuerySender query="INSERT INTO "otherMessage"(message) VALUES(?)"> | ||
<Param name="message" type="string" defaultValueMethods="input" /> | ||
</FixedQuerySender> | ||
</SenderPipe> | ||
</Pipeline> | ||
</Adapter> | ||
</Configuration> |
24 changes: 24 additions & 0 deletions
24
docs/source/snippets/Frank2Transactions/v510/docker-compose.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
```none{6, 7, 8, 9, 10, 18, 20, 21, 22} | ||
services: | ||
db: | ||
image: private.docker.nexus.frankframework.org/ff-test/dbms/postgresql | ||
ports: | ||
- 5432:5432 | ||
jms: | ||
image: private.docker.nexus.frankframework.org/ff-test/mq/artemis | ||
ports: | ||
- 8160:8160 | ||
- 61615:61615 | ||
ff: | ||
image: frankframework/frankframework:8.3.0-SNAPSHOT | ||
ports: | ||
- 8080:8080 | ||
volumes: | ||
- ./src/main/resources:/opt/frank/resources | ||
environment: | ||
jdbc.dbms.default: postgres-xa | ||
jdbc.hostname: db | ||
jms.hostname: jms | ||
transactionmanager.type.default: NARAYANA | ||
jms.createDestination: true | ||
``` |
25 changes: 25 additions & 0 deletions
25
docs/source/snippets/Frank2Transactions/v510/docker-compose.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
.. code-block:: none | ||
:emphasize-lines: 6, 7, 8, 9, 10, 18, 20, 21, 22 | ||
|
||
services: | ||
db: | ||
image: private.docker.nexus.frankframework.org/ff-test/dbms/postgresql | ||
ports: | ||
- 5432:5432 | ||
jms: | ||
image: private.docker.nexus.frankframework.org/ff-test/mq/artemis | ||
ports: | ||
- 8160:8160 | ||
- 61615:61615 | ||
ff: | ||
image: frankframework/frankframework:8.3.0-SNAPSHOT | ||
ports: | ||
- 8080:8080 | ||
volumes: | ||
- ./src/main/resources:/opt/frank/resources | ||
environment: | ||
jdbc.dbms.default: postgres-xa | ||
jdbc.hostname: db | ||
jms.hostname: jms | ||
transactionmanager.type.default: NARAYANA | ||
jms.createDestination: true |
14 changes: 14 additions & 0 deletions
14
docs/source/snippets/Frank2Transactions/v510/reference-queue.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
```none{3, 8, 9, 10, 11, 12} | ||
jdbc: | ||
- name: "frank2transactions" | ||
type: "org.postgresql.xa.PGXADataSource" | ||
url: "jdbc:postgresql://${jdbc.hostname:-localhost}:5432/testiaf" | ||
authalias: "${db.authalias}" | ||
username: "testiaf_user" | ||
password: "testiaf_user00" | ||
jms: | ||
- name: "qcf-artemis" | ||
type: "org.apache.activemq.artemis.jms.client.ActiveMQXAConnectionFactory" | ||
url: "tcp://${jms.hostname:-localhost}:61615" | ||
``` |
15 changes: 15 additions & 0 deletions
15
docs/source/snippets/Frank2Transactions/v510/reference-queue.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.. code-block:: none | ||
:emphasize-lines: 3, 8, 9, 10, 11, 12 | ||
|
||
jdbc: | ||
- name: "frank2transactions" | ||
type: "org.postgresql.xa.PGXADataSource" | ||
url: "jdbc:postgresql://${jdbc.hostname:-localhost}:5432/testiaf" | ||
authalias: "${db.authalias}" | ||
username: "testiaf_user" | ||
password: "testiaf_user00" | ||
|
||
jms: | ||
- name: "qcf-artemis" | ||
type: "org.apache.activemq.artemis.jms.client.ActiveMQXAConnectionFactory" | ||
url: "tcp://${jms.hostname:-localhost}:61615" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
services: | ||
db: | ||
image: private.docker.nexus.frankframework.org/ff-test/dbms/postgresql | ||
ports: | ||
- 5432:5432 | ||
jms: | ||
image: private.docker.nexus.frankframework.org/ff-test/mq/artemis | ||
ports: | ||
- 8160:8160 | ||
- 61615:61615 | ||
ff: | ||
image: frankframework/frankframework:8.3.0-SNAPSHOT | ||
ports: | ||
- 8080:8080 | ||
volumes: | ||
- ./src/main/resources:/opt/frank/resources | ||
environment: | ||
jdbc.dbms.default: postgres-xa | ||
jdbc.hostname: db | ||
jms.hostname: jms | ||
transactionmanager.type.default: NARAYANA | ||
jms.createDestination: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
- predecessor: v500 | ||
- file: | ||
path: docker-compose.yml | ||
change: | ||
- insert: 5 | ||
highlight: true | ||
snippet: docker-compose | ||
- old: 1 | ||
new: 1 | ||
highlight: true | ||
snippet: docker-compose | ||
- insert: 3 | ||
highlight: true | ||
snippet: docker-compose | ||
- file: | ||
path: src/main/resources/Configuration.xml | ||
change: | ||
- old: 1 | ||
new: 1 | ||
highlight: true | ||
snippet: async-config | ||
- old: 1 | ||
new: 12 | ||
highlight: true | ||
snippet: async-config | ||
- file: | ||
path: src/main/resources/resources.yml | ||
change: | ||
- old: 1 | ||
new: 1 | ||
highlight: true | ||
snippet: reference-queue | ||
- insert: 5 | ||
highlight: true | ||
snippet: reference-queue | ||
- snippet: | ||
name: docker-compose | ||
markup: none | ||
context: 50 | ||
- snippet: | ||
name: async-config | ||
markup: xml | ||
context: 50 | ||
- snippet: | ||
name: reference-queue | ||
markup: none | ||
context: 50 |
55 changes: 55 additions & 0 deletions
55
srcSteps/Frank2Transactions/v510/src/main/resources/Configuration.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<Configuration | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="../FrankConfig.xsd" | ||
> | ||
<Adapter name="writeDbAsync"> | ||
<Receiver checkForDuplicates="true" processResultCacheSize="0" transactionAttribute="RequiresNew"> | ||
<ApiListener uriPattern="/write" method="POST" /> | ||
<JdbcMessageLog slotId="write-db-req"/> | ||
</Receiver> | ||
<Pipeline> | ||
<SenderPipe name="enqueue"> | ||
<JmsSender name="enqueue" destinationName="myQueue" messageClass="TEXT" queueConnectionFactoryName="jms/qcf-artemis"></JmsSender> | ||
</SenderPipe> | ||
</Pipeline> | ||
</Adapter> | ||
<Adapter name="writeDb"> | ||
<Receiver transactionAttribute="RequiresNew" maxRetries="5"> | ||
<JmsListener name="dequeue" destinationName="myQueue" messageClass="TEXT" queueConnectionFactoryName="jms/qcf-artemis" /> | ||
<JdbcErrorStorage slotId="write-db"/> | ||
</Receiver> | ||
<Pipeline> | ||
<SenderPipe name="writeTableMessage"> | ||
<IbisLocalSender name="writeTableMessage" javaListener="writeTableMessage" /> | ||
</SenderPipe> | ||
<EchoPipe name="originalMessage" getInputFromSessionKey="originalMessage" /> | ||
<SenderPipe name="writeTableOtherMessage"> | ||
<IbisLocalSender name="writeTableOtherMessage" javaListener="writeTableOtherMessage" /> | ||
</SenderPipe> | ||
</Pipeline> | ||
</Adapter> | ||
<Adapter name="writeTableMessage"> | ||
<Receiver transactionAttribute="Mandatory"> | ||
<JavaListener name="writeTableMessage" serviceName="writeTableMessage" /> | ||
</Receiver> | ||
<Pipeline> | ||
<SenderPipe name="writeTableMessage"> | ||
<FixedQuerySender query="INSERT INTO "message"(message) VALUES(?)"> | ||
<Param name="message" type="string" defaultValueMethods="input" /> | ||
</FixedQuerySender> | ||
</SenderPipe> | ||
</Pipeline> | ||
</Adapter> | ||
<Adapter name="writeTableOtherMessage"> | ||
<Receiver transactionAttribute="Mandatory"> | ||
<JavaListener name="writeTableOtherMessage" serviceName="writeTableOtherMessage" /> | ||
</Receiver> | ||
<Pipeline> | ||
<SenderPipe name="writeTableOtherMessage"> | ||
<FixedQuerySender query="INSERT INTO "otherMessage"(message) VALUES(?)"> | ||
<Param name="message" type="string" defaultValueMethods="input" /> | ||
</FixedQuerySender> | ||
</SenderPipe> | ||
</Pipeline> | ||
</Adapter> | ||
</Configuration> |
49 changes: 49 additions & 0 deletions
49
srcSteps/Frank2Transactions/v510/src/main/resources/DatabaseChangelog.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<databaseChangeLog | ||
xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" | ||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd | ||
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd"> | ||
<changeSet id="1" author="martijn"> | ||
<createTable tableName="message"> | ||
<column name="id" type="int"> | ||
<constraints primaryKey="true" nullable="false"/> | ||
</column> | ||
<column name="message" type="VARCHAR(30)"> | ||
<constraints nullable="false"/> | ||
</column> | ||
</createTable> | ||
</changeSet> | ||
<changeSet id="2" author="liquibase-docs"> | ||
<addAutoIncrement | ||
tableName="message" | ||
columnDataType="int" | ||
columnName="id" | ||
incrementBy="1" | ||
schemaName="public" | ||
startWith="1" | ||
/> | ||
</changeSet> | ||
<changeSet id="3" author="martijn"> | ||
<createTable tableName="otherMessage"> | ||
<column name="id" type="int"> | ||
<constraints primaryKey="true" nullable="false"/> | ||
</column> | ||
<column name="message" type="VARCHAR(30)"> | ||
<constraints nullable="false"/> | ||
</column> | ||
</createTable> | ||
</changeSet> | ||
<changeSet id="4" author="liquibase-docs"> | ||
<addAutoIncrement | ||
tableName="otherMessage" | ||
columnDataType="int" | ||
columnName="id" | ||
incrementBy="1" | ||
schemaName="public" | ||
startWith="1" | ||
/> | ||
</changeSet> | ||
</databaseChangeLog> |
2 changes: 2 additions & 0 deletions
2
srcSteps/Frank2Transactions/v510/src/main/resources/DeploymentSpecifics.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
instance.name=Frank2Transactions | ||
jdbc.migrator.active=true |
12 changes: 12 additions & 0 deletions
12
srcSteps/Frank2Transactions/v510/src/main/resources/resources.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
jdbc: | ||
- name: "frank2transactions" | ||
type: "org.postgresql.xa.PGXADataSource" | ||
url: "jdbc:postgresql://${jdbc.hostname:-localhost}:5432/testiaf" | ||
authalias: "${db.authalias}" | ||
username: "testiaf_user" | ||
password: "testiaf_user00" | ||
|
||
jms: | ||
- name: "qcf-artemis" | ||
type: "org.apache.activemq.artemis.jms.client.ActiveMQXAConnectionFactory" | ||
url: "tcp://${jms.hostname:-localhost}:61615" |