sca-j message
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]
Subject: [sca-j] [NEW ISSUE] Java Common Annotations and APIs has conflictingstatements about unannotated reference/property against Java ComponentImplementation Specification
- From: Raymond Feng <rfeng@us.ibm.com>
- To: sca-j@lists.oasis-open.org
- Date: Thu, 18 Oct 2007 11:00:00 -0500
TARGET: [1] Java Common Annotations and APIs, [2]
Java Component Implementation Specification
DESCRIPTION :
In spec [1]:
1349 Properties may also be injected via public
setter methods even when the @Property annotation is
not
1350 present. However, the @Property annotation must
be used in order to inject a property onto a non-public
1351 field.
1407 References may also be injected via public
setter methods even when the @Reference annotation
is not
1408 present. However, the @Reference annotation must
be used in order to inject a reference onto a non-
1409 public field.
In spec [2]:
358 1.2.7. Semantics of an Unannotated Implementation
359 The section defines the rules for determining properties
and references for a Java component
360 implementation that does not explicitly declare them
using @Reference or @Property.
361 In the absence of @Property and @Reference annotations,
the properties and references of a class are
362 defined according to the following rules:
363 1. Public setter methods that are not included in
any interface specified by an @Service annotation.
364 2. Protected setter
methods
365 3. Public or protected
fields unless there is a public or protected setter
method for the same name
As a result, it's NOT consistent on how to deal with the
protected setter methods and protected fields without annotations.
PROPOSAL: Change the text in [1]
to be consistent with [2]. We have two options here:
a) Only allows unannotated public setter
methods and public fields to be treated as SCA references/properties
b) Relax the statements in [1] to allow
protected setter methods and protected fields
Thanks,
Raymond
S/MIME Cryptographic Signature
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]