[
https://issues.apache.org/jira/browse/TUSCANY-3193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738395#action_12738395
]
Simon Nash commented on TUSCANY-3193:
-------------------------------------
The fix I have checked in isn't completely straightforward because of the
"catch 22" of the binding URIs being created before the wiring is done. This
ordering means that it isn't possible to use the presence or absence of wires
to influence whether a relative or absolute URI is created for binding.sca.
The desired behaviour for <binding.sca> is to create an absolute URI for
reference and service bindings (including reference callback bindings) if the
reference and service are wired across composites running on different nodes in
a distributed configuration. For references and services that aren't wired, or
that are wired within a composite running on a single node in a distributed
configuration, the binding URI should be relative so that locally optimized
calling is used.
With the r800411 fix, the URI creation step still happens first. If the
binding type is binding.sca and the builders are being called by the domain
manager to create a node configuration, a "tentative" relative URI is created
for the binding and the binding is added to a Map that maintains binding/node
relationships (the bindingMap).
When the domain wiring is done later, there is code in the matchBinding()
method of BindingConfigurationUtil that uses the bindingMap created in the
first step to look up which node the reference or service is running on. If
the source and target of the wire are running on different nodes, the
"tentative" relative URI is updated to convert it to an absolute URI with
host/port information. In all other cases the "tentative" relative URI is left
unchanged.
For reference callback URIs, the "tentative" relative URI is updated to an
absolute URI if and only if the target of the forward wire is outside the
current node.
If the builders are not being called by the domain manager, the bindingMap will
always be null and none of the above processing will happen. This ensures that
the fix will not disturb the execution paths for calls not made by the domain
manager.
> Domain Manager GUI does not put <binding.sca> entries in generated node
> confiig files
> -------------------------------------------------------------------------------------
>
> Key: TUSCANY-3193
> URL: https://issues.apache.org/jira/browse/TUSCANY-3193
> Project: Tuscany
> Issue Type: Bug
> Components: Java SCA Domain Management
> Affects Versions: Java-SCA-1.5.1
> Reporter: Simon Nash
> Assignee: Simon Nash
> Fix For: Java-SCA-1.5.1
>
>
> When creating a domain configuration from scratch using the Domain Manager
> GUI, the generated configuration files for nodes in the "cloud" directory
> don't have a <binding.sca> entry. These files currently have host/port
> entries for binding.ws, binding.http, binding.jsonrpc, and binding.atom, but
> no host/port entry for binding.sca.
> Without this entry, application composites sent to the nodes by the domain
> manager will always have local-only <binding.sca> entries, which means they
> can't use binding.sca to communicate between different nodes. This applies
> to both forward calls and callbacks.
> In order to get binding.sca to work across distributed nodes, it's currently
> necessary to manually edit the generated files in the "cloud" directory and
> add <binding.sca> elements to the node definitions. This is a serious
> usability issue for someone who wants to use the distributed domain in the
> simplest possible manner.
> A complete fix for this problem requires the following:
> 1. Add <binding.sca> elements to the generated configuration.
> 2. Change the builder code so that the presence of these elements does not
> force all binding.sca calls to use a distributed provider, which would create
> unnecessary overhead when the reference and the target are running on the
> same node.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.