Added xa-data-source with WildFly 10 CLI

Commands for adding XA data sources in the WildFly 10 CLI. It seems that the command is slightly different depending on the version, and I struggled a little, so I will leave a note.

environment

Procedure etc.

[standalone@localhost:9990 /] jdbc-driver-info
NAME       SOURCE
h2         com.h2database.h2/main
oracle     com.oracle/main
postgresql org.postgresql/main
[standalone@localhost:9990 /] xa-data-source add \
>   --name=XAOracleDS \
>   --driver-name=oracle \
>   --jndi-name=java:/XAOracleDS \
>   --user-name=kagamihoge \
>   --password=xxxx \
>   --xa-datasource-properties=URL=jdbc:oracle:thin:@//192.168.0.20:1521/ORCL.kagamihoge
[standalone@localhost:9990 /] xa-data-source test-connection-in-pool --name=XAOracleDS
true
[standalone@localhost:9990 /] xa-data-source add \
>   --name=PostgresXADS \
>   --driver-name=postgresql \
>   --jndi-name=java:/PostgresXADS \
>   --user-name=postgres \
>   --password=postgres \
>   --xa-datasource-properties=DatabaseName=postgres,PortNumber=5432,ServerName=192.168.0.21
[standalone@localhost:9990 /] xa-data-source test-connection-in-pool --name=PostgresXADS2
true
xa-data-source add \
  --name= \
  --driver-name= \
  --jndi-name= \
  --user-name= \
  --password= \
  --xa-datasource-properties=

xa-data-source add --helpYou can check the parameter list etc. with.--xa-datasource-propertiesSeems to vary by dbms. Here depending on the versionbatIt seems to be input by a command, but in 10 it seems that it can be specified collectively with this parameter.

Recommended Posts

Added xa-data-source with WildFly 10 CLI
CLI creation with thor
Try WildFly with Docker