In case (1) below, are you imagining that
the ServiceReference object would be shared between threads, but that the callbackID
would be thread local?
Sent: Friday, February 22, 2008
To: OASIS Java
Subject: Re: [sca-j] AW: ISSUE 8:
Concurrency model for Service Reference instances
said in a previous note that I'd get around to the question of Callbacks. This
note deals with the Callbacks.
are different from conversations today. (Yes, I realize that there are
proposals to change this)
principal difference is the need for a client to be able to distinguish each
invocation it makes on an
of a service reference. ie logically, the client needs to impose a
callback ID on each invocation
the reference and be able to access this callbackID when it receives an
invocation on the callback
clearly gives a problem if multiple threads are allowed to make forward calls
on the service reference
held by the client. There is a time window between setting the callbackID
and invoking the reference
- and this allows one thread to potentially interfere with another.
seem to be two approaches to this:
Have the callbackID set as a thread local variable.
Change the design of callback interfaces so that there is a version of each
operation which includes the
as an additional parameter on each method, allowing the client to set the
callbackID directly onto
invocation. The precedent for this approach is the existing JAX-WS
approach to the asynchronous client
which is generated by formula from the standard call-and-return API for a
of these approaches means that any given forward request can have a correct
callbackID available on
per-invocation basis to the binding code that packages the request for
tranmisssion form the client to the
Strategist - Emerging Technologies, SCA & SDO.
Co Chair OASIS SCA Assembly TC.
Park, Mail Point 146, Winchester, SO21
2JN, Great Britain.
Phone & FAX: +44-1962-818014 Mobile: +44-7802-467431
IBM United Kingdom Limited - Registered in England
with number 741598.
Registered office: PO Box 41,
North Harbour, Portsmouth, Hampshire PO6 3AU