[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [sca-j] [JAVA-161]: @Service attributes "value" and "interfaces" should be combined
Hi Simon, I have raised this as new issue as JAVA-161. See: http://www.osoa.org/jira/browse/JAVA-161 Thanks, Mark Mark Combellack| Software Developer| Avaya | > -----Original Message----- > From: Simon Nash [mailto:oasis@cjnash.com] > Sent: 08 May 2009 14:22 > To: OASIS Java > Subject: [sca-j] NEW ISSUE: @Service attributes "value" and "interfaces" > should be combined > > TARGET: Java Common Annotations and APIs > > DESCRIPTION: @Service attributes "value" and "interfaces" should be > combined > > The @Service annotation allows a single service interface > (Java interface or Java class) to be specified using the "value" > attribute, and multiple service interfaces to be specified > using the "interfaces" attribute. > > There is no need for these attributes to be separate, because the > Java annotations syntax permits a single value to be specified > for an array-valued attribute, in which case an array containing > one element is implied. Other SCA Java annotations such as > @Requires and @PolicySets exploit this capability. > > By merging the "value" and "interfaces" attribute, the syntax of > @Service can be made simpler to use and easier to describe, with no > loss of capability or convenience. > > PROPOSAL: > > The following line numbers are taken from Java CAA CD03. > > Replace lines 2187-2193 by: > > public @interface Service { > > Class<?>[] value() default { Void.class }; > String name() default ""; > String[] names() default {}; > } > > Replace lines 2202-2217 by: > > The @Service annotation has the following attributes: > • value (1..1) – An array of interface or class objects that are > exposed as services by this implementation. The array MUST contain > at least one element. [JCA90053] > • name (0..1) - A string which is used as the service name. If the > name attribute is specified on the @Service annotation, the value > attribute MUST contain an array of exactly one element. [JCA90048] > • names (0..1) - Contains an array of Strings which are used as the > service names for each of the interfaces declared in the values > array. > If the names attribute is specified for a @Service annotation, the > name attribute MUST NOT be specified. [JCA90049] The number of > Strings > in the names attributes array of the @Service annotation MUST match > the number of elements in the values attribute array. [JCA90050] > > Replace lines 2222-2225 by: > > The service names of the defined services default to the names of the > interfaces or class, without the package name. If the names parameter is > specified, the service name for each interface in the values attribute > array is the String declared in the corresponding position in the names > attribute array. > > > > --------------------------------------------------------------------- > 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]