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

Removing XA Datasources via CLI OR DMR does not de-register it from the context without reload.

    XMLWordPrintable

Details

    • Hide

      1. Start EAP in domain mode without any server.
      2. Add xa-data-source=TestXADataSource through CLI OR DMR
      3. Remove TestXADataSource
      4. Again add TestXADataSource, it will throw below error.

      java.lang.IllegalStateException: WFLYCTL0363: Capability 'org.wildfly.data-source.TestXADataSource' is already registered in context 'profile=default'.
      
      Show
      1. Start EAP in domain mode without any server. 2. Add xa-data-source=TestXADataSource through CLI OR DMR 3. Remove TestXADataSource 4. Again add TestXADataSource, it will throw below error. java.lang.IllegalStateException: WFLYCTL0363: Capability 'org.wildfly.data-source.TestXADataSource' is already registered in context 'profile= default ' .
    • Workaround Exists
    • Hide

      reload after remove.

      Show
      reload after remove.

    Description

      Below is the result of add .. remove ..add operation of XADatasource .

      1. Add - OK

      [domain@localhost:9990 /] ./profile=default/subsystem=datasources/xa-data-source=TestXADataSource:add(jndi-name=java\:jboss\/datasources\/oracleXaDatasource,driver-name=oracle-driver.jar)
      {
          "outcome" => "success",
          "result" => undefined,
          "server-groups" => undefined
      }
      

      2. Remove - OK

      [domain@localhost:9990 /] ./profile=default/subsystem=datasources/xa-data-source=TestXADataSource:remove()
      {
          "outcome" => "success",
          "result" => undefined,
          "server-groups" => undefined
      }
      

      3. Add - Error is thrown

      [domain@localhost:9990 /] ./profile=default/subsystem=datasources/xa-data-source=TestXADataSource:add(jndi-name=java\:jboss\/datasources\/oracleXaDatasource,driver-name=oracle-driver.jar)
      {
          "outcome" => "failed",
          "failure-description" => {"domain-failure-description" => "WFLYCTL0158: Operation handler failed: java.lang.IllegalStateException: WFLYCTL0363: Capability 'org.wildfly.data-source.TestXADataSource' is already registered in context 'profile=default'."},
          "rolled-back" => true
      }
      

      Attachments

        Issue Links

          Activity

            People

              rhn-support-shsingh Shailendra Singh
              rhn-support-shsingh Shailendra Singh
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: