Hi,
The SCA spec says "Independent of whether the remotable service is called
remotely from outside the process where the service runs or from another
component running in the same process, the data exchange semantics are
by-value."
I plan to add this support. To trigger more discussions, here are some
points to brainstorm.
1) It will apply to a wire with remotable interfaces for the source and
target.
2) We need to take "AllowsPassByReference" into consideration in the
ServiceContract
3) An interceptor will be added to the invocation chain to enforce the
"pass-by-value" semantics by data transformation if necessary
4) How we copy the value depends on the databinding for the given argument
or return value of an operation. A databinding provider can implement the
"copy" method to control how the copy will be made.
Object copy(Object source, TransformationContext context);
5) For objects without exlicit databinding (in which case, we assume it's
plain java databinding), we'll use techniques:
* Serilization followed by a deserialization (Serialize the data in
source context and deserialize it in target context)
* Cloning? (If the object is Cloneable, can we use the clone() to make
the copy?)
6) Some optimaization can be applied, for example, for immutable jdk classes
such as "java.lang.String" we don't have to make a copy
7) For composite services/references with bindings, can we assume that
"pass-by-value" semantics will be automatically enforeced by the protocol
layer for inter-process calls?
Any thoughts?
Thanks,
Raymond
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]