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

EJB subsystem adds a capability but does not remove it in remove handler

    XMLWordPrintable

    Details

      Description

      EJB3SubsystemAdd adds capability org.wildfly.ejb3.clustered.singleton but then EJB3SubsystemRemove does not remove it.

      This breaks use cases where the subsystem is repeatedly added, particularly a cycle of

      /profile=foo:clone(to-profile=bar)
      ... make some adjustments to bar
      ... oops, screwed up on those adjustments, lets start over!
      /profile=bar:remove
      /profile=foo:clone(to-profile=bar)

      The last step will fail with:

      [Host Controller] &amp#27;[33m&amp#27;[0m&amp#27;[31m12:05:13,818 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 4) WFLYCTL0013: Operation ("add") failed - address: ([&amp#27;[0m
      [Host Controller] &amp#27;[31m    ("profile" => "clone"),&amp#27;[0m
      [Host Controller] &amp#27;[31m    ("subsystem" => "ejb3")&amp#27;[0m
      [Host Controller] &amp#27;[31m]): java.lang.IllegalStateException: WFLYCTL0363: Capability 'org.wildfly.ejb3.clustered.singleton' is already registered in context 'profile=clone'.&amp#27;[0m
      [Host Controller] &amp#27;[31m	at org.jboss.as.controller.CapabilityRegistry.registerCapability(CapabilityRegistry.java:146)&amp#27;[0m
      [Host Controller] &amp#27;[31m	at org.jboss.as.controller.OperationContextImpl.registerCapability(OperationContextImpl.java:1430)&amp#27;[0m
      [Host Controller] &amp#27;[31m	at org.jboss.as.controller.OperationContextImpl.registerCapability(OperationContextImpl.java:1417)&amp#27;[0m
      [Host Controller] &amp#27;[31m	at org.jboss.as.ejb3.subsystem.EJB3SubsystemAdd.recordCapabilitiesAndRequirements(EJB3SubsystemAdd.java:178)&amp#27;[0m
      

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: