OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

sca-j message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [sca-j] [NEW ISSUE] Missing Normative statement relating to getServiceReference()method - [JAVA-158]


Anish Karmarkar wrote:
> Simon Nash wrote:
>> Anish Karmarkar wrote:
>>> +1
>>>
>>> I do have a clarification Q:
>>> The spec says -- "This method MUST throw an IllegalArgumentException 
>>> if the reference has multiplicity greater than one."
>>> I had assumed that this means "multiplicity" as defined in Assembly 
>>> and not how many services the reference is wired to, for that 
>>> particular component. I.e., if the multiplicity is 0..N, regardless 
>>> of how many services the reference is wired to, this method would 
>>> throw an IllegalArgumentException. IOW, which method to use 
>>> (getServiceReference() or getServiceReferences()) depends on the 
>>> ComponentType and not on the component. I hope my 
>>> assumption/interpretation is correct.
>>>
>>> I ask because you used "0..x" rather than 0..1.
>>>
>> I agree that it depends on the componentType multiplicity.
>>
>> If this multiplicity is 0..1, NULL could be a non-error return
>> value if the reference is unwired.
>>
>> If this multiplicity is 0..n, NULL could not be a non-error
>> return value.  An unwired 0..n reference would result in an
>> empty array being returned (see JCA90023).
>>
> 
> Yes, but that will be for the method getServiceReferences() and not 
> getServiceReference().
> 
You're right, I was confused about which method (apologies).
We are in agreement.  To correct my earlier statement:

If the componentType multiplicity is 0..1, NULL could be a non-error
return value from getServiceReference() if the reference is unwired.

If the componentType multiplicity is 0..n, NULL could not be a non-error
return value from getServiceReference().  An unwired 0..n reference would
result in an IllegalArgumentException being thrown.

   Simon

> -Anish
> -- 
> 
>> I agree with Dave that this call should not return NULL in
>> error cases.
>>
>>   Simon
>>
>>> Thanks.
>>>
>>> -Anish
>>> -- 
>>>
>>>
>>> David Booz wrote:
>>>> I know we haven't accepted the issue yet, but I want to comment on 
>>>> the proposal anyway.
>>>>
>>>> I think the error condition described by JCA80006 should also throw 
>>>> IllegalArgumentException (or some other exception) instead of 
>>>> returning null. Null could be a valid (non-error) return value if 
>>>> the multiplicity is 0..x and the reference is unwired. It's 
>>>> important for the component developer to be able to distinguish 
>>>> between unexpected errors and expected behavior.
>>>>
>>>> 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
>>>>
>>>> Inactive hide details for "Mark Combellack" ---04/30/2009 06:40:59 
>>>> AM---Hi,"Mark Combellack" ---04/30/2009 06:40:59 AM---Hi,
>>>>
>>>>
>>>> From:   "Mark Combellack" <mcombellack@avaya.com>
>>>>
>>>> To:   "Mike Edwards" <mike_edwards@uk.ibm.com>, "OASIS Java" 
>>>> <sca-j@lists.oasis-open.org>
>>>>
>>>> Date:   04/30/2009 06:40 AM
>>>>
>>>> Subject:   RE: [sca-j] [NEW ISSUE] Missing Normative statement 
>>>> relating to getServiceReference() method - [JAVA-158]
>>>>
>>>> ------------------------------------------------------------------------ 
>>>>
>>>>
>>>>
>>>>
>>>> Hi,
>>>>
>>>> I have raised this new issue as JAVA-158. See:
>>>>
>>>>             _http://www.osoa.org/jira/browse/JAVA-158_
>>>> Thanks,
>>>>
>>>> Mark
>>>> Mark Combellack| Software Developer| Avaya | Eastern Business Park | 
>>>> St. Mellons | Cardiff | CF3 5EA | Voice: +44 (0) 29 2081 7624 | 
>>>> _mcombellack@avaya.com_ <mailto:%7Cmcombellack@avaya.com>
>>>> ------------------------------------------------------------------------ 
>>>>
>>>> *From:* Mike Edwards [mailto:mike_edwards@uk.ibm.com] *
>>>> Sent:* 30 April 2009 08:48*
>>>> To:* OASIS Java*
>>>> Subject:* [sca-j] [NEW ISSUE] Missing Normative statement relating 
>>>> to getServiceReference() method
>>>>
>>>>
>>>> Raiser: Mike Edwards
>>>>
>>>> Target: sca-javacaa-1.1-spec-cd02-rev7.doc
>>>>
>>>> Description:
>>>>
>>>> The paragraph describing the getServiceReference() method in section 
>>>> 9.1 contains normative material that
>>>> is not tagged as a normative statement:
>>>>
>>>> Lines 1320-1322:
>>>>
>>>> */getServiceReference(Class<B> businessInterface, String 
>>>> referenceName) /*
>>>>
>>>> – Returns a ServiceReference defined by the current component. This 
>>>> method MUST throw an IllegalArgumentException if the reference has 
>>>> multiplicity greater than one.
>>>>
>>>> I also note that the description for this method does not describe 
>>>> other error cases that should be covered.
>>>>
>>>>
>>>> Proposal:
>>>>
>>>> Create a new normative statements, appropriately tagged, as follows:
>>>>
>>>> */getServiceReference(Class<B> businessInterface, String 
>>>> referenceName) /*
>>>>
>>>> – Returns a ServiceReference defined by the current component.
>>>>
>>>> */businessInterface /*- the interface class of the reference
>>>>
>>>> */referenceName /*- the name of the reference
>>>>
>>>> The getServiceReference method MUST throw an 
>>>> IllegalArgumentException if the reference named by the referenceName 
>>>> parameter has multiplicity greater than one. [JCA80004]
>>>>
>>>> The getServiceReference method MUST throw an 
>>>> IllegalArgumentException if the reference named by the referenceName 
>>>> parameter does not have an interface of the type defined by the 
>>>> businessInterface parameter. [JCA80005]
>>>>
>>>> The getServiceReference method MUST return null if the component 
>>>> does not have a reference with the name provided in the 
>>>> referenceName parameter. [JCA80006]
>>>>
>>>>
>>>>
>>>> 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_edwards@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/
>>>>
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this mail list, you must leave the OASIS TC that
>>> generates this mail.  Follow this link to all your TCs in OASIS at:
>>> https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php
>>>
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this mail list, you must leave the OASIS TC that
>> generates this mail.  Follow this link to all your TCs in OASIS at:
>> https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php
> 
> 




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]