Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-1076

(Xa)DatasourceRemove does not clean up services properly

    Details

      Description

      Fails in the CLI as well:

      [standalone@localhost:9999 /] cd subsystem=datasources
      [standalone@localhost:9999 subsystem=datasources] cd data-source=foo
      [standalone@localhost:9999 data-source=foo] :add(name=foo,jndi-name=bar,pool-name=foo_Pool,connection-url=badconnection,driver-name=h2)

      {"outcome" => "success"}

      [standalone@localhost:9999 data-source=foo] cd ..
      [standalone@localhost:9999 subsystem=datasources] :read-children-resources(child-type=data-source)
      {
      "outcome" => "success",
      "result" => {
      "foo" => { "background-validation" => undefined, "background-validation-minutes" => undefined, "blocking-timeout-wait-millis" => undefined, "connection-url" => "badconnection", "driver-name" => "h2", "idle-timeout-minutes" => undefined, "jndi-name" => "bar", "max-pool-size" => undefined, "min-pool-size" => undefined, "pool-name" => "foo_Pool", "pool-prefill" => undefined, "pool-use-strict-min" => undefined, "use-fast-fail" => undefined },
      "java:/H2DS" => { "background-validation" => false, "background-validation-minutes" => undefined, "blocking-timeout-wait-millis" => undefined, "connection-url" => "jdbc:h2:mem:test;DB_CLOSE_DELAY=-1", "driver-name" => "h2", "enabled" => true, "flush-strategy" => "FailingConnectionOnly", "idle-timeout-minutes" => undefined, "jndi-name" => "java:/H2DS", "jta" => true, "max-pool-size" => undefined, "min-pool-size" => undefined, "password" => "sa", "pool-name" => "H2DS", "pool-prefill" => false, "pool-use-strict-min" => false, "use-ccm" => true, "use-fast-fail" => false, "use-java-context" => true, "user-name" => "sa", "validate-on-match" => false }
      }
      }

      [standalone@localhost:9999 subsystem=datasources] cd data-source=foo
      [standalone@localhost:9999 data-source=foo] :remove{"outcome" => "success"}

      [standalone@localhost:9999 data-source=foo] :add(name=foo,jndi-name=bar,pool-name=foo_Pool,connection-url=badconnection,driver-name=h2)

      { "outcome" => "failed", "failure-description" => "Operation handler failed: org.jboss.msc.service.DuplicateServiceException: Service jboss.data-source-config.bar is already registered", "rolled-back" => true }

      [standalone@localhost:9999 data-source=foo]
      [standalone@localhost:9999 data-source=foo] cd ..
      [standalone@localhost:9999 subsystem=datasources] :read-children-resources(child-type=data-source)
      {
      "outcome" => "success",
      "result" => {"java:/H2DS" => {
      "background-validation" => false,
      "background-validation-minutes" => undefined,
      "blocking-timeout-wait-millis" => undefined,
      "connection-url" => "jdbc:h2:mem:test;DB_CLOSE_DELAY=-1",
      "driver-name" => "h2",
      "enabled" => true,
      "flush-strategy" => "FailingConnectionOnly",
      "idle-timeout-minutes" => undefined,
      "jndi-name" => "java:/H2DS",
      "jta" => true,
      "max-pool-size" => undefined,
      "min-pool-size" => undefined,
      "password" => "sa",
      "pool-name" => "H2DS",
      "pool-prefill" => false,
      "pool-use-strict-min" => false,
      "use-ccm" => true,
      "use-fast-fail" => false,
      "use-java-context" => true,
      "user-name" => "sa",
      "validate-on-match" => false
      }}
      }

      Bug appears to be use of the wrong name for the service names in AbstractDatasourceRemove. Should be the JNDI name to match the add handler.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                brian.stansberry Brian Stansberry
                Reporter:
                brian.stansberry Brian Stansberry
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: