Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-1893

Restarting server with a disabled DS enables the DS

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 9.0.0.Final
    • None
    • JCA
    • None

      See https://issues.jboss.org/browse/WFLY-1874
      If you add a datasource with
      subsystem=datasources/data-source=Test:add(jndi-name=java:/Test,jta=false,use-ccm=false,connection-url=url,driver-class=org.h2.Driver,driver-name=h2,user-name=user,password=pass,validate-on-match=false,background-validation=false,share-prepared-statements=false)

      it shows up as not enabled/undefined:

      [standalone@localhost:9990 /] /subsystem=datasources/data-source=Test:read-resource{                                                                                                                                         "outcome" => "success",
          "result" => {
      ...
              "enabled" => false,
      
      [standalone@localhost:9990 /] /subsystem=datasources/data-source=Test:read-resource(include-defaults=false)
      {
          "outcome" => "success",
          "result" => {
      ...        "enabled" => undefined,
      

      This is persisted as

                     <datasource jta="false" jndi-name="java:/Test" pool-name="Test" enabled="false" use-ccm="false">
                          <connection-url>url</connection-url>
                          <driver-class&gt;org.h2.Driver</driver-class&gt;
                          <driver>h2</driver>
                          <security>
                              <user-name>user</user-name>
                              <password>pass</password>
                          </security>
                          <validation>
                              <validate-on-match>false</validate-on-match>
                              <background-validation>false</background-validation>
                          </validation>
                          <statement>
                              <share-prepared-statements>false</share-prepared-statements>
                          </statement>
                      </datasource>
      

      Now if you stop and start the server again you end up with enabled=true.

            smaestri@redhat.com Stefano Maestri
            kkhan1@redhat.com Kabir Khan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: