| From | Sent On | Attachments |
|---|---|---|
| mrow...@bea.com | Jan 4, 2008 2:07 pm | |
| Reza Shafii | Jan 4, 2008 2:19 pm | .xls |
| Mike Edwards | Jan 7, 2008 1:27 am | |
| Simon Nash | Jan 7, 2008 4:58 am | |
| David Booz | Jan 7, 2008 7:35 am | |
| Reza Shafii | Jan 7, 2008 9:22 am | |
| Blohm, Henning | Jan 7, 2008 9:43 am | |
| Peshev, Peter | Jan 7, 2008 10:18 am | |
| Simon Nash | Jan 7, 2008 11:01 am | |
| Reza Shafii | Jan 7, 2008 1:06 pm | .xls |
| Simon Nash | Jan 7, 2008 3:43 pm | .xls |
| Mike Edwards | Jan 8, 2008 12:42 am | |
| Blohm, Henning | Jan 8, 2008 12:49 am | |
| Mike Edwards | Jan 8, 2008 12:50 am | |
| Mike Edwards | Jan 8, 2008 1:32 am | |
| Mike Edwards | Jan 8, 2008 2:22 am | |
| Peshev, Peter | Jan 8, 2008 3:57 am | |
| Mike Edwards | Jan 8, 2008 4:46 am | |
| Simon Nash | Jan 8, 2008 5:51 am | |
| Simon Nash | Jan 8, 2008 5:51 am | |
| Reza Shafii | Jan 8, 2008 8:11 am | |
| David Booz | Jan 8, 2008 8:31 am | |
| Peshev, Peter | Jan 8, 2008 9:36 am | |
| David Booz | Jan 8, 2008 12:46 pm | |
| Reza Shafii | Jan 8, 2008 1:31 pm | |
| Mike Edwards | Jan 9, 2008 2:45 am | |
| Simon Nash | Jan 9, 2008 4:18 am | |
| Mike Edwards | Jan 9, 2008 5:07 am | |
| Mike Edwards | Jan 9, 2008 6:13 am | |
| Michael Rowley | Jan 10, 2008 1:19 pm | .xls |
| Simon Nash | Jan 15, 2008 2:31 pm | .xls, .xls |
| Simon Nash | Jan 30, 2008 7:58 am | .xls, .xls |
| Mike Edwards | Jan 30, 2008 8:22 am | .xls, .xls |
| Subject: | RE: [sca-j] ISSUE 4 - Dependency reinjection | |
|---|---|---|
| From: | Mike Edwards (mike...@uk.ibm.com) | |
| Date: | Jan 8, 2008 12:50:58 am | |
| List: | org.oasis-open.lists.sca-j | |
Folks,
Regarding the relationship between reinjection and the value returned from getServiceReference():
- I think that getServiceReference() should always return a reference that reflects the current state of the wiring for the component. This should not be influenced by whether reinjection is enabled or not.
- If reinjection is not allowed, then why is the component using getServiceReference() ?? The component should already have a copy of the reference to use - the act of calling getServiceReference() to me looks like a desire to get a new copy of the reference - why bother unless you expect it to have changed ??
For me reinjection is one way of getting a new service reference - calling getServiceReference() is simply an alternate means to achieve the same thing.
My viewpoint is based on the simple idea that the original reference (originally injected or originally obtained from getServiceReference() ) will always be available for the component to use - the component may get an exception thrown if, for example, the target service ain't there any more, but the component will still be free to use the reference and to invoke operations on it. The implication is that IF a wiring change has occurred, this may not affect the component instances already running - only new instances created after the change get affected. 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
"Reza Shafii" <rsha...@bea.com> wrote on 07/01/2008 21:07:32:
Another option would be to use Mike's idea of a "reinject" parameter on @Reference to also derive the behavior of the getServiceReference() method. If reinject="true" reinjection should occur and subsequent invocations of getServiceReference() would lead to an object referencing the new target. If reinject="false", reinjection should not occur and subsequent invocations of getServiceReference() would lead to the target prior to rewiring.
I am also thinking that the reinject=true value would only be valid if the conditions previously discussed apply (i.e. scope is composite, conversational interfaces must not be active, and the reference is field based or setter based). This would change the table as attached.
Cheers,
Reza
------------------------------------------------------------------------------
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






.xls