Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-7809

Resolve datasource name for query definitions at runtime

    Details

    • Sprint:
      2018 Week 39-41
    • Story Points:
      2
    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      Queries are registered using the org.kie.server.persistence on first server startup and this information - including the full datasource name - is persisted into the database:

      MariaDB [rhpam7]> select qName, qSource from QueryDefinitionStore limit 3;
      +-----------------------------+--------------------+
      | qName                       | qSource            |
      +-----------------------------+--------------------+
      | jbpmExecutionErrorList      | java:jboss/MySqlDS |
      | jbpmHumanTasksWithVariables | java:jboss/MySqlDS |
      | tasksMonitoring             | java:jboss/MySqlDS |
      +-----------------------------+--------------------+
      

      On server restart, the values from the database are used. This prevents to run multiple kie-server nodes using the same database to be deployed on different application servers:

      1. Create a fresh DB schema
      2. Start kie-server deployed on EAP
      3. Start kie-server deployed on WAS (using the same database connection settings, but with a different datasource name)

      In this scenario, the WAS deployment fails as it tries to resolve the datasource name from the database java:jboss/MySqlDS, which does not exist in the WAS server.

      The value of the datasource name should be taken from the system property on each server start, not just for the first one.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  swiderski.maciej Maciej Swiderski
                  Reporter:
                  mputz Martin Weiler
                  Tester:
                  Karel Suta
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: