sca-j message
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]
Subject: Re: [sca-j] ISSUE-131: @Callback injection could be NULL
- From: David Booz <booz@us.ibm.com>
- To: sca-j@lists.oasis-open.org
- Date: Tue, 10 Feb 2009 10:59:12 -0500
:-) of course
Dave Booz
STSM, BPM and SCA Architecture
Co-Chair OASIS SCA-Policy TC and SCA-J TC
"Distributed objects first, then world hunger"
Poughkeepsie, NY (845)-435-6093 or 8-295-6093
e-mail:booz@us.ibm.com
C Vamsi ---02/10/2009 10:48:17 AM---In the example, should that be "if (callback != null)" instead of "if (callback)" ?

From: | 
C Vamsi <vamsic007@in.ibm.com> |

To: | 
David Booz/Poughkeepsie/IBM@IBMUS |

Cc: | 
sca-j@lists.oasis-open.org |

Date: | 
02/10/2009 10:48 AM |

Subject: | 
Re: [sca-j] ISSUE-131: @Callback injection could be NULL |
In the example, should that be
"if (callback != null)" instead of "if (callback)" ?
++Vamsi
Apache Tuscany Committer http://tuscany.apache.org
Apache Geronimo Committer and Member of PMC http://geronimo.apache.org
David Booz
<booz@us.ibm.com>
To
10/02/2009 20:56 sca-j@lists.oasis-open.org
cc
Subject
[sca-j] ISSUE-131: @Callback
injection could be NULL
http://www.osoa.org/jira/browse/JAVA-131
Dave Booz
STSM, BPM and SCA Architecture
Co-Chair OASIS SCA-Policy TC and SCA-J TC
"Distributed objects first, then world hunger"
Poughkeepsie, NY (845)-435-6093 or 8-295-6093
e-mail:booz@us.ibm.com
(Embedded image moved to file: pic14186.jpg)David Booz---02/10/2009
10:09:27 AM---TARGET: Java CAA, section 6.2.4 "Accessing Callbacks" [1]
DESCRIPTION: There are situations where th
(Embedde (Embedded image moved to file: pic11093.jpg)
d image David Booz/Poughkeepsie/IBM
moved to
file:
pic31569
.jpg)
From:
(Embedde (Embedded image moved to file: pic07950.jpg)
d image sca-j@lists.oasis-open.org
moved to
file:
pic22101
.jpg)
To:
(Embedde (Embedded image moved to file: pic08519.jpg)
d image 02/10/2009 10:09 AM
moved to
file:
pic26429
.jpg)
Date:
(Embedde (Embedded image moved to file: pic06057.jpg)
d image NEW ISSUE: @Callback injection could be NULL
moved to
file:
pic15253
.jpg)
Subject:
TARGET: Java CAA, section 6.2.4 "Accessing Callbacks" [1]
DESCRIPTION: There are situations where the field or setter with an
@callback annotation (when used to obtain a reference to a callaback
instance) can be injected with NULL. As noted in section 8.2
RequestContext, the getCallback() method might return NULL in certain
situations, and those situations might also occur in combination with the
use of @callback. For example, suppose a component implements two
services, one has a bidirectional interface and the other does not. The
component impl could use @callback to get a callback instance. When
invoked over the bidirectional service, the @callback will non-null, but
will be null when the non-bidirectional service is invoked. AFAIK, the
specs don't prohibit the example (nor do I think they should).
PROPOSAL:
There is no pdf for [1] so bear with me:
In section 6.2.4, at the end of the first paragraph (line 395) add the
following:
A field or setter method annotated with @callback might be injected or set
to NULL if the implementation is invoked through a non-bidirectional
service or when invoked as a callback. The component implementation should
always check for null before using a callback reference (See also the
getCallbackReference() method in section 8.2 "RequestContext").
In section 6.2.4, the first example (line 400) replace the example with the
following:
@Callback
protected ServiceReference<MyCallback> callback;
public void someMethod() {
if (callback) {
MyCallback myCallback = callback.getCallback(); …
myCallback.receiveResult(theResult);
}
}
[1]
http://www.oasis-open.org/committees/download.php/31121/sca-javacaa-1.1-spec-cd02-rev2.doc
Dave Booz
STSM, BPM and SCA Architecture
Co-Chair OASIS SCA-Policy TC and SCA-J TC
"Distributed objects first, then world hunger"
Poughkeepsie, NY (845)-435-6093 or 8-295-6093
e-mail:booz@us.ibm.com
(See attached file: pic14186.jpg)(See attached file: pic31569.jpg)(See attached file: pic11093.jpg)(See attached file: pic22101.jpg)(See attached file: pic07950.jpg)(See attached file: pic26429.jpg)(See attached file: pic08519.jpg)(See attached file: pic15253.jpg)(See attached file: pic06057.jpg)
pic14186.jpg
pic31569.jpg
pic11093.jpg
pic22101.jpg
pic07950.jpg
pic26429.jpg
pic08519.jpg
pic15253.jpg
pic06057.jpg
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]