| From | Sent On | Attachments |
|---|---|---|
| Michael Rowley | Feb 21, 2008 11:45 am | |
| Barack, Ron | Feb 21, 2008 2:15 pm | |
| Mike Edwards | Feb 22, 2008 3:13 am | |
| Mike Edwards | Feb 22, 2008 6:30 am | |
| Shih-Chang Chen | Feb 22, 2008 7:07 am | |
| Michael Rowley | Feb 22, 2008 9:18 am | |
| Michael Rowley | Feb 22, 2008 9:28 am | |
| Michael Rowley | Feb 22, 2008 9:30 am | |
| Michael Rowley | Feb 22, 2008 9:48 am | |
| Barack, Ron | Feb 22, 2008 10:25 am | |
| Michael Rowley | Feb 23, 2008 8:05 am | |
| Mike Edwards | Feb 24, 2008 5:48 am | |
| Mike Edwards | Feb 24, 2008 6:10 am | |
| Mike Edwards | Feb 24, 2008 6:39 am | |
| Michael Rowley | Feb 25, 2008 8:10 am | |
| Mike Edwards | Feb 25, 2008 10:29 am | |
| Michael Rowley | Feb 25, 2008 12:04 pm | |
| Mike Edwards | Feb 26, 2008 5:51 am | |
| Michael Rowley | Feb 27, 2008 5:38 am | |
| Mike Edwards | Feb 27, 2008 2:57 pm | |
| Simon Nash | Feb 28, 2008 6:42 am | |
| Simon Nash | Feb 28, 2008 10:26 am | |
| Michael Rowley | Feb 28, 2008 5:31 pm | |
| Simon Nash | Mar 13, 2008 8:03 am | |
| Michael Rowley | Mar 13, 2008 11:33 am | |
| Simon Nash | Mar 13, 2008 11:44 am | |
| Peshev, Peter | Mar 13, 2008 12:41 pm | |
| Mike Edwards | Mar 14, 2008 2:09 am | |
| Peshev, Peter | Mar 14, 2008 6:32 am |
| Subject: | Re: [sca-j] AW: ISSUE 8: Concurrency model for Service Reference instances | |
|---|---|---|
| From: | Mike Edwards (mike...@uk.ibm.com) | |
| Date: | Feb 22, 2008 6:30:38 am | |
| List: | org.oasis-open.lists.sca-j | |
Folks,
I said in a previous note that I'd get around to the question of Callbacks. This note deals with the Callbacks.
Callbacks are different from conversations today. (Yes, I realize that there are proposals to change this) The principal difference is the need for a client to be able to distinguish each invocation it makes on an operation of a service reference. ie logically, the client needs to impose a callback ID on each invocation of the reference and be able to access this callbackID when it receives an invocation on the callback interface.
This clearly gives a problem if multiple threads are allowed to make forward calls on the service reference object held by the client. There is a time window between setting the callbackID and invoking the reference method - and this allows one thread to potentially interfere with another.
There seem to be two approaches to this:
1) Have the callbackID set as a thread local variable.
2) Change the design of callback interfaces so that there is a version of each operation which includes the callbackID as an additional parameter on each method, allowing the client to set the callbackID directly onto each invocation. The precedent for this approach is the existing JAX-WS approach to the asynchronous client API, which is generated by formula from the standard call-and-return API for a service.
Either of these approaches means that any given forward request can have a correct callbackID available on a per-invocation basis to the binding code that packages the request for tranmisssion form the client to the service.
Problem solved.
Yours, Mike.
Strategist - Emerging Technologies, SCA & SDO. Co Chair OASIS SCA Assembly TC. IBM Hursley Park, Mail Point 146, Winchester, SO21 2JN, Great Britain. Phone & FAX: +44-1962-818014 Mobile: +44-7802-467431 Email: mike...@uk.ibm.com
------------------------------------------------------------------------------
Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU





