[ https://issues.apache.org/jira/browse/TUSCANY-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Luciano Resende reassigned TUSCANY-3256: ---------------------------------------- Assignee: Luciano Resende > PolicyConfigurationException raised incorrectly when using operation level > policy > --------------------------------------------------------------------------------- > > Key: TUSCANY-3256 > URL: https://issues.apache.org/jira/browse/TUSCANY-3256 > Project: Tuscany > Issue Type: Bug > Components: Java SCA Policy > Affects Versions: Java-SCA-1.5.1 > Reporter: Greg Dritschler > Assignee: Luciano Resende > Priority: Minor > Fix For: Java-SCA-1.5.1 > > Attachments: TUSCANY-3256-1.5.1.patch, TUSCANY-3256.patch > > > 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. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.