Within a single domain where a reference is wired to a service I think
there are ? scenarios that we need to take account of....
1 - target service component and reference component are running in
separate nodes in separate JVMs
a remote sca binding must we used
2 - target service component and reference component are running in
separate nodes in the same JVM
a mechanism for crossing classloader boundaries is required
3 - target service component and reference component are running in
the same node (and hence the same JVM)
3a - the service and reference are in the same composite and
hence contribution.
local optimization is possible
3b - the service and reference are in different composites and
possible contributions
a mechanism for crossing classloader boundaries is required
Currently the code determines these different cases in the following way
if the target service is able to be resolved within the current
composite at build time then
3a
else if the target service is resolved at runtime and it's marked as
remote (as it's been copied between endpoint registry instances)
1
else
2 or 3b
we aren't currently able to tell the difference between these
I don't believe we have any code to do cross classloader copying
There is potentially a flaw here in we can only detect local service
components if they are declared in the same composite as the
reference.
I support ensuring that this algorithm is correct and that it's
represented more explicitly in the code which I guess means storing
more information on the endpoints and endpoint references. Am catching
up with the other Domain/Node URI threads so not committing to what
that might be yet.
Simon