BRE_ResolveProvider.UpdateContextProperties work in progress?

Developer
Apr 7, 2010 at 1:48 PM

Hi

the UpdateContextProperties method in the BRE.EXT provider seems to be incomplete... basically it only updates a context property in the following two cases:

  1. If we set a promoted property value for an already existing and promoted property
  2. If we set a distinguished property value (new or existing)

Theres a comment indicating that old values should be overwritten and/or added but there seems to be no code for it...

Fiddled around a bit with it... wrote all values from updatedCtx to baseMsgCtx and tracked if existing props were promoted but ended up with a new inifinte loop in the ESB Dispatcher afterwards...

please advice (or am I missing something here...)

cheers and keep up the good work!

/Henrik

Coordinator
Apr 8, 2010 at 2:55 AM
  1. If we set a promoted property value for an already existing and promoted property
  2. If we set a distinguished property value (new or existing)

This is correct. The option to promote a value which was distinguished, or even worse, promote a value which was recently *demoted* could cause a cyclic behavior, which is what we were seeing. Thus I removed that section, however with the latest build, I added it back with a switch: useRepromotion=true|false

You should know what you're doing to use this switch, it shouldn't just promote values for the fun of it as you saw it could cause unpredictable results. Thus use this switch cautiously, and only on values that will not cause the infinite loop behavior.

HTH



Developer
Apr 29, 2010 at 11:00 AM
Hi did some tinkering with the 0.4 release to make the repromotion part a bit less risky by using a dirty flag so that we only update the message context with actual changes and nothing else. This should make significant change if repromotion is enabled and if no filter is used (sending the complete context to BRE). Basically I added a dirty indicator to the context property name (using $ as prefix) which is set when a property is updated or added by the MessageContextFactRetriever.SetItem method. An isDirty flag was added to UpdateContextProperties that is set by checking for the $ prefix. I also added code to allow update/add of properties regardless if they are promoted or not if useRepromotion is enabled. Also fixed an unistall issue that left adapterproviders in esb.config causing a conflict after repeated uninstall+install and added the UseRepromotion to the BRE_ExtendedResolver so it's configurable in the ItineraryDsl. I've created an issue where I uploaded my code changes as an zip file for you to review and add if you like. Cheers /Henrik
Coordinator
May 2, 2010 at 11:45 PM

Ok the latest build has your changes, and a few more on the MSMQ Adapter provider.