I'm trying to knock off a couple of long(ish) standing JIRA around callbacks. I was looking in the code and noticed some TODOs I had left there previously. I've taken a look at the code and here are some issues and patterns that we need to fix and enforce. The first three are related to TUSCANY-3932. I have a feeling there is a JIRA for the last one two but I haven't looked yet.
- The URI of the top level (non delegate binding.sca model) should represent what was set in the SCDL so that it can 1/ be re-written accurately and 2/ so that it can be used in the callback scenario and be transported across the wire in the case where we want to look up the callback endpoint at the service side. This is not the case at the moment as binding.sca uri is reset to the delegate uri. The delegate uri is required when binding.sca is resolved via the registry and we want to configure the reference binding with configuration from the service. The solution here is, I think, to store both pieces of information in the binding.sca model and make sure that they are serialized correctly. - Absolute uris that arrive as callback addresses should be dealt with in the service binding. I.e. the service binding should be responsible for callback binding configuration based on binding specific callback headers. This is mostly the case already I think. There is some commented out code that I added that suggests there might be an alternative approach but I'm going to remove that unused code now - The passing of callback binding configuration from the service binding to the CallbackServiceReferenceImpl that uses currently relies on the creation of a EPR->EP structure that mirrors the structure that is available in the local version of binding.sca. I've heard comments that this seems quite complicated. An option is to have the service binding just create the callback binding and pass this along in the message header. - Callback endpoints registered in the registry can be confused for forward endpoints when the "component name only" form of the reference target URI is used. I think we need to be able to make an endpoint as representing a callback so we can distinguish between forward and callback endpoints when matching. I'll start to rough outs some changes. Any comments. Simon -- Apache Tuscany committer: tuscany.apache.org Co-author of a book about Tuscany and SCA: tuscanyinaction.com
