I've been looking at TUSCANY-3884 about separating our the local code. I note that the delegation code clones endpoints and endpoint references during the delegation process. I think we might have to get a bit smarter in routing messages back to the wire from whence they came as this seems to be problematic in the async case where response information is cached on the reference and not copied into the clone. Not sure this thought belongs to this JIRA but if we have an API the model of the delegation should be as clean as possible so that the API makes sense.
Change committed at revision: 1145112
Added a simple API to endpoint/endpoint reference to access the delegate endpoint/endpoint reference if there is one.