10 Replies Latest reply on Mar 26, 2019 10:20 AM by ochaloup

    Using WildFly instance as an external transaction coordinator service

    ike3

      I struggle with configuring an external transaction coordinator. According to https://developer.jboss.org/message/809802, all I need is the xts-environment property in my standalone.xml.

       

      My testing environment is:

      • callee - WildFly instance running callee.ear with a very simple web-service which writes a row in oracle table
      • caller - WildFly instance running caller.ear with another web-service which calls the first service then writes another row in the same table

       

      All instances are WidlfFly 15 on Java11 with standalone.xml copied from standalone-xts.xml example. @Transactional annonations are in place, transactions work fine.

       

      The idea is to load-balance the callee service using ngnix or other balancer across multiple instances of WildFly. (I've already done it - it works fine too). Generally, there will be many other callers and callees so it may be a good idea to have an external transaction coordinator to have all transaction information in one place.

       

      Can I just add another WildFly instance with XTS enabled and change in all my WildFly the xts-environment url pointing to this new WildFly instance?

       

          <subsystem xmlns="urn:jboss:domain:xts:3.0">

              <host name="default-host"/>

              <xts-environment url="http://<some_host>:<some_port>/ws-c11/ActivationService"/>

              <default-context-propagation enabled="true"/>

          </subsystem>

       

      It seems the setting is ignored completely, no matter what URL I use, the caller instance is always using the local ActivationService. There are no requests to the coordinator host at all.

      Am I doing this completely wrong? Can anybody point me in the right direction?

       

      The source code for this example is available at https://github.com/ike3/lkp_transactions. I am using docker-compose so the environment is in the docker directory (unfortunately, the oracle database is not yet there).