Uploaded image for project: 'Tuscany'
  1. Tuscany
  2. TUSCANY-3256

PolicyConfigurationException raised incorrectly when using operation level policy

    XMLWordPrintableJSON

Details

    • Patch Available

    Description

      A PolicyConfigurationException may be raised incorrectly when using operation policy as shown in the example below.

      <composite ...>
      <component ... requires='A'>
      <implementation.java class="test.MyServiceImpl"/>
      <service name="MyService">
      <operation name="setXYZZY" requires="B"/>
      </service>
      </component>
      </composite>

      Let's say intent 'A' constrains an implementation rather than a binding. Constraints aren't examined until the final step of propagating the intents into the binding. So 'A' gets inherited by the service and then the service operation. Now the code in PolicyComputationUtil.addInheritedOpConfOnBindings gets control to inherit the service operation intents to the binding. If it can find a matching operation element under the binding, it goes through logic that applies the constraint (among among things). This would keep 'A' from being inherited by the binding level. However if it can't find an operation element under the binding, it simply adds a new operation element without doing any checking on it. This leads to a PolicyConfigurationException because there is no policy that applies to the binding and satisfies 'A'.

      I am attaching a patch that changes the logic in PolicyComputationUtil.addInheritedOpConfOnBindings so that added binding operations go through the same logic as existing operations.

      Attachments

        1. TUSCANY-3256.patch
          6 kB
          Greg Dritschler
        2. TUSCANY-3256-1.5.1.patch
          6 kB
          Greg Dritschler

        Activity

          People

            lresende Luciano Resende
            gregdritschler Greg Dritschler
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: