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: NEW ISSUE: Injection on private fields - or not

TARGET: Java Common Annotations an APIs (working draft - 28 Feb 2008:
sca-javacaa-draft-20080228.doc ).

DESCRIPTION: The spec is widely inconsistent in its approach to injection
on private fields.  The first question that needs to be answered is whether
or not injection on private fields is allowed, disallowed, or requried to
be supported.  There was discussion of this during the formation of the
OSOA V1.0 spec, where I believe the resolution was to disallow injection on
private fields.  Despite that, the spec text was never sufficiently
addressed.  As a result, I think the Java TC needs to first re-debate this
issue (as there may be other interpretations around due to lack of clarity
in the spec), and then clean up the text accordingly.

As evidence of the chaos, see the following non-exhaustive list:

line 349: If a protected or public field or setter method is annotated with
@ConversationID, then the conversation ID for the conversation is injected
onto the field  The type of the field is not necessarily String.  System
generated conversation IDs are always strings, but application generated
conversation IDs may be other complex types.

with an example on line 1572:

   private String ConversationID;

(b) @property (line 1174)
   Properties may also be injected via public setter methods even when the
   @Property annotation is not present.  However, the @Property annotation
   must be used in order to inject a property onto a non-public field.  In
   the case where there is no @Property annotation, the name of the
   property is the same as the name of the field or setter.

(c) @reference has similar text.

(d) And then in the @componentName and @context section there are also
private fields being annotated, and neither section addresses
private/public.  These are also both injection sites.

PROPOSAL: This is not a formal proposal, but is intended to smoke out any
staunch opposition.
(a) Injection on private fields is disallowed.
(b) Cleanup the spec text - this is editorial work IMO.

Dave Booz
STSM, SCA and WebSphere Architecture
Co-Chair OASIS SCA-Policy TC
"Distributed objects first, then world hunger"
Poughkeepsie, NY (845)-435-6093  or  8-295-6093

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