Skip to content

Commit

Permalink
Change parameters to identify database and messaging hosts (#4419)
Browse files Browse the repository at this point in the history
  • Loading branch information
philipsens committed Jan 25, 2023
1 parent 61670ef commit fe1529d
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 28 deletions.
16 changes: 8 additions & 8 deletions docker/appserver/JBoss/src/configuration/standalone.xml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
</datasource>
<xa-datasource jndi-name="java:/jdbc/ibis4test-oracle" pool-name="ibis4test-oracle">
<driver>oracle</driver>
<xa-datasource-property name="URL">jdbc:oracle:thin:@host.docker.internal:1521:XE</xa-datasource-property>
<xa-datasource-property name="URL">jdbc:oracle:thin:@${jdbc.hostname:host.docker.internal}:1521:XE</xa-datasource-property>
<security>
<user-name>testiaf_user</user-name>
<credential-reference store="CS" alias="testiaf_user"/>
Expand All @@ -198,7 +198,7 @@
</xa-datasource>
<xa-datasource jndi-name="java:/jdbc/ibis4test-mssql" pool-name="ibis4test-mssql" enabled="true" use-java-context="true" spy="false" use-ccm="true" statistics-enabled="false">
<xa-datasource-property name="SelectMethod">direct</xa-datasource-property>
<xa-datasource-property name="URL">jdbc:sqlserver://host.docker.internal:1433;database=testiaf</xa-datasource-property>
<xa-datasource-property name="URL">jdbc:sqlserver://${jdbc.hostname:host.docker.internal}:1433;database=testiaf</xa-datasource-property>
<xa-datasource-property name="encrypt">false</xa-datasource-property>
<xa-datasource-property name="trustServerCertificate">true</xa-datasource-property>
<driver>mssql</driver>
Expand Down Expand Up @@ -226,7 +226,7 @@
</xa-datasource>
<xa-datasource jndi-name="java:/jdbc/ibis4test-mysql" pool-name="ibis4test-mysql">
<driver>mysql</driver>
<xa-datasource-property name="URL">jdbc:mysql://host.docker.internal:3307/testiaf</xa-datasource-property>
<xa-datasource-property name="URL">jdbc:mysql://${jdbc.hostname:host.docker.internal}:3307/testiaf</xa-datasource-property>
<security>
<user-name>testiaf_user</user-name>
<credential-reference store="CS" alias="testiaf_user"/>
Expand All @@ -235,15 +235,15 @@
<!-- Use MySQL driver for MariaDB for proper XA support. -->
<xa-datasource jndi-name="java:/jdbc/ibis4test-mariadb" pool-name="ibis4test-mariadb">
<driver>mysql</driver>
<xa-datasource-property name="URL">jdbc:mysql://host.docker.internal:3307/testiaf</xa-datasource-property>
<xa-datasource-property name="URL">jdbc:mysql://${jdbc.hostname:host.docker.internal}:3307/testiaf</xa-datasource-property>
<security>
<user-name>testiaf_user</user-name>
<credential-reference store="CS" alias="testiaf_user"/>
</security>
</xa-datasource>
<xa-datasource jndi-name="java:/jdbc/ibis4test-postgres-xa" pool-name="ibis4test-postgres">
<driver>postgresql</driver>
<xa-datasource-property name="URL">jdbc:postgresql://host.docker.internal:5432/testiaf</xa-datasource-property>
<xa-datasource-property name="URL">jdbc:postgresql://${jdbc.hostname:host.docker.internal}:5432/testiaf</xa-datasource-property>
<security>
<user-name>testiaf_user</user-name>
<credential-reference store="CS" alias="testiaf_user"/>
Expand All @@ -252,7 +252,7 @@
<xa-datasource jndi-name="java:/jdbc/ibis4test-db2-xa" pool-name="ibis4test-db2">
<driver>db2</driver>
<xa-datasource-property name="databaseName">testiaf</xa-datasource-property>
<xa-datasource-property name="serverName">host.docker.internal</xa-datasource-property>
<xa-datasource-property name="serverName">${jdbc.hostname:host.docker.internal}</xa-datasource-property>
<xa-datasource-property name="portNumber">50000</xa-datasource-property>
<xa-datasource-property name="driverType">4</xa-datasource-property>
<security>
Expand Down Expand Up @@ -571,7 +571,7 @@
<archive>activemq-rar.rar</archive>
<transaction-support>XATransaction</transaction-support>
<config-property name="ServerUrl">
tcp://host.docker.internal:61616
tcp://${jms.hostname:host.docker.internal}:61616
</config-property>
<connection-definitions>
<connection-definition class-name="org.apache.activemq.ra.ActiveMQManagedConnectionFactory" jndi-name="jms/qcf-activemq" enabled="true" use-java-context="true" pool-name="jms/qcf-activemq" use-ccm="true">
Expand Down Expand Up @@ -696,7 +696,7 @@
<remote-destination host="localhost" port="25"/>
</outbound-socket-binding>
<outbound-socket-binding name="artemis">
<remote-destination host="host.docker.internal" port="61615"/>
<remote-destination host="${jms.hostname:host.docker.internal}" port="61615"/>
</outbound-socket-binding>
</socket-binding-group>
</server>
16 changes: 8 additions & 8 deletions docker/appserver/WildFly/src/configuration/standalone.xml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
</datasource>
<xa-datasource jndi-name="java:/jdbc/ibis4test-oracle" pool-name="ibis4test-oracle">
<driver>oracle</driver>
<xa-datasource-property name="URL">jdbc:oracle:thin:@host.docker.internal:1521:XE</xa-datasource-property>
<xa-datasource-property name="URL">jdbc:oracle:thin:@${jdbc.hostname:host.docker.internal}:1521:XE</xa-datasource-property>
<security>
<user-name>testiaf_user</user-name>
<credential-reference store="CS" alias="testiaf_user"/>
Expand All @@ -172,7 +172,7 @@
</xa-datasource>
<xa-datasource jndi-name="java:/jdbc/ibis4test-mssql" pool-name="ibis4test-mssql" enabled="true" use-java-context="true" spy="false" use-ccm="true" statistics-enabled="false">
<xa-datasource-property name="SelectMethod">direct</xa-datasource-property>
<xa-datasource-property name="URL">jdbc:sqlserver://host.docker.internal:1433;database=testiaf</xa-datasource-property>
<xa-datasource-property name="URL">jdbc:sqlserver://${jdbc.hostname:host.docker.internal}:1433;database=testiaf</xa-datasource-property>
<xa-datasource-property name="encrypt">false</xa-datasource-property>
<xa-datasource-property name="trustServerCertificate">true</xa-datasource-property>
<driver>mssql</driver>
Expand Down Expand Up @@ -200,7 +200,7 @@
</xa-datasource>
<xa-datasource jndi-name="java:/jdbc/ibis4test-mysql" pool-name="ibis4test-mysql">
<driver>mysql</driver>
<xa-datasource-property name="URL">jdbc:mysql://host.docker.internal:3307/testiaf</xa-datasource-property>
<xa-datasource-property name="URL">jdbc:mysql://${jdbc.hostname:host.docker.internal}:3307/testiaf</xa-datasource-property>
<security>
<user-name>testiaf_user</user-name>
<credential-reference store="CS" alias="testiaf_user"/>
Expand All @@ -209,15 +209,15 @@
<!-- Use MySQL driver for MariaDB for proper XA support. -->
<xa-datasource jndi-name="java:/jdbc/ibis4test-mariadb" pool-name="ibis4test-mariadb">
<driver>mysql</driver>
<xa-datasource-property name="URL">jdbc:mysql://host.docker.internal:3307/testiaf</xa-datasource-property>
<xa-datasource-property name="URL">jdbc:mysql://${jdbc.hostname:host.docker.internal}:3307/testiaf</xa-datasource-property>
<security>
<user-name>testiaf_user</user-name>
<credential-reference store="CS" alias="testiaf_user"/>
</security>
</xa-datasource>
<xa-datasource jndi-name="java:/jdbc/ibis4test-postgres-xa" pool-name="ibis4test-postgres">
<driver>postgresql</driver>
<xa-datasource-property name="URL">jdbc:postgresql://host.docker.internal:5432/testiaf</xa-datasource-property>
<xa-datasource-property name="URL">jdbc:postgresql://${jdbc.hostname:host.docker.internal}:5432/testiaf</xa-datasource-property>
<security>
<user-name>testiaf_user</user-name>
<credential-reference store="CS" alias="testiaf_user"/>
Expand All @@ -226,7 +226,7 @@
<xa-datasource jndi-name="java:/jdbc/ibis4test-db2-xa" pool-name="ibis4test-db2">
<driver>db2</driver>
<xa-datasource-property name="databaseName">testiaf</xa-datasource-property>
<xa-datasource-property name="serverName">host.docker.internal</xa-datasource-property>
<xa-datasource-property name="serverName">${jdbc.hostname:host.docker.internal}</xa-datasource-property>
<xa-datasource-property name="portNumber">50000</xa-datasource-property>
<xa-datasource-property name="driverType">4</xa-datasource-property>
<security>
Expand Down Expand Up @@ -580,7 +580,7 @@
<archive>activemq-rar.rar</archive>
<transaction-support>XATransaction</transaction-support>
<config-property name="ServerUrl">
tcp://host.docker.internal:61616
tcp://${jms.hostname:host.docker.internal}:61616
</config-property>
<connection-definitions>
<connection-definition class-name="org.apache.activemq.ra.ActiveMQManagedConnectionFactory" jndi-name="jms/qcf-activemq" enabled="true" use-java-context="true" pool-name="jms/qcf-activemq" use-ccm="true">
Expand Down Expand Up @@ -675,7 +675,7 @@
<remote-destination host="${jboss.mail.server.host:localhost}" port="${jboss.mail.server.port:25}"/>
</outbound-socket-binding>
<outbound-socket-binding name="artemis">
<remote-destination host="host.docker.internal" port="61615"/>
<remote-destination host="${jms.hostname:host.docker.internal}" port="61615"/>
</outbound-socket-binding>
</socket-binding-group>
</server>
24 changes: 12 additions & 12 deletions test/src/main/webapp/META-INF/context.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
name="jdbc/ibis4test-oracle"
factory="org.apache.naming.factory.BeanFactory"
type="oracle.jdbc.xa.client.OracleXADataSource"
URL="jdbc:oracle:thin:@${jdbc.dbms.hostname:-host.docker.internal}:1521:XE"
URL="jdbc:oracle:thin:@${jdbc.hostname:-host.docker.internal}:1521:XE"
user="${testiaf_user/username:-testiaf_user}"
password="${testiaf_user/password:-testiaf_user00}"
/>
Expand All @@ -41,7 +41,7 @@
auth="Container"
factory="org.apache.naming.factory.BeanFactory"
type="com.microsoft.sqlserver.jdbc.SQLServerXADataSource"
URL="jdbc:sqlserver://${jdbc.dbms.hostname:-host.docker.internal}:1433;database=testiaf"
URL="jdbc:sqlserver://${jdbc.hostname:-host.docker.internal}:1433;database=testiaf"
user="${testiaf_user/username:-testiaf_user}"
password="${testiaf_user/password:-testiaf_user00}"
sendStringParametersAsUnicode="false"
Expand All @@ -63,7 +63,7 @@
name="jdbc/ibis4test-mysql"
factory="org.apache.naming.factory.BeanFactory"
type="com.mysql.cj.jdbc.MysqlXADataSource"
URL="jdbc:mysql://${jdbc.dbms.hostname:-host.docker.internal}:3307/testiaf"
URL="jdbc:mysql://${jdbc.hostname:-host.docker.internal}:3307/testiaf"
user="${testiaf_user/username:-testiaf_user}"
password="${testiaf_user/password:-testiaf_user00}"
sslMode="DISABLED"
Expand All @@ -80,7 +80,7 @@
name="jdbc/ibis4test-mariadb"
factory="org.apache.naming.factory.BeanFactory"
type="com.mysql.cj.jdbc.MysqlXADataSource"
URL="jdbc:mysql://${jdbc.dbms.hostname:-host.docker.internal}:3306/testiaf"
URL="jdbc:mysql://${jdbc.hostname:-host.docker.internal}:3306/testiaf"
user="${testiaf_user/username:-testiaf_user}"
password="${testiaf_user/password:-testiaf_user00}"
sslMode="DISABLED"
Expand All @@ -96,7 +96,7 @@
type="org.mariadb.jdbc.MariaDbDataSource"
user="testiaf_user"
password="testiaf_user00"
url="jdbc:mariadb://${jdbc.dbms.hostname:-host.docker.internal}:3306/testiaf?pinGlobalTxToPhysicalConnection=true"
url="jdbc:mariadb://${jdbc.hostname:-host.docker.internal}:3306/testiaf?pinGlobalTxToPhysicalConnection=true"
/>
-->
<!-- pinGlobalTxToPhysicalConnection does not work the same for mariadb as it does for mysql, therefor still locking problems under XA for mariadb -->
Expand All @@ -106,7 +106,7 @@
name="jdbc/ibis4test-postgres-xa"
factory="org.apache.naming.factory.BeanFactory"
type="org.postgresql.xa.PGXADataSource"
URL="jdbc:postgresql://${jdbc.dbms.hostname:-host.docker.internal}:5432/testiaf"
URL="jdbc:postgresql://${jdbc.hostname:-host.docker.internal}:5432/testiaf"
user="${testiaf_user/username:-testiaf_user}"
password="${testiaf_user/password:-testiaf_user00}"
/>
Expand All @@ -115,7 +115,7 @@
<Resource name="jdbc/ibis4test-postgres" auth="Container"
type="javax.sql.DataSource"
driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://${jdbc.dbms.hostname:-host.docker.internal}:5432/testiaf"
url="jdbc:postgresql://${jdbc.hostname:-host.docker.internal}:5432/testiaf"
username="${testiaf_user/username:-testiaf_user}"
password="${testiaf_user/password:-testiaf_user00}"
maxTotal="10"
Expand All @@ -125,7 +125,7 @@
<Resource name="jdbc/ibis4test-db2-xa" auth="Container"
factory="org.apache.naming.factory.BeanFactory"
type="com.ibm.db2.jcc.DB2XADataSource"
serverName="${jdbc.dbms.hostname:-host.docker.internal}"
serverName="${jdbc.hostname:-host.docker.internal}"
portNumber="50000"
databaseName="testiaf"
driverType="4"
Expand All @@ -137,7 +137,7 @@
<Resource name="jdbc/ibis4test-db2" auth="Container"
type="javax.sql.DataSource"
driverClassName="com.ibm.db2.jcc.DB2Driver"
url="jdbc:db2://${jdbc.dbms.hostname:-host.docker.internal}:50000/testiaf"
url="jdbc:db2://${jdbc.hostname:-host.docker.internal}:50000/testiaf"
username="${testiaf_user/username:-testiaf_user}"
password="${testiaf_user/password:-testiaf_user00}"
/>
Expand All @@ -146,7 +146,7 @@
name="mongodb/ibis4test"
type="com.mongodb.MongoClient"
factory="com.mongodb.client.MongoClientFactory"
connectionString="mongodb://testiaf_user:testiaf_user00@${jdbc.dbms.hostname:-host.docker.internal}"
connectionString="mongodb://testiaf_user:testiaf_user00@${jdbc.hostname:-host.docker.internal}"
auth="Container"
singleton="true"
/>
Expand Down Expand Up @@ -199,14 +199,14 @@
<Resource name="jms/qcf-activemq"
factory="org.apache.naming.factory.BeanFactory"
type="org.apache.activemq.ActiveMQXAConnectionFactory"
brokerURL="tcp://${jdbc.dbms.hostname:-host.docker.internal}:61616?jms.xaAckMode=1"
brokerURL="tcp://${jms.hostname:-host.docker.internal}:61616?jms.xaAckMode=1"
/>

<!-- Activemq-artemis resource configuration -->
<Resource name="jms/qcf-artemis"
factory="org.apache.naming.factory.BeanFactory"
type="org.apache.activemq.artemis.jms.client.ActiveMQXAConnectionFactory"
brokerURL="tcp://${jdbc.dbms.hostname:-host.docker.internal}:61615"
brokerURL="tcp://${jms.hostname:-host.docker.internal}:61615"
/>

</Context>

0 comments on commit fe1529d

Please sign in to comment.