sca-j message
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]
Subject: Re: [sca-j] NEW ISSUE: Incorrect example in Java Component ImplementationSpec v1.00 - Sec 1.2.4
- From: Simon Nash <NASH@uk.ibm.com>
- To: sca-j@lists.oasis-open.org
- Date: Thu, 8 May 2008 11:57:41 +0100
Vamsi,
The section number given in the chat
log minutes from last week's call was incorrect. The correct section
is Section 8.12 of the Java Common Annotations and APIs spec. This
says the following:
1172 The
@Property annotation may be used on protected or public fields and on setter
methods or on
1173 a
constructor method.
1174 Properties
may also be injected via public setter methods even when the @Property
annotation is
1175 not
present. However, the @Property annotation must be used in order to inject
a property onto a
1176 non-public
field. In the case where there is no @Property annotation, the name of
the property is
1177 the
same as the name of the field or setter.
The above text says nothing about this
only applying if no annotations are present. So this example should
be fine as long as either the implementation's componentType or the SCDL
component configuration specifies a property called someProperty.
When looking at the example code, I
noticed a different problem. The constructor should be Impl4 not
Impl2.
Simon
Simon C. Nash, IBM Distinguished Engineer
Member of the IBM Academy of Technology
Tel. +44-1962-815156 Fax +44-1962-818999
C Vamsi <vamsic007@in.ibm.com>
28/04/2008 20:17
|
To
| sca-j@lists.oasis-open.org
|
cc
|
|
Subject
| [sca-j] NEW ISSUE: Incorrect example
in Java Component Implementation Spec v1.00 - Sec 1.2.4 |
|
DESCRIPTION:
Java Component Implementation Specification v1.00 - Sec 1.2.4 - Lines 296
to 302:
296 /** Additional property set through a method */
297 public class Impl4 {
298 public String someProperty;
299 public SomeService someReference;
300 public Impl2(String a, SomeService b) {...}
301 @Property public void setAnotherProperty(int x) {...}
302 }
In this example, the presence of @Property annotation on
setAnotherProperty() results in someProperty and someReference not make
into the componentType as property and reference respectively. Only
after
removing the @Property annotation, the implementation becomes unannotated
and someProperty & anotherProperty will be computed as properties;
someReference will be computed as a reference as per section 1.2.7.
PROPOSAL: Remove @Property from line 301 so that the line reads "public
void setAnotherProperty(int x) {...}"
See http://lists.oasis-open.org/archives/sca-j/200804/msg00050.html
++Vamsi
---------------------------------------------------------------------
To unsubscribe from this mail list, you must leave the OASIS TC that
generates this mail. You may a link to this group and all your TCs
in OASIS
at:
https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php
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]