Raymond Feng wrote:
One more question:
Do you think if the participants to enforce PBV know their data
capability upfront (static) or do they have to defer the decision to the
actual invocation time (dynamic)? It seems that you were leaning to the
dynamic style in your proposal.
Static, per operation.
If it's static, we could have a flag set on the InvocationChain (instead
of Message and Interceptor). The implementation/binding providers as
well as other interception providers can call
InvocationChain.setPBVEnsured().
A flag on interceptor will let its implementor decide the value of the
flag according to what he's doing in the interceptor. That's more
extensible than hardwired logic in the providers competing to set a
single flag.
With my latest proposal we don't even need a message flag as an
interceptor that copies data just needs to return the flag value
indicating that the data is now safe from changes.
To summarize, and using the spec terminology:
AnInvoker {
boolean allowsPassByReference() {
// example implementation
check the @AllowsPassByReference annotation or equivalent
indication that the given data is safe and won't be altered
}
}
and Interceptor {
boolean allowsPassByReference() {
// example implementation
boolean doIAllowThat = depends on what I do with the data
in the interceptor;
return doIAllowThat && next.allowsPassByReference();
}
}
--
Jean-Sebastien
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]