[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [sca-j] [NEW ISSUE] Missing Normative statement relating togetServiceReference() method - [JAVA-158]
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
"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] |
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
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]