Skip to content

Commit

Permalink
Have the code to explain XA and error store
Browse files Browse the repository at this point in the history
  • Loading branch information
Martijn Dirkse committed Sep 19, 2024
1 parent cd3148f commit 5837822
Show file tree
Hide file tree
Showing 26 changed files with 380 additions and 0 deletions.
Binary file not shown.
Binary file modified docs/source/downloads/advancedDevelopmentProperties.zip
Binary file not shown.
Binary file modified docs/source/downloads/configurations/NewHorizons.zip
Binary file not shown.
Binary file modified docs/source/downloads/configurations/NewHorizonsDatabase.zip
Binary file not shown.
Binary file not shown.
Binary file modified docs/source/downloads/configurations/NewHorizonsValidate.zip
Binary file not shown.
Binary file modified docs/source/downloads/configurations/credentials.zip
Binary file not shown.
Binary file modified docs/source/downloads/configurations/forFrankConsole.zip
Binary file not shown.
Binary file modified docs/source/downloads/configurations/forFrankConsole_2.zip
Binary file not shown.
Binary file modified docs/source/downloads/configurations/hermesBridge.zip
Binary file not shown.
Binary file modified docs/source/downloads/deploymentTomcat.zip
Binary file not shown.
Binary file modified docs/source/downloads/extendLadybugTable.zip
Binary file not shown.
Binary file modified docs/source/downloads/ladybug.zip
Binary file not shown.
Binary file modified docs/source/downloads/sandbox/v01.zip
Binary file not shown.
57 changes: 57 additions & 0 deletions docs/source/snippets/Frank2Transactions/v510/async-config.md
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 &quot;message&quot;(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 &quot;otherMessage&quot;(message) VALUES(?)">
<Param name="message" type="string" defaultValueMethods="input" />
</FixedQuerySender>
</SenderPipe>
</Pipeline>
</Adapter>
</Configuration>
```
58 changes: 58 additions & 0 deletions docs/source/snippets/Frank2Transactions/v510/async-config.txt
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 &quot;message&quot;(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 &quot;otherMessage&quot;(message) VALUES(?)">
<Param name="message" type="string" defaultValueMethods="input" />
</FixedQuerySender>
</SenderPipe>
</Pipeline>
</Adapter>
</Configuration>
24 changes: 24 additions & 0 deletions docs/source/snippets/Frank2Transactions/v510/docker-compose.md
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 docs/source/snippets/Frank2Transactions/v510/docker-compose.txt
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 docs/source/snippets/Frank2Transactions/v510/reference-queue.md
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 docs/source/snippets/Frank2Transactions/v510/reference-queue.txt
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"
22 changes: 22 additions & 0 deletions srcSteps/Frank2Transactions/v510/docker-compose.yml
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
47 changes: 47 additions & 0 deletions srcSteps/Frank2Transactions/v510/meta.yml
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
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 &quot;message&quot;(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 &quot;otherMessage&quot;(message) VALUES(?)">
<Param name="message" type="string" defaultValueMethods="input" />
</FixedQuerySender>
</SenderPipe>
</Pipeline>
</Adapter>
</Configuration>
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>
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 srcSteps/Frank2Transactions/v510/src/main/resources/resources.yml
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"

0 comments on commit 5837822

Please sign in to comment.