2 Replies Latest reply on Jan 26, 2018 4:32 AM by blurec

    Configuring database-data-stores for Wildfly swarm EJB timer-service

    patmagee

      I am trying to componentize our monolithic java application into smaller parts using swarm, and have been running into a few problems with configuring some of the services.

       

      One application that I am working on uses the "timer-service" made available through the swarm-ejb fraction. In order to ensure that the timers are fault tolerant, they are being persisted to a remote datasource configured in the project-defaults.yml, unfortunately, the fraction is not even connecting to the remote data source.

       

      I have configured my project-defaults.yml for the timer service according to the reference documentation, however, regardless of what I change it still does not write to the remote db. Additionally, I tried passing in the configuration parameters as command line arguments, but still, nothing changed. I have confirmed that the actual datasource works using an xml standalone configuration and deploying my war in wildfly.

       

      I looked at the current source code, comparing the Datasource Fraction to the EJB fraction and it looks like the  EJB fraction may not support customization. If this is the case, is there any expectation when this would be supported? Otherwise, is there something glaringly wrong with my swarm configuration file that anyone can see?

       

      FYI I am using swarm 2017.11.0

       

       

      swarm:

        datasources:

          data-sources:

            MysqlBillingDS:

              jndi-name: java:/jboss/datasources/MysqlBillingDS

              driver-name: mysql

              connection-url: <DB_HOST>

              user-name: <DB_USERNAME>

              password: <DB_PASSWORD>

              jta: true

              ....

        ejb:

          timer-service:

            database-data-stores:

              MysqlBillingTimerStore:

                allow-execution: true

                datasource-jndi-name: java:/jboss/datasources/MysqlBillingDS

                database: mysql

                partition: timer

            default-data-store: MysqlBillingTimerStore